Initial revision
[TestXSLT.git] / libexpat / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52 for expat 1.95.6.
4 #
5 # Report bugs to <expat-bugs@mail.libexpat.org>.
6 #
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Find the correct PATH separator.  Usually this is `:', but
13 # DJGPP uses `;' like DOS.
14 if test "X${PATH_SEPARATOR+set}" != Xset; then
15   UNAME=${UNAME-`uname 2>/dev/null`}
16   case X$UNAME in
17     *-DOS) lt_cv_sys_path_separator=';' ;;
18     *)     lt_cv_sys_path_separator=':' ;;
19   esac
20   PATH_SEPARATOR=$lt_cv_sys_path_separator
21 fi
22
23 # Check that we are running under the correct shell.
24 SHELL=${CONFIG_SHELL-/bin/sh}
25
26 case X$ECHO in
27 X*--fallback-echo)
28   # Remove one level of quotation (which was required for Make).
29   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
30   ;;
31 esac
32
33 echo=${ECHO-echo}
34 if test "X$1" = X--no-reexec; then
35   # Discard the --no-reexec flag, and continue.
36   shift
37 elif test "X$1" = X--fallback-echo; then
38   # Avoid inline document here, it may be left over
39   :
40 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
41   # Yippee, $echo works!
42   :
43 else
44   # Restart under the correct shell.
45   exec $SHELL "$0" --no-reexec ${1+"$@"}
46 fi
47
48 if test "X$1" = X--fallback-echo; then
49   # used as fallback echo
50   shift
51   cat <<EOF
52
53 EOF
54   exit 0
55 fi
56
57 # The HP-UX ksh and POSIX shell print the target directory to stdout
58 # if CDPATH is set.
59 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
60
61 if test -z "$ECHO"; then
62 if test "X${echo_test_string+set}" != Xset; then
63 # find a string as large as possible, as long as the shell can cope with it
64   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
65     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
66     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
67        echo_test_string="`eval $cmd`" &&
68        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
69     then
70       break
71     fi
72   done
73 fi
74
75 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
76    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
77    test "X$echo_testing_string" = "X$echo_test_string"; then
78   :
79 else
80   # The Solaris, AIX, and Digital Unix default echo programs unquote
81   # backslashes.  This makes it impossible to quote backslashes using
82   #   echo "$something" | sed 's/\\/\\\\/g'
83   #
84   # So, first we look for a working echo in the user's PATH.
85
86   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
87   for dir in $PATH /usr/ucb; do
88     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
89        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
90        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
91        test "X$echo_testing_string" = "X$echo_test_string"; then
92       echo="$dir/echo"
93       break
94     fi
95   done
96   IFS="$save_ifs"
97
98   if test "X$echo" = Xecho; then
99     # We didn't find a better echo, so look for alternatives.
100     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
101        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
102        test "X$echo_testing_string" = "X$echo_test_string"; then
103       # This shell has a builtin print -r that does the trick.
104       echo='print -r'
105     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
106          test "X$CONFIG_SHELL" != X/bin/ksh; then
107       # If we have ksh, try running configure again with it.
108       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
109       export ORIGINAL_CONFIG_SHELL
110       CONFIG_SHELL=/bin/ksh
111       export CONFIG_SHELL
112       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
113     else
114       # Try using printf.
115       echo='printf %s\n'
116       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
117          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
118          test "X$echo_testing_string" = "X$echo_test_string"; then
119         # Cool, printf works
120         :
121       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
122            test "X$echo_testing_string" = 'X\t' &&
123            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
124            test "X$echo_testing_string" = "X$echo_test_string"; then
125         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
126         export CONFIG_SHELL
127         SHELL="$CONFIG_SHELL"
128         export SHELL
129         echo="$CONFIG_SHELL $0 --fallback-echo"
130       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
131            test "X$echo_testing_string" = 'X\t' &&
132            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
133            test "X$echo_testing_string" = "X$echo_test_string"; then
134         echo="$CONFIG_SHELL $0 --fallback-echo"
135       else
136         # maybe with a smaller string...
137         prev=:
138
139         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
140           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
141           then
142             break
143           fi
144           prev="$cmd"
145         done
146
147         if test "$prev" != 'sed 50q "$0"'; then
148           echo_test_string=`eval $prev`
149           export echo_test_string
150           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
151         else
152           # Oops.  We lost completely, so just stick with echo.
153           echo=echo
154         fi
155       fi
156     fi
157   fi
158 fi
159 fi
160
161 # Copy echo and quote the copy suitably for passing to libtool from
162 # the Makefile, instead of quoting the original, which is used later.
163 ECHO=$echo
164 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
165    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
166 fi
167
168 # Avoid depending upon Character Ranges.
169 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
170 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
171 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
172 as_cr_digits='0123456789'
173 as_cr_alnum=$as_cr_Letters$as_cr_digits
174
175 # Sed expression to map a string onto a valid variable name.
176 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
177
178 # Sed expression to map a string onto a valid CPP name.
179 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
180
181 # Be Bourne compatible
182 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
183   emulate sh
184   NULLCMD=:
185 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
186   set -o posix
187 fi
188
189 # Name of the executable.
190 as_me=`echo "$0" |sed 's,.*[\\/],,'`
191
192 if expr a : '\(a\)' >/dev/null 2>&1; then
193   as_expr=expr
194 else
195   as_expr=false
196 fi
197
198 rm -f conf$$ conf$$.exe conf$$.file
199 echo >conf$$.file
200 if ln -s conf$$.file conf$$ 2>/dev/null; then
201   # We could just check for DJGPP; but this test a) works b) is more generic
202   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
203   if test -f conf$$.exe; then
204     # Don't use ln at all; we don't have any links
205     as_ln_s='cp -p'
206   else
207     as_ln_s='ln -s'
208   fi
209 elif ln conf$$.file conf$$ 2>/dev/null; then
210   as_ln_s=ln
211 else
212   as_ln_s='cp -p'
213 fi
214 rm -f conf$$ conf$$.exe conf$$.file
215
216 as_executable_p="test -f"
217
218 # Support unset when possible.
219 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
220   as_unset=unset
221 else
222   as_unset=false
223 fi
224
225 # NLS nuisances.
226 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
227 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
228 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
229 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
230 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
231 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
232 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
233 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
234
235 # IFS
236 # We need space, tab and new line, in precisely that order.
237 as_nl='
238 '
239 IFS="   $as_nl"
240
241 # CDPATH.
242 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
243
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249 exec 6>&1
250
251 #
252 # Initializations.
253 #
254 ac_default_prefix=/usr/local
255 cross_compiling=no
256 subdirs=
257 MFLAGS= MAKEFLAGS=
258 SHELL=${CONFIG_SHELL-/bin/sh}
259
260 # Maximum number of lines to put in a shell here document.
261 # This variable seems obsolete.  It should probably be removed, and
262 # only ac_max_sed_lines should be used.
263 : ${ac_max_here_lines=38}
264
265 ac_unique_file="Makefile.in"
266 # Factoring default headers for most tests.
267 ac_includes_default="\
268 #include <stdio.h>
269 #if HAVE_SYS_TYPES_H
270 # include <sys/types.h>
271 #endif
272 #if HAVE_SYS_STAT_H
273 # include <sys/stat.h>
274 #endif
275 #if STDC_HEADERS
276 # include <stdlib.h>
277 # include <stddef.h>
278 #else
279 # if HAVE_STDLIB_H
280 #  include <stdlib.h>
281 # endif
282 #endif
283 #if HAVE_STRING_H
284 # if !STDC_HEADERS && HAVE_MEMORY_H
285 #  include <memory.h>
286 # endif
287 # include <string.h>
288 #endif
289 #if HAVE_STRINGS_H
290 # include <strings.h>
291 #endif
292 #if HAVE_INTTYPES_H
293 # include <inttypes.h>
294 #else
295 # if HAVE_STDINT_H
296 #  include <stdint.h>
297 # endif
298 #endif
299 #if HAVE_UNISTD_H
300 # include <unistd.h>
301 #endif"
302
303 # Initialize some variables set by options.
304 ac_init_help=
305 ac_init_version=false
306 # The variables have the same names as the options, with
307 # dashes changed to underlines.
308 cache_file=/dev/null
309 exec_prefix=NONE
310 no_create=
311 no_recursion=
312 prefix=NONE
313 program_prefix=NONE
314 program_suffix=NONE
315 program_transform_name=s,x,x,
316 silent=
317 site=
318 srcdir=
319 verbose=
320 x_includes=NONE
321 x_libraries=NONE
322
323 # Installation directory options.
324 # These are left unexpanded so users can "make install exec_prefix=/foo"
325 # and all the variables that are supposed to be based on exec_prefix
326 # by default will actually change.
327 # Use braces instead of parens because sh, perl, etc. also accept them.
328 bindir='${exec_prefix}/bin'
329 sbindir='${exec_prefix}/sbin'
330 libexecdir='${exec_prefix}/libexec'
331 datadir='${prefix}/share'
332 sysconfdir='${prefix}/etc'
333 sharedstatedir='${prefix}/com'
334 localstatedir='${prefix}/var'
335 libdir='${exec_prefix}/lib'
336 includedir='${prefix}/include'
337 oldincludedir='/usr/include'
338 infodir='${prefix}/info'
339 mandir='${prefix}/man'
340
341 # Identity of this package.
342 PACKAGE_NAME='expat'
343 PACKAGE_TARNAME='expat'
344 PACKAGE_VERSION='1.95.6'
345 PACKAGE_STRING='expat 1.95.6'
346 PACKAGE_BUGREPORT='expat-bugs@mail.libexpat.org'
347
348 ac_prev=
349 for ac_option
350 do
351   # If the previous option needs an argument, assign it.
352   if test -n "$ac_prev"; then
353     eval "$ac_prev=\$ac_option"
354     ac_prev=
355     continue
356   fi
357
358   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
359
360   # Accept the important Cygnus configure options, so we can diagnose typos.
361
362   case $ac_option in
363
364   -bindir | --bindir | --bindi | --bind | --bin | --bi)
365     ac_prev=bindir ;;
366   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
367     bindir=$ac_optarg ;;
368
369   -build | --build | --buil | --bui | --bu)
370     ac_prev=build_alias ;;
371   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
372     build_alias=$ac_optarg ;;
373
374   -cache-file | --cache-file | --cache-fil | --cache-fi \
375   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
376     ac_prev=cache_file ;;
377   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
378   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
379     cache_file=$ac_optarg ;;
380
381   --config-cache | -C)
382     cache_file=config.cache ;;
383
384   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
385     ac_prev=datadir ;;
386   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
387   | --da=*)
388     datadir=$ac_optarg ;;
389
390   -disable-* | --disable-*)
391     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
392     # Reject names that are not valid shell variable names.
393     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395    { (exit 1); exit 1; }; }
396     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397     eval "enable_$ac_feature=no" ;;
398
399   -enable-* | --enable-*)
400     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
401     # Reject names that are not valid shell variable names.
402     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
403       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
404    { (exit 1); exit 1; }; }
405     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
406     case $ac_option in
407       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
408       *) ac_optarg=yes ;;
409     esac
410     eval "enable_$ac_feature='$ac_optarg'" ;;
411
412   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
413   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
414   | --exec | --exe | --ex)
415     ac_prev=exec_prefix ;;
416   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
417   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
418   | --exec=* | --exe=* | --ex=*)
419     exec_prefix=$ac_optarg ;;
420
421   -gas | --gas | --ga | --g)
422     # Obsolete; use --with-gas.
423     with_gas=yes ;;
424
425   -help | --help | --hel | --he | -h)
426     ac_init_help=long ;;
427   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
428     ac_init_help=recursive ;;
429   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
430     ac_init_help=short ;;
431
432   -host | --host | --hos | --ho)
433     ac_prev=host_alias ;;
434   -host=* | --host=* | --hos=* | --ho=*)
435     host_alias=$ac_optarg ;;
436
437   -includedir | --includedir | --includedi | --included | --include \
438   | --includ | --inclu | --incl | --inc)
439     ac_prev=includedir ;;
440   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
441   | --includ=* | --inclu=* | --incl=* | --inc=*)
442     includedir=$ac_optarg ;;
443
444   -infodir | --infodir | --infodi | --infod | --info | --inf)
445     ac_prev=infodir ;;
446   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
447     infodir=$ac_optarg ;;
448
449   -libdir | --libdir | --libdi | --libd)
450     ac_prev=libdir ;;
451   -libdir=* | --libdir=* | --libdi=* | --libd=*)
452     libdir=$ac_optarg ;;
453
454   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
455   | --libexe | --libex | --libe)
456     ac_prev=libexecdir ;;
457   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
458   | --libexe=* | --libex=* | --libe=*)
459     libexecdir=$ac_optarg ;;
460
461   -localstatedir | --localstatedir | --localstatedi | --localstated \
462   | --localstate | --localstat | --localsta | --localst \
463   | --locals | --local | --loca | --loc | --lo)
464     ac_prev=localstatedir ;;
465   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
466   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
467   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
468     localstatedir=$ac_optarg ;;
469
470   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
471     ac_prev=mandir ;;
472   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
473     mandir=$ac_optarg ;;
474
475   -nfp | --nfp | --nf)
476     # Obsolete; use --without-fp.
477     with_fp=no ;;
478
479   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
480   | --no-cr | --no-c)
481     no_create=yes ;;
482
483   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
485     no_recursion=yes ;;
486
487   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
488   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
489   | --oldin | --oldi | --old | --ol | --o)
490     ac_prev=oldincludedir ;;
491   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
492   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
493   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
494     oldincludedir=$ac_optarg ;;
495
496   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
497     ac_prev=prefix ;;
498   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
499     prefix=$ac_optarg ;;
500
501   -program-prefix | --program-prefix | --program-prefi | --program-pref \
502   | --program-pre | --program-pr | --program-p)
503     ac_prev=program_prefix ;;
504   -program-prefix=* | --program-prefix=* | --program-prefi=* \
505   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
506     program_prefix=$ac_optarg ;;
507
508   -program-suffix | --program-suffix | --program-suffi | --program-suff \
509   | --program-suf | --program-su | --program-s)
510     ac_prev=program_suffix ;;
511   -program-suffix=* | --program-suffix=* | --program-suffi=* \
512   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
513     program_suffix=$ac_optarg ;;
514
515   -program-transform-name | --program-transform-name \
516   | --program-transform-nam | --program-transform-na \
517   | --program-transform-n | --program-transform- \
518   | --program-transform | --program-transfor \
519   | --program-transfo | --program-transf \
520   | --program-trans | --program-tran \
521   | --progr-tra | --program-tr | --program-t)
522     ac_prev=program_transform_name ;;
523   -program-transform-name=* | --program-transform-name=* \
524   | --program-transform-nam=* | --program-transform-na=* \
525   | --program-transform-n=* | --program-transform-=* \
526   | --program-transform=* | --program-transfor=* \
527   | --program-transfo=* | --program-transf=* \
528   | --program-trans=* | --program-tran=* \
529   | --progr-tra=* | --program-tr=* | --program-t=*)
530     program_transform_name=$ac_optarg ;;
531
532   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
533   | -silent | --silent | --silen | --sile | --sil)
534     silent=yes ;;
535
536   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
537     ac_prev=sbindir ;;
538   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
539   | --sbi=* | --sb=*)
540     sbindir=$ac_optarg ;;
541
542   -sharedstatedir | --sharedstatedir | --sharedstatedi \
543   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
544   | --sharedst | --shareds | --shared | --share | --shar \
545   | --sha | --sh)
546     ac_prev=sharedstatedir ;;
547   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
548   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
549   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
550   | --sha=* | --sh=*)
551     sharedstatedir=$ac_optarg ;;
552
553   -site | --site | --sit)
554     ac_prev=site ;;
555   -site=* | --site=* | --sit=*)
556     site=$ac_optarg ;;
557
558   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
559     ac_prev=srcdir ;;
560   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
561     srcdir=$ac_optarg ;;
562
563   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
564   | --syscon | --sysco | --sysc | --sys | --sy)
565     ac_prev=sysconfdir ;;
566   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
567   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
568     sysconfdir=$ac_optarg ;;
569
570   -target | --target | --targe | --targ | --tar | --ta | --t)
571     ac_prev=target_alias ;;
572   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
573     target_alias=$ac_optarg ;;
574
575   -v | -verbose | --verbose | --verbos | --verbo | --verb)
576     verbose=yes ;;
577
578   -version | --version | --versio | --versi | --vers | -V)
579     ac_init_version=: ;;
580
581   -with-* | --with-*)
582     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
583     # Reject names that are not valid shell variable names.
584     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
585       { echo "$as_me: error: invalid package name: $ac_package" >&2
586    { (exit 1); exit 1; }; }
587     ac_package=`echo $ac_package| sed 's/-/_/g'`
588     case $ac_option in
589       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
590       *) ac_optarg=yes ;;
591     esac
592     eval "with_$ac_package='$ac_optarg'" ;;
593
594   -without-* | --without-*)
595     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
596     # Reject names that are not valid shell variable names.
597     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
598       { echo "$as_me: error: invalid package name: $ac_package" >&2
599    { (exit 1); exit 1; }; }
600     ac_package=`echo $ac_package | sed 's/-/_/g'`
601     eval "with_$ac_package=no" ;;
602
603   --x)
604     # Obsolete; use --with-x.
605     with_x=yes ;;
606
607   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
608   | --x-incl | --x-inc | --x-in | --x-i)
609     ac_prev=x_includes ;;
610   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
611   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
612     x_includes=$ac_optarg ;;
613
614   -x-libraries | --x-libraries | --x-librarie | --x-librari \
615   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
616     ac_prev=x_libraries ;;
617   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
618   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
619     x_libraries=$ac_optarg ;;
620
621   -*) { echo "$as_me: error: unrecognized option: $ac_option
622 Try \`$0 --help' for more information." >&2
623    { (exit 1); exit 1; }; }
624     ;;
625
626   *=*)
627     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
628     # Reject names that are not valid shell variable names.
629     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
630       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
631    { (exit 1); exit 1; }; }
632     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
633     eval "$ac_envvar='$ac_optarg'"
634     export $ac_envvar ;;
635
636   *)
637     # FIXME: should be removed in autoconf 3.0.
638     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
639     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
640       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
641     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
642     ;;
643
644   esac
645 done
646
647 if test -n "$ac_prev"; then
648   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
649   { echo "$as_me: error: missing argument to $ac_option" >&2
650    { (exit 1); exit 1; }; }
651 fi
652
653 # Be sure to have absolute paths.
654 for ac_var in exec_prefix prefix
655 do
656   eval ac_val=$`echo $ac_var`
657   case $ac_val in
658     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
659     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
660    { (exit 1); exit 1; }; };;
661   esac
662 done
663
664 # Be sure to have absolute paths.
665 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
666               localstatedir libdir includedir oldincludedir infodir mandir
667 do
668   eval ac_val=$`echo $ac_var`
669   case $ac_val in
670     [\\/$]* | ?:[\\/]* ) ;;
671     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
672    { (exit 1); exit 1; }; };;
673   esac
674 done
675
676 # There might be people who depend on the old broken behavior: `$host'
677 # used to hold the argument of --host etc.
678 build=$build_alias
679 host=$host_alias
680 target=$target_alias
681
682 # FIXME: should be removed in autoconf 3.0.
683 if test "x$host_alias" != x; then
684   if test "x$build_alias" = x; then
685     cross_compiling=maybe
686     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
687     If a cross compiler is detected then cross compile mode will be used." >&2
688   elif test "x$build_alias" != "x$host_alias"; then
689     cross_compiling=yes
690   fi
691 fi
692
693 ac_tool_prefix=
694 test -n "$host_alias" && ac_tool_prefix=$host_alias-
695
696 test "$silent" = yes && exec 6>/dev/null
697
698 # Find the source files, if location was not specified.
699 if test -z "$srcdir"; then
700   ac_srcdir_defaulted=yes
701   # Try the directory containing this script, then its parent.
702   ac_prog=$0
703   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
704   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
705   srcdir=$ac_confdir
706   if test ! -r $srcdir/$ac_unique_file; then
707     srcdir=..
708   fi
709 else
710   ac_srcdir_defaulted=no
711 fi
712 if test ! -r $srcdir/$ac_unique_file; then
713   if test "$ac_srcdir_defaulted" = yes; then
714     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
715    { (exit 1); exit 1; }; }
716   else
717     { echo "$as_me: error: cannot find sources in $srcdir" >&2
718    { (exit 1); exit 1; }; }
719   fi
720 fi
721 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
722 ac_env_build_alias_set=${build_alias+set}
723 ac_env_build_alias_value=$build_alias
724 ac_cv_env_build_alias_set=${build_alias+set}
725 ac_cv_env_build_alias_value=$build_alias
726 ac_env_host_alias_set=${host_alias+set}
727 ac_env_host_alias_value=$host_alias
728 ac_cv_env_host_alias_set=${host_alias+set}
729 ac_cv_env_host_alias_value=$host_alias
730 ac_env_target_alias_set=${target_alias+set}
731 ac_env_target_alias_value=$target_alias
732 ac_cv_env_target_alias_set=${target_alias+set}
733 ac_cv_env_target_alias_value=$target_alias
734 ac_env_CC_set=${CC+set}
735 ac_env_CC_value=$CC
736 ac_cv_env_CC_set=${CC+set}
737 ac_cv_env_CC_value=$CC
738 ac_env_CFLAGS_set=${CFLAGS+set}
739 ac_env_CFLAGS_value=$CFLAGS
740 ac_cv_env_CFLAGS_set=${CFLAGS+set}
741 ac_cv_env_CFLAGS_value=$CFLAGS
742 ac_env_LDFLAGS_set=${LDFLAGS+set}
743 ac_env_LDFLAGS_value=$LDFLAGS
744 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
745 ac_cv_env_LDFLAGS_value=$LDFLAGS
746 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
747 ac_env_CPPFLAGS_value=$CPPFLAGS
748 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
749 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
750 ac_env_CPP_set=${CPP+set}
751 ac_env_CPP_value=$CPP
752 ac_cv_env_CPP_set=${CPP+set}
753 ac_cv_env_CPP_value=$CPP
754
755 #
756 # Report the --help message.
757 #
758 if test "$ac_init_help" = "long"; then
759   # Omit some internal or obsolete options to make the list less imposing.
760   # This message is too long to be a string in the A/UX 3.1 sh.
761   cat <<EOF
762 \`configure' configures expat 1.95.6 to adapt to many kinds of systems.
763
764 Usage: $0 [OPTION]... [VAR=VALUE]...
765
766 To assign environment variables (e.g., CC, CFLAGS...), specify them as
767 VAR=VALUE.  See below for descriptions of some of the useful variables.
768
769 Defaults for the options are specified in brackets.
770
771 Configuration:
772   -h, --help              display this help and exit
773       --help=short        display options specific to this package
774       --help=recursive    display the short help of all the included packages
775   -V, --version           display version information and exit
776   -q, --quiet, --silent   do not print \`checking...' messages
777       --cache-file=FILE   cache test results in FILE [disabled]
778   -C, --config-cache      alias for \`--cache-file=config.cache'
779   -n, --no-create         do not create output files
780       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
781
782 EOF
783
784   cat <<EOF
785 Installation directories:
786   --prefix=PREFIX         install architecture-independent files in PREFIX
787                           [$ac_default_prefix]
788   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
789                           [PREFIX]
790
791 By default, \`make install' will install all the files in
792 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
793 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
794 for instance \`--prefix=\$HOME'.
795
796 For better control, use the options below.
797
798 Fine tuning of the installation directories:
799   --bindir=DIR           user executables [EPREFIX/bin]
800   --sbindir=DIR          system admin executables [EPREFIX/sbin]
801   --libexecdir=DIR       program executables [EPREFIX/libexec]
802   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
803   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
804   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
805   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
806   --libdir=DIR           object code libraries [EPREFIX/lib]
807   --includedir=DIR       C header files [PREFIX/include]
808   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
809   --infodir=DIR          info documentation [PREFIX/info]
810   --mandir=DIR           man documentation [PREFIX/man]
811 EOF
812
813   cat <<\EOF
814
815 System types:
816   --build=BUILD     configure for building on BUILD [guessed]
817   --host=HOST       build programs to run on HOST [BUILD]
818 EOF
819 fi
820
821 if test -n "$ac_init_help"; then
822   case $ac_init_help in
823      short | recursive ) echo "Configuration of expat 1.95.6:";;
824    esac
825   cat <<\EOF
826
827 Optional Features:
828   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
829   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
830   --enable-shared=PKGS  build shared libraries default=yes
831   --enable-static=PKGS  build static libraries default=yes
832   --enable-fast-install=PKGS  optimize for fast installation default=yes
833   --disable-libtool-lock  avoid locking (might break parallel builds)
834
835 Optional Packages:
836   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
837   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
838   --with-gnu-ld           assume the C compiler uses GNU ld default=no
839   --with-pic              try to use only PIC/non-PIC objects default=use both
840
841 Some influential environment variables:
842   CC          C compiler command
843   CFLAGS      C compiler flags
844   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
845               nonstandard directory <lib dir>
846   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
847               headers in a nonstandard directory <include dir>
848   CPP         C preprocessor
849
850 Use these variables to override the choices made by `configure' or to help
851 it to find libraries and programs with nonstandard names/locations.
852
853 Report bugs to <expat-bugs@mail.libexpat.org>.
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896 expat configure 1.95.6
897 generated by GNU Autoconf 2.52
898
899 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
900 Free Software Foundation, Inc.
901 This configure script is free software; the Free Software Foundation
902 gives unlimited permission to copy, distribute and modify it.
903 EOF
904   exit 0
905 fi
906 exec 5>config.log
907 cat >&5 <<EOF
908 This file contains any messages produced by compilers while
909 running configure, to aid debugging if configure makes a mistake.
910
911 It was created by expat $as_me 1.95.6, which was
912 generated by GNU Autoconf 2.52.  Invocation command line was
913
914   $ $0 $@
915
916 EOF
917 {
918 cat <<_ASUNAME
919 ## ---------- ##
920 ## Platform.  ##
921 ## ---------- ##
922
923 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
924 uname -m = `(uname -m) 2>/dev/null || echo unknown`
925 uname -r = `(uname -r) 2>/dev/null || echo unknown`
926 uname -s = `(uname -s) 2>/dev/null || echo unknown`
927 uname -v = `(uname -v) 2>/dev/null || echo unknown`
928
929 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
930 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
931
932 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
933 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
934 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
935 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
936 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
937 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
938 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
939
940 PATH = $PATH
941
942 _ASUNAME
943 } >&5
944
945 cat >&5 <<EOF
946 ## ------------ ##
947 ## Core tests.  ##
948 ## ------------ ##
949
950 EOF
951
952 # Keep a trace of the command line.
953 # Strip out --no-create and --no-recursion so they do not pile up.
954 # Also quote any args containing shell meta-characters.
955 ac_configure_args=
956 ac_sep=
957 for ac_arg
958 do
959   case $ac_arg in
960   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
961   | --no-cr | --no-c) ;;
962   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
963   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
964   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
965     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
966     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
967     ac_sep=" " ;;
968   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
969      ac_sep=" " ;;
970   esac
971   # Get rid of the leading space.
972 done
973
974 # When interrupted or exit'd, cleanup temporary files, and complete
975 # config.log.  We remove comments because anyway the quotes in there
976 # would cause problems or look ugly.
977 trap 'exit_status=$?
978   # Save into config.log some information that might help in debugging.
979   echo >&5
980   echo "## ----------------- ##" >&5
981   echo "## Cache variables.  ##" >&5
982   echo "## ----------------- ##" >&5
983   echo >&5
984   # The following way of writing the cache mishandles newlines in values,
985 {
986   (set) 2>&1 |
987     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
988     *ac_space=\ *)
989       sed -n \
990         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
991           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
992       ;;
993     *)
994       sed -n \
995         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
996       ;;
997     esac;
998 } >&5
999   sed "/^$/d" confdefs.h >conftest.log
1000   if test -s conftest.log; then
1001     echo >&5
1002     echo "## ------------ ##" >&5
1003     echo "## confdefs.h.  ##" >&5
1004     echo "## ------------ ##" >&5
1005     echo >&5
1006     cat conftest.log >&5
1007   fi
1008   (echo; echo) >&5
1009   test "$ac_signal" != 0 &&
1010     echo "$as_me: caught signal $ac_signal" >&5
1011   echo "$as_me: exit $exit_status" >&5
1012   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1013     exit $exit_status
1014      ' 0
1015 for ac_signal in 1 2 13 15; do
1016   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1017 done
1018 ac_signal=0
1019
1020 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1021 rm -rf conftest* confdefs.h
1022 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1023 echo >confdefs.h
1024
1025 # Let the site file select an alternate cache file if it wants to.
1026 # Prefer explicitly selected file to automatically selected ones.
1027 if test -z "$CONFIG_SITE"; then
1028   if test "x$prefix" != xNONE; then
1029     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1030   else
1031     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1032   fi
1033 fi
1034 for ac_site_file in $CONFIG_SITE; do
1035   if test -r "$ac_site_file"; then
1036     { echo "$as_me:1036: loading site script $ac_site_file" >&5
1037 echo "$as_me: loading site script $ac_site_file" >&6;}
1038     cat "$ac_site_file" >&5
1039     . "$ac_site_file"
1040   fi
1041 done
1042
1043 if test -r "$cache_file"; then
1044   # Some versions of bash will fail to source /dev/null (special
1045   # files actually), so we avoid doing that.
1046   if test -f "$cache_file"; then
1047     { echo "$as_me:1047: loading cache $cache_file" >&5
1048 echo "$as_me: loading cache $cache_file" >&6;}
1049     case $cache_file in
1050       [\\/]* | ?:[\\/]* ) . $cache_file;;
1051       *)                      . ./$cache_file;;
1052     esac
1053   fi
1054 else
1055   { echo "$as_me:1055: creating cache $cache_file" >&5
1056 echo "$as_me: creating cache $cache_file" >&6;}
1057   >$cache_file
1058 fi
1059
1060 # Check that the precious variables saved in the cache have kept the same
1061 # value.
1062 ac_cache_corrupted=false
1063 for ac_var in `(set) 2>&1 |
1064                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1065   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1066   eval ac_new_set=\$ac_env_${ac_var}_set
1067   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1068   eval ac_new_val="\$ac_env_${ac_var}_value"
1069   case $ac_old_set,$ac_new_set in
1070     set,)
1071       { echo "$as_me:1071: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1072 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1073       ac_cache_corrupted=: ;;
1074     ,set)
1075       { echo "$as_me:1075: error: \`$ac_var' was not set in the previous run" >&5
1076 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1077       ac_cache_corrupted=: ;;
1078     ,);;
1079     *)
1080       if test "x$ac_old_val" != "x$ac_new_val"; then
1081         { echo "$as_me:1081: error: \`$ac_var' has changed since the previous run:" >&5
1082 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1083         { echo "$as_me:1083:   former value:  $ac_old_val" >&5
1084 echo "$as_me:   former value:  $ac_old_val" >&2;}
1085         { echo "$as_me:1085:   current value: $ac_new_val" >&5
1086 echo "$as_me:   current value: $ac_new_val" >&2;}
1087         ac_cache_corrupted=:
1088       fi;;
1089   esac
1090   # Pass precious variables to config.status.  It doesn't matter if
1091   # we pass some twice (in addition to the command line arguments).
1092   if test "$ac_new_set" = set; then
1093     case $ac_new_val in
1094     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1095       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1096       ac_configure_args="$ac_configure_args '$ac_arg'"
1097       ;;
1098     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1099        ;;
1100     esac
1101   fi
1102 done
1103 if $ac_cache_corrupted; then
1104   { echo "$as_me:1104: error: changes in the environment can compromise the build" >&5
1105 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1106   { { echo "$as_me:1106: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1107 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1108    { (exit 1); exit 1; }; }
1109 fi
1110
1111 ac_ext=c
1112 ac_cpp='$CPP $CPPFLAGS'
1113 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1114 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1115 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1116
1117 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1118   *c*,-n*) ECHO_N= ECHO_C='
1119 ' ECHO_T='      ' ;;
1120   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1121   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1122 esac
1123 echo "#! $SHELL" >conftest.sh
1124 echo  "exit 0"   >>conftest.sh
1125 chmod +x conftest.sh
1126 if { (echo "$as_me:1126: PATH=\".;.\"; conftest.sh") >&5
1127   (PATH=".;."; conftest.sh) 2>&5
1128   ac_status=$?
1129   echo "$as_me:1129: \$? = $ac_status" >&5
1130   (exit $ac_status); }; then
1131   ac_path_separator=';'
1132 else
1133   ac_path_separator=:
1134 fi
1135 PATH_SEPARATOR="$ac_path_separator"
1136 rm -f conftest.sh
1137
1138 ac_aux_dir=
1139 for ac_dir in conftools $srcdir/conftools; do
1140   if test -f $ac_dir/install-sh; then
1141     ac_aux_dir=$ac_dir
1142     ac_install_sh="$ac_aux_dir/install-sh -c"
1143     break
1144   elif test -f $ac_dir/install.sh; then
1145     ac_aux_dir=$ac_dir
1146     ac_install_sh="$ac_aux_dir/install.sh -c"
1147     break
1148   elif test -f $ac_dir/shtool; then
1149     ac_aux_dir=$ac_dir
1150     ac_install_sh="$ac_aux_dir/shtool install -c"
1151     break
1152   fi
1153 done
1154 if test -z "$ac_aux_dir"; then
1155   { { echo "$as_me:1155: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&5
1156 echo "$as_me: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&2;}
1157    { (exit 1); exit 1; }; }
1158 fi
1159 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1160 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1161 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1162
1163 LIBCURRENT=4
1164 LIBREVISION=0
1165 LIBAGE=4
1166
1167 ac_config_headers="$ac_config_headers expat_config.h"
1168
1169 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1170 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
1171 ## Free Software Foundation, Inc.
1172 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1173 ##
1174 ## This program is free software; you can redistribute it and/or modify
1175 ## it under the terms of the GNU General Public License as published by
1176 ## the Free Software Foundation; either version 2 of the License, or
1177 ## (at your option) any later version.
1178 ##
1179 ## This program is distributed in the hope that it will be useful, but
1180 ## WITHOUT ANY WARRANTY; without even the implied warranty of
1181 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1182 ## General Public License for more details.
1183 ##
1184 ## You should have received a copy of the GNU General Public License
1185 ## along with this program; if not, write to the Free Software
1186 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1187 ##
1188 ## As a special exception to the GNU General Public License, if you
1189 ## distribute this file as part of a program that contains a
1190 ## configuration script generated by Autoconf, you may include it under
1191 ## the same distribution terms that you use for the rest of that program.
1192
1193 # serial 46 AC_PROG_LIBTOOL
1194
1195 # AC_LIBTOOL_HEADER_ASSERT
1196 # ------------------------
1197 # AC_LIBTOOL_HEADER_ASSERT
1198
1199 # _LT_AC_CHECK_DLFCN
1200 # --------------------
1201 # _LT_AC_CHECK_DLFCN
1202
1203 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1204 # ---------------------------------
1205  # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1206
1207 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1208 # ---------------------------------
1209 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1210
1211 # _LT_AC_PROG_ECHO_BACKSLASH
1212 # --------------------------
1213 # Add some code to the start of the generated configure script which
1214 # will find an echo command which doesn't interpret backslashes.
1215 # _LT_AC_PROG_ECHO_BACKSLASH
1216
1217 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1218 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1219 # ------------------------------------------------------------------
1220 # _LT_AC_TRY_DLOPEN_SELF
1221
1222 # AC_LIBTOOL_DLOPEN_SELF
1223 # -------------------
1224 # AC_LIBTOOL_DLOPEN_SELF
1225
1226 # _LT_AC_LTCONFIG_HACK
1227
1228 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
1229
1230 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
1231
1232 # AC_ENABLE_SHARED - implement the --enable-shared flag
1233 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
1234 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
1235 #   `yes'.
1236
1237 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
1238
1239 # AC_ENABLE_STATIC - implement the --enable-static flag
1240 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
1241 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
1242 #   `yes'.
1243
1244 # AC_DISABLE_STATIC - set the default static flag to --disable-static
1245
1246 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
1247 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
1248 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
1249 #   `yes'.
1250
1251 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
1252
1253 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
1254 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
1255 #   Where MODE is either `yes' or `no'.  If omitted, it defaults to
1256 #   `both'.
1257
1258 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
1259
1260 # AC_PATH_MAGIC - find a file program which can recognise a shared library
1261
1262 # AC_PROG_LD - find the path to the GNU or non-GNU linker
1263
1264 # AC_PROG_LD_GNU -
1265
1266 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
1267 #   -- PORTME Some linkers may need a different reload flag.
1268
1269 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
1270 #  -- PORTME fill in with the dynamic library characteristics
1271
1272 # AC_PROG_NM - find the path to a BSD-compatible name lister
1273
1274 # AC_CHECK_LIBM - check for math library
1275
1276 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
1277 # the libltdl convenience library and INCLTDL to the include flags for
1278 # the libltdl header and adds --enable-ltdl-convenience to the
1279 # configure arguments.  Note that LIBLTDL and INCLTDL are not
1280 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
1281 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
1282 # with '${top_builddir}/' and INCLTDL will be prefixed with
1283 # '${top_srcdir}/' (note the single quotes!).  If your package is not
1284 # flat and you're not using automake, define top_builddir and
1285 # top_srcdir appropriately in the Makefiles.
1286
1287 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
1288 # the libltdl installable library and INCLTDL to the include flags for
1289 # the libltdl header and adds --enable-ltdl-install to the configure
1290 # arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
1291 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
1292 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
1293 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
1294 # with '${top_srcdir}/' (note the single quotes!).  If your package is
1295 # not flat and you're not using automake, define top_builddir and
1296 # top_srcdir appropriately in the Makefiles.
1297 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
1298
1299 # old names
1300
1301 # This is just to silence aclocal about the macro not being used
1302
1303 # Check whether --enable-shared or --disable-shared was given.
1304 if test "${enable_shared+set}" = set; then
1305   enableval="$enable_shared"
1306   p=${PACKAGE-default}
1307 case $enableval in
1308 yes) enable_shared=yes ;;
1309 no) enable_shared=no ;;
1310 *)
1311   enable_shared=no
1312   # Look at the argument we got.  We use all the common list separators.
1313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1314   for pkg in $enableval; do
1315     if test "X$pkg" = "X$p"; then
1316       enable_shared=yes
1317     fi
1318   done
1319   IFS="$ac_save_ifs"
1320   ;;
1321 esac
1322 else
1323   enable_shared=yes
1324 fi;
1325 # Check whether --enable-static or --disable-static was given.
1326 if test "${enable_static+set}" = set; then
1327   enableval="$enable_static"
1328   p=${PACKAGE-default}
1329 case $enableval in
1330 yes) enable_static=yes ;;
1331 no) enable_static=no ;;
1332 *)
1333   enable_static=no
1334   # Look at the argument we got.  We use all the common list separators.
1335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1336   for pkg in $enableval; do
1337     if test "X$pkg" = "X$p"; then
1338       enable_static=yes
1339     fi
1340   done
1341   IFS="$ac_save_ifs"
1342   ;;
1343 esac
1344 else
1345   enable_static=yes
1346 fi;
1347 # Check whether --enable-fast-install or --disable-fast-install was given.
1348 if test "${enable_fast_install+set}" = set; then
1349   enableval="$enable_fast_install"
1350   p=${PACKAGE-default}
1351 case $enableval in
1352 yes) enable_fast_install=yes ;;
1353 no) enable_fast_install=no ;;
1354 *)
1355   enable_fast_install=no
1356   # Look at the argument we got.  We use all the common list separators.
1357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1358   for pkg in $enableval; do
1359     if test "X$pkg" = "X$p"; then
1360       enable_fast_install=yes
1361     fi
1362   done
1363   IFS="$ac_save_ifs"
1364   ;;
1365 esac
1366 else
1367   enable_fast_install=yes
1368 fi;
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 ac_ext=c
1422 ac_cpp='$CPP $CPPFLAGS'
1423 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1424 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1425 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1426 if test -n "$ac_tool_prefix"; then
1427   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1428 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1429 echo "$as_me:1429: checking for $ac_word" >&5
1430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1431 if test "${ac_cv_prog_CC+set}" = set; then
1432   echo $ECHO_N "(cached) $ECHO_C" >&6
1433 else
1434   if test -n "$CC"; then
1435   ac_cv_prog_CC="$CC" # Let the user override the test.
1436 else
1437   ac_save_IFS=$IFS; IFS=$ac_path_separator
1438 ac_dummy="$PATH"
1439 for ac_dir in $ac_dummy; do
1440   IFS=$ac_save_IFS
1441   test -z "$ac_dir" && ac_dir=.
1442   $as_executable_p "$ac_dir/$ac_word" || continue
1443 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1444 echo "$as_me:1444: found $ac_dir/$ac_word" >&5
1445 break
1446 done
1447
1448 fi
1449 fi
1450 CC=$ac_cv_prog_CC
1451 if test -n "$CC"; then
1452   echo "$as_me:1452: result: $CC" >&5
1453 echo "${ECHO_T}$CC" >&6
1454 else
1455   echo "$as_me:1455: result: no" >&5
1456 echo "${ECHO_T}no" >&6
1457 fi
1458
1459 fi
1460 if test -z "$ac_cv_prog_CC"; then
1461   ac_ct_CC=$CC
1462   # Extract the first word of "gcc", so it can be a program name with args.
1463 set dummy gcc; ac_word=$2
1464 echo "$as_me:1464: checking for $ac_word" >&5
1465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1466 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1467   echo $ECHO_N "(cached) $ECHO_C" >&6
1468 else
1469   if test -n "$ac_ct_CC"; then
1470   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1471 else
1472   ac_save_IFS=$IFS; IFS=$ac_path_separator
1473 ac_dummy="$PATH"
1474 for ac_dir in $ac_dummy; do
1475   IFS=$ac_save_IFS
1476   test -z "$ac_dir" && ac_dir=.
1477   $as_executable_p "$ac_dir/$ac_word" || continue
1478 ac_cv_prog_ac_ct_CC="gcc"
1479 echo "$as_me:1479: found $ac_dir/$ac_word" >&5
1480 break
1481 done
1482
1483 fi
1484 fi
1485 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1486 if test -n "$ac_ct_CC"; then
1487   echo "$as_me:1487: result: $ac_ct_CC" >&5
1488 echo "${ECHO_T}$ac_ct_CC" >&6
1489 else
1490   echo "$as_me:1490: result: no" >&5
1491 echo "${ECHO_T}no" >&6
1492 fi
1493
1494   CC=$ac_ct_CC
1495 else
1496   CC="$ac_cv_prog_CC"
1497 fi
1498
1499 if test -z "$CC"; then
1500   if test -n "$ac_tool_prefix"; then
1501   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1502 set dummy ${ac_tool_prefix}cc; ac_word=$2
1503 echo "$as_me:1503: checking for $ac_word" >&5
1504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1505 if test "${ac_cv_prog_CC+set}" = set; then
1506   echo $ECHO_N "(cached) $ECHO_C" >&6
1507 else
1508   if test -n "$CC"; then
1509   ac_cv_prog_CC="$CC" # Let the user override the test.
1510 else
1511   ac_save_IFS=$IFS; IFS=$ac_path_separator
1512 ac_dummy="$PATH"
1513 for ac_dir in $ac_dummy; do
1514   IFS=$ac_save_IFS
1515   test -z "$ac_dir" && ac_dir=.
1516   $as_executable_p "$ac_dir/$ac_word" || continue
1517 ac_cv_prog_CC="${ac_tool_prefix}cc"
1518 echo "$as_me:1518: found $ac_dir/$ac_word" >&5
1519 break
1520 done
1521
1522 fi
1523 fi
1524 CC=$ac_cv_prog_CC
1525 if test -n "$CC"; then
1526   echo "$as_me:1526: result: $CC" >&5
1527 echo "${ECHO_T}$CC" >&6
1528 else
1529   echo "$as_me:1529: result: no" >&5
1530 echo "${ECHO_T}no" >&6
1531 fi
1532
1533 fi
1534 if test -z "$ac_cv_prog_CC"; then
1535   ac_ct_CC=$CC
1536   # Extract the first word of "cc", so it can be a program name with args.
1537 set dummy cc; ac_word=$2
1538 echo "$as_me:1538: checking for $ac_word" >&5
1539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1540 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1541   echo $ECHO_N "(cached) $ECHO_C" >&6
1542 else
1543   if test -n "$ac_ct_CC"; then
1544   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1545 else
1546   ac_save_IFS=$IFS; IFS=$ac_path_separator
1547 ac_dummy="$PATH"
1548 for ac_dir in $ac_dummy; do
1549   IFS=$ac_save_IFS
1550   test -z "$ac_dir" && ac_dir=.
1551   $as_executable_p "$ac_dir/$ac_word" || continue
1552 ac_cv_prog_ac_ct_CC="cc"
1553 echo "$as_me:1553: found $ac_dir/$ac_word" >&5
1554 break
1555 done
1556
1557 fi
1558 fi
1559 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1560 if test -n "$ac_ct_CC"; then
1561   echo "$as_me:1561: result: $ac_ct_CC" >&5
1562 echo "${ECHO_T}$ac_ct_CC" >&6
1563 else
1564   echo "$as_me:1564: result: no" >&5
1565 echo "${ECHO_T}no" >&6
1566 fi
1567
1568   CC=$ac_ct_CC
1569 else
1570   CC="$ac_cv_prog_CC"
1571 fi
1572
1573 fi
1574 if test -z "$CC"; then
1575   # Extract the first word of "cc", so it can be a program name with args.
1576 set dummy cc; ac_word=$2
1577 echo "$as_me:1577: checking for $ac_word" >&5
1578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1579 if test "${ac_cv_prog_CC+set}" = set; then
1580   echo $ECHO_N "(cached) $ECHO_C" >&6
1581 else
1582   if test -n "$CC"; then
1583   ac_cv_prog_CC="$CC" # Let the user override the test.
1584 else
1585   ac_prog_rejected=no
1586   ac_save_IFS=$IFS; IFS=$ac_path_separator
1587 ac_dummy="$PATH"
1588 for ac_dir in $ac_dummy; do
1589   IFS=$ac_save_IFS
1590   test -z "$ac_dir" && ac_dir=.
1591   $as_executable_p "$ac_dir/$ac_word" || continue
1592 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1593   ac_prog_rejected=yes
1594   continue
1595 fi
1596 ac_cv_prog_CC="cc"
1597 echo "$as_me:1597: found $ac_dir/$ac_word" >&5
1598 break
1599 done
1600
1601 if test $ac_prog_rejected = yes; then
1602   # We found a bogon in the path, so make sure we never use it.
1603   set dummy $ac_cv_prog_CC
1604   shift
1605   if test $# != 0; then
1606     # We chose a different compiler from the bogus one.
1607     # However, it has the same basename, so the bogon will be chosen
1608     # first if we set CC to just the basename; use the full file name.
1609     shift
1610     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1611     shift
1612     ac_cv_prog_CC="$@"
1613   fi
1614 fi
1615 fi
1616 fi
1617 CC=$ac_cv_prog_CC
1618 if test -n "$CC"; then
1619   echo "$as_me:1619: result: $CC" >&5
1620 echo "${ECHO_T}$CC" >&6
1621 else
1622   echo "$as_me:1622: result: no" >&5
1623 echo "${ECHO_T}no" >&6
1624 fi
1625
1626 fi
1627 if test -z "$CC"; then
1628   if test -n "$ac_tool_prefix"; then
1629   for ac_prog in cl
1630   do
1631     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1632 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1633 echo "$as_me:1633: checking for $ac_word" >&5
1634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1635 if test "${ac_cv_prog_CC+set}" = set; then
1636   echo $ECHO_N "(cached) $ECHO_C" >&6
1637 else
1638   if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641   ac_save_IFS=$IFS; IFS=$ac_path_separator
1642 ac_dummy="$PATH"
1643 for ac_dir in $ac_dummy; do
1644   IFS=$ac_save_IFS
1645   test -z "$ac_dir" && ac_dir=.
1646   $as_executable_p "$ac_dir/$ac_word" || continue
1647 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1648 echo "$as_me:1648: found $ac_dir/$ac_word" >&5
1649 break
1650 done
1651
1652 fi
1653 fi
1654 CC=$ac_cv_prog_CC
1655 if test -n "$CC"; then
1656   echo "$as_me:1656: result: $CC" >&5
1657 echo "${ECHO_T}$CC" >&6
1658 else
1659   echo "$as_me:1659: result: no" >&5
1660 echo "${ECHO_T}no" >&6
1661 fi
1662
1663     test -n "$CC" && break
1664   done
1665 fi
1666 if test -z "$CC"; then
1667   ac_ct_CC=$CC
1668   for ac_prog in cl
1669 do
1670   # Extract the first word of "$ac_prog", so it can be a program name with args.
1671 set dummy $ac_prog; ac_word=$2
1672 echo "$as_me:1672: checking for $ac_word" >&5
1673 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1674 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1675   echo $ECHO_N "(cached) $ECHO_C" >&6
1676 else
1677   if test -n "$ac_ct_CC"; then
1678   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1679 else
1680   ac_save_IFS=$IFS; IFS=$ac_path_separator
1681 ac_dummy="$PATH"
1682 for ac_dir in $ac_dummy; do
1683   IFS=$ac_save_IFS
1684   test -z "$ac_dir" && ac_dir=.
1685   $as_executable_p "$ac_dir/$ac_word" || continue
1686 ac_cv_prog_ac_ct_CC="$ac_prog"
1687 echo "$as_me:1687: found $ac_dir/$ac_word" >&5
1688 break
1689 done
1690
1691 fi
1692 fi
1693 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1694 if test -n "$ac_ct_CC"; then
1695   echo "$as_me:1695: result: $ac_ct_CC" >&5
1696 echo "${ECHO_T}$ac_ct_CC" >&6
1697 else
1698   echo "$as_me:1698: result: no" >&5
1699 echo "${ECHO_T}no" >&6
1700 fi
1701
1702   test -n "$ac_ct_CC" && break
1703 done
1704
1705   CC=$ac_ct_CC
1706 fi
1707
1708 fi
1709
1710 test -z "$CC" && { { echo "$as_me:1710: error: no acceptable cc found in \$PATH" >&5
1711 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1712    { (exit 1); exit 1; }; }
1713
1714 # Provide some information about the compiler.
1715 echo "$as_me:1715:" \
1716      "checking for C compiler version" >&5
1717 ac_compiler=`set X $ac_compile; echo $2`
1718 { (eval echo "$as_me:1718: \"$ac_compiler --version </dev/null >&5\"") >&5
1719   (eval $ac_compiler --version </dev/null >&5) 2>&5
1720   ac_status=$?
1721   echo "$as_me:1721: \$? = $ac_status" >&5
1722   (exit $ac_status); }
1723 { (eval echo "$as_me:1723: \"$ac_compiler -v </dev/null >&5\"") >&5
1724   (eval $ac_compiler -v </dev/null >&5) 2>&5
1725   ac_status=$?
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); }
1728 { (eval echo "$as_me:1728: \"$ac_compiler -V </dev/null >&5\"") >&5
1729   (eval $ac_compiler -V </dev/null >&5) 2>&5
1730   ac_status=$?
1731   echo "$as_me:1731: \$? = $ac_status" >&5
1732   (exit $ac_status); }
1733
1734 cat >conftest.$ac_ext <<_ACEOF
1735 #line 1735 "configure"
1736 #include "confdefs.h"
1737
1738 int
1739 main ()
1740 {
1741
1742   ;
1743   return 0;
1744 }
1745 _ACEOF
1746 ac_clean_files_save=$ac_clean_files
1747 ac_clean_files="$ac_clean_files a.out a.exe"
1748 # Try to create an executable without -o first, disregard a.out.
1749 # It will help us diagnose broken compilers, and finding out an intuition
1750 # of exeext.
1751 echo "$as_me:1751: checking for C compiler default output" >&5
1752 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1753 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1754 if { (eval echo "$as_me:1754: \"$ac_link_default\"") >&5
1755   (eval $ac_link_default) 2>&5
1756   ac_status=$?
1757   echo "$as_me:1757: \$? = $ac_status" >&5
1758   (exit $ac_status); }; then
1759   # Find the output, starting from the most likely.  This scheme is
1760 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1761 # resort.
1762 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1763                 ls a.out conftest 2>/dev/null;
1764                 ls a.* conftest.* 2>/dev/null`; do
1765   case $ac_file in
1766     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1767     a.out ) # We found the default executable, but exeext='' is most
1768             # certainly right.
1769             break;;
1770     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1771           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1772           export ac_cv_exeext
1773           break;;
1774     * ) break;;
1775   esac
1776 done
1777 else
1778   echo "$as_me: failed program was:" >&5
1779 cat conftest.$ac_ext >&5
1780 { { echo "$as_me:1780: error: C compiler cannot create executables" >&5
1781 echo "$as_me: error: C compiler cannot create executables" >&2;}
1782    { (exit 77); exit 77; }; }
1783 fi
1784
1785 ac_exeext=$ac_cv_exeext
1786 echo "$as_me:1786: result: $ac_file" >&5
1787 echo "${ECHO_T}$ac_file" >&6
1788
1789 # Check the compiler produces executables we can run.  If not, either
1790 # the compiler is broken, or we cross compile.
1791 echo "$as_me:1791: checking whether the C compiler works" >&5
1792 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1793 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1794 # If not cross compiling, check that we can run a simple program.
1795 if test "$cross_compiling" != yes; then
1796   if { ac_try='./$ac_file'
1797   { (eval echo "$as_me:1797: \"$ac_try\"") >&5
1798   (eval $ac_try) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; }; then
1802     cross_compiling=no
1803   else
1804     if test "$cross_compiling" = maybe; then
1805         cross_compiling=yes
1806     else
1807         { { echo "$as_me:1807: error: cannot run C compiled programs.
1808 If you meant to cross compile, use \`--host'." >&5
1809 echo "$as_me: error: cannot run C compiled programs.
1810 If you meant to cross compile, use \`--host'." >&2;}
1811    { (exit 1); exit 1; }; }
1812     fi
1813   fi
1814 fi
1815 echo "$as_me:1815: result: yes" >&5
1816 echo "${ECHO_T}yes" >&6
1817
1818 rm -f a.out a.exe conftest$ac_cv_exeext
1819 ac_clean_files=$ac_clean_files_save
1820 # Check the compiler produces executables we can run.  If not, either
1821 # the compiler is broken, or we cross compile.
1822 echo "$as_me:1822: checking whether we are cross compiling" >&5
1823 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1824 echo "$as_me:1824: result: $cross_compiling" >&5
1825 echo "${ECHO_T}$cross_compiling" >&6
1826
1827 echo "$as_me:1827: checking for executable suffix" >&5
1828 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1829 if { (eval echo "$as_me:1829: \"$ac_link\"") >&5
1830   (eval $ac_link) 2>&5
1831   ac_status=$?
1832   echo "$as_me:1832: \$? = $ac_status" >&5
1833   (exit $ac_status); }; then
1834   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1835 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1836 # work properly (i.e., refer to `conftest.exe'), while it won't with
1837 # `rm'.
1838 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1839   case $ac_file in
1840     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1841     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1842           export ac_cv_exeext
1843           break;;
1844     * ) break;;
1845   esac
1846 done
1847 else
1848   { { echo "$as_me:1848: error: cannot compute EXEEXT: cannot compile and link" >&5
1849 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1850    { (exit 1); exit 1; }; }
1851 fi
1852
1853 rm -f conftest$ac_cv_exeext
1854 echo "$as_me:1854: result: $ac_cv_exeext" >&5
1855 echo "${ECHO_T}$ac_cv_exeext" >&6
1856
1857 rm -f conftest.$ac_ext
1858 EXEEXT=$ac_cv_exeext
1859 ac_exeext=$EXEEXT
1860 echo "$as_me:1860: checking for object suffix" >&5
1861 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1862 if test "${ac_cv_objext+set}" = set; then
1863   echo $ECHO_N "(cached) $ECHO_C" >&6
1864 else
1865   cat >conftest.$ac_ext <<_ACEOF
1866 #line 1866 "configure"
1867 #include "confdefs.h"
1868
1869 int
1870 main ()
1871 {
1872
1873   ;
1874   return 0;
1875 }
1876 _ACEOF
1877 rm -f conftest.o conftest.obj
1878 if { (eval echo "$as_me:1878: \"$ac_compile\"") >&5
1879   (eval $ac_compile) 2>&5
1880   ac_status=$?
1881   echo "$as_me:1881: \$? = $ac_status" >&5
1882   (exit $ac_status); }; then
1883   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1884   case $ac_file in
1885     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1886     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1887        break;;
1888   esac
1889 done
1890 else
1891   echo "$as_me: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 { { echo "$as_me:1893: error: cannot compute OBJEXT: cannot compile" >&5
1894 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1895    { (exit 1); exit 1; }; }
1896 fi
1897
1898 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1899 fi
1900 echo "$as_me:1900: result: $ac_cv_objext" >&5
1901 echo "${ECHO_T}$ac_cv_objext" >&6
1902 OBJEXT=$ac_cv_objext
1903 ac_objext=$OBJEXT
1904 echo "$as_me:1904: checking whether we are using the GNU C compiler" >&5
1905 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1906 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1907   echo $ECHO_N "(cached) $ECHO_C" >&6
1908 else
1909   cat >conftest.$ac_ext <<_ACEOF
1910 #line 1910 "configure"
1911 #include "confdefs.h"
1912
1913 int
1914 main ()
1915 {
1916 #ifndef __GNUC__
1917        choke me
1918 #endif
1919
1920   ;
1921   return 0;
1922 }
1923 _ACEOF
1924 rm -f conftest.$ac_objext
1925 if { (eval echo "$as_me:1925: \"$ac_compile\"") >&5
1926   (eval $ac_compile) 2>&5
1927   ac_status=$?
1928   echo "$as_me:1928: \$? = $ac_status" >&5
1929   (exit $ac_status); } &&
1930          { ac_try='test -s conftest.$ac_objext'
1931   { (eval echo "$as_me:1931: \"$ac_try\"") >&5
1932   (eval $ac_try) 2>&5
1933   ac_status=$?
1934   echo "$as_me:1934: \$? = $ac_status" >&5
1935   (exit $ac_status); }; }; then
1936   ac_compiler_gnu=yes
1937 else
1938   echo "$as_me: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1940 ac_compiler_gnu=no
1941 fi
1942 rm -f conftest.$ac_objext conftest.$ac_ext
1943 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1944
1945 fi
1946 echo "$as_me:1946: result: $ac_cv_c_compiler_gnu" >&5
1947 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1948 GCC=`test $ac_compiler_gnu = yes && echo yes`
1949 ac_test_CFLAGS=${CFLAGS+set}
1950 ac_save_CFLAGS=$CFLAGS
1951 CFLAGS="-g"
1952 echo "$as_me:1952: checking whether $CC accepts -g" >&5
1953 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1954 if test "${ac_cv_prog_cc_g+set}" = set; then
1955   echo $ECHO_N "(cached) $ECHO_C" >&6
1956 else
1957   cat >conftest.$ac_ext <<_ACEOF
1958 #line 1958 "configure"
1959 #include "confdefs.h"
1960
1961 int
1962 main ()
1963 {
1964
1965   ;
1966   return 0;
1967 }
1968 _ACEOF
1969 rm -f conftest.$ac_objext
1970 if { (eval echo "$as_me:1970: \"$ac_compile\"") >&5
1971   (eval $ac_compile) 2>&5
1972   ac_status=$?
1973   echo "$as_me:1973: \$? = $ac_status" >&5
1974   (exit $ac_status); } &&
1975          { ac_try='test -s conftest.$ac_objext'
1976   { (eval echo "$as_me:1976: \"$ac_try\"") >&5
1977   (eval $ac_try) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); }; }; then
1981   ac_cv_prog_cc_g=yes
1982 else
1983   echo "$as_me: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1985 ac_cv_prog_cc_g=no
1986 fi
1987 rm -f conftest.$ac_objext conftest.$ac_ext
1988 fi
1989 echo "$as_me:1989: result: $ac_cv_prog_cc_g" >&5
1990 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1991 if test "$ac_test_CFLAGS" = set; then
1992   CFLAGS=$ac_save_CFLAGS
1993 elif test $ac_cv_prog_cc_g = yes; then
1994   if test "$GCC" = yes; then
1995     CFLAGS="-g -O2"
1996   else
1997     CFLAGS="-g"
1998   fi
1999 else
2000   if test "$GCC" = yes; then
2001     CFLAGS="-O2"
2002   else
2003     CFLAGS=
2004   fi
2005 fi
2006 # Some people use a C++ compiler to compile C.  Since we use `exit',
2007 # in C++ we need to declare it.  In case someone uses the same compiler
2008 # for both compiling C and C++ we need to have the C++ compiler decide
2009 # the declaration of exit, since it's the most demanding environment.
2010 cat >conftest.$ac_ext <<_ACEOF
2011 #ifndef __cplusplus
2012   choke me
2013 #endif
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   for ac_declaration in \
2028    ''\
2029    '#include <stdlib.h>' \
2030    'extern "C" void std::exit (int) throw (); using std::exit;' \
2031    'extern "C" void std::exit (int); using std::exit;' \
2032    'extern "C" void exit (int) throw ();' \
2033    'extern "C" void exit (int);' \
2034    'void exit (int);'
2035 do
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 #include <stdlib.h>
2040 $ac_declaration
2041 int
2042 main ()
2043 {
2044 exit (42);
2045   ;
2046   return 0;
2047 }
2048 _ACEOF
2049 rm -f conftest.$ac_objext
2050 if { (eval echo "$as_me:2050: \"$ac_compile\"") >&5
2051   (eval $ac_compile) 2>&5
2052   ac_status=$?
2053   echo "$as_me:2053: \$? = $ac_status" >&5
2054   (exit $ac_status); } &&
2055          { ac_try='test -s conftest.$ac_objext'
2056   { (eval echo "$as_me:2056: \"$ac_try\"") >&5
2057   (eval $ac_try) 2>&5
2058   ac_status=$?
2059   echo "$as_me:2059: \$? = $ac_status" >&5
2060   (exit $ac_status); }; }; then
2061   :
2062 else
2063   echo "$as_me: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 continue
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068   cat >conftest.$ac_ext <<_ACEOF
2069 #line 2069 "configure"
2070 #include "confdefs.h"
2071 $ac_declaration
2072 int
2073 main ()
2074 {
2075 exit (42);
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 rm -f conftest.$ac_objext
2081 if { (eval echo "$as_me:2081: \"$ac_compile\"") >&5
2082   (eval $ac_compile) 2>&5
2083   ac_status=$?
2084   echo "$as_me:2084: \$? = $ac_status" >&5
2085   (exit $ac_status); } &&
2086          { ac_try='test -s conftest.$ac_objext'
2087   { (eval echo "$as_me:2087: \"$ac_try\"") >&5
2088   (eval $ac_try) 2>&5
2089   ac_status=$?
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit $ac_status); }; }; then
2092   break
2093 else
2094   echo "$as_me: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 fi
2097 rm -f conftest.$ac_objext conftest.$ac_ext
2098 done
2099 rm -f conftest*
2100 if test -n "$ac_declaration"; then
2101   echo '#ifdef __cplusplus' >>confdefs.h
2102   echo $ac_declaration      >>confdefs.h
2103   echo '#endif'             >>confdefs.h
2104 fi
2105
2106 else
2107   echo "$as_me: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
2109 fi
2110 rm -f conftest.$ac_objext conftest.$ac_ext
2111 ac_ext=c
2112 ac_cpp='$CPP $CPPFLAGS'
2113 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2114 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2115 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2116
2117 # Find the correct PATH separator.  Usually this is `:', but
2118 # DJGPP uses `;' like DOS.
2119 if test "X${PATH_SEPARATOR+set}" != Xset; then
2120   UNAME=${UNAME-`uname 2>/dev/null`}
2121   case X$UNAME in
2122     *-DOS) lt_cv_sys_path_separator=';' ;;
2123     *)     lt_cv_sys_path_separator=':' ;;
2124   esac
2125   PATH_SEPARATOR=$lt_cv_sys_path_separator
2126 fi
2127
2128 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2129 if test "${with_gnu_ld+set}" = set; then
2130   withval="$with_gnu_ld"
2131   test "$withval" = no || with_gnu_ld=yes
2132 else
2133   with_gnu_ld=no
2134 fi;
2135 ac_prog=ld
2136 if test "$GCC" = yes; then
2137   # Check if gcc -print-prog-name=ld gives a path.
2138   echo "$as_me:2138: checking for ld used by GCC" >&5
2139 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
2140   case $host in
2141   *-*-mingw*)
2142     # gcc leaves a trailing carriage return which upsets mingw
2143     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2144   *)
2145     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2146   esac
2147   case $ac_prog in
2148     # Accept absolute paths.
2149     [\\/]* | [A-Za-z]:[\\/]*)
2150       re_direlt='/[^/][^/]*/\.\./'
2151       # Canonicalize the path of ld
2152       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2153       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2154         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2155       done
2156       test -z "$LD" && LD="$ac_prog"
2157       ;;
2158   "")
2159     # If it fails, then pretend we aren't using GCC.
2160     ac_prog=ld
2161     ;;
2162   *)
2163     # If it is relative, then search for the first ld in PATH.
2164     with_gnu_ld=unknown
2165     ;;
2166   esac
2167 elif test "$with_gnu_ld" = yes; then
2168   echo "$as_me:2168: checking for GNU ld" >&5
2169 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
2170 else
2171   echo "$as_me:2171: checking for non-GNU ld" >&5
2172 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
2173 fi
2174 if test "${lt_cv_path_LD+set}" = set; then
2175   echo $ECHO_N "(cached) $ECHO_C" >&6
2176 else
2177   if test -z "$LD"; then
2178   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2179   for ac_dir in $PATH; do
2180     test -z "$ac_dir" && ac_dir=.
2181     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2182       lt_cv_path_LD="$ac_dir/$ac_prog"
2183       # Check to see if the program is GNU ld.  I'd rather use --version,
2184       # but apparently some GNU ld's only accept -v.
2185       # Break only if it was the GNU/non-GNU ld that we prefer.
2186       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2187         test "$with_gnu_ld" != no && break
2188       else
2189         test "$with_gnu_ld" != yes && break
2190       fi
2191     fi
2192   done
2193   IFS="$ac_save_ifs"
2194 else
2195   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2196 fi
2197 fi
2198
2199 LD="$lt_cv_path_LD"
2200 if test -n "$LD"; then
2201   echo "$as_me:2201: result: $LD" >&5
2202 echo "${ECHO_T}$LD" >&6
2203 else
2204   echo "$as_me:2204: result: no" >&5
2205 echo "${ECHO_T}no" >&6
2206 fi
2207 test -z "$LD" && { { echo "$as_me:2207: error: no acceptable ld found in \$PATH" >&5
2208 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
2209    { (exit 1); exit 1; }; }
2210 echo "$as_me:2210: checking if the linker ($LD) is GNU ld" >&5
2211 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
2212 if test "${lt_cv_prog_gnu_ld+set}" = set; then
2213   echo $ECHO_N "(cached) $ECHO_C" >&6
2214 else
2215   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2216 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2217   lt_cv_prog_gnu_ld=yes
2218 else
2219   lt_cv_prog_gnu_ld=no
2220 fi
2221 fi
2222 echo "$as_me:2222: result: $lt_cv_prog_gnu_ld" >&5
2223 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
2224 with_gnu_ld=$lt_cv_prog_gnu_ld
2225
2226 echo "$as_me:2226: checking for $LD option to reload object files" >&5
2227 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
2228 if test "${lt_cv_ld_reload_flag+set}" = set; then
2229   echo $ECHO_N "(cached) $ECHO_C" >&6
2230 else
2231   lt_cv_ld_reload_flag='-r'
2232 fi
2233 echo "$as_me:2233: result: $lt_cv_ld_reload_flag" >&5
2234 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
2235 reload_flag=$lt_cv_ld_reload_flag
2236 test -n "$reload_flag" && reload_flag=" $reload_flag"
2237
2238 echo "$as_me:2238: checking for BSD-compatible nm" >&5
2239 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
2240 if test "${lt_cv_path_NM+set}" = set; then
2241   echo $ECHO_N "(cached) $ECHO_C" >&6
2242 else
2243   if test -n "$NM"; then
2244   # Let the user override the test.
2245   lt_cv_path_NM="$NM"
2246 else
2247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2248   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2249     test -z "$ac_dir" && ac_dir=.
2250     tmp_nm=$ac_dir/${ac_tool_prefix}nm
2251     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2252       # Check to see if the nm accepts a BSD-compat flag.
2253       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2254       #   nm: unknown option "B" ignored
2255       # Tru64's nm complains that /dev/null is an invalid object file
2256       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2257         lt_cv_path_NM="$tmp_nm -B"
2258         break
2259       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2260         lt_cv_path_NM="$tmp_nm -p"
2261         break
2262       else
2263         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2264         continue # so that we can try to find one that supports BSD flags
2265       fi
2266     fi
2267   done
2268   IFS="$ac_save_ifs"
2269   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2270 fi
2271 fi
2272
2273 NM="$lt_cv_path_NM"
2274 echo "$as_me:2274: result: $NM" >&5
2275 echo "${ECHO_T}$NM" >&6
2276
2277 echo "$as_me:2277: checking whether ln -s works" >&5
2278 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2279 LN_S=$as_ln_s
2280 if test "$LN_S" = "ln -s"; then
2281   echo "$as_me:2281: result: yes" >&5
2282 echo "${ECHO_T}yes" >&6
2283 else
2284   echo "$as_me:2284: result: no, using $LN_S" >&5
2285 echo "${ECHO_T}no, using $LN_S" >&6
2286 fi
2287
2288 echo "$as_me:2288: checking how to recognise dependant libraries" >&5
2289 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
2290 if test "${lt_cv_deplibs_check_method+set}" = set; then
2291   echo $ECHO_N "(cached) $ECHO_C" >&6
2292 else
2293   lt_cv_file_magic_cmd='$MAGIC_CMD'
2294 lt_cv_file_magic_test_file=
2295 lt_cv_deplibs_check_method='unknown'
2296 # Need to set the preceding variable on all platforms that support
2297 # interlibrary dependencies.
2298 # 'none' -- dependencies not supported.
2299 # `unknown' -- same as none, but documents that we really don't know.
2300 # 'pass_all' -- all dependencies passed with no checks.
2301 # 'test_compile' -- check by making test program.
2302 # 'file_magic [[regex]]' -- check by looking for files in library path
2303 # which responds to the $file_magic_cmd with a given egrep regex.
2304 # If you have `file' or equivalent on your system and you're not sure
2305 # whether `pass_all' will *always* work, you probably want this one.
2306
2307 case $host_os in
2308 aix4* | aix5*)
2309   lt_cv_deplibs_check_method=pass_all
2310   ;;
2311
2312 beos*)
2313   lt_cv_deplibs_check_method=pass_all
2314   ;;
2315
2316 bsdi4*)
2317   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
2318   lt_cv_file_magic_cmd='/usr/bin/file -L'
2319   lt_cv_file_magic_test_file=/shlib/libc.so
2320   ;;
2321
2322 cygwin* | mingw* | pw32*)
2323   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2324   lt_cv_file_magic_cmd='$OBJDUMP -f'
2325   ;;
2326
2327 darwin* | rhapsody*)
2328   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2329   lt_cv_file_magic_cmd='/usr/bin/file -L'
2330   case "$host_os" in
2331   rhapsody* | darwin1.[012])
2332     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
2333     ;;
2334   *) # Darwin 1.3 on
2335     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2336     ;;
2337   esac
2338   ;;
2339
2340 freebsd*)
2341   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2342     case $host_cpu in
2343     i*86 )
2344       # Not sure whether the presence of OpenBSD here was a mistake.
2345       # Let's accept both of them until this is cleared up.
2346       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
2347       lt_cv_file_magic_cmd=/usr/bin/file
2348       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2349       ;;
2350     esac
2351   else
2352     lt_cv_deplibs_check_method=pass_all
2353   fi
2354   ;;
2355
2356 gnu*)
2357   lt_cv_deplibs_check_method=pass_all
2358   ;;
2359
2360 hpux10.20*|hpux11*)
2361   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2362   lt_cv_file_magic_cmd=/usr/bin/file
2363   lt_cv_file_magic_test_file=/usr/lib/libc.sl
2364   ;;
2365
2366 irix5* | irix6*)
2367   case $host_os in
2368   irix5*)
2369     # this will be overridden with pass_all, but let us keep it just in case
2370     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2371     ;;
2372   *)
2373     case $LD in
2374     *-32|*"-32 ") libmagic=32-bit;;
2375     *-n32|*"-n32 ") libmagic=N32;;
2376     *-64|*"-64 ") libmagic=64-bit;;
2377     *) libmagic=never-match;;
2378     esac
2379     # this will be overridden with pass_all, but let us keep it just in case
2380     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2381     ;;
2382   esac
2383   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2384   lt_cv_deplibs_check_method=pass_all
2385   ;;
2386
2387 # This must be Linux ELF.
2388 linux-gnu*)
2389   case $host_cpu in
2390   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2391     lt_cv_deplibs_check_method=pass_all ;;
2392   *)
2393     # glibc up to 2.1.1 does not perform some relocations on ARM
2394     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2395   esac
2396   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2397   ;;
2398
2399 netbsd*)
2400   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2401     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2402   else
2403     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2404   fi
2405   ;;
2406
2407 newos6*)
2408   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2409   lt_cv_file_magic_cmd=/usr/bin/file
2410   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2411   ;;
2412
2413 openbsd*)
2414   lt_cv_file_magic_cmd=/usr/bin/file
2415   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2416   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2417     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
2418   else
2419     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2420   fi
2421   ;;
2422
2423 osf3* | osf4* | osf5*)
2424   # this will be overridden with pass_all, but let us keep it just in case
2425   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2426   lt_cv_file_magic_test_file=/shlib/libc.so
2427   lt_cv_deplibs_check_method=pass_all
2428   ;;
2429
2430 sco3.2v5*)
2431   lt_cv_deplibs_check_method=pass_all
2432   ;;
2433
2434 solaris*)
2435   lt_cv_deplibs_check_method=pass_all
2436   lt_cv_file_magic_test_file=/lib/libc.so
2437   ;;
2438
2439 sysv5uw[78]* | sysv4*uw2*)
2440   lt_cv_deplibs_check_method=pass_all
2441   ;;
2442
2443 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2444   case $host_vendor in
2445   motorola)
2446     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]'
2447     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2448     ;;
2449   ncr)
2450     lt_cv_deplibs_check_method=pass_all
2451     ;;
2452   sequent)
2453     lt_cv_file_magic_cmd='/bin/file'
2454     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
2455     ;;
2456   sni)
2457     lt_cv_file_magic_cmd='/bin/file'
2458     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
2459     lt_cv_file_magic_test_file=/lib/libc.so
2460     ;;
2461   esac
2462   ;;
2463 esac
2464
2465 fi
2466 echo "$as_me:2466: result: $lt_cv_deplibs_check_method" >&5
2467 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
2468 file_magic_cmd=$lt_cv_file_magic_cmd
2469 deplibs_check_method=$lt_cv_deplibs_check_method
2470
2471 # Check for command to grab the raw symbol name followed by C symbol from nm.
2472 echo "$as_me:2472: checking command to parse $NM output" >&5
2473 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
2474 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
2475   echo $ECHO_N "(cached) $ECHO_C" >&6
2476 else
2477
2478 # These are sane defaults that work on at least a few old systems.
2479 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
2480
2481 # Character class describing NM global symbol codes.
2482 symcode='[BCDEGRST]'
2483
2484 # Regexp to match symbols that can be accessed directly from C.
2485 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
2486
2487 # Transform the above into a raw symbol and a C symbol.
2488 symxfrm='\1 \2\3 \3'
2489
2490 # Transform an extracted symbol line into a proper C declaration
2491 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
2492
2493 # Transform an extracted symbol line into symbol name and symbol address
2494 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'"
2495
2496 # Define system-specific variables.
2497 case $host_os in
2498 aix*)
2499   symcode='[BCDT]'
2500   ;;
2501 cygwin* | mingw* | pw32*)
2502   symcode='[ABCDGISTW]'
2503   ;;
2504 hpux*) # Its linker distinguishes data from code symbols
2505   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2506   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'"
2507   ;;
2508 irix*)
2509   symcode='[BCDEGRST]'
2510   ;;
2511 solaris* | sysv5*)
2512   symcode='[BDT]'
2513   ;;
2514 sysv4)
2515   symcode='[DFNSTU]'
2516   ;;
2517 esac
2518
2519 # Handle CRLF in mingw tool chain
2520 opt_cr=
2521 case $host_os in
2522 mingw*)
2523   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
2524   ;;
2525 esac
2526
2527 # If we're using GNU nm, then use its standard symbol codes.
2528 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
2529   symcode='[ABCDGISTW]'
2530 fi
2531
2532 # Try without a prefix undercore, then with it.
2533 for ac_symprfx in "" "_"; do
2534
2535   # Write the raw and C identifiers.
2536 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2537
2538   # Check to see that the pipe works correctly.
2539   pipe_works=no
2540   rm -f conftest*
2541   cat > conftest.$ac_ext <<EOF
2542 #ifdef __cplusplus
2543 extern "C" {
2544 #endif
2545 char nm_test_var;
2546 void nm_test_func(){}
2547 #ifdef __cplusplus
2548 }
2549 #endif
2550 int main(){nm_test_var='a';nm_test_func();return(0);}
2551 EOF
2552
2553   if { (eval echo "$as_me:2553: \"$ac_compile\"") >&5
2554   (eval $ac_compile) 2>&5
2555   ac_status=$?
2556   echo "$as_me:2556: \$? = $ac_status" >&5
2557   (exit $ac_status); }; then
2558     # Now try to grab the symbols.
2559     nlist=conftest.nm
2560     if { (eval echo "$as_me:2560: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
2561   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
2562   ac_status=$?
2563   echo "$as_me:2563: \$? = $ac_status" >&5
2564   (exit $ac_status); } && test -s "$nlist"; then
2565       # Try sorting and uniquifying the output.
2566       if sort "$nlist" | uniq > "$nlist"T; then
2567         mv -f "$nlist"T "$nlist"
2568       else
2569         rm -f "$nlist"T
2570       fi
2571
2572       # Make sure that we snagged all the symbols we need.
2573       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
2574         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
2575           cat <<EOF > conftest.$ac_ext
2576 #ifdef __cplusplus
2577 extern "C" {
2578 #endif
2579
2580 EOF
2581           # Now generate the symbol file.
2582           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
2583
2584           cat <<EOF >> conftest.$ac_ext
2585 #if defined (__STDC__) && __STDC__
2586 # define lt_ptr void *
2587 #else
2588 # define lt_ptr char *
2589 # define const
2590 #endif
2591
2592 /* The mapping between symbol names and symbols. */
2593 const struct {
2594   const char *name;
2595   lt_ptr address;
2596 }
2597 lt_preloaded_symbols[] =
2598 {
2599 EOF
2600           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
2601           cat <<\EOF >> conftest.$ac_ext
2602   {0, (lt_ptr) 0}
2603 };
2604
2605 #ifdef __cplusplus
2606 }
2607 #endif
2608 EOF
2609           # Now try linking the two files.
2610           mv conftest.$ac_objext conftstm.$ac_objext
2611           save_LIBS="$LIBS"
2612           save_CFLAGS="$CFLAGS"
2613           LIBS="conftstm.$ac_objext"
2614           CFLAGS="$CFLAGS$no_builtin_flag"
2615           if { (eval echo "$as_me:2615: \"$ac_link\"") >&5
2616   (eval $ac_link) 2>&5
2617   ac_status=$?
2618   echo "$as_me:2618: \$? = $ac_status" >&5
2619   (exit $ac_status); } && test -s conftest; then
2620             pipe_works=yes
2621           fi
2622           LIBS="$save_LIBS"
2623           CFLAGS="$save_CFLAGS"
2624         else
2625           echo "cannot find nm_test_func in $nlist" >&5
2626         fi
2627       else
2628         echo "cannot find nm_test_var in $nlist" >&5
2629       fi
2630     else
2631       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
2632     fi
2633   else
2634     echo "$progname: failed program was:" >&5
2635     cat conftest.$ac_ext >&5
2636   fi
2637   rm -f conftest* conftst*
2638
2639   # Do not use the global_symbol_pipe unless it works.
2640   if test "$pipe_works" = yes; then
2641     break
2642   else
2643     lt_cv_sys_global_symbol_pipe=
2644   fi
2645 done
2646
2647 fi
2648
2649 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
2650 if test -z "$lt_cv_sys_global_symbol_pipe"; then
2651   global_symbol_to_cdecl=
2652   global_symbol_to_c_name_address=
2653 else
2654   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
2655   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
2656 fi
2657 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
2658 then
2659   echo "$as_me:2659: result: failed" >&5
2660 echo "${ECHO_T}failed" >&6
2661 else
2662   echo "$as_me:2662: result: ok" >&5
2663 echo "${ECHO_T}ok" >&6
2664 fi
2665
2666 ac_ext=c
2667 ac_cpp='$CPP $CPPFLAGS'
2668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2671 echo "$as_me:2671: checking how to run the C preprocessor" >&5
2672 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2673 # On Suns, sometimes $CPP names a directory.
2674 if test -n "$CPP" && test -d "$CPP"; then
2675   CPP=
2676 fi
2677 if test -z "$CPP"; then
2678   if test "${ac_cv_prog_CPP+set}" = set; then
2679   echo $ECHO_N "(cached) $ECHO_C" >&6
2680 else
2681       # Double quotes because CPP needs to be expanded
2682     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2683     do
2684       ac_preproc_ok=false
2685 for ac_c_preproc_warn_flag in '' yes
2686 do
2687   # Use a header file that comes with gcc, so configuring glibc
2688   # with a fresh cross-compiler works.
2689   # On the NeXT, cc -E runs the code through the compiler's parser,
2690   # not just through cpp. "Syntax error" is here to catch this case.
2691   cat >conftest.$ac_ext <<_ACEOF
2692 #line 2692 "configure"
2693 #include "confdefs.h"
2694 #include <assert.h>
2695                      Syntax error
2696 _ACEOF
2697 if { (eval echo "$as_me:2697: \"$ac_cpp conftest.$ac_ext\"") >&5
2698   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2699   ac_status=$?
2700   egrep -v '^ *\+' conftest.er1 >conftest.err
2701   rm -f conftest.er1
2702   cat conftest.err >&5
2703   echo "$as_me:2703: \$? = $ac_status" >&5
2704   (exit $ac_status); } >/dev/null; then
2705   if test -s conftest.err; then
2706     ac_cpp_err=$ac_c_preproc_warn_flag
2707   else
2708     ac_cpp_err=
2709   fi
2710 else
2711   ac_cpp_err=yes
2712 fi
2713 if test -z "$ac_cpp_err"; then
2714   :
2715 else
2716   echo "$as_me: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   # Broken: fails on valid input.
2719 continue
2720 fi
2721 rm -f conftest.err conftest.$ac_ext
2722
2723   # OK, works on sane cases.  Now check whether non-existent headers
2724   # can be detected and how.
2725   cat >conftest.$ac_ext <<_ACEOF
2726 #line 2726 "configure"
2727 #include "confdefs.h"
2728 #include <ac_nonexistent.h>
2729 _ACEOF
2730 if { (eval echo "$as_me:2730: \"$ac_cpp conftest.$ac_ext\"") >&5
2731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2732   ac_status=$?
2733   egrep -v '^ *\+' conftest.er1 >conftest.err
2734   rm -f conftest.er1
2735   cat conftest.err >&5
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); } >/dev/null; then
2738   if test -s conftest.err; then
2739     ac_cpp_err=$ac_c_preproc_warn_flag
2740   else
2741     ac_cpp_err=
2742   fi
2743 else
2744   ac_cpp_err=yes
2745 fi
2746 if test -z "$ac_cpp_err"; then
2747   # Broken: success on invalid input.
2748 continue
2749 else
2750   echo "$as_me: failed program was:" >&5
2751   cat conftest.$ac_ext >&5
2752   # Passes both tests.
2753 ac_preproc_ok=:
2754 break
2755 fi
2756 rm -f conftest.err conftest.$ac_ext
2757
2758 done
2759 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2760 rm -f conftest.err conftest.$ac_ext
2761 if $ac_preproc_ok; then
2762   break
2763 fi
2764
2765     done
2766     ac_cv_prog_CPP=$CPP
2767
2768 fi
2769   CPP=$ac_cv_prog_CPP
2770 else
2771   ac_cv_prog_CPP=$CPP
2772 fi
2773 echo "$as_me:2773: result: $CPP" >&5
2774 echo "${ECHO_T}$CPP" >&6
2775 ac_preproc_ok=false
2776 for ac_c_preproc_warn_flag in '' yes
2777 do
2778   # Use a header file that comes with gcc, so configuring glibc
2779   # with a fresh cross-compiler works.
2780   # On the NeXT, cc -E runs the code through the compiler's parser,
2781   # not just through cpp. "Syntax error" is here to catch this case.
2782   cat >conftest.$ac_ext <<_ACEOF
2783 #line 2783 "configure"
2784 #include "confdefs.h"
2785 #include <assert.h>
2786                      Syntax error
2787 _ACEOF
2788 if { (eval echo "$as_me:2788: \"$ac_cpp conftest.$ac_ext\"") >&5
2789   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2790   ac_status=$?
2791   egrep -v '^ *\+' conftest.er1 >conftest.err
2792   rm -f conftest.er1
2793   cat conftest.err >&5
2794   echo "$as_me:2794: \$? = $ac_status" >&5
2795   (exit $ac_status); } >/dev/null; then
2796   if test -s conftest.err; then
2797     ac_cpp_err=$ac_c_preproc_warn_flag
2798   else
2799     ac_cpp_err=
2800   fi
2801 else
2802   ac_cpp_err=yes
2803 fi
2804 if test -z "$ac_cpp_err"; then
2805   :
2806 else
2807   echo "$as_me: failed program was:" >&5
2808   cat conftest.$ac_ext >&5
2809   # Broken: fails on valid input.
2810 continue
2811 fi
2812 rm -f conftest.err conftest.$ac_ext
2813
2814   # OK, works on sane cases.  Now check whether non-existent headers
2815   # can be detected and how.
2816   cat >conftest.$ac_ext <<_ACEOF
2817 #line 2817 "configure"
2818 #include "confdefs.h"
2819 #include <ac_nonexistent.h>
2820 _ACEOF
2821 if { (eval echo "$as_me:2821: \"$ac_cpp conftest.$ac_ext\"") >&5
2822   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2823   ac_status=$?
2824   egrep -v '^ *\+' conftest.er1 >conftest.err
2825   rm -f conftest.er1
2826   cat conftest.err >&5
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); } >/dev/null; then
2829   if test -s conftest.err; then
2830     ac_cpp_err=$ac_c_preproc_warn_flag
2831   else
2832     ac_cpp_err=
2833   fi
2834 else
2835   ac_cpp_err=yes
2836 fi
2837 if test -z "$ac_cpp_err"; then
2838   # Broken: success on invalid input.
2839 continue
2840 else
2841   echo "$as_me: failed program was:" >&5
2842   cat conftest.$ac_ext >&5
2843   # Passes both tests.
2844 ac_preproc_ok=:
2845 break
2846 fi
2847 rm -f conftest.err conftest.$ac_ext
2848
2849 done
2850 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2851 rm -f conftest.err conftest.$ac_ext
2852 if $ac_preproc_ok; then
2853   :
2854 else
2855   { { echo "$as_me:2855: error: C preprocessor \"$CPP\" fails sanity check" >&5
2856 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2857    { (exit 1); exit 1; }; }
2858 fi
2859
2860 ac_ext=c
2861 ac_cpp='$CPP $CPPFLAGS'
2862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2865
2866 for ac_header in dlfcn.h
2867 do
2868 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2869 echo "$as_me:2869: checking for $ac_header" >&5
2870 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2871 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2872   echo $ECHO_N "(cached) $ECHO_C" >&6
2873 else
2874   cat >conftest.$ac_ext <<_ACEOF
2875 #line 2875 "configure"
2876 #include "confdefs.h"
2877 #include <$ac_header>
2878 _ACEOF
2879 if { (eval echo "$as_me:2879: \"$ac_cpp conftest.$ac_ext\"") >&5
2880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2881   ac_status=$?
2882   egrep -v '^ *\+' conftest.er1 >conftest.err
2883   rm -f conftest.er1
2884   cat conftest.err >&5
2885   echo "$as_me:2885: \$? = $ac_status" >&5
2886   (exit $ac_status); } >/dev/null; then
2887   if test -s conftest.err; then
2888     ac_cpp_err=$ac_c_preproc_warn_flag
2889   else
2890     ac_cpp_err=
2891   fi
2892 else
2893   ac_cpp_err=yes
2894 fi
2895 if test -z "$ac_cpp_err"; then
2896   eval "$as_ac_Header=yes"
2897 else
2898   echo "$as_me: failed program was:" >&5
2899   cat conftest.$ac_ext >&5
2900   eval "$as_ac_Header=no"
2901 fi
2902 rm -f conftest.err conftest.$ac_ext
2903 fi
2904 echo "$as_me:2904: result: `eval echo '${'$as_ac_Header'}'`" >&5
2905 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2906 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2907   cat >>confdefs.h <<EOF
2908 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2909 EOF
2910
2911 fi
2912 done
2913
2914 # Only perform the check for file, if the check method requires it
2915 case $deplibs_check_method in
2916 file_magic*)
2917   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2918     echo "$as_me:2918: checking for ${ac_tool_prefix}file" >&5
2919 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
2920 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
2921   echo $ECHO_N "(cached) $ECHO_C" >&6
2922 else
2923   case $MAGIC_CMD in
2924   /*)
2925   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2926   ;;
2927   ?:/*)
2928   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2929   ;;
2930   *)
2931   ac_save_MAGIC_CMD="$MAGIC_CMD"
2932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2933   ac_dummy="/usr/bin:$PATH"
2934   for ac_dir in $ac_dummy; do
2935     test -z "$ac_dir" && ac_dir=.
2936     if test -f $ac_dir/${ac_tool_prefix}file; then
2937       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2938       if test -n "$file_magic_test_file"; then
2939         case $deplibs_check_method in
2940         "file_magic "*)
2941           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2942           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2943           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2944             egrep "$file_magic_regex" > /dev/null; then
2945             :
2946           else
2947             cat <<EOF 1>&2
2948
2949 *** Warning: the command libtool uses to detect shared libraries,
2950 *** $file_magic_cmd, produces output that libtool cannot recognize.
2951 *** The result is that libtool may fail to recognize shared libraries
2952 *** as such.  This will affect the creation of libtool libraries that
2953 *** depend on shared libraries, but programs linked with such libtool
2954 *** libraries will work regardless of this problem.  Nevertheless, you
2955 *** may want to report the problem to your system manager and/or to
2956 *** bug-libtool@gnu.org
2957
2958 EOF
2959           fi ;;
2960         esac
2961       fi
2962       break
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966   MAGIC_CMD="$ac_save_MAGIC_CMD"
2967   ;;
2968 esac
2969 fi
2970
2971 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2972 if test -n "$MAGIC_CMD"; then
2973   echo "$as_me:2973: result: $MAGIC_CMD" >&5
2974 echo "${ECHO_T}$MAGIC_CMD" >&6
2975 else
2976   echo "$as_me:2976: result: no" >&5
2977 echo "${ECHO_T}no" >&6
2978 fi
2979
2980 if test -z "$lt_cv_path_MAGIC_CMD"; then
2981   if test -n "$ac_tool_prefix"; then
2982     echo "$as_me:2982: checking for file" >&5
2983 echo $ECHO_N "checking for file... $ECHO_C" >&6
2984 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
2985   echo $ECHO_N "(cached) $ECHO_C" >&6
2986 else
2987   case $MAGIC_CMD in
2988   /*)
2989   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2990   ;;
2991   ?:/*)
2992   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2993   ;;
2994   *)
2995   ac_save_MAGIC_CMD="$MAGIC_CMD"
2996   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2997   ac_dummy="/usr/bin:$PATH"
2998   for ac_dir in $ac_dummy; do
2999     test -z "$ac_dir" && ac_dir=.
3000     if test -f $ac_dir/file; then
3001       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3002       if test -n "$file_magic_test_file"; then
3003         case $deplibs_check_method in
3004         "file_magic "*)
3005           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3006           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3007           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3008             egrep "$file_magic_regex" > /dev/null; then
3009             :
3010           else
3011             cat <<EOF 1>&2
3012
3013 *** Warning: the command libtool uses to detect shared libraries,
3014 *** $file_magic_cmd, produces output that libtool cannot recognize.
3015 *** The result is that libtool may fail to recognize shared libraries
3016 *** as such.  This will affect the creation of libtool libraries that
3017 *** depend on shared libraries, but programs linked with such libtool
3018 *** libraries will work regardless of this problem.  Nevertheless, you
3019 *** may want to report the problem to your system manager and/or to
3020 *** bug-libtool@gnu.org
3021
3022 EOF
3023           fi ;;
3024         esac
3025       fi
3026       break
3027     fi
3028   done
3029   IFS="$ac_save_ifs"
3030   MAGIC_CMD="$ac_save_MAGIC_CMD"
3031   ;;
3032 esac
3033 fi
3034
3035 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3036 if test -n "$MAGIC_CMD"; then
3037   echo "$as_me:3037: result: $MAGIC_CMD" >&5
3038 echo "${ECHO_T}$MAGIC_CMD" >&6
3039 else
3040   echo "$as_me:3040: result: no" >&5
3041 echo "${ECHO_T}no" >&6
3042 fi
3043
3044   else
3045     MAGIC_CMD=:
3046   fi
3047 fi
3048
3049   fi
3050   ;;
3051 esac
3052
3053 if test -n "$ac_tool_prefix"; then
3054   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3055 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3056 echo "$as_me:3056: checking for $ac_word" >&5
3057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3058 if test "${ac_cv_prog_RANLIB+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   if test -n "$RANLIB"; then
3062   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3063 else
3064   ac_save_IFS=$IFS; IFS=$ac_path_separator
3065 ac_dummy="$PATH"
3066 for ac_dir in $ac_dummy; do
3067   IFS=$ac_save_IFS
3068   test -z "$ac_dir" && ac_dir=.
3069   $as_executable_p "$ac_dir/$ac_word" || continue
3070 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3071 echo "$as_me:3071: found $ac_dir/$ac_word" >&5
3072 break
3073 done
3074
3075 fi
3076 fi
3077 RANLIB=$ac_cv_prog_RANLIB
3078 if test -n "$RANLIB"; then
3079   echo "$as_me:3079: result: $RANLIB" >&5
3080 echo "${ECHO_T}$RANLIB" >&6
3081 else
3082   echo "$as_me:3082: result: no" >&5
3083 echo "${ECHO_T}no" >&6
3084 fi
3085
3086 fi
3087 if test -z "$ac_cv_prog_RANLIB"; then
3088   ac_ct_RANLIB=$RANLIB
3089   # Extract the first word of "ranlib", so it can be a program name with args.
3090 set dummy ranlib; ac_word=$2
3091 echo "$as_me:3091: checking for $ac_word" >&5
3092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3093 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3094   echo $ECHO_N "(cached) $ECHO_C" >&6
3095 else
3096   if test -n "$ac_ct_RANLIB"; then
3097   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3098 else
3099   ac_save_IFS=$IFS; IFS=$ac_path_separator
3100 ac_dummy="$PATH"
3101 for ac_dir in $ac_dummy; do
3102   IFS=$ac_save_IFS
3103   test -z "$ac_dir" && ac_dir=.
3104   $as_executable_p "$ac_dir/$ac_word" || continue
3105 ac_cv_prog_ac_ct_RANLIB="ranlib"
3106 echo "$as_me:3106: found $ac_dir/$ac_word" >&5
3107 break
3108 done
3109
3110   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3111 fi
3112 fi
3113 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3114 if test -n "$ac_ct_RANLIB"; then
3115   echo "$as_me:3115: result: $ac_ct_RANLIB" >&5
3116 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3117 else
3118   echo "$as_me:3118: result: no" >&5
3119 echo "${ECHO_T}no" >&6
3120 fi
3121
3122   RANLIB=$ac_ct_RANLIB
3123 else
3124   RANLIB="$ac_cv_prog_RANLIB"
3125 fi
3126
3127 if test -n "$ac_tool_prefix"; then
3128   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3129 set dummy ${ac_tool_prefix}strip; ac_word=$2
3130 echo "$as_me:3130: checking for $ac_word" >&5
3131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3132 if test "${ac_cv_prog_STRIP+set}" = set; then
3133   echo $ECHO_N "(cached) $ECHO_C" >&6
3134 else
3135   if test -n "$STRIP"; then
3136   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3137 else
3138   ac_save_IFS=$IFS; IFS=$ac_path_separator
3139 ac_dummy="$PATH"
3140 for ac_dir in $ac_dummy; do
3141   IFS=$ac_save_IFS
3142   test -z "$ac_dir" && ac_dir=.
3143   $as_executable_p "$ac_dir/$ac_word" || continue
3144 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3145 echo "$as_me:3145: found $ac_dir/$ac_word" >&5
3146 break
3147 done
3148
3149 fi
3150 fi
3151 STRIP=$ac_cv_prog_STRIP
3152 if test -n "$STRIP"; then
3153   echo "$as_me:3153: result: $STRIP" >&5
3154 echo "${ECHO_T}$STRIP" >&6
3155 else
3156   echo "$as_me:3156: result: no" >&5
3157 echo "${ECHO_T}no" >&6
3158 fi
3159
3160 fi
3161 if test -z "$ac_cv_prog_STRIP"; then
3162   ac_ct_STRIP=$STRIP
3163   # Extract the first word of "strip", so it can be a program name with args.
3164 set dummy strip; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$ac_ct_STRIP"; then
3171   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_ac_ct_STRIP="strip"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
3185 fi
3186 fi
3187 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3188 if test -n "$ac_ct_STRIP"; then
3189   echo "$as_me:3189: result: $ac_ct_STRIP" >&5
3190 echo "${ECHO_T}$ac_ct_STRIP" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196   STRIP=$ac_ct_STRIP
3197 else
3198   STRIP="$ac_cv_prog_STRIP"
3199 fi
3200
3201 enable_dlopen=no
3202 enable_win32_dll=yes
3203
3204 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3205 if test "${enable_libtool_lock+set}" = set; then
3206   enableval="$enable_libtool_lock"
3207
3208 fi;
3209 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3210
3211 # Some flags need to be propagated to the compiler or linker for good
3212 # libtool support.
3213 case $host in
3214 *-*-irix6*)
3215   # Find out which ABI we are using.
3216   echo '#line 3216 "configure"' > conftest.$ac_ext
3217   if { (eval echo "$as_me:3217: \"$ac_compile\"") >&5
3218   (eval $ac_compile) 2>&5
3219   ac_status=$?
3220   echo "$as_me:3220: \$? = $ac_status" >&5
3221   (exit $ac_status); }; then
3222     case `/usr/bin/file conftest.$ac_objext` in
3223     *32-bit*)
3224       LD="${LD-ld} -32"
3225       ;;
3226     *N32*)
3227       LD="${LD-ld} -n32"
3228       ;;
3229     *64-bit*)
3230       LD="${LD-ld} -64"
3231       ;;
3232     esac
3233   fi
3234   rm -rf conftest*
3235   ;;
3236
3237 *-*-sco3.2v5*)
3238   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3239   SAVE_CFLAGS="$CFLAGS"
3240   CFLAGS="$CFLAGS -belf"
3241   echo "$as_me:3241: checking whether the C compiler needs -belf" >&5
3242 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
3243 if test "${lt_cv_cc_needs_belf+set}" = set; then
3244   echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246
3247      ac_ext=c
3248 ac_cpp='$CPP $CPPFLAGS'
3249 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3250 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3251 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3252
3253      cat >conftest.$ac_ext <<_ACEOF
3254 #line 3254 "configure"
3255 #include "confdefs.h"
3256
3257 int
3258 main ()
3259 {
3260
3261   ;
3262   return 0;
3263 }
3264 _ACEOF
3265 rm -f conftest.$ac_objext conftest$ac_exeext
3266 if { (eval echo "$as_me:3266: \"$ac_link\"") >&5
3267   (eval $ac_link) 2>&5
3268   ac_status=$?
3269   echo "$as_me:3269: \$? = $ac_status" >&5
3270   (exit $ac_status); } &&
3271          { ac_try='test -s conftest$ac_exeext'
3272   { (eval echo "$as_me:3272: \"$ac_try\"") >&5
3273   (eval $ac_try) 2>&5
3274   ac_status=$?
3275   echo "$as_me:3275: \$? = $ac_status" >&5
3276   (exit $ac_status); }; }; then
3277   lt_cv_cc_needs_belf=yes
3278 else
3279   echo "$as_me: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3281 lt_cv_cc_needs_belf=no
3282 fi
3283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3284      ac_ext=c
3285 ac_cpp='$CPP $CPPFLAGS'
3286 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3287 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3288 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3289
3290 fi
3291 echo "$as_me:3291: result: $lt_cv_cc_needs_belf" >&5
3292 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
3293   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3294     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3295     CFLAGS="$SAVE_CFLAGS"
3296   fi
3297   ;;
3298
3299 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
3300   if test -n "$ac_tool_prefix"; then
3301   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3302 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3303 echo "$as_me:3303: checking for $ac_word" >&5
3304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
3306   echo $ECHO_N "(cached) $ECHO_C" >&6
3307 else
3308   if test -n "$DLLTOOL"; then
3309   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3310 else
3311   ac_save_IFS=$IFS; IFS=$ac_path_separator
3312 ac_dummy="$PATH"
3313 for ac_dir in $ac_dummy; do
3314   IFS=$ac_save_IFS
3315   test -z "$ac_dir" && ac_dir=.
3316   $as_executable_p "$ac_dir/$ac_word" || continue
3317 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3318 echo "$as_me:3318: found $ac_dir/$ac_word" >&5
3319 break
3320 done
3321
3322 fi
3323 fi
3324 DLLTOOL=$ac_cv_prog_DLLTOOL
3325 if test -n "$DLLTOOL"; then
3326   echo "$as_me:3326: result: $DLLTOOL" >&5
3327 echo "${ECHO_T}$DLLTOOL" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333 fi
3334 if test -z "$ac_cv_prog_DLLTOOL"; then
3335   ac_ct_DLLTOOL=$DLLTOOL
3336   # Extract the first word of "dlltool", so it can be a program name with args.
3337 set dummy dlltool; ac_word=$2
3338 echo "$as_me:3338: checking for $ac_word" >&5
3339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3340 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
3341   echo $ECHO_N "(cached) $ECHO_C" >&6
3342 else
3343   if test -n "$ac_ct_DLLTOOL"; then
3344   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
3345 else
3346   ac_save_IFS=$IFS; IFS=$ac_path_separator
3347 ac_dummy="$PATH"
3348 for ac_dir in $ac_dummy; do
3349   IFS=$ac_save_IFS
3350   test -z "$ac_dir" && ac_dir=.
3351   $as_executable_p "$ac_dir/$ac_word" || continue
3352 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
3353 echo "$as_me:3353: found $ac_dir/$ac_word" >&5
3354 break
3355 done
3356
3357   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
3358 fi
3359 fi
3360 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
3361 if test -n "$ac_ct_DLLTOOL"; then
3362   echo "$as_me:3362: result: $ac_ct_DLLTOOL" >&5
3363 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
3364 else
3365   echo "$as_me:3365: result: no" >&5
3366 echo "${ECHO_T}no" >&6
3367 fi
3368
3369   DLLTOOL=$ac_ct_DLLTOOL
3370 else
3371   DLLTOOL="$ac_cv_prog_DLLTOOL"
3372 fi
3373
3374   if test -n "$ac_tool_prefix"; then
3375   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3376 set dummy ${ac_tool_prefix}as; ac_word=$2
3377 echo "$as_me:3377: checking for $ac_word" >&5
3378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3379 if test "${ac_cv_prog_AS+set}" = set; then
3380   echo $ECHO_N "(cached) $ECHO_C" >&6
3381 else
3382   if test -n "$AS"; then
3383   ac_cv_prog_AS="$AS" # Let the user override the test.
3384 else
3385   ac_save_IFS=$IFS; IFS=$ac_path_separator
3386 ac_dummy="$PATH"
3387 for ac_dir in $ac_dummy; do
3388   IFS=$ac_save_IFS
3389   test -z "$ac_dir" && ac_dir=.
3390   $as_executable_p "$ac_dir/$ac_word" || continue
3391 ac_cv_prog_AS="${ac_tool_prefix}as"
3392 echo "$as_me:3392: found $ac_dir/$ac_word" >&5
3393 break
3394 done
3395
3396 fi
3397 fi
3398 AS=$ac_cv_prog_AS
3399 if test -n "$AS"; then
3400   echo "$as_me:3400: result: $AS" >&5
3401 echo "${ECHO_T}$AS" >&6
3402 else
3403   echo "$as_me:3403: result: no" >&5
3404 echo "${ECHO_T}no" >&6
3405 fi
3406
3407 fi
3408 if test -z "$ac_cv_prog_AS"; then
3409   ac_ct_AS=$AS
3410   # Extract the first word of "as", so it can be a program name with args.
3411 set dummy as; ac_word=$2
3412 echo "$as_me:3412: checking for $ac_word" >&5
3413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3414 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
3415   echo $ECHO_N "(cached) $ECHO_C" >&6
3416 else
3417   if test -n "$ac_ct_AS"; then
3418   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
3419 else
3420   ac_save_IFS=$IFS; IFS=$ac_path_separator
3421 ac_dummy="$PATH"
3422 for ac_dir in $ac_dummy; do
3423   IFS=$ac_save_IFS
3424   test -z "$ac_dir" && ac_dir=.
3425   $as_executable_p "$ac_dir/$ac_word" || continue
3426 ac_cv_prog_ac_ct_AS="as"
3427 echo "$as_me:3427: found $ac_dir/$ac_word" >&5
3428 break
3429 done
3430
3431   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
3432 fi
3433 fi
3434 ac_ct_AS=$ac_cv_prog_ac_ct_AS
3435 if test -n "$ac_ct_AS"; then
3436   echo "$as_me:3436: result: $ac_ct_AS" >&5
3437 echo "${ECHO_T}$ac_ct_AS" >&6
3438 else
3439   echo "$as_me:3439: result: no" >&5
3440 echo "${ECHO_T}no" >&6
3441 fi
3442
3443   AS=$ac_ct_AS
3444 else
3445   AS="$ac_cv_prog_AS"
3446 fi
3447
3448   if test -n "$ac_tool_prefix"; then
3449   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3450 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3451 echo "$as_me:3451: checking for $ac_word" >&5
3452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3453 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   if test -n "$OBJDUMP"; then
3457   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3458 else
3459   ac_save_IFS=$IFS; IFS=$ac_path_separator
3460 ac_dummy="$PATH"
3461 for ac_dir in $ac_dummy; do
3462   IFS=$ac_save_IFS
3463   test -z "$ac_dir" && ac_dir=.
3464   $as_executable_p "$ac_dir/$ac_word" || continue
3465 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3466 echo "$as_me:3466: found $ac_dir/$ac_word" >&5
3467 break
3468 done
3469
3470 fi
3471 fi
3472 OBJDUMP=$ac_cv_prog_OBJDUMP
3473 if test -n "$OBJDUMP"; then
3474   echo "$as_me:3474: result: $OBJDUMP" >&5
3475 echo "${ECHO_T}$OBJDUMP" >&6
3476 else
3477   echo "$as_me:3477: result: no" >&5
3478 echo "${ECHO_T}no" >&6
3479 fi
3480
3481 fi
3482 if test -z "$ac_cv_prog_OBJDUMP"; then
3483   ac_ct_OBJDUMP=$OBJDUMP
3484   # Extract the first word of "objdump", so it can be a program name with args.
3485 set dummy objdump; ac_word=$2
3486 echo "$as_me:3486: checking for $ac_word" >&5
3487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3488 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
3489   echo $ECHO_N "(cached) $ECHO_C" >&6
3490 else
3491   if test -n "$ac_ct_OBJDUMP"; then
3492   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
3493 else
3494   ac_save_IFS=$IFS; IFS=$ac_path_separator
3495 ac_dummy="$PATH"
3496 for ac_dir in $ac_dummy; do
3497   IFS=$ac_save_IFS
3498   test -z "$ac_dir" && ac_dir=.
3499   $as_executable_p "$ac_dir/$ac_word" || continue
3500 ac_cv_prog_ac_ct_OBJDUMP="objdump"
3501 echo "$as_me:3501: found $ac_dir/$ac_word" >&5
3502 break
3503 done
3504
3505   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
3506 fi
3507 fi
3508 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
3509 if test -n "$ac_ct_OBJDUMP"; then
3510   echo "$as_me:3510: result: $ac_ct_OBJDUMP" >&5
3511 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
3512 else
3513   echo "$as_me:3513: result: no" >&5
3514 echo "${ECHO_T}no" >&6
3515 fi
3516
3517   OBJDUMP=$ac_ct_OBJDUMP
3518 else
3519   OBJDUMP="$ac_cv_prog_OBJDUMP"
3520 fi
3521
3522   # recent cygwin and mingw systems supply a stub DllMain which the user
3523   # can override, but on older systems we have to supply one
3524   echo "$as_me:3524: checking if libtool should supply DllMain function" >&5
3525 echo $ECHO_N "checking if libtool should supply DllMain function... $ECHO_C" >&6
3526 if test "${lt_cv_need_dllmain+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   cat >conftest.$ac_ext <<_ACEOF
3530 #line 3530 "configure"
3531 #include "confdefs.h"
3532
3533 int
3534 main ()
3535 {
3536 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
3537       DllMain (0, 0, 0);
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 rm -f conftest.$ac_objext conftest$ac_exeext
3543 if { (eval echo "$as_me:3543: \"$ac_link\"") >&5
3544   (eval $ac_link) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit $ac_status); } &&
3548          { ac_try='test -s conftest$ac_exeext'
3549   { (eval echo "$as_me:3549: \"$ac_try\"") >&5
3550   (eval $ac_try) 2>&5
3551   ac_status=$?
3552   echo "$as_me:3552: \$? = $ac_status" >&5
3553   (exit $ac_status); }; }; then
3554   lt_cv_need_dllmain=no
3555 else
3556   echo "$as_me: failed program was:" >&5
3557 cat conftest.$ac_ext >&5
3558 lt_cv_need_dllmain=yes
3559 fi
3560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3561 fi
3562 echo "$as_me:3562: result: $lt_cv_need_dllmain" >&5
3563 echo "${ECHO_T}$lt_cv_need_dllmain" >&6
3564
3565   case $host/$CC in
3566   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
3567     # old mingw systems require "-dll" to link a DLL, while more recent ones
3568     # require "-mdll"
3569     SAVE_CFLAGS="$CFLAGS"
3570     CFLAGS="$CFLAGS -mdll"
3571     echo "$as_me:3571: checking how to link DLLs" >&5
3572 echo $ECHO_N "checking how to link DLLs... $ECHO_C" >&6
3573 if test "${lt_cv_cc_dll_switch+set}" = set; then
3574   echo $ECHO_N "(cached) $ECHO_C" >&6
3575 else
3576   cat >conftest.$ac_ext <<_ACEOF
3577 #line 3577 "configure"
3578 #include "confdefs.h"
3579
3580 int
3581 main ()
3582 {
3583
3584   ;
3585   return 0;
3586 }
3587 _ACEOF
3588 rm -f conftest.$ac_objext conftest$ac_exeext
3589 if { (eval echo "$as_me:3589: \"$ac_link\"") >&5
3590   (eval $ac_link) 2>&5
3591   ac_status=$?
3592   echo "$as_me:3592: \$? = $ac_status" >&5
3593   (exit $ac_status); } &&
3594          { ac_try='test -s conftest$ac_exeext'
3595   { (eval echo "$as_me:3595: \"$ac_try\"") >&5
3596   (eval $ac_try) 2>&5
3597   ac_status=$?
3598   echo "$as_me:3598: \$? = $ac_status" >&5
3599   (exit $ac_status); }; }; then
3600   lt_cv_cc_dll_switch=-mdll
3601 else
3602   echo "$as_me: failed program was:" >&5
3603 cat conftest.$ac_ext >&5
3604 lt_cv_cc_dll_switch=-dll
3605 fi
3606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3607 fi
3608 echo "$as_me:3608: result: $lt_cv_cc_dll_switch" >&5
3609 echo "${ECHO_T}$lt_cv_cc_dll_switch" >&6
3610     CFLAGS="$SAVE_CFLAGS" ;;
3611   *-*-cygwin* | *-*-pw32*)
3612     # cygwin systems need to pass --dll to the linker, and not link
3613     # crt.o which will require a WinMain@16 definition.
3614     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
3615   esac
3616   ;;
3617
3618 esac
3619
3620 # Sed substitution that helps us do robust quoting.  It backslashifies
3621 # metacharacters that are still active within double-quoted strings.
3622 Xsed='sed -e s/^X//'
3623 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
3624
3625 # Same as above, but do not quote variable references.
3626 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
3627
3628 # Sed substitution to delay expansion of an escaped shell variable in a
3629 # double_quote_subst'ed string.
3630 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3631
3632 # Constants:
3633 rm="rm -f"
3634
3635 # Global variables:
3636 default_ofile=libtool
3637 can_build_shared=yes
3638
3639 # All known linkers require a `.a' archive for static linking (except M$VC,
3640 # which needs '.lib').
3641 libext=a
3642 ltmain="$ac_aux_dir/ltmain.sh"
3643 ofile="$default_ofile"
3644 with_gnu_ld="$lt_cv_prog_gnu_ld"
3645 need_locks="$enable_libtool_lock"
3646
3647 old_CC="$CC"
3648 old_CFLAGS="$CFLAGS"
3649
3650 # Set sane defaults for various variables
3651 test -z "$AR" && AR=ar
3652 test -z "$AR_FLAGS" && AR_FLAGS=cru
3653 test -z "$AS" && AS=as
3654 test -z "$CC" && CC=cc
3655 test -z "$DLLTOOL" && DLLTOOL=dlltool
3656 test -z "$LD" && LD=ld
3657 test -z "$LN_S" && LN_S="ln -s"
3658 test -z "$MAGIC_CMD" && MAGIC_CMD=file
3659 test -z "$NM" && NM=nm
3660 test -z "$OBJDUMP" && OBJDUMP=objdump
3661 test -z "$RANLIB" && RANLIB=:
3662 test -z "$STRIP" && STRIP=:
3663 test -z "$ac_objext" && ac_objext=o
3664
3665 if test x"$host" != x"$build"; then
3666   ac_tool_prefix=${host_alias}-
3667 else
3668   ac_tool_prefix=
3669 fi
3670
3671 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
3672 case $host_os in
3673 linux-gnu*) ;;
3674 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
3675 esac
3676
3677 case $host_os in
3678 aix3*)
3679   # AIX sometimes has problems with the GCC collect2 program.  For some
3680   # reason, if we set the COLLECT_NAMES environment variable, the problems
3681   # vanish in a puff of smoke.
3682   if test "X${COLLECT_NAMES+set}" != Xset; then
3683     COLLECT_NAMES=
3684     export COLLECT_NAMES
3685   fi
3686   ;;
3687 esac
3688
3689 # Determine commands to create old-style static archives.
3690 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
3691 old_postinstall_cmds='chmod 644 $oldlib'
3692 old_postuninstall_cmds=
3693
3694 if test -n "$RANLIB"; then
3695   case $host_os in
3696   openbsd*)
3697     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
3698     ;;
3699   *)
3700     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
3701     ;;
3702   esac
3703   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3704 fi
3705
3706 # Allow CC to be a program name with arguments.
3707 set dummy $CC
3708 compiler="$2"
3709
3710 ## FIXME: this should be a separate macro
3711 ##
3712 echo "$as_me:3712: checking for objdir" >&5
3713 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
3714 rm -f .libs 2>/dev/null
3715 mkdir .libs 2>/dev/null
3716 if test -d .libs; then
3717   objdir=.libs
3718 else
3719   # MS-DOS does not allow filenames that begin with a dot.
3720   objdir=_libs
3721 fi
3722 rmdir .libs 2>/dev/null
3723 echo "$as_me:3723: result: $objdir" >&5
3724 echo "${ECHO_T}$objdir" >&6
3725 ##
3726 ## END FIXME
3727
3728 ## FIXME: this should be a separate macro
3729 ##
3730
3731 # Check whether --with-pic or --without-pic was given.
3732 if test "${with_pic+set}" = set; then
3733   withval="$with_pic"
3734   pic_mode="$withval"
3735 else
3736   pic_mode=default
3737 fi;
3738 test -z "$pic_mode" && pic_mode=default
3739
3740 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
3741 # in isolation, and that seeing it set (from the cache) indicates that
3742 # the associated values are set (in the cache) correctly too.
3743 echo "$as_me:3743: checking for $compiler option to produce PIC" >&5
3744 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
3745 if test "${lt_cv_prog_cc_pic+set}" = set; then
3746   echo $ECHO_N "(cached) $ECHO_C" >&6
3747 else
3748    lt_cv_prog_cc_pic=
3749   lt_cv_prog_cc_shlib=
3750   lt_cv_prog_cc_wl=
3751   lt_cv_prog_cc_static=
3752   lt_cv_prog_cc_no_builtin=
3753   lt_cv_prog_cc_can_build_shared=$can_build_shared
3754
3755   if test "$GCC" = yes; then
3756     lt_cv_prog_cc_wl='-Wl,'
3757     lt_cv_prog_cc_static='-static'
3758
3759     case $host_os in
3760     aix*)
3761       # Below there is a dirty hack to force normal static linking with -ldl
3762       # The problem is because libdl dynamically linked with both libc and
3763       # libC (AIX C++ library), which obviously doesn't included in libraries
3764       # list by gcc. This cause undefined symbols with -static flags.
3765       # This hack allows C programs to be linked with "-static -ldl", but
3766       # not sure about C++ programs.
3767       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
3768       ;;
3769     amigaos*)
3770       # FIXME: we need at least 68020 code to build shared libraries, but
3771       # adding the `-m68020' flag to GCC prevents building anything better,
3772       # like `-m68040'.
3773       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
3774       ;;
3775     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
3776       # PIC is the default for these OSes.
3777       ;;
3778     darwin* | rhapsody*)
3779       # PIC is the default on this platform
3780       # Common symbols not allowed in MH_DYLIB files
3781       lt_cv_prog_cc_pic='-fno-common'
3782       ;;
3783     cygwin* | mingw* | pw32* | os2*)
3784       # This hack is so that the source file can tell whether it is being
3785       # built for inclusion in a dll (and should export symbols for example).
3786       lt_cv_prog_cc_pic='-DDLL_EXPORT'
3787       ;;
3788     sysv4*MP*)
3789       if test -d /usr/nec; then
3790          lt_cv_prog_cc_pic=-Kconform_pic
3791       fi
3792       ;;
3793     *)
3794       lt_cv_prog_cc_pic='-fPIC'
3795       ;;
3796     esac
3797   else
3798     # PORTME Check for PIC flags for the system compiler.
3799     case $host_os in
3800     aix3* | aix4* | aix5*)
3801       lt_cv_prog_cc_wl='-Wl,'
3802       # All AIX code is PIC.
3803       if test "$host_cpu" = ia64; then
3804         # AIX 5 now supports IA64 processor
3805         lt_cv_prog_cc_static='-Bstatic'
3806       else
3807         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
3808       fi
3809       ;;
3810
3811     hpux9* | hpux10* | hpux11*)
3812       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
3813       lt_cv_prog_cc_wl='-Wl,'
3814       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
3815       lt_cv_prog_cc_pic='+Z'
3816       ;;
3817
3818     irix5* | irix6*)
3819       lt_cv_prog_cc_wl='-Wl,'
3820       lt_cv_prog_cc_static='-non_shared'
3821       # PIC (with -KPIC) is the default.
3822       ;;
3823
3824     cygwin* | mingw* | pw32* | os2*)
3825       # This hack is so that the source file can tell whether it is being
3826       # built for inclusion in a dll (and should export symbols for example).
3827       lt_cv_prog_cc_pic='-DDLL_EXPORT'
3828       ;;
3829
3830     newsos6)
3831       lt_cv_prog_cc_pic='-KPIC'
3832       lt_cv_prog_cc_static='-Bstatic'
3833       ;;
3834
3835     osf3* | osf4* | osf5*)
3836       # All OSF/1 code is PIC.
3837       lt_cv_prog_cc_wl='-Wl,'
3838       lt_cv_prog_cc_static='-non_shared'
3839       ;;
3840
3841     sco3.2v5*)
3842       lt_cv_prog_cc_pic='-Kpic'
3843       lt_cv_prog_cc_static='-dn'
3844       lt_cv_prog_cc_shlib='-belf'
3845       ;;
3846
3847     solaris*)
3848       lt_cv_prog_cc_pic='-KPIC'
3849       lt_cv_prog_cc_static='-Bstatic'
3850       lt_cv_prog_cc_wl='-Wl,'
3851       ;;
3852
3853     sunos4*)
3854       lt_cv_prog_cc_pic='-PIC'
3855       lt_cv_prog_cc_static='-Bstatic'
3856       lt_cv_prog_cc_wl='-Qoption ld '
3857       ;;
3858
3859     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3860       lt_cv_prog_cc_pic='-KPIC'
3861       lt_cv_prog_cc_static='-Bstatic'
3862       if test "x$host_vendor" = xsni; then
3863         lt_cv_prog_cc_wl='-LD'
3864       else
3865         lt_cv_prog_cc_wl='-Wl,'
3866       fi
3867       ;;
3868
3869     uts4*)
3870       lt_cv_prog_cc_pic='-pic'
3871       lt_cv_prog_cc_static='-Bstatic'
3872       ;;
3873
3874     sysv4*MP*)
3875       if test -d /usr/nec ;then
3876         lt_cv_prog_cc_pic='-Kconform_pic'
3877         lt_cv_prog_cc_static='-Bstatic'
3878       fi
3879       ;;
3880
3881     *)
3882       lt_cv_prog_cc_can_build_shared=no
3883       ;;
3884     esac
3885   fi
3886
3887 fi
3888
3889 if test -z "$lt_cv_prog_cc_pic"; then
3890   echo "$as_me:3890: result: none" >&5
3891 echo "${ECHO_T}none" >&6
3892 else
3893   echo "$as_me:3893: result: $lt_cv_prog_cc_pic" >&5
3894 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
3895
3896   # Check to make sure the pic_flag actually works.
3897   echo "$as_me:3897: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
3898 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
3899   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
3900   echo $ECHO_N "(cached) $ECHO_C" >&6
3901 else
3902       save_CFLAGS="$CFLAGS"
3903     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
3904     cat >conftest.$ac_ext <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3907
3908 int
3909 main ()
3910 {
3911
3912   ;
3913   return 0;
3914 }
3915 _ACEOF
3916 rm -f conftest.$ac_objext
3917 if { (eval echo "$as_me:3917: \"$ac_compile\"") >&5
3918   (eval $ac_compile) 2>&5
3919   ac_status=$?
3920   echo "$as_me:3920: \$? = $ac_status" >&5
3921   (exit $ac_status); } &&
3922          { ac_try='test -s conftest.$ac_objext'
3923   { (eval echo "$as_me:3923: \"$ac_try\"") >&5
3924   (eval $ac_try) 2>&5
3925   ac_status=$?
3926   echo "$as_me:3926: \$? = $ac_status" >&5
3927   (exit $ac_status); }; }; then
3928         case $host_os in
3929       hpux9* | hpux10* | hpux11*)
3930         # On HP-UX, both CC and GCC only warn that PIC is supported... then
3931         # they create non-PIC objects.  So, if there were any warnings, we
3932         # assume that PIC is not supported.
3933         if test -s conftest.err; then
3934           lt_cv_prog_cc_pic_works=no
3935         else
3936           lt_cv_prog_cc_pic_works=yes
3937         fi
3938         ;;
3939       *)
3940         lt_cv_prog_cc_pic_works=yes
3941         ;;
3942       esac
3943
3944 else
3945   echo "$as_me: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947       lt_cv_prog_cc_pic_works=no
3948
3949 fi
3950 rm -f conftest.$ac_objext conftest.$ac_ext
3951     CFLAGS="$save_CFLAGS"
3952
3953 fi
3954
3955   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
3956     lt_cv_prog_cc_pic=
3957     lt_cv_prog_cc_can_build_shared=no
3958   else
3959     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
3960   fi
3961
3962   echo "$as_me:3962: result: $lt_cv_prog_cc_pic_works" >&5
3963 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
3964 fi
3965 ##
3966 ## END FIXME
3967
3968 # Check for any special shared library compilation flags.
3969 if test -n "$lt_cv_prog_cc_shlib"; then
3970   { echo "$as_me:3970: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
3971 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
3972   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
3973   else
3974    { echo "$as_me:3974: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
3975 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
3976     lt_cv_prog_cc_can_build_shared=no
3977   fi
3978 fi
3979
3980 ## FIXME: this should be a separate macro
3981 ##
3982 echo "$as_me:3982: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
3983 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
3984 if test "${lt_cv_prog_cc_static_works+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987     lt_cv_prog_cc_static_works=no
3988   save_LDFLAGS="$LDFLAGS"
3989   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
3990   cat >conftest.$ac_ext <<_ACEOF
3991 #line 3991 "configure"
3992 #include "confdefs.h"
3993
3994 int
3995 main ()
3996 {
3997
3998   ;
3999   return 0;
4000 }
4001 _ACEOF
4002 rm -f conftest.$ac_objext conftest$ac_exeext
4003 if { (eval echo "$as_me:4003: \"$ac_link\"") >&5
4004   (eval $ac_link) 2>&5
4005   ac_status=$?
4006   echo "$as_me:4006: \$? = $ac_status" >&5
4007   (exit $ac_status); } &&
4008          { ac_try='test -s conftest$ac_exeext'
4009   { (eval echo "$as_me:4009: \"$ac_try\"") >&5
4010   (eval $ac_try) 2>&5
4011   ac_status=$?
4012   echo "$as_me:4012: \$? = $ac_status" >&5
4013   (exit $ac_status); }; }; then
4014   lt_cv_prog_cc_static_works=yes
4015 else
4016   echo "$as_me: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 fi
4019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4020   LDFLAGS="$save_LDFLAGS"
4021
4022 fi
4023
4024 # Belt *and* braces to stop my trousers falling down:
4025 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4026 echo "$as_me:4026: result: $lt_cv_prog_cc_static_works" >&5
4027 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
4028
4029 pic_flag="$lt_cv_prog_cc_pic"
4030 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4031 wl="$lt_cv_prog_cc_wl"
4032 link_static_flag="$lt_cv_prog_cc_static"
4033 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4034 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4035 ##
4036 ## END FIXME
4037
4038 ## FIXME: this should be a separate macro
4039 ##
4040 # Check to see if options -o and -c are simultaneously supported by compiler
4041 echo "$as_me:4041: checking if $compiler supports -c -o file.$ac_objext" >&5
4042 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
4043 if test "${lt_cv_compiler_c_o+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046
4047 $rm -r conftest 2>/dev/null
4048 mkdir conftest
4049 cd conftest
4050 echo "int some_variable = 0;" > conftest.$ac_ext
4051 mkdir out
4052 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4053 # that will create temporary files in the current directory regardless of
4054 # the output directory.  Thus, making CWD read-only will cause this test
4055 # to fail, enabling locking or at least warning the user not to do parallel
4056 # builds.
4057 chmod -w .
4058 save_CFLAGS="$CFLAGS"
4059 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4060 compiler_c_o=no
4061 if { (eval echo configure:4061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4062   # The compiler can only warn and ignore the option if not recognized
4063   # So say no if there are warnings
4064   if test -s out/conftest.err; then
4065     lt_cv_compiler_c_o=no
4066   else
4067     lt_cv_compiler_c_o=yes
4068   fi
4069 else
4070   # Append any errors to the config.log.
4071   cat out/conftest.err 1>&5
4072   lt_cv_compiler_c_o=no
4073 fi
4074 CFLAGS="$save_CFLAGS"
4075 chmod u+w .
4076 $rm conftest* out/*
4077 rmdir out
4078 cd ..
4079 rmdir conftest
4080 $rm -r conftest 2>/dev/null
4081
4082 fi
4083
4084 compiler_c_o=$lt_cv_compiler_c_o
4085 echo "$as_me:4085: result: $compiler_c_o" >&5
4086 echo "${ECHO_T}$compiler_c_o" >&6
4087
4088 if test x"$compiler_c_o" = x"yes"; then
4089   # Check to see if we can write to a .lo
4090   echo "$as_me:4090: checking if $compiler supports -c -o file.lo" >&5
4091 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
4092   if test "${lt_cv_compiler_o_lo+set}" = set; then
4093   echo $ECHO_N "(cached) $ECHO_C" >&6
4094 else
4095
4096   lt_cv_compiler_o_lo=no
4097   save_CFLAGS="$CFLAGS"
4098   CFLAGS="$CFLAGS -c -o conftest.lo"
4099   save_objext="$ac_objext"
4100   ac_objext=lo
4101   cat >conftest.$ac_ext <<_ACEOF
4102 #line 4102 "configure"
4103 #include "confdefs.h"
4104
4105 int
4106 main ()
4107 {
4108 int some_variable = 0;
4109   ;
4110   return 0;
4111 }
4112 _ACEOF
4113 rm -f conftest.$ac_objext
4114 if { (eval echo "$as_me:4114: \"$ac_compile\"") >&5
4115   (eval $ac_compile) 2>&5
4116   ac_status=$?
4117   echo "$as_me:4117: \$? = $ac_status" >&5
4118   (exit $ac_status); } &&
4119          { ac_try='test -s conftest.$ac_objext'
4120   { (eval echo "$as_me:4120: \"$ac_try\"") >&5
4121   (eval $ac_try) 2>&5
4122   ac_status=$?
4123   echo "$as_me:4123: \$? = $ac_status" >&5
4124   (exit $ac_status); }; }; then
4125       # The compiler can only warn and ignore the option if not recognized
4126     # So say no if there are warnings
4127     if test -s conftest.err; then
4128       lt_cv_compiler_o_lo=no
4129     else
4130       lt_cv_compiler_o_lo=yes
4131     fi
4132
4133 else
4134   echo "$as_me: failed program was:" >&5
4135 cat conftest.$ac_ext >&5
4136 fi
4137 rm -f conftest.$ac_objext conftest.$ac_ext
4138   ac_objext="$save_objext"
4139   CFLAGS="$save_CFLAGS"
4140
4141 fi
4142
4143   compiler_o_lo=$lt_cv_compiler_o_lo
4144   echo "$as_me:4144: result: $compiler_o_lo" >&5
4145 echo "${ECHO_T}$compiler_o_lo" >&6
4146 else
4147   compiler_o_lo=no
4148 fi
4149 ##
4150 ## END FIXME
4151
4152 ## FIXME: this should be a separate macro
4153 ##
4154 # Check to see if we can do hard links to lock some files if needed
4155 hard_links="nottested"
4156 if test "$compiler_c_o" = no && test "$need_locks" != no; then
4157   # do not overwrite the value of need_locks provided by the user
4158   echo "$as_me:4158: checking if we can lock with hard links" >&5
4159 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
4160   hard_links=yes
4161   $rm conftest*
4162   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4163   touch conftest.a
4164   ln conftest.a conftest.b 2>&5 || hard_links=no
4165   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4166   echo "$as_me:4166: result: $hard_links" >&5
4167 echo "${ECHO_T}$hard_links" >&6
4168   if test "$hard_links" = no; then
4169     { echo "$as_me:4169: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
4170 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
4171     need_locks=warn
4172   fi
4173 else
4174   need_locks=no
4175 fi
4176 ##
4177 ## END FIXME
4178
4179 ## FIXME: this should be a separate macro
4180 ##
4181 if test "$GCC" = yes; then
4182   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
4183   echo "$as_me:4183: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
4184 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
4185   echo "int some_variable = 0;" > conftest.$ac_ext
4186   save_CFLAGS="$CFLAGS"
4187   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
4188   compiler_rtti_exceptions=no
4189   cat >conftest.$ac_ext <<_ACEOF
4190 #line 4190 "configure"
4191 #include "confdefs.h"
4192
4193 int
4194 main ()
4195 {
4196 int some_variable = 0;
4197   ;
4198   return 0;
4199 }
4200 _ACEOF
4201 rm -f conftest.$ac_objext
4202 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203   (eval $ac_compile) 2>&5
4204   ac_status=$?
4205   echo "$as_me:4205: \$? = $ac_status" >&5
4206   (exit $ac_status); } &&
4207          { ac_try='test -s conftest.$ac_objext'
4208   { (eval echo "$as_me:4208: \"$ac_try\"") >&5
4209   (eval $ac_try) 2>&5
4210   ac_status=$?
4211   echo "$as_me:4211: \$? = $ac_status" >&5
4212   (exit $ac_status); }; }; then
4213       # The compiler can only warn and ignore the option if not recognized
4214     # So say no if there are warnings
4215     if test -s conftest.err; then
4216       compiler_rtti_exceptions=no
4217     else
4218       compiler_rtti_exceptions=yes
4219     fi
4220
4221 else
4222   echo "$as_me: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4224 fi
4225 rm -f conftest.$ac_objext conftest.$ac_ext
4226   CFLAGS="$save_CFLAGS"
4227   echo "$as_me:4227: result: $compiler_rtti_exceptions" >&5
4228 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
4229
4230   if test "$compiler_rtti_exceptions" = "yes"; then
4231     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
4232   else
4233     no_builtin_flag=' -fno-builtin'
4234   fi
4235 fi
4236 ##
4237 ## END FIXME
4238
4239 ## FIXME: this should be a separate macro
4240 ##
4241 # See if the linker supports building shared libraries.
4242 echo "$as_me:4242: checking whether the linker ($LD) supports shared libraries" >&5
4243 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
4244
4245 allow_undefined_flag=
4246 no_undefined_flag=
4247 need_lib_prefix=unknown
4248 need_version=unknown
4249 # when you set need_version to no, make sure it does not cause -set_version
4250 # flags to be left without arguments
4251 archive_cmds=
4252 archive_expsym_cmds=
4253 old_archive_from_new_cmds=
4254 old_archive_from_expsyms_cmds=
4255 export_dynamic_flag_spec=
4256 whole_archive_flag_spec=
4257 thread_safe_flag_spec=
4258 hardcode_into_libs=no
4259 hardcode_libdir_flag_spec=
4260 hardcode_libdir_separator=
4261 hardcode_direct=no
4262 hardcode_minus_L=no
4263 hardcode_shlibpath_var=unsupported
4264 runpath_var=
4265 link_all_deplibs=unknown
4266 always_export_symbols=no
4267 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4268 # include_expsyms should be a list of space-separated symbols to be *always*
4269 # included in the symbol list
4270 include_expsyms=
4271 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4272 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4273 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4274 # as well as any symbol that contains `d'.
4275 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
4276 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4277 # platforms (ab)use it in PIC code, but their linkers get confused if
4278 # the symbol is explicitly referenced.  Since portable code cannot
4279 # rely on this symbol name, it's probably fine to never include it in
4280 # preloaded symbol tables.
4281 extract_expsyms_cmds=
4282
4283 case $host_os in
4284 cygwin* | mingw* | pw32*)
4285   # FIXME: the MSVC++ port hasn't been tested in a loooong time
4286   # When not using gcc, we currently assume that we are using
4287   # Microsoft Visual C++.
4288   if test "$GCC" != yes; then
4289     with_gnu_ld=no
4290   fi
4291   ;;
4292 openbsd*)
4293   with_gnu_ld=no
4294   ;;
4295 esac
4296
4297 ld_shlibs=yes
4298 if test "$with_gnu_ld" = yes; then
4299   # If archive_cmds runs LD, not CC, wlarc should be empty
4300   wlarc='${wl}'
4301
4302   # See if GNU ld supports shared libraries.
4303   case $host_os in
4304   aix3* | aix4* | aix5*)
4305     # On AIX, the GNU linker is very broken
4306     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
4307     ld_shlibs=no
4308     cat <<EOF 1>&2
4309
4310 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4311 *** to be unable to reliably create shared libraries on AIX.
4312 *** Therefore, libtool is disabling shared libraries support.  If you
4313 *** really care for shared libraries, you may want to modify your PATH
4314 *** so that a non-GNU linker is found, and then restart.
4315
4316 EOF
4317     ;;
4318
4319   amigaos*)
4320     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)'
4321     hardcode_libdir_flag_spec='-L$libdir'
4322     hardcode_minus_L=yes
4323
4324     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4325     # that the semantics of dynamic libraries on AmigaOS, at least up
4326     # to version 4, is to share data among multiple programs linked
4327     # with the same dynamic library.  Since this doesn't match the
4328     # behavior of shared libraries on other platforms, we can use
4329     # them.
4330     ld_shlibs=no
4331     ;;
4332
4333   beos*)
4334     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4335       allow_undefined_flag=unsupported
4336       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4337       # support --undefined.  This deserves some investigation.  FIXME
4338       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4339     else
4340       ld_shlibs=no
4341     fi
4342     ;;
4343
4344   cygwin* | mingw* | pw32*)
4345     # hardcode_libdir_flag_spec is actually meaningless, as there is
4346     # no search path for DLLs.
4347     hardcode_libdir_flag_spec='-L$libdir'
4348     allow_undefined_flag=unsupported
4349     always_export_symbols=yes
4350
4351     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4352       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4353       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4354       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4355       else $CC -o impgen impgen.c ; fi)~
4356       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4357
4358     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4359
4360     # cygwin and mingw dlls have different entry points and sets of symbols
4361     # to exclude.
4362     # FIXME: what about values for MSVC?
4363     dll_entry=__cygwin_dll_entry@12
4364     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4365     case $host_os in
4366     mingw*)
4367       # mingw values
4368       dll_entry=_DllMainCRTStartup@12
4369       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4370       ;;
4371     esac
4372
4373     # mingw and cygwin differ, and it's simplest to just exclude the union
4374     # of the two symbol sets.
4375     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4376
4377     # recent cygwin and mingw systems supply a stub DllMain which the user
4378     # can override, but on older systems we have to supply one (in ltdll.c)
4379     if test "x$lt_cv_need_dllmain" = "xyes"; then
4380       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4381       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~
4382         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4383     else
4384       ltdll_obj=
4385       ltdll_cmds=
4386     fi
4387
4388     # Extract the symbol export list from an `--export-all' def file,
4389     # then regenerate the def file from the symbol export list, so that
4390     # the compiled dll only exports the symbol export list.
4391     # Be careful not to strip the DATA tag left be newer dlltools.
4392     export_symbols_cmds="$ltdll_cmds"'
4393       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4394       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4395
4396     # If the export-symbols file already is a .def file (1st line
4397     # is EXPORTS), use it as is.
4398     # If DATA tags from a recent dlltool are present, honour them!
4399     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4400         cp $export_symbols $output_objdir/$soname-def;
4401       else
4402         echo EXPORTS > $output_objdir/$soname-def;
4403         _lt_hint=1;
4404         cat $export_symbols | while read symbol; do
4405          set dummy \$symbol;
4406          case \$# in
4407            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4408            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
4409          esac;
4410          _lt_hint=`expr 1 + \$_lt_hint`;
4411         done;
4412       fi~
4413       '"$ltdll_cmds"'
4414       $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~
4415       $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~
4416       $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~
4417       $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~
4418       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
4419     ;;
4420
4421   netbsd*)
4422     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4423       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4424       wlarc=
4425     else
4426       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4427       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4428     fi
4429     ;;
4430
4431   solaris* | sysv5*)
4432     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
4433       ld_shlibs=no
4434       cat <<EOF 1>&2
4435
4436 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4437 *** create shared libraries on Solaris systems.  Therefore, libtool
4438 *** is disabling shared libraries support.  We urge you to upgrade GNU
4439 *** binutils to release 2.9.1 or newer.  Another option is to modify
4440 *** your PATH or compiler configuration so that the native linker is
4441 *** used, and then restart.
4442
4443 EOF
4444     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4445       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4446       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4447     else
4448       ld_shlibs=no
4449     fi
4450     ;;
4451
4452   sunos4*)
4453     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4454     wlarc=
4455     hardcode_direct=yes
4456     hardcode_shlibpath_var=no
4457     ;;
4458
4459   *)
4460     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4461       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4462       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4463     else
4464       ld_shlibs=no
4465     fi
4466     ;;
4467   esac
4468
4469   if test "$ld_shlibs" = yes; then
4470     runpath_var=LD_RUN_PATH
4471     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
4472     export_dynamic_flag_spec='${wl}--export-dynamic'
4473     case $host_os in
4474     cygwin* | mingw* | pw32*)
4475       # dlltool doesn't understand --whole-archive et. al.
4476       whole_archive_flag_spec=
4477       ;;
4478     *)
4479       # ancient GNU ld didn't support --whole-archive et. al.
4480       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4481         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4482       else
4483         whole_archive_flag_spec=
4484       fi
4485       ;;
4486     esac
4487   fi
4488 else
4489   # PORTME fill in a description of your system's linker (not GNU ld)
4490   case $host_os in
4491   aix3*)
4492     allow_undefined_flag=unsupported
4493     always_export_symbols=yes
4494     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'
4495     # Note: this linker hardcodes the directories in LIBPATH if there
4496     # are no directories specified by -L.
4497     hardcode_minus_L=yes
4498     if test "$GCC" = yes && test -z "$link_static_flag"; then
4499       # Neither direct hardcoding nor static linking is supported with a
4500       # broken collect2.
4501       hardcode_direct=unsupported
4502     fi
4503     ;;
4504
4505   aix4* | aix5*)
4506     if test "$host_cpu" = ia64; then
4507       # On IA64, the linker does run time linking by default, so we don't
4508       # have to do anything special.
4509       aix_use_runtimelinking=no
4510       exp_sym_flag='-Bexport'
4511       no_entry_flag=""
4512     else
4513       aix_use_runtimelinking=no
4514
4515       # Test if we are trying to use run time linking or normal
4516       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4517       # need to do runtime linking.
4518       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
4519         for ld_flag in $LDFLAGS; do
4520           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4521             aix_use_runtimelinking=yes
4522             break
4523           fi
4524         done
4525       esac
4526
4527       exp_sym_flag='-bexport'
4528       no_entry_flag='-bnoentry'
4529     fi
4530
4531     # When large executables or shared objects are built, AIX ld can
4532     # have problems creating the table of contents.  If linking a library
4533     # or program results in "error TOC overflow" add -mminimal-toc to
4534     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4535     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4536
4537     hardcode_direct=yes
4538     archive_cmds=''
4539     hardcode_libdir_separator=':'
4540     if test "$GCC" = yes; then
4541       case $host_os in aix4.[012]|aix4.[012].*)
4542         collect2name=`${CC} -print-prog-name=collect2`
4543         if test -f "$collect2name" && \
4544           strings "$collect2name" | grep resolve_lib_name >/dev/null
4545         then
4546           # We have reworked collect2
4547           hardcode_direct=yes
4548         else
4549           # We have old collect2
4550           hardcode_direct=unsupported
4551           # It fails to find uninstalled libraries when the uninstalled
4552           # path is not listed in the libpath.  Setting hardcode_minus_L
4553           # to unsupported forces relinking
4554           hardcode_minus_L=yes
4555           hardcode_libdir_flag_spec='-L$libdir'
4556           hardcode_libdir_separator=
4557         fi
4558       esac
4559
4560       shared_flag='-shared'
4561     else
4562       # not using gcc
4563       if test "$host_cpu" = ia64; then
4564         shared_flag='${wl}-G'
4565       else
4566         if test "$aix_use_runtimelinking" = yes; then
4567           shared_flag='${wl}-G'
4568         else
4569           shared_flag='${wl}-bM:SRE'
4570         fi
4571       fi
4572     fi
4573
4574     # It seems that -bexpall can do strange things, so it is better to
4575     # generate a list of symbols to export.
4576     always_export_symbols=yes
4577     if test "$aix_use_runtimelinking" = yes; then
4578       # Warning - without using the other runtime loading flags (-brtl),
4579       # -berok will link without error, but may produce a broken library.
4580       allow_undefined_flag='-berok'
4581       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
4582       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"
4583     else
4584       if test "$host_cpu" = ia64; then
4585         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
4586         allow_undefined_flag="-z nodefs"
4587         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"
4588       else
4589         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
4590         # Warning - without using the other run time loading flags,
4591         # -berok will link without error, but may produce a broken library.
4592         allow_undefined_flag='${wl}-berok'
4593         # This is a bit strange, but is similar to how AIX traditionally builds
4594         # it's shared libraries.
4595         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'
4596       fi
4597     fi
4598     ;;
4599
4600   amigaos*)
4601     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)'
4602     hardcode_libdir_flag_spec='-L$libdir'
4603     hardcode_minus_L=yes
4604     # see comment about different semantics on the GNU ld section
4605     ld_shlibs=no
4606     ;;
4607
4608   cygwin* | mingw* | pw32*)
4609     # When not using gcc, we currently assume that we are using
4610     # Microsoft Visual C++.
4611     # hardcode_libdir_flag_spec is actually meaningless, as there is
4612     # no search path for DLLs.
4613     hardcode_libdir_flag_spec=' '
4614     allow_undefined_flag=unsupported
4615     # Tell ltmain to make .lib files, not .a files.
4616     libext=lib
4617     # FIXME: Setting linknames here is a bad hack.
4618     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4619     # The linker will automatically build a .lib file if we build a DLL.
4620     old_archive_from_new_cmds='true'
4621     # FIXME: Should let the user specify the lib program.
4622     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
4623     fix_srcfile_path='`cygpath -w "$srcfile"`'
4624     ;;
4625
4626   darwin* | rhapsody*)
4627     case "$host_os" in
4628     rhapsody* | darwin1.[012])
4629       allow_undefined_flag='-undefined suppress'
4630       ;;
4631     *) # Darwin 1.3 on
4632       allow_undefined_flag='-flat_namespace -undefined suppress'
4633       ;;
4634     esac
4635     # FIXME: Relying on posixy $() will cause problems for
4636     #        cross-compilation, but unfortunately the echo tests do not
4637     #        yet detect zsh echo's removal of \ escapes.
4638     archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
4639     # We need to add '_' to the symbols in $export_symbols first
4640     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
4641     hardcode_direct=yes
4642     hardcode_shlibpath_var=no
4643     whole_archive_flag_spec='-all_load $convenience'
4644     ;;
4645
4646   freebsd1*)
4647     ld_shlibs=no
4648     ;;
4649
4650   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4651   # support.  Future versions do this automatically, but an explicit c++rt0.o
4652   # does not break anything, and helps significantly (at the cost of a little
4653   # extra space).
4654   freebsd2.2*)
4655     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4656     hardcode_libdir_flag_spec='-R$libdir'
4657     hardcode_direct=yes
4658     hardcode_shlibpath_var=no
4659     ;;
4660
4661   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4662   freebsd2*)
4663     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4664     hardcode_direct=yes
4665     hardcode_minus_L=yes
4666     hardcode_shlibpath_var=no
4667     ;;
4668
4669   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4670   freebsd*)
4671     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4672     hardcode_libdir_flag_spec='-R$libdir'
4673     hardcode_direct=yes
4674     hardcode_shlibpath_var=no
4675     ;;
4676
4677   hpux9* | hpux10* | hpux11*)
4678     case $host_os in
4679     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' ;;
4680     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
4681     esac
4682     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
4683     hardcode_libdir_separator=:
4684     hardcode_direct=yes
4685     hardcode_minus_L=yes # Not in the search PATH, but as the default
4686                          # location of the library.
4687     export_dynamic_flag_spec='${wl}-E'
4688     ;;
4689
4690   irix5* | irix6*)
4691     if test "$GCC" = yes; then
4692       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'
4693     else
4694       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'
4695     fi
4696     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4697     hardcode_libdir_separator=:
4698     link_all_deplibs=yes
4699     ;;
4700
4701   netbsd*)
4702     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4703       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4704     else
4705       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4706     fi
4707     hardcode_libdir_flag_spec='-R$libdir'
4708     hardcode_direct=yes
4709     hardcode_shlibpath_var=no
4710     ;;
4711
4712   newsos6)
4713     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4714     hardcode_direct=yes
4715     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4716     hardcode_libdir_separator=:
4717     hardcode_shlibpath_var=no
4718     ;;
4719
4720   openbsd*)
4721     hardcode_direct=yes
4722     hardcode_shlibpath_var=no
4723     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4724       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4725       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
4726       export_dynamic_flag_spec='${wl}-E'
4727     else
4728       case "$host_os" in
4729       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
4730         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4731         hardcode_libdir_flag_spec='-R$libdir'
4732         ;;
4733       *)
4734         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4735         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
4736         ;;
4737       esac
4738     fi
4739     ;;
4740
4741   os2*)
4742     hardcode_libdir_flag_spec='-L$libdir'
4743     hardcode_minus_L=yes
4744     allow_undefined_flag=unsupported
4745     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'
4746     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4747     ;;
4748
4749   osf3*)
4750     if test "$GCC" = yes; then
4751       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
4752       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'
4753     else
4754       allow_undefined_flag=' -expect_unresolved \*'
4755       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'
4756     fi
4757     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4758     hardcode_libdir_separator=:
4759     ;;
4760
4761   osf4* | osf5*)        # as osf3* with the addition of -msym flag
4762     if test "$GCC" = yes; then
4763       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
4764       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'
4765       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4766     else
4767       allow_undefined_flag=' -expect_unresolved \*'
4768       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'
4769       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4770       $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'
4771
4772       #Both c and cxx compiler support -rpath directly
4773       hardcode_libdir_flag_spec='-rpath $libdir'
4774     fi
4775     hardcode_libdir_separator=:
4776     ;;
4777
4778   sco3.2v5*)
4779     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4780     hardcode_shlibpath_var=no
4781     runpath_var=LD_RUN_PATH
4782     hardcode_runpath_var=yes
4783     export_dynamic_flag_spec='${wl}-Bexport'
4784     ;;
4785
4786   solaris*)
4787     # gcc --version < 3.0 without binutils cannot create self contained
4788     # shared libraries reliably, requiring libgcc.a to resolve some of
4789     # the object symbols generated in some cases.  Libraries that use
4790     # assert need libgcc.a to resolve __eprintf, for example.  Linking
4791     # a copy of libgcc.a into every shared library to guarantee resolving
4792     # such symbols causes other problems:  According to Tim Van Holder
4793     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
4794     # (to the application) exception stack for one thing.
4795     no_undefined_flag=' -z defs'
4796     if test "$GCC" = yes; then
4797       case `$CC --version 2>/dev/null` in
4798       [12].*)
4799         cat <<EOF 1>&2
4800
4801 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
4802 *** create self contained shared libraries on Solaris systems, without
4803 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
4804 *** -no-undefined support, which will at least allow you to build shared
4805 *** libraries.  However, you may find that when you link such libraries
4806 *** into an application without using GCC, you have to manually add
4807 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
4808 *** upgrade to a newer version of GCC.  Another option is to rebuild your
4809 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
4810
4811 EOF
4812         no_undefined_flag=
4813         ;;
4814       esac
4815     fi
4816     # $CC -shared without GNU ld will not create a library from C++
4817     # object files and a static libstdc++, better avoid it by now
4818     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4819     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4820                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4821     hardcode_libdir_flag_spec='-R$libdir'
4822     hardcode_shlibpath_var=no
4823     case $host_os in
4824     solaris2.[0-5] | solaris2.[0-5].*) ;;
4825     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
4826       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
4827     esac
4828     link_all_deplibs=yes
4829     ;;
4830
4831   sunos4*)
4832     if test "x$host_vendor" = xsequent; then
4833       # Use $CC to link under sequent, because it throws in some extra .o
4834       # files that make .init and .fini sections work.
4835       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4836     else
4837       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4838     fi
4839     hardcode_libdir_flag_spec='-L$libdir'
4840     hardcode_direct=yes
4841     hardcode_minus_L=yes
4842     hardcode_shlibpath_var=no
4843     ;;
4844
4845   sysv4)
4846     if test "x$host_vendor" = xsno; then
4847       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
4848       hardcode_direct=yes # is this really true???
4849     else
4850       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4851       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
4852     fi
4853     runpath_var='LD_RUN_PATH'
4854     hardcode_shlibpath_var=no
4855     ;;
4856
4857   sysv4.3*)
4858     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4859     hardcode_shlibpath_var=no
4860     export_dynamic_flag_spec='-Bexport'
4861     ;;
4862
4863   sysv5*)
4864     no_undefined_flag=' -z text'
4865     # $CC -shared without GNU ld will not create a library from C++
4866     # object files and a static libstdc++, better avoid it by now
4867     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4868     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4869                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4870     hardcode_libdir_flag_spec=
4871     hardcode_shlibpath_var=no
4872     runpath_var='LD_RUN_PATH'
4873     ;;
4874
4875   uts4*)
4876     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4877     hardcode_libdir_flag_spec='-L$libdir'
4878     hardcode_shlibpath_var=no
4879     ;;
4880
4881   dgux*)
4882     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4883     hardcode_libdir_flag_spec='-L$libdir'
4884     hardcode_shlibpath_var=no
4885     ;;
4886
4887   sysv4*MP*)
4888     if test -d /usr/nec; then
4889       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4890       hardcode_shlibpath_var=no
4891       runpath_var=LD_RUN_PATH
4892       hardcode_runpath_var=yes
4893       ld_shlibs=yes
4894     fi
4895     ;;
4896
4897   sysv4.2uw2*)
4898     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4899     hardcode_direct=yes
4900     hardcode_minus_L=no
4901     hardcode_shlibpath_var=no
4902     hardcode_runpath_var=yes
4903     runpath_var=LD_RUN_PATH
4904     ;;
4905
4906   sysv5uw7* | unixware7*)
4907     no_undefined_flag='${wl}-z ${wl}text'
4908     if test "$GCC" = yes; then
4909       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4910     else
4911       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4912     fi
4913     runpath_var='LD_RUN_PATH'
4914     hardcode_shlibpath_var=no
4915     ;;
4916
4917   *)
4918     ld_shlibs=no
4919     ;;
4920   esac
4921 fi
4922 echo "$as_me:4922: result: $ld_shlibs" >&5
4923 echo "${ECHO_T}$ld_shlibs" >&6
4924 test "$ld_shlibs" = no && can_build_shared=no
4925 ##
4926 ## END FIXME
4927
4928 ## FIXME: this should be a separate macro
4929 ##
4930 # Check hardcoding attributes.
4931 echo "$as_me:4931: checking how to hardcode library paths into programs" >&5
4932 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
4933 hardcode_action=
4934 if test -n "$hardcode_libdir_flag_spec" || \
4935    test -n "$runpath_var"; then
4936
4937   # We can hardcode non-existant directories.
4938   if test "$hardcode_direct" != no &&
4939      # If the only mechanism to avoid hardcoding is shlibpath_var, we
4940      # have to relink, otherwise we might link with an installed library
4941      # when we should be linking with a yet-to-be-installed one
4942      ## test "$hardcode_shlibpath_var" != no &&
4943      test "$hardcode_minus_L" != no; then
4944     # Linking always hardcodes the temporary library directory.
4945     hardcode_action=relink
4946   else
4947     # We can link without hardcoding, and we can hardcode nonexisting dirs.
4948     hardcode_action=immediate
4949   fi
4950 else
4951   # We cannot hardcode anything, or else we can only hardcode existing
4952   # directories.
4953   hardcode_action=unsupported
4954 fi
4955 echo "$as_me:4955: result: $hardcode_action" >&5
4956 echo "${ECHO_T}$hardcode_action" >&6
4957 ##
4958 ## END FIXME
4959
4960 ## FIXME: this should be a separate macro
4961 ##
4962 striplib=
4963 old_striplib=
4964 echo "$as_me:4964: checking whether stripping libraries is possible" >&5
4965 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
4966 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
4967   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4968   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4969   echo "$as_me:4969: result: yes" >&5
4970 echo "${ECHO_T}yes" >&6
4971 else
4972   echo "$as_me:4972: result: no" >&5
4973 echo "${ECHO_T}no" >&6
4974 fi
4975 ##
4976 ## END FIXME
4977
4978 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4979 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4980
4981 ## FIXME: this should be a separate macro
4982 ##
4983 # PORTME Fill in your ld.so characteristics
4984 echo "$as_me:4984: checking dynamic linker characteristics" >&5
4985 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
4986 library_names_spec=
4987 libname_spec='lib$name'
4988 soname_spec=
4989 postinstall_cmds=
4990 postuninstall_cmds=
4991 finish_cmds=
4992 finish_eval=
4993 shlibpath_var=
4994 shlibpath_overrides_runpath=unknown
4995 version_type=none
4996 dynamic_linker="$host_os ld.so"
4997 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4998 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4999
5000 case $host_os in
5001 aix3*)
5002   version_type=linux
5003   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5004   shlibpath_var=LIBPATH
5005
5006   # AIX has no versioning support, so we append a major version to the name.
5007   soname_spec='${libname}${release}.so$major'
5008   ;;
5009
5010 aix4* | aix5*)
5011   version_type=linux
5012   if test "$host_cpu" = ia64; then
5013     # AIX 5 supports IA64
5014     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5015     shlibpath_var=LD_LIBRARY_PATH
5016   else
5017     # With GCC up to 2.95.x, collect2 would create an import file
5018     # for dependence libraries.  The import file would start with
5019     # the line `#! .'.  This would cause the generated library to
5020     # depend on `.', always an invalid library.  This was fixed in
5021     # development snapshots of GCC prior to 3.0.
5022     case $host_os in
5023       aix4 | aix4.[01] | aix4.[01].*)
5024         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5025              echo ' yes '
5026              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5027           :
5028         else
5029           can_build_shared=no
5030         fi
5031         ;;
5032     esac
5033     # AIX (on Power*) has no versioning support, so currently we can
5034     # not hardcode correct soname into executable. Probably we can
5035     # add versioning support to collect2, so additional links can
5036     # be useful in future.
5037     if test "$aix_use_runtimelinking" = yes; then
5038       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5039       # instead of lib<name>.a to let people know that these are not
5040       # typical AIX shared libraries.
5041       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5042     else
5043       # We preserve .a as extension for shared libraries through AIX4.2
5044       # and later when we are not doing run time linking.
5045       library_names_spec='${libname}${release}.a $libname.a'
5046       soname_spec='${libname}${release}.so$major'
5047     fi
5048     shlibpath_var=LIBPATH
5049   fi
5050   ;;
5051
5052 amigaos*)
5053   library_names_spec='$libname.ixlibrary $libname.a'
5054   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5055   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'
5056   ;;
5057
5058 beos*)
5059   library_names_spec='${libname}.so'
5060   dynamic_linker="$host_os ld.so"
5061   shlibpath_var=LIBRARY_PATH
5062   ;;
5063
5064 bsdi4*)
5065   version_type=linux
5066   need_version=no
5067   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5068   soname_spec='${libname}${release}.so$major'
5069   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5070   shlibpath_var=LD_LIBRARY_PATH
5071   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5072   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5073   export_dynamic_flag_spec=-rdynamic
5074   # the default ld.so.conf also contains /usr/contrib/lib and
5075   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5076   # libtool to hard-code these into programs
5077   ;;
5078
5079 cygwin* | mingw* | pw32*)
5080   version_type=windows
5081   need_version=no
5082   need_lib_prefix=no
5083   case $GCC,$host_os in
5084   yes,cygwin*)
5085     library_names_spec='$libname.dll.a'
5086     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5087     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5088       dldir=$destdir/`dirname \$dlpath`~
5089       test -d \$dldir || mkdir -p \$dldir~
5090       $install_prog .libs/$dlname \$dldir/$dlname'
5091     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5092       dlpath=$dir/\$dldll~
5093        $rm \$dlpath'
5094     ;;
5095   yes,mingw*)
5096     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5097     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
5098     ;;
5099   yes,pw32*)
5100     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5101     ;;
5102   *)
5103     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5104     ;;
5105   esac
5106   dynamic_linker='Win32 ld.exe'
5107   # FIXME: first we should search . and the directory the executable is in
5108   shlibpath_var=PATH
5109   ;;
5110
5111 darwin* | rhapsody*)
5112   dynamic_linker="$host_os dyld"
5113   version_type=darwin
5114   need_lib_prefix=no
5115   need_version=no
5116   # FIXME: Relying on posixy $() will cause problems for
5117   #        cross-compilation, but unfortunately the echo tests do not
5118   #        yet detect zsh echo's removal of \ escapes.
5119   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)'
5120   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5121   shlibpath_overrides_runpath=yes
5122   shlibpath_var=DYLD_LIBRARY_PATH
5123   ;;
5124
5125 freebsd1*)
5126   dynamic_linker=no
5127   ;;
5128
5129 freebsd*)
5130   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5131   version_type=freebsd-$objformat
5132   case $version_type in
5133     freebsd-elf*)
5134       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5135       need_version=no
5136       need_lib_prefix=no
5137       ;;
5138     freebsd-*)
5139       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5140       need_version=yes
5141       ;;
5142   esac
5143   shlibpath_var=LD_LIBRARY_PATH
5144   case $host_os in
5145   freebsd2*)
5146     shlibpath_overrides_runpath=yes
5147     ;;
5148   *)
5149     shlibpath_overrides_runpath=no
5150     hardcode_into_libs=yes
5151     ;;
5152   esac
5153   ;;
5154
5155 gnu*)
5156   version_type=linux
5157   need_lib_prefix=no
5158   need_version=no
5159   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5160   soname_spec='${libname}${release}.so$major'
5161   shlibpath_var=LD_LIBRARY_PATH
5162   hardcode_into_libs=yes
5163   ;;
5164
5165 hpux9* | hpux10* | hpux11*)
5166   # Give a soname corresponding to the major version so that dld.sl refuses to
5167   # link against other versions.
5168   dynamic_linker="$host_os dld.sl"
5169   version_type=sunos
5170   need_lib_prefix=no
5171   need_version=no
5172   shlibpath_var=SHLIB_PATH
5173   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
5174   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
5175   soname_spec='${libname}${release}.sl$major'
5176   # HP-UX runs *really* slowly unless shared libraries are mode 555.
5177   postinstall_cmds='chmod 555 $lib'
5178   ;;
5179
5180 irix5* | irix6*)
5181   version_type=irix
5182   need_lib_prefix=no
5183   need_version=no
5184   soname_spec='${libname}${release}.so$major'
5185   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
5186   case $host_os in
5187   irix5*)
5188     libsuff= shlibsuff=
5189     ;;
5190   *)
5191     case $LD in # libtool.m4 will add one of these switches to LD
5192     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
5193     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
5194     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
5195     *) libsuff= shlibsuff= libmagic=never-match;;
5196     esac
5197     ;;
5198   esac
5199   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
5200   shlibpath_overrides_runpath=no
5201   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
5202   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
5203   ;;
5204
5205 # No shared lib support for Linux oldld, aout, or coff.
5206 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
5207   dynamic_linker=no
5208   ;;
5209
5210 # This must be Linux ELF.
5211 linux-gnu*)
5212   version_type=linux
5213   need_lib_prefix=no
5214   need_version=no
5215   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5216   soname_spec='${libname}${release}.so$major'
5217   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
5218   shlibpath_var=LD_LIBRARY_PATH
5219   shlibpath_overrides_runpath=no
5220   # This implies no fast_install, which is unacceptable.
5221   # Some rework will be needed to allow for fast_install
5222   # before this can be enabled.
5223   hardcode_into_libs=yes
5224
5225   # We used to test for /lib/ld.so.1 and disable shared libraries on
5226   # powerpc, because MkLinux only supported shared libraries with the
5227   # GNU dynamic linker.  Since this was broken with cross compilers,
5228   # most powerpc-linux boxes support dynamic linking these days and
5229   # people can always --disable-shared, the test was removed, and we
5230   # assume the GNU/Linux dynamic linker is in use.
5231   dynamic_linker='GNU/Linux ld.so'
5232   ;;
5233
5234 netbsd*)
5235   version_type=sunos
5236   need_lib_prefix=no
5237   need_version=no
5238   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5239     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5240     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5241     dynamic_linker='NetBSD (a.out) ld.so'
5242   else
5243     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
5244     soname_spec='${libname}${release}.so$major'
5245     dynamic_linker='NetBSD ld.elf_so'
5246   fi
5247   shlibpath_var=LD_LIBRARY_PATH
5248   shlibpath_overrides_runpath=yes
5249   hardcode_into_libs=yes
5250   ;;
5251
5252 newsos6)
5253   version_type=linux
5254   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5255   shlibpath_var=LD_LIBRARY_PATH
5256   shlibpath_overrides_runpath=yes
5257   ;;
5258
5259 openbsd*)
5260   version_type=sunos
5261   need_lib_prefix=no
5262   need_version=no
5263   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5264     case "$host_os" in
5265     openbsd2.[89] | openbsd2.[89].*)
5266       shlibpath_overrides_runpath=no
5267       ;;
5268     *)
5269       shlibpath_overrides_runpath=yes
5270       ;;
5271     esac
5272   else
5273     shlibpath_overrides_runpath=yes
5274   fi
5275   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5276   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5277   shlibpath_var=LD_LIBRARY_PATH
5278   ;;
5279
5280 os2*)
5281   libname_spec='$name'
5282   need_lib_prefix=no
5283   library_names_spec='$libname.dll $libname.a'
5284   dynamic_linker='OS/2 ld.exe'
5285   shlibpath_var=LIBPATH
5286   ;;
5287
5288 osf3* | osf4* | osf5*)
5289   version_type=osf
5290   need_version=no
5291   soname_spec='${libname}${release}.so'
5292   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5293   shlibpath_var=LD_LIBRARY_PATH
5294   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5295   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5296   ;;
5297
5298 sco3.2v5*)
5299   version_type=osf
5300   soname_spec='${libname}${release}.so$major'
5301   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5302   shlibpath_var=LD_LIBRARY_PATH
5303   ;;
5304
5305 solaris*)
5306   version_type=linux
5307   need_lib_prefix=no
5308   need_version=no
5309   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5310   soname_spec='${libname}${release}.so$major'
5311   shlibpath_var=LD_LIBRARY_PATH
5312   shlibpath_overrides_runpath=yes
5313   hardcode_into_libs=yes
5314   # ldd complains unless libraries are executable
5315   postinstall_cmds='chmod +x $lib'
5316   ;;
5317
5318 sunos4*)
5319   version_type=sunos
5320   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5321   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5322   shlibpath_var=LD_LIBRARY_PATH
5323   shlibpath_overrides_runpath=yes
5324   if test "$with_gnu_ld" = yes; then
5325     need_lib_prefix=no
5326   fi
5327   need_version=yes
5328   ;;
5329
5330 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5331   version_type=linux
5332   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5333   soname_spec='${libname}${release}.so$major'
5334   shlibpath_var=LD_LIBRARY_PATH
5335   case $host_vendor in
5336     sni)
5337       shlibpath_overrides_runpath=no
5338       ;;
5339     motorola)
5340       need_lib_prefix=no
5341       need_version=no
5342       shlibpath_overrides_runpath=no
5343       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5344       ;;
5345   esac
5346   ;;
5347
5348 uts4*)
5349   version_type=linux
5350   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5351   soname_spec='${libname}${release}.so$major'
5352   shlibpath_var=LD_LIBRARY_PATH
5353   ;;
5354
5355 dgux*)
5356   version_type=linux
5357   need_lib_prefix=no
5358   need_version=no
5359   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5360   soname_spec='${libname}${release}.so$major'
5361   shlibpath_var=LD_LIBRARY_PATH
5362   ;;
5363
5364 sysv4*MP*)
5365   if test -d /usr/nec ;then
5366     version_type=linux
5367     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
5368     soname_spec='$libname.so.$major'
5369     shlibpath_var=LD_LIBRARY_PATH
5370   fi
5371   ;;
5372
5373 *)
5374   dynamic_linker=no
5375   ;;
5376 esac
5377 echo "$as_me:5377: result: $dynamic_linker" >&5
5378 echo "${ECHO_T}$dynamic_linker" >&6
5379 test "$dynamic_linker" = no && can_build_shared=no
5380 ##
5381 ## END FIXME
5382
5383 ## FIXME: this should be a separate macro
5384 ##
5385 # Report the final consequences.
5386 echo "$as_me:5386: checking if libtool supports shared libraries" >&5
5387 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
5388 echo "$as_me:5388: result: $can_build_shared" >&5
5389 echo "${ECHO_T}$can_build_shared" >&6
5390 ##
5391 ## END FIXME
5392
5393 ## FIXME: this should be a separate macro
5394 ##
5395 echo "$as_me:5395: checking whether to build shared libraries" >&5
5396 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
5397 test "$can_build_shared" = "no" && enable_shared=no
5398
5399 # On AIX, shared libraries and static libraries use the same namespace, and
5400 # are all built from PIC.
5401 case "$host_os" in
5402 aix3*)
5403   test "$enable_shared" = yes && enable_static=no
5404   if test -n "$RANLIB"; then
5405     archive_cmds="$archive_cmds~\$RANLIB \$lib"
5406     postinstall_cmds='$RANLIB $lib'
5407   fi
5408   ;;
5409
5410 aix4*)
5411   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5412     test "$enable_shared" = yes && enable_static=no
5413   fi
5414   ;;
5415 esac
5416 echo "$as_me:5416: result: $enable_shared" >&5
5417 echo "${ECHO_T}$enable_shared" >&6
5418 ##
5419 ## END FIXME
5420
5421 ## FIXME: this should be a separate macro
5422 ##
5423 echo "$as_me:5423: checking whether to build static libraries" >&5
5424 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
5425 # Make sure either enable_shared or enable_static is yes.
5426 test "$enable_shared" = yes || enable_static=yes
5427 echo "$as_me:5427: result: $enable_static" >&5
5428 echo "${ECHO_T}$enable_static" >&6
5429 ##
5430 ## END FIXME
5431
5432 if test "$hardcode_action" = relink; then
5433   # Fast installation is not supported
5434   enable_fast_install=no
5435 elif test "$shlibpath_overrides_runpath" = yes ||
5436      test "$enable_shared" = no; then
5437   # Fast installation is not necessary
5438   enable_fast_install=needless
5439 fi
5440
5441 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5442 if test "$GCC" = yes; then
5443   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5444 fi
5445
5446 if test "x$enable_dlopen" != xyes; then
5447   enable_dlopen=unknown
5448   enable_dlopen_self=unknown
5449   enable_dlopen_self_static=unknown
5450 else
5451   lt_cv_dlopen=no
5452   lt_cv_dlopen_libs=
5453
5454   case $host_os in
5455   beos*)
5456     lt_cv_dlopen="load_add_on"
5457     lt_cv_dlopen_libs=
5458     lt_cv_dlopen_self=yes
5459     ;;
5460
5461   cygwin* | mingw* | pw32*)
5462     lt_cv_dlopen="LoadLibrary"
5463     lt_cv_dlopen_libs=
5464    ;;
5465
5466   *)
5467     echo "$as_me:5467: checking for shl_load" >&5
5468 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
5469 if test "${ac_cv_func_shl_load+set}" = set; then
5470   echo $ECHO_N "(cached) $ECHO_C" >&6
5471 else
5472   cat >conftest.$ac_ext <<_ACEOF
5473 #line 5473 "configure"
5474 #include "confdefs.h"
5475 /* System header to define __stub macros and hopefully few prototypes,
5476     which can conflict with char shl_load (); below.  */
5477 #include <assert.h>
5478 /* Override any gcc2 internal prototype to avoid an error.  */
5479 #ifdef __cplusplus
5480 extern "C"
5481 #endif
5482 /* We use char because int might match the return type of a gcc2
5483    builtin and then its argument prototype would still apply.  */
5484 char shl_load ();
5485 char (*f) ();
5486
5487 int
5488 main ()
5489 {
5490 /* The GNU C library defines this for functions which it implements
5491     to always fail with ENOSYS.  Some functions are actually named
5492     something starting with __ and the normal name is an alias.  */
5493 #if defined (__stub_shl_load) || defined (__stub___shl_load)
5494 choke me
5495 #else
5496 f = shl_load;
5497 #endif
5498
5499   ;
5500   return 0;
5501 }
5502 _ACEOF
5503 rm -f conftest.$ac_objext conftest$ac_exeext
5504 if { (eval echo "$as_me:5504: \"$ac_link\"") >&5
5505   (eval $ac_link) 2>&5
5506   ac_status=$?
5507   echo "$as_me:5507: \$? = $ac_status" >&5
5508   (exit $ac_status); } &&
5509          { ac_try='test -s conftest$ac_exeext'
5510   { (eval echo "$as_me:5510: \"$ac_try\"") >&5
5511   (eval $ac_try) 2>&5
5512   ac_status=$?
5513   echo "$as_me:5513: \$? = $ac_status" >&5
5514   (exit $ac_status); }; }; then
5515   ac_cv_func_shl_load=yes
5516 else
5517   echo "$as_me: failed program was:" >&5
5518 cat conftest.$ac_ext >&5
5519 ac_cv_func_shl_load=no
5520 fi
5521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5522 fi
5523 echo "$as_me:5523: result: $ac_cv_func_shl_load" >&5
5524 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
5525 if test $ac_cv_func_shl_load = yes; then
5526   lt_cv_dlopen="shl_load"
5527 else
5528   echo "$as_me:5528: checking for shl_load in -ldld" >&5
5529 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
5530 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
5531   echo $ECHO_N "(cached) $ECHO_C" >&6
5532 else
5533   ac_check_lib_save_LIBS=$LIBS
5534 LIBS="-ldld  $LIBS"
5535 cat >conftest.$ac_ext <<_ACEOF
5536 #line 5536 "configure"
5537 #include "confdefs.h"
5538
5539 /* Override any gcc2 internal prototype to avoid an error.  */
5540 #ifdef __cplusplus
5541 extern "C"
5542 #endif
5543 /* We use char because int might match the return type of a gcc2
5544    builtin and then its argument prototype would still apply.  */
5545 char shl_load ();
5546 int
5547 main ()
5548 {
5549 shl_load ();
5550   ;
5551   return 0;
5552 }
5553 _ACEOF
5554 rm -f conftest.$ac_objext conftest$ac_exeext
5555 if { (eval echo "$as_me:5555: \"$ac_link\"") >&5
5556   (eval $ac_link) 2>&5
5557   ac_status=$?
5558   echo "$as_me:5558: \$? = $ac_status" >&5
5559   (exit $ac_status); } &&
5560          { ac_try='test -s conftest$ac_exeext'
5561   { (eval echo "$as_me:5561: \"$ac_try\"") >&5
5562   (eval $ac_try) 2>&5
5563   ac_status=$?
5564   echo "$as_me:5564: \$? = $ac_status" >&5
5565   (exit $ac_status); }; }; then
5566   ac_cv_lib_dld_shl_load=yes
5567 else
5568   echo "$as_me: failed program was:" >&5
5569 cat conftest.$ac_ext >&5
5570 ac_cv_lib_dld_shl_load=no
5571 fi
5572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5573 LIBS=$ac_check_lib_save_LIBS
5574 fi
5575 echo "$as_me:5575: result: $ac_cv_lib_dld_shl_load" >&5
5576 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
5577 if test $ac_cv_lib_dld_shl_load = yes; then
5578   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
5579 else
5580   echo "$as_me:5580: checking for dlopen" >&5
5581 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
5582 if test "${ac_cv_func_dlopen+set}" = set; then
5583   echo $ECHO_N "(cached) $ECHO_C" >&6
5584 else
5585   cat >conftest.$ac_ext <<_ACEOF
5586 #line 5586 "configure"
5587 #include "confdefs.h"
5588 /* System header to define __stub macros and hopefully few prototypes,
5589     which can conflict with char dlopen (); below.  */
5590 #include <assert.h>
5591 /* Override any gcc2 internal prototype to avoid an error.  */
5592 #ifdef __cplusplus
5593 extern "C"
5594 #endif
5595 /* We use char because int might match the return type of a gcc2
5596    builtin and then its argument prototype would still apply.  */
5597 char dlopen ();
5598 char (*f) ();
5599
5600 int
5601 main ()
5602 {
5603 /* The GNU C library defines this for functions which it implements
5604     to always fail with ENOSYS.  Some functions are actually named
5605     something starting with __ and the normal name is an alias.  */
5606 #if defined (__stub_dlopen) || defined (__stub___dlopen)
5607 choke me
5608 #else
5609 f = dlopen;
5610 #endif
5611
5612   ;
5613   return 0;
5614 }
5615 _ACEOF
5616 rm -f conftest.$ac_objext conftest$ac_exeext
5617 if { (eval echo "$as_me:5617: \"$ac_link\"") >&5
5618   (eval $ac_link) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); } &&
5622          { ac_try='test -s conftest$ac_exeext'
5623   { (eval echo "$as_me:5623: \"$ac_try\"") >&5
5624   (eval $ac_try) 2>&5
5625   ac_status=$?
5626   echo "$as_me:5626: \$? = $ac_status" >&5
5627   (exit $ac_status); }; }; then
5628   ac_cv_func_dlopen=yes
5629 else
5630   echo "$as_me: failed program was:" >&5
5631 cat conftest.$ac_ext >&5
5632 ac_cv_func_dlopen=no
5633 fi
5634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5635 fi
5636 echo "$as_me:5636: result: $ac_cv_func_dlopen" >&5
5637 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
5638 if test $ac_cv_func_dlopen = yes; then
5639   lt_cv_dlopen="dlopen"
5640 else
5641   echo "$as_me:5641: checking for dlopen in -ldl" >&5
5642 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
5643 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
5644   echo $ECHO_N "(cached) $ECHO_C" >&6
5645 else
5646   ac_check_lib_save_LIBS=$LIBS
5647 LIBS="-ldl  $LIBS"
5648 cat >conftest.$ac_ext <<_ACEOF
5649 #line 5649 "configure"
5650 #include "confdefs.h"
5651
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 #ifdef __cplusplus
5654 extern "C"
5655 #endif
5656 /* We use char because int might match the return type of a gcc2
5657    builtin and then its argument prototype would still apply.  */
5658 char dlopen ();
5659 int
5660 main ()
5661 {
5662 dlopen ();
5663   ;
5664   return 0;
5665 }
5666 _ACEOF
5667 rm -f conftest.$ac_objext conftest$ac_exeext
5668 if { (eval echo "$as_me:5668: \"$ac_link\"") >&5
5669   (eval $ac_link) 2>&5
5670   ac_status=$?
5671   echo "$as_me:5671: \$? = $ac_status" >&5
5672   (exit $ac_status); } &&
5673          { ac_try='test -s conftest$ac_exeext'
5674   { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5675   (eval $ac_try) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); }; }; then
5679   ac_cv_lib_dl_dlopen=yes
5680 else
5681   echo "$as_me: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 ac_cv_lib_dl_dlopen=no
5684 fi
5685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5686 LIBS=$ac_check_lib_save_LIBS
5687 fi
5688 echo "$as_me:5688: result: $ac_cv_lib_dl_dlopen" >&5
5689 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
5690 if test $ac_cv_lib_dl_dlopen = yes; then
5691   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
5692 else
5693   echo "$as_me:5693: checking for dlopen in -lsvld" >&5
5694 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
5695 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
5696   echo $ECHO_N "(cached) $ECHO_C" >&6
5697 else
5698   ac_check_lib_save_LIBS=$LIBS
5699 LIBS="-lsvld  $LIBS"
5700 cat >conftest.$ac_ext <<_ACEOF
5701 #line 5701 "configure"
5702 #include "confdefs.h"
5703
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 #ifdef __cplusplus
5706 extern "C"
5707 #endif
5708 /* We use char because int might match the return type of a gcc2
5709    builtin and then its argument prototype would still apply.  */
5710 char dlopen ();
5711 int
5712 main ()
5713 {
5714 dlopen ();
5715   ;
5716   return 0;
5717 }
5718 _ACEOF
5719 rm -f conftest.$ac_objext conftest$ac_exeext
5720 if { (eval echo "$as_me:5720: \"$ac_link\"") >&5
5721   (eval $ac_link) 2>&5
5722   ac_status=$?
5723   echo "$as_me:5723: \$? = $ac_status" >&5
5724   (exit $ac_status); } &&
5725          { ac_try='test -s conftest$ac_exeext'
5726   { (eval echo "$as_me:5726: \"$ac_try\"") >&5
5727   (eval $ac_try) 2>&5
5728   ac_status=$?
5729   echo "$as_me:5729: \$? = $ac_status" >&5
5730   (exit $ac_status); }; }; then
5731   ac_cv_lib_svld_dlopen=yes
5732 else
5733   echo "$as_me: failed program was:" >&5
5734 cat conftest.$ac_ext >&5
5735 ac_cv_lib_svld_dlopen=no
5736 fi
5737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5738 LIBS=$ac_check_lib_save_LIBS
5739 fi
5740 echo "$as_me:5740: result: $ac_cv_lib_svld_dlopen" >&5
5741 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
5742 if test $ac_cv_lib_svld_dlopen = yes; then
5743   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
5744 else
5745   echo "$as_me:5745: checking for dld_link in -ldld" >&5
5746 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
5747 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
5748   echo $ECHO_N "(cached) $ECHO_C" >&6
5749 else
5750   ac_check_lib_save_LIBS=$LIBS
5751 LIBS="-ldld  $LIBS"
5752 cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755
5756 /* Override any gcc2 internal prototype to avoid an error.  */
5757 #ifdef __cplusplus
5758 extern "C"
5759 #endif
5760 /* We use char because int might match the return type of a gcc2
5761    builtin and then its argument prototype would still apply.  */
5762 char dld_link ();
5763 int
5764 main ()
5765 {
5766 dld_link ();
5767   ;
5768   return 0;
5769 }
5770 _ACEOF
5771 rm -f conftest.$ac_objext conftest$ac_exeext
5772 if { (eval echo "$as_me:5772: \"$ac_link\"") >&5
5773   (eval $ac_link) 2>&5
5774   ac_status=$?
5775   echo "$as_me:5775: \$? = $ac_status" >&5
5776   (exit $ac_status); } &&
5777          { ac_try='test -s conftest$ac_exeext'
5778   { (eval echo "$as_me:5778: \"$ac_try\"") >&5
5779   (eval $ac_try) 2>&5
5780   ac_status=$?
5781   echo "$as_me:5781: \$? = $ac_status" >&5
5782   (exit $ac_status); }; }; then
5783   ac_cv_lib_dld_dld_link=yes
5784 else
5785   echo "$as_me: failed program was:" >&5
5786 cat conftest.$ac_ext >&5
5787 ac_cv_lib_dld_dld_link=no
5788 fi
5789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5790 LIBS=$ac_check_lib_save_LIBS
5791 fi
5792 echo "$as_me:5792: result: $ac_cv_lib_dld_dld_link" >&5
5793 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
5794 if test $ac_cv_lib_dld_dld_link = yes; then
5795   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
5796 fi
5797
5798 fi
5799
5800 fi
5801
5802 fi
5803
5804 fi
5805
5806 fi
5807
5808     ;;
5809   esac
5810
5811   if test "x$lt_cv_dlopen" != xno; then
5812     enable_dlopen=yes
5813   else
5814     enable_dlopen=no
5815   fi
5816
5817   case $lt_cv_dlopen in
5818   dlopen)
5819     save_CPPFLAGS="$CPPFLAGS"
5820         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5821
5822     save_LDFLAGS="$LDFLAGS"
5823     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5824
5825     save_LIBS="$LIBS"
5826     LIBS="$lt_cv_dlopen_libs $LIBS"
5827
5828     echo "$as_me:5828: checking whether a program can dlopen itself" >&5
5829 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
5830 if test "${lt_cv_dlopen_self+set}" = set; then
5831   echo $ECHO_N "(cached) $ECHO_C" >&6
5832 else
5833           if test "$cross_compiling" = yes; then :
5834   lt_cv_dlopen_self=cross
5835 else
5836     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5837   lt_status=$lt_dlunknown
5838   cat > conftest.$ac_ext <<EOF
5839 #line 5839 "configure"
5840 #include "confdefs.h"
5841
5842 #if HAVE_DLFCN_H
5843 #include <dlfcn.h>
5844 #endif
5845
5846 #include <stdio.h>
5847
5848 #ifdef RTLD_GLOBAL
5849 #  define LT_DLGLOBAL           RTLD_GLOBAL
5850 #else
5851 #  ifdef DL_GLOBAL
5852 #    define LT_DLGLOBAL         DL_GLOBAL
5853 #  else
5854 #    define LT_DLGLOBAL         0
5855 #  endif
5856 #endif
5857
5858 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5859    find out it does not work in some platform. */
5860 #ifndef LT_DLLAZY_OR_NOW
5861 #  ifdef RTLD_LAZY
5862 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
5863 #  else
5864 #    ifdef DL_LAZY
5865 #      define LT_DLLAZY_OR_NOW          DL_LAZY
5866 #    else
5867 #      ifdef RTLD_NOW
5868 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
5869 #      else
5870 #        ifdef DL_NOW
5871 #          define LT_DLLAZY_OR_NOW      DL_NOW
5872 #        else
5873 #          define LT_DLLAZY_OR_NOW      0
5874 #        endif
5875 #      endif
5876 #    endif
5877 #  endif
5878 #endif
5879
5880 #ifdef __cplusplus
5881 extern "C" void exit (int);
5882 #endif
5883
5884 void fnord() { int i=42;}
5885 int main ()
5886 {
5887   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5888   int status = $lt_dlunknown;
5889
5890   if (self)
5891     {
5892       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5893       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
5894       /* dlclose (self); */
5895     }
5896
5897     exit (status);
5898 }
5899 EOF
5900   if { (eval echo "$as_me:5900: \"$ac_link\"") >&5
5901   (eval $ac_link) 2>&5
5902   ac_status=$?
5903   echo "$as_me:5903: \$? = $ac_status" >&5
5904   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
5905     (./conftest; exit; ) 2>/dev/null
5906     lt_status=$?
5907     case x$lt_status in
5908       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
5909       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
5910       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
5911     esac
5912   else :
5913     # compilation failed
5914     lt_cv_dlopen_self=no
5915   fi
5916 fi
5917 rm -fr conftest*
5918
5919 fi
5920 echo "$as_me:5920: result: $lt_cv_dlopen_self" >&5
5921 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
5922
5923     if test "x$lt_cv_dlopen_self" = xyes; then
5924       LDFLAGS="$LDFLAGS $link_static_flag"
5925       echo "$as_me:5925: checking whether a statically linked program can dlopen itself" >&5
5926 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
5927 if test "${lt_cv_dlopen_self_static+set}" = set; then
5928   echo $ECHO_N "(cached) $ECHO_C" >&6
5929 else
5930           if test "$cross_compiling" = yes; then :
5931   lt_cv_dlopen_self_static=cross
5932 else
5933     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5934   lt_status=$lt_dlunknown
5935   cat > conftest.$ac_ext <<EOF
5936 #line 5936 "configure"
5937 #include "confdefs.h"
5938
5939 #if HAVE_DLFCN_H
5940 #include <dlfcn.h>
5941 #endif
5942
5943 #include <stdio.h>
5944
5945 #ifdef RTLD_GLOBAL
5946 #  define LT_DLGLOBAL           RTLD_GLOBAL
5947 #else
5948 #  ifdef DL_GLOBAL
5949 #    define LT_DLGLOBAL         DL_GLOBAL
5950 #  else
5951 #    define LT_DLGLOBAL         0
5952 #  endif
5953 #endif
5954
5955 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5956    find out it does not work in some platform. */
5957 #ifndef LT_DLLAZY_OR_NOW
5958 #  ifdef RTLD_LAZY
5959 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
5960 #  else
5961 #    ifdef DL_LAZY
5962 #      define LT_DLLAZY_OR_NOW          DL_LAZY
5963 #    else
5964 #      ifdef RTLD_NOW
5965 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
5966 #      else
5967 #        ifdef DL_NOW
5968 #          define LT_DLLAZY_OR_NOW      DL_NOW
5969 #        else
5970 #          define LT_DLLAZY_OR_NOW      0
5971 #        endif
5972 #      endif
5973 #    endif
5974 #  endif
5975 #endif
5976
5977 #ifdef __cplusplus
5978 extern "C" void exit (int);
5979 #endif
5980
5981 void fnord() { int i=42;}
5982 int main ()
5983 {
5984   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5985   int status = $lt_dlunknown;
5986
5987   if (self)
5988     {
5989       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5990       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
5991       /* dlclose (self); */
5992     }
5993
5994     exit (status);
5995 }
5996 EOF
5997   if { (eval echo "$as_me:5997: \"$ac_link\"") >&5
5998   (eval $ac_link) 2>&5
5999   ac_status=$?
6000   echo "$as_me:6000: \$? = $ac_status" >&5
6001   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
6002     (./conftest; exit; ) 2>/dev/null
6003     lt_status=$?
6004     case x$lt_status in
6005       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6006       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6007       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6008     esac
6009   else :
6010     # compilation failed
6011     lt_cv_dlopen_self_static=no
6012   fi
6013 fi
6014 rm -fr conftest*
6015
6016 fi
6017 echo "$as_me:6017: result: $lt_cv_dlopen_self_static" >&5
6018 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
6019     fi
6020
6021     CPPFLAGS="$save_CPPFLAGS"
6022     LDFLAGS="$save_LDFLAGS"
6023     LIBS="$save_LIBS"
6024     ;;
6025   esac
6026
6027   case $lt_cv_dlopen_self in
6028   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6029   *) enable_dlopen_self=unknown ;;
6030   esac
6031
6032   case $lt_cv_dlopen_self_static in
6033   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6034   *) enable_dlopen_self_static=unknown ;;
6035   esac
6036 fi
6037
6038 ## FIXME: this should be a separate macro
6039 ##
6040 if test "$enable_shared" = yes && test "$GCC" = yes; then
6041   case $archive_cmds in
6042   *'~'*)
6043     # FIXME: we may have to deal with multi-command sequences.
6044     ;;
6045   '$CC '*)
6046     # Test whether the compiler implicitly links with -lc since on some
6047     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6048     # to ld, don't add -lc before -lgcc.
6049     echo "$as_me:6049: checking whether -lc should be explicitly linked in" >&5
6050 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
6051     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
6052   echo $ECHO_N "(cached) $ECHO_C" >&6
6053 else
6054   $rm conftest*
6055     echo 'static int dummy;' > conftest.$ac_ext
6056
6057     if { (eval echo "$as_me:6057: \"$ac_compile\"") >&5
6058   (eval $ac_compile) 2>&5
6059   ac_status=$?
6060   echo "$as_me:6060: \$? = $ac_status" >&5
6061   (exit $ac_status); }; then
6062       soname=conftest
6063       lib=conftest
6064       libobjs=conftest.$ac_objext
6065       deplibs=
6066       wl=$lt_cv_prog_cc_wl
6067       compiler_flags=-v
6068       linker_flags=-v
6069       verstring=
6070       output_objdir=.
6071       libname=conftest
6072       save_allow_undefined_flag=$allow_undefined_flag
6073       allow_undefined_flag=
6074       if { (eval echo "$as_me:6074: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
6075   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
6076   ac_status=$?
6077   echo "$as_me:6077: \$? = $ac_status" >&5
6078   (exit $ac_status); }
6079       then
6080         lt_cv_archive_cmds_need_lc=no
6081       else
6082         lt_cv_archive_cmds_need_lc=yes
6083       fi
6084       allow_undefined_flag=$save_allow_undefined_flag
6085     else
6086       cat conftest.err 1>&5
6087     fi
6088 fi
6089
6090     echo "$as_me:6090: result: $lt_cv_archive_cmds_need_lc" >&5
6091 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
6092     ;;
6093   esac
6094 fi
6095 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6096 ##
6097 ## END FIXME
6098
6099 ## FIXME: this should be a separate macro
6100 ##
6101 # The second clause should only fire when bootstrapping the
6102 # libtool distribution, otherwise you forgot to ship ltmain.sh
6103 # with your package, and you will get complaints that there are
6104 # no rules to generate ltmain.sh.
6105 if test -f "$ltmain"; then
6106   :
6107 else
6108   # If there is no Makefile yet, we rely on a make rule to execute
6109   # `config.status --recheck' to rerun these tests and create the
6110   # libtool script then.
6111   test -f Makefile && make "$ltmain"
6112 fi
6113
6114 if test -f "$ltmain"; then
6115   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6116   $rm -f "${ofile}T"
6117
6118   echo creating $ofile
6119
6120   # Now quote all the things that may contain metacharacters while being
6121   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6122   # variables and quote the copies for generation of the libtool script.
6123   for var in echo old_CC old_CFLAGS \
6124     AR AR_FLAGS CC LD LN_S NM SHELL \
6125     reload_flag reload_cmds wl \
6126     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6127     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6128     library_names_spec soname_spec \
6129     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6130     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6131     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6132     old_striplib striplib file_magic_cmd export_symbols_cmds \
6133     deplibs_check_method allow_undefined_flag no_undefined_flag \
6134     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6135     global_symbol_to_c_name_address \
6136     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6137     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6138     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6139
6140     case $var in
6141     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6142     old_postinstall_cmds | old_postuninstall_cmds | \
6143     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6144     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6145     postinstall_cmds | postuninstall_cmds | \
6146     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6147       # Double-quote double-evaled strings.
6148       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6149       ;;
6150     *)
6151       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6152       ;;
6153     esac
6154   done
6155
6156   cat <<__EOF__ > "${ofile}T"
6157 #! $SHELL
6158
6159 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6160 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6161 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6162 #
6163 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6164 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6165 #
6166 # This program is free software; you can redistribute it and/or modify
6167 # it under the terms of the GNU General Public License as published by
6168 # the Free Software Foundation; either version 2 of the License, or
6169 # (at your option) any later version.
6170 #
6171 # This program is distributed in the hope that it will be useful, but
6172 # WITHOUT ANY WARRANTY; without even the implied warranty of
6173 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6174 # General Public License for more details.
6175 #
6176 # You should have received a copy of the GNU General Public License
6177 # along with this program; if not, write to the Free Software
6178 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6179 #
6180 # As a special exception to the GNU General Public License, if you
6181 # distribute this file as part of a program that contains a
6182 # configuration script generated by Autoconf, you may include it under
6183 # the same distribution terms that you use for the rest of that program.
6184
6185 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6186 Xsed="sed -e s/^X//"
6187
6188 # The HP-UX ksh and POSIX shell print the target directory to stdout
6189 # if CDPATH is set.
6190 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6191
6192 # ### BEGIN LIBTOOL CONFIG
6193
6194 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6195
6196 # Shell to use when invoking shell scripts.
6197 SHELL=$lt_SHELL
6198
6199 # Whether or not to build shared libraries.
6200 build_libtool_libs=$enable_shared
6201
6202 # Whether or not to build static libraries.
6203 build_old_libs=$enable_static
6204
6205 # Whether or not to add -lc for building shared libraries.
6206 build_libtool_need_lc=$need_lc
6207
6208 # Whether or not to optimize for fast installation.
6209 fast_install=$enable_fast_install
6210
6211 # The host system.
6212 host_alias=$host_alias
6213 host=$host
6214
6215 # An echo program that does not interpret backslashes.
6216 echo=$lt_echo
6217
6218 # The archiver.
6219 AR=$lt_AR
6220 AR_FLAGS=$lt_AR_FLAGS
6221
6222 # The default C compiler.
6223 CC=$lt_CC
6224
6225 # Is the compiler the GNU C compiler?
6226 with_gcc=$GCC
6227
6228 # The linker used to build libraries.
6229 LD=$lt_LD
6230
6231 # Whether we need hard or soft links.
6232 LN_S=$lt_LN_S
6233
6234 # A BSD-compatible nm program.
6235 NM=$lt_NM
6236
6237 # A symbol stripping program
6238 STRIP=$STRIP
6239
6240 # Used to examine libraries when file_magic_cmd begins "file"
6241 MAGIC_CMD=$MAGIC_CMD
6242
6243 # Used on cygwin: DLL creation program.
6244 DLLTOOL="$DLLTOOL"
6245
6246 # Used on cygwin: object dumper.
6247 OBJDUMP="$OBJDUMP"
6248
6249 # Used on cygwin: assembler.
6250 AS="$AS"
6251
6252 # The name of the directory that contains temporary libtool files.
6253 objdir=$objdir
6254
6255 # How to create reloadable object files.
6256 reload_flag=$lt_reload_flag
6257 reload_cmds=$lt_reload_cmds
6258
6259 # How to pass a linker flag through the compiler.
6260 wl=$lt_wl
6261
6262 # Object file suffix (normally "o").
6263 objext="$ac_objext"
6264
6265 # Old archive suffix (normally "a").
6266 libext="$libext"
6267
6268 # Executable file suffix (normally "").
6269 exeext="$exeext"
6270
6271 # Additional compiler flags for building library objects.
6272 pic_flag=$lt_pic_flag
6273 pic_mode=$pic_mode
6274
6275 # Does compiler simultaneously support -c and -o options?
6276 compiler_c_o=$lt_compiler_c_o
6277
6278 # Can we write directly to a .lo ?
6279 compiler_o_lo=$lt_compiler_o_lo
6280
6281 # Must we lock files when doing compilation ?
6282 need_locks=$lt_need_locks
6283
6284 # Do we need the lib prefix for modules?
6285 need_lib_prefix=$need_lib_prefix
6286
6287 # Do we need a version for libraries?
6288 need_version=$need_version
6289
6290 # Whether dlopen is supported.
6291 dlopen_support=$enable_dlopen
6292
6293 # Whether dlopen of programs is supported.
6294 dlopen_self=$enable_dlopen_self
6295
6296 # Whether dlopen of statically linked programs is supported.
6297 dlopen_self_static=$enable_dlopen_self_static
6298
6299 # Compiler flag to prevent dynamic linking.
6300 link_static_flag=$lt_link_static_flag
6301
6302 # Compiler flag to turn off builtin functions.
6303 no_builtin_flag=$lt_no_builtin_flag
6304
6305 # Compiler flag to allow reflexive dlopens.
6306 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
6307
6308 # Compiler flag to generate shared objects directly from archives.
6309 whole_archive_flag_spec=$lt_whole_archive_flag_spec
6310
6311 # Compiler flag to generate thread-safe objects.
6312 thread_safe_flag_spec=$lt_thread_safe_flag_spec
6313
6314 # Library versioning type.
6315 version_type=$version_type
6316
6317 # Format of library name prefix.
6318 libname_spec=$lt_libname_spec
6319
6320 # List of archive names.  First name is the real one, the rest are links.
6321 # The last name is the one that the linker finds with -lNAME.
6322 library_names_spec=$lt_library_names_spec
6323
6324 # The coded name of the library, if different from the real name.
6325 soname_spec=$lt_soname_spec
6326
6327 # Commands used to build and install an old-style archive.
6328 RANLIB=$lt_RANLIB
6329 old_archive_cmds=$lt_old_archive_cmds
6330 old_postinstall_cmds=$lt_old_postinstall_cmds
6331 old_postuninstall_cmds=$lt_old_postuninstall_cmds
6332
6333 # Create an old-style archive from a shared archive.
6334 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
6335
6336 # Create a temporary old-style archive to link instead of a shared archive.
6337 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
6338
6339 # Commands used to build and install a shared archive.
6340 archive_cmds=$lt_archive_cmds
6341 archive_expsym_cmds=$lt_archive_expsym_cmds
6342 postinstall_cmds=$lt_postinstall_cmds
6343 postuninstall_cmds=$lt_postuninstall_cmds
6344
6345 # Commands to strip libraries.
6346 old_striplib=$lt_old_striplib
6347 striplib=$lt_striplib
6348
6349 # Method to check whether dependent libraries are shared objects.
6350 deplibs_check_method=$lt_deplibs_check_method
6351
6352 # Command to use when deplibs_check_method == file_magic.
6353 file_magic_cmd=$lt_file_magic_cmd
6354
6355 # Flag that allows shared libraries with undefined symbols to be built.
6356 allow_undefined_flag=$lt_allow_undefined_flag
6357
6358 # Flag that forces no undefined symbols.
6359 no_undefined_flag=$lt_no_undefined_flag
6360
6361 # Commands used to finish a libtool library installation in a directory.
6362 finish_cmds=$lt_finish_cmds
6363
6364 # Same as above, but a single script fragment to be evaled but not shown.
6365 finish_eval=$lt_finish_eval
6366
6367 # Take the output of nm and produce a listing of raw symbols and C names.
6368 global_symbol_pipe=$lt_global_symbol_pipe
6369
6370 # Transform the output of nm in a proper C declaration
6371 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
6372
6373 # Transform the output of nm in a C name address pair
6374 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
6375
6376 # This is the shared library runtime path variable.
6377 runpath_var=$runpath_var
6378
6379 # This is the shared library path variable.
6380 shlibpath_var=$shlibpath_var
6381
6382 # Is shlibpath searched before the hard-coded library search path?
6383 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6384
6385 # How to hardcode a shared library path into an executable.
6386 hardcode_action=$hardcode_action
6387
6388 # Whether we should hardcode library paths into libraries.
6389 hardcode_into_libs=$hardcode_into_libs
6390
6391 # Flag to hardcode \$libdir into a binary during linking.
6392 # This must work even if \$libdir does not exist.
6393 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
6394
6395 # Whether we need a single -rpath flag with a separated argument.
6396 hardcode_libdir_separator=$lt_hardcode_libdir_separator
6397
6398 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
6399 # resulting binary.
6400 hardcode_direct=$hardcode_direct
6401
6402 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6403 # resulting binary.
6404 hardcode_minus_L=$hardcode_minus_L
6405
6406 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6407 # the resulting binary.
6408 hardcode_shlibpath_var=$hardcode_shlibpath_var
6409
6410 # Variables whose values should be saved in libtool wrapper scripts and
6411 # restored at relink time.
6412 variables_saved_for_relink="$variables_saved_for_relink"
6413
6414 # Whether libtool must link a program against all its dependency libraries.
6415 link_all_deplibs=$link_all_deplibs
6416
6417 # Compile-time system search path for libraries
6418 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6419
6420 # Run-time system search path for libraries
6421 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6422
6423 # Fix the shell variable \$srcfile for the compiler.
6424 fix_srcfile_path="$fix_srcfile_path"
6425
6426 # Set to yes if exported symbols are required.
6427 always_export_symbols=$always_export_symbols
6428
6429 # The commands to list exported symbols.
6430 export_symbols_cmds=$lt_export_symbols_cmds
6431
6432 # The commands to extract the exported symbol list from a shared archive.
6433 extract_expsyms_cmds=$lt_extract_expsyms_cmds
6434
6435 # Symbols that should not be listed in the preloaded symbols.
6436 exclude_expsyms=$lt_exclude_expsyms
6437
6438 # Symbols that must always be exported.
6439 include_expsyms=$lt_include_expsyms
6440
6441 # ### END LIBTOOL CONFIG
6442
6443 __EOF__
6444
6445   case $host_os in
6446   aix3*)
6447     cat <<\EOF >> "${ofile}T"
6448
6449 # AIX sometimes has problems with the GCC collect2 program.  For some
6450 # reason, if we set the COLLECT_NAMES environment variable, the problems
6451 # vanish in a puff of smoke.
6452 if test "X${COLLECT_NAMES+set}" != Xset; then
6453   COLLECT_NAMES=
6454   export COLLECT_NAMES
6455 fi
6456 EOF
6457     ;;
6458   esac
6459
6460   case $host_os in
6461   cygwin* | mingw* | pw32* | os2*)
6462     cat <<'EOF' >> "${ofile}T"
6463       # This is a source program that is used to create dlls on Windows
6464       # Don't remove nor modify the starting and closing comments
6465 # /* ltdll.c starts here */
6466 # #define WIN32_LEAN_AND_MEAN
6467 # #include <windows.h>
6468 # #undef WIN32_LEAN_AND_MEAN
6469 # #include <stdio.h>
6470 #
6471 # #ifndef __CYGWIN__
6472 # #  ifdef __CYGWIN32__
6473 # #    define __CYGWIN__ __CYGWIN32__
6474 # #  endif
6475 # #endif
6476 #
6477 # #ifdef __cplusplus
6478 # extern "C" {
6479 # #endif
6480 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6481 # #ifdef __cplusplus
6482 # }
6483 # #endif
6484 #
6485 # #ifdef __CYGWIN__
6486 # #include <cygwin/cygwin_dll.h>
6487 # DECLARE_CYGWIN_DLL( DllMain );
6488 # #endif
6489 # HINSTANCE __hDllInstance_base;
6490 #
6491 # BOOL APIENTRY
6492 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6493 # {
6494 #   __hDllInstance_base = hInst;
6495 #   return TRUE;
6496 # }
6497 # /* ltdll.c ends here */
6498         # This is a source program that is used to create import libraries
6499         # on Windows for dlls which lack them. Don't remove nor modify the
6500         # starting and closing comments
6501 # /* impgen.c starts here */
6502 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
6503 #
6504 #  This file is part of GNU libtool.
6505 #
6506 #  This program is free software; you can redistribute it and/or modify
6507 #  it under the terms of the GNU General Public License as published by
6508 #  the Free Software Foundation; either version 2 of the License, or
6509 #  (at your option) any later version.
6510 #
6511 #  This program is distributed in the hope that it will be useful,
6512 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
6513 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6514 #  GNU General Public License for more details.
6515 #
6516 #  You should have received a copy of the GNU General Public License
6517 #  along with this program; if not, write to the Free Software
6518 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6519 #  */
6520 #
6521 # #include <stdio.h>            /* for printf() */
6522 # #include <unistd.h>           /* for open(), lseek(), read() */
6523 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
6524 # #include <string.h>           /* for strdup() */
6525 #
6526 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
6527 # #ifndef O_BINARY
6528 # #define O_BINARY 0
6529 # #endif
6530 #
6531 # static unsigned int
6532 # pe_get16 (fd, offset)
6533 #      int fd;
6534 #      int offset;
6535 # {
6536 #   unsigned char b[2];
6537 #   lseek (fd, offset, SEEK_SET);
6538 #   read (fd, b, 2);
6539 #   return b[0] + (b[1]<<8);
6540 # }
6541 #
6542 # static unsigned int
6543 # pe_get32 (fd, offset)
6544 #     int fd;
6545 #     int offset;
6546 # {
6547 #   unsigned char b[4];
6548 #   lseek (fd, offset, SEEK_SET);
6549 #   read (fd, b, 4);
6550 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6551 # }
6552 #
6553 # static unsigned int
6554 # pe_as32 (ptr)
6555 #      void *ptr;
6556 # {
6557 #   unsigned char *b = ptr;
6558 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6559 # }
6560 #
6561 # int
6562 # main (argc, argv)
6563 #     int argc;
6564 #     char *argv[];
6565 # {
6566 #     int dll;
6567 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
6568 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
6569 #     unsigned long name_rvas, nexp;
6570 #     unsigned char *expdata, *erva;
6571 #     char *filename, *dll_name;
6572 #
6573 #     filename = argv[1];
6574 #
6575 #     dll = open(filename, O_RDONLY|O_BINARY);
6576 #     if (dll < 1)
6577 #       return 1;
6578 #
6579 #     dll_name = filename;
6580 #
6581 #     for (i=0; filename[i]; i++)
6582 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
6583 #           dll_name = filename + i +1;
6584 #
6585 #     pe_header_offset = pe_get32 (dll, 0x3c);
6586 #     opthdr_ofs = pe_header_offset + 4 + 20;
6587 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
6588 #
6589 #     if (num_entries < 1) /* no exports */
6590 #       return 1;
6591 #
6592 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
6593 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
6594 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
6595 #     secptr = (pe_header_offset + 4 + 20 +
6596 #             pe_get16 (dll, pe_header_offset + 4 + 16));
6597 #
6598 #     expptr = 0;
6599 #     for (i = 0; i < nsections; i++)
6600 #     {
6601 #       char sname[8];
6602 #       unsigned long secptr1 = secptr + 40 * i;
6603 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
6604 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
6605 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
6606 #       lseek(dll, secptr1, SEEK_SET);
6607 #       read(dll, sname, 8);
6608 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
6609 #       {
6610 #           expptr = fptr + (export_rva - vaddr);
6611 #           if (export_rva + export_size > vaddr + vsize)
6612 #               export_size = vsize - (export_rva - vaddr);
6613 #           break;
6614 #       }
6615 #     }
6616 #
6617 #     expdata = (unsigned char*)malloc(export_size);
6618 #     lseek (dll, expptr, SEEK_SET);
6619 #     read (dll, expdata, export_size);
6620 #     erva = expdata - export_rva;
6621 #
6622 #     nexp = pe_as32 (expdata+24);
6623 #     name_rvas = pe_as32 (expdata+32);
6624 #
6625 #     printf ("EXPORTS\n");
6626 #     for (i = 0; i<nexp; i++)
6627 #     {
6628 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
6629 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
6630 #     }
6631 #
6632 #     return 0;
6633 # }
6634 # /* impgen.c ends here */
6635
6636 EOF
6637     ;;
6638   esac
6639
6640   # We use sed instead of cat because bash on DJGPP gets confused if
6641   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6642   # text mode, it properly converts lines to CR/LF.  This bash problem
6643   # is reportedly fixed, but why not run on old versions too?
6644   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
6645
6646   mv -f "${ofile}T" "$ofile" || \
6647     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
6648   chmod +x "$ofile"
6649 fi
6650 ##
6651 ## END FIXME
6652
6653 # This can be used to rebuild libtool when needed
6654 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6655
6656 # Always use our own libtool.
6657 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
6658
6659 # Prevent multiple expansion
6660
6661 ac_ext=c
6662 ac_cpp='$CPP $CPPFLAGS'
6663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6666 if test -n "$ac_tool_prefix"; then
6667   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6668 set dummy ${ac_tool_prefix}gcc; ac_word=$2
6669 echo "$as_me:6669: checking for $ac_word" >&5
6670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6671 if test "${ac_cv_prog_CC+set}" = set; then
6672   echo $ECHO_N "(cached) $ECHO_C" >&6
6673 else
6674   if test -n "$CC"; then
6675   ac_cv_prog_CC="$CC" # Let the user override the test.
6676 else
6677   ac_save_IFS=$IFS; IFS=$ac_path_separator
6678 ac_dummy="$PATH"
6679 for ac_dir in $ac_dummy; do
6680   IFS=$ac_save_IFS
6681   test -z "$ac_dir" && ac_dir=.
6682   $as_executable_p "$ac_dir/$ac_word" || continue
6683 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6684 echo "$as_me:6684: found $ac_dir/$ac_word" >&5
6685 break
6686 done
6687
6688 fi
6689 fi
6690 CC=$ac_cv_prog_CC
6691 if test -n "$CC"; then
6692   echo "$as_me:6692: result: $CC" >&5
6693 echo "${ECHO_T}$CC" >&6
6694 else
6695   echo "$as_me:6695: result: no" >&5
6696 echo "${ECHO_T}no" >&6
6697 fi
6698
6699 fi
6700 if test -z "$ac_cv_prog_CC"; then
6701   ac_ct_CC=$CC
6702   # Extract the first word of "gcc", so it can be a program name with args.
6703 set dummy gcc; ac_word=$2
6704 echo "$as_me:6704: checking for $ac_word" >&5
6705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6706 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
6707   echo $ECHO_N "(cached) $ECHO_C" >&6
6708 else
6709   if test -n "$ac_ct_CC"; then
6710   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6711 else
6712   ac_save_IFS=$IFS; IFS=$ac_path_separator
6713 ac_dummy="$PATH"
6714 for ac_dir in $ac_dummy; do
6715   IFS=$ac_save_IFS
6716   test -z "$ac_dir" && ac_dir=.
6717   $as_executable_p "$ac_dir/$ac_word" || continue
6718 ac_cv_prog_ac_ct_CC="gcc"
6719 echo "$as_me:6719: found $ac_dir/$ac_word" >&5
6720 break
6721 done
6722
6723 fi
6724 fi
6725 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6726 if test -n "$ac_ct_CC"; then
6727   echo "$as_me:6727: result: $ac_ct_CC" >&5
6728 echo "${ECHO_T}$ac_ct_CC" >&6
6729 else
6730   echo "$as_me:6730: result: no" >&5
6731 echo "${ECHO_T}no" >&6
6732 fi
6733
6734   CC=$ac_ct_CC
6735 else
6736   CC="$ac_cv_prog_CC"
6737 fi
6738
6739 if test -z "$CC"; then
6740   if test -n "$ac_tool_prefix"; then
6741   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6742 set dummy ${ac_tool_prefix}cc; ac_word=$2
6743 echo "$as_me:6743: checking for $ac_word" >&5
6744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6745 if test "${ac_cv_prog_CC+set}" = set; then
6746   echo $ECHO_N "(cached) $ECHO_C" >&6
6747 else
6748   if test -n "$CC"; then
6749   ac_cv_prog_CC="$CC" # Let the user override the test.
6750 else
6751   ac_save_IFS=$IFS; IFS=$ac_path_separator
6752 ac_dummy="$PATH"
6753 for ac_dir in $ac_dummy; do
6754   IFS=$ac_save_IFS
6755   test -z "$ac_dir" && ac_dir=.
6756   $as_executable_p "$ac_dir/$ac_word" || continue
6757 ac_cv_prog_CC="${ac_tool_prefix}cc"
6758 echo "$as_me:6758: found $ac_dir/$ac_word" >&5
6759 break
6760 done
6761
6762 fi
6763 fi
6764 CC=$ac_cv_prog_CC
6765 if test -n "$CC"; then
6766   echo "$as_me:6766: result: $CC" >&5
6767 echo "${ECHO_T}$CC" >&6
6768 else
6769   echo "$as_me:6769: result: no" >&5
6770 echo "${ECHO_T}no" >&6
6771 fi
6772
6773 fi
6774 if test -z "$ac_cv_prog_CC"; then
6775   ac_ct_CC=$CC
6776   # Extract the first word of "cc", so it can be a program name with args.
6777 set dummy cc; ac_word=$2
6778 echo "$as_me:6778: checking for $ac_word" >&5
6779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6780 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
6781   echo $ECHO_N "(cached) $ECHO_C" >&6
6782 else
6783   if test -n "$ac_ct_CC"; then
6784   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6785 else
6786   ac_save_IFS=$IFS; IFS=$ac_path_separator
6787 ac_dummy="$PATH"
6788 for ac_dir in $ac_dummy; do
6789   IFS=$ac_save_IFS
6790   test -z "$ac_dir" && ac_dir=.
6791   $as_executable_p "$ac_dir/$ac_word" || continue
6792 ac_cv_prog_ac_ct_CC="cc"
6793 echo "$as_me:6793: found $ac_dir/$ac_word" >&5
6794 break
6795 done
6796
6797 fi
6798 fi
6799 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6800 if test -n "$ac_ct_CC"; then
6801   echo "$as_me:6801: result: $ac_ct_CC" >&5
6802 echo "${ECHO_T}$ac_ct_CC" >&6
6803 else
6804   echo "$as_me:6804: result: no" >&5
6805 echo "${ECHO_T}no" >&6
6806 fi
6807
6808   CC=$ac_ct_CC
6809 else
6810   CC="$ac_cv_prog_CC"
6811 fi
6812
6813 fi
6814 if test -z "$CC"; then
6815   # Extract the first word of "cc", so it can be a program name with args.
6816 set dummy cc; ac_word=$2
6817 echo "$as_me:6817: checking for $ac_word" >&5
6818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6819 if test "${ac_cv_prog_CC+set}" = set; then
6820   echo $ECHO_N "(cached) $ECHO_C" >&6
6821 else
6822   if test -n "$CC"; then
6823   ac_cv_prog_CC="$CC" # Let the user override the test.
6824 else
6825   ac_prog_rejected=no
6826   ac_save_IFS=$IFS; IFS=$ac_path_separator
6827 ac_dummy="$PATH"
6828 for ac_dir in $ac_dummy; do
6829   IFS=$ac_save_IFS
6830   test -z "$ac_dir" && ac_dir=.
6831   $as_executable_p "$ac_dir/$ac_word" || continue
6832 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
6833   ac_prog_rejected=yes
6834   continue
6835 fi
6836 ac_cv_prog_CC="cc"
6837 echo "$as_me:6837: found $ac_dir/$ac_word" >&5
6838 break
6839 done
6840
6841 if test $ac_prog_rejected = yes; then
6842   # We found a bogon in the path, so make sure we never use it.
6843   set dummy $ac_cv_prog_CC
6844   shift
6845   if test $# != 0; then
6846     # We chose a different compiler from the bogus one.
6847     # However, it has the same basename, so the bogon will be chosen
6848     # first if we set CC to just the basename; use the full file name.
6849     shift
6850     set dummy "$ac_dir/$ac_word" ${1+"$@"}
6851     shift
6852     ac_cv_prog_CC="$@"
6853   fi
6854 fi
6855 fi
6856 fi
6857 CC=$ac_cv_prog_CC
6858 if test -n "$CC"; then
6859   echo "$as_me:6859: result: $CC" >&5
6860 echo "${ECHO_T}$CC" >&6
6861 else
6862   echo "$as_me:6862: result: no" >&5
6863 echo "${ECHO_T}no" >&6
6864 fi
6865
6866 fi
6867 if test -z "$CC"; then
6868   if test -n "$ac_tool_prefix"; then
6869   for ac_prog in cl
6870   do
6871     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6872 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6873 echo "$as_me:6873: checking for $ac_word" >&5
6874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6875 if test "${ac_cv_prog_CC+set}" = set; then
6876   echo $ECHO_N "(cached) $ECHO_C" >&6
6877 else
6878   if test -n "$CC"; then
6879   ac_cv_prog_CC="$CC" # Let the user override the test.
6880 else
6881   ac_save_IFS=$IFS; IFS=$ac_path_separator
6882 ac_dummy="$PATH"
6883 for ac_dir in $ac_dummy; do
6884   IFS=$ac_save_IFS
6885   test -z "$ac_dir" && ac_dir=.
6886   $as_executable_p "$ac_dir/$ac_word" || continue
6887 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6888 echo "$as_me:6888: found $ac_dir/$ac_word" >&5
6889 break
6890 done
6891
6892 fi
6893 fi
6894 CC=$ac_cv_prog_CC
6895 if test -n "$CC"; then
6896   echo "$as_me:6896: result: $CC" >&5
6897 echo "${ECHO_T}$CC" >&6
6898 else
6899   echo "$as_me:6899: result: no" >&5
6900 echo "${ECHO_T}no" >&6
6901 fi
6902
6903     test -n "$CC" && break
6904   done
6905 fi
6906 if test -z "$CC"; then
6907   ac_ct_CC=$CC
6908   for ac_prog in cl
6909 do
6910   # Extract the first word of "$ac_prog", so it can be a program name with args.
6911 set dummy $ac_prog; ac_word=$2
6912 echo "$as_me:6912: checking for $ac_word" >&5
6913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6914 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
6915   echo $ECHO_N "(cached) $ECHO_C" >&6
6916 else
6917   if test -n "$ac_ct_CC"; then
6918   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6919 else
6920   ac_save_IFS=$IFS; IFS=$ac_path_separator
6921 ac_dummy="$PATH"
6922 for ac_dir in $ac_dummy; do
6923   IFS=$ac_save_IFS
6924   test -z "$ac_dir" && ac_dir=.
6925   $as_executable_p "$ac_dir/$ac_word" || continue
6926 ac_cv_prog_ac_ct_CC="$ac_prog"
6927 echo "$as_me:6927: found $ac_dir/$ac_word" >&5
6928 break
6929 done
6930
6931 fi
6932 fi
6933 ac_ct_CC=$ac_cv_prog_ac_ct_CC
6934 if test -n "$ac_ct_CC"; then
6935   echo "$as_me:6935: result: $ac_ct_CC" >&5
6936 echo "${ECHO_T}$ac_ct_CC" >&6
6937 else
6938   echo "$as_me:6938: result: no" >&5
6939 echo "${ECHO_T}no" >&6
6940 fi
6941
6942   test -n "$ac_ct_CC" && break
6943 done
6944
6945   CC=$ac_ct_CC
6946 fi
6947
6948 fi
6949
6950 test -z "$CC" && { { echo "$as_me:6950: error: no acceptable cc found in \$PATH" >&5
6951 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
6952    { (exit 1); exit 1; }; }
6953
6954 # Provide some information about the compiler.
6955 echo "$as_me:6955:" \
6956      "checking for C compiler version" >&5
6957 ac_compiler=`set X $ac_compile; echo $2`
6958 { (eval echo "$as_me:6958: \"$ac_compiler --version </dev/null >&5\"") >&5
6959   (eval $ac_compiler --version </dev/null >&5) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); }
6963 { (eval echo "$as_me:6963: \"$ac_compiler -v </dev/null >&5\"") >&5
6964   (eval $ac_compiler -v </dev/null >&5) 2>&5
6965   ac_status=$?
6966   echo "$as_me:6966: \$? = $ac_status" >&5
6967   (exit $ac_status); }
6968 { (eval echo "$as_me:6968: \"$ac_compiler -V </dev/null >&5\"") >&5
6969   (eval $ac_compiler -V </dev/null >&5) 2>&5
6970   ac_status=$?
6971   echo "$as_me:6971: \$? = $ac_status" >&5
6972   (exit $ac_status); }
6973
6974 echo "$as_me:6974: checking whether we are using the GNU C compiler" >&5
6975 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
6976 if test "${ac_cv_c_compiler_gnu+set}" = set; then
6977   echo $ECHO_N "(cached) $ECHO_C" >&6
6978 else
6979   cat >conftest.$ac_ext <<_ACEOF
6980 #line 6980 "configure"
6981 #include "confdefs.h"
6982
6983 int
6984 main ()
6985 {
6986 #ifndef __GNUC__
6987        choke me
6988 #endif
6989
6990   ;
6991   return 0;
6992 }
6993 _ACEOF
6994 rm -f conftest.$ac_objext
6995 if { (eval echo "$as_me:6995: \"$ac_compile\"") >&5
6996   (eval $ac_compile) 2>&5
6997   ac_status=$?
6998   echo "$as_me:6998: \$? = $ac_status" >&5
6999   (exit $ac_status); } &&
7000          { ac_try='test -s conftest.$ac_objext'
7001   { (eval echo "$as_me:7001: \"$ac_try\"") >&5
7002   (eval $ac_try) 2>&5
7003   ac_status=$?
7004   echo "$as_me:7004: \$? = $ac_status" >&5
7005   (exit $ac_status); }; }; then
7006   ac_compiler_gnu=yes
7007 else
7008   echo "$as_me: failed program was:" >&5
7009 cat conftest.$ac_ext >&5
7010 ac_compiler_gnu=no
7011 fi
7012 rm -f conftest.$ac_objext conftest.$ac_ext
7013 ac_cv_c_compiler_gnu=$ac_compiler_gnu
7014
7015 fi
7016 echo "$as_me:7016: result: $ac_cv_c_compiler_gnu" >&5
7017 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
7018 GCC=`test $ac_compiler_gnu = yes && echo yes`
7019 ac_test_CFLAGS=${CFLAGS+set}
7020 ac_save_CFLAGS=$CFLAGS
7021 CFLAGS="-g"
7022 echo "$as_me:7022: checking whether $CC accepts -g" >&5
7023 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
7024 if test "${ac_cv_prog_cc_g+set}" = set; then
7025   echo $ECHO_N "(cached) $ECHO_C" >&6
7026 else
7027   cat >conftest.$ac_ext <<_ACEOF
7028 #line 7028 "configure"
7029 #include "confdefs.h"
7030
7031 int
7032 main ()
7033 {
7034
7035   ;
7036   return 0;
7037 }
7038 _ACEOF
7039 rm -f conftest.$ac_objext
7040 if { (eval echo "$as_me:7040: \"$ac_compile\"") >&5
7041   (eval $ac_compile) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); } &&
7045          { ac_try='test -s conftest.$ac_objext'
7046   { (eval echo "$as_me:7046: \"$ac_try\"") >&5
7047   (eval $ac_try) 2>&5
7048   ac_status=$?
7049   echo "$as_me:7049: \$? = $ac_status" >&5
7050   (exit $ac_status); }; }; then
7051   ac_cv_prog_cc_g=yes
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 cat conftest.$ac_ext >&5
7055 ac_cv_prog_cc_g=no
7056 fi
7057 rm -f conftest.$ac_objext conftest.$ac_ext
7058 fi
7059 echo "$as_me:7059: result: $ac_cv_prog_cc_g" >&5
7060 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
7061 if test "$ac_test_CFLAGS" = set; then
7062   CFLAGS=$ac_save_CFLAGS
7063 elif test $ac_cv_prog_cc_g = yes; then
7064   if test "$GCC" = yes; then
7065     CFLAGS="-g -O2"
7066   else
7067     CFLAGS="-g"
7068   fi
7069 else
7070   if test "$GCC" = yes; then
7071     CFLAGS="-O2"
7072   else
7073     CFLAGS=
7074   fi
7075 fi
7076 # Some people use a C++ compiler to compile C.  Since we use `exit',
7077 # in C++ we need to declare it.  In case someone uses the same compiler
7078 # for both compiling C and C++ we need to have the C++ compiler decide
7079 # the declaration of exit, since it's the most demanding environment.
7080 cat >conftest.$ac_ext <<_ACEOF
7081 #ifndef __cplusplus
7082   choke me
7083 #endif
7084 _ACEOF
7085 rm -f conftest.$ac_objext
7086 if { (eval echo "$as_me:7086: \"$ac_compile\"") >&5
7087   (eval $ac_compile) 2>&5
7088   ac_status=$?
7089   echo "$as_me:7089: \$? = $ac_status" >&5
7090   (exit $ac_status); } &&
7091          { ac_try='test -s conftest.$ac_objext'
7092   { (eval echo "$as_me:7092: \"$ac_try\"") >&5
7093   (eval $ac_try) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); }; }; then
7097   for ac_declaration in \
7098    ''\
7099    '#include <stdlib.h>' \
7100    'extern "C" void std::exit (int) throw (); using std::exit;' \
7101    'extern "C" void std::exit (int); using std::exit;' \
7102    'extern "C" void exit (int) throw ();' \
7103    'extern "C" void exit (int);' \
7104    'void exit (int);'
7105 do
7106   cat >conftest.$ac_ext <<_ACEOF
7107 #line 7107 "configure"
7108 #include "confdefs.h"
7109 #include <stdlib.h>
7110 $ac_declaration
7111 int
7112 main ()
7113 {
7114 exit (42);
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 rm -f conftest.$ac_objext
7120 if { (eval echo "$as_me:7120: \"$ac_compile\"") >&5
7121   (eval $ac_compile) 2>&5
7122   ac_status=$?
7123   echo "$as_me:7123: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest.$ac_objext'
7126   { (eval echo "$as_me:7126: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:7129: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   :
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7135 continue
7136 fi
7137 rm -f conftest.$ac_objext conftest.$ac_ext
7138   cat >conftest.$ac_ext <<_ACEOF
7139 #line 7139 "configure"
7140 #include "confdefs.h"
7141 $ac_declaration
7142 int
7143 main ()
7144 {
7145 exit (42);
7146   ;
7147   return 0;
7148 }
7149 _ACEOF
7150 rm -f conftest.$ac_objext
7151 if { (eval echo "$as_me:7151: \"$ac_compile\"") >&5
7152   (eval $ac_compile) 2>&5
7153   ac_status=$?
7154   echo "$as_me:7154: \$? = $ac_status" >&5
7155   (exit $ac_status); } &&
7156          { ac_try='test -s conftest.$ac_objext'
7157   { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7158   (eval $ac_try) 2>&5
7159   ac_status=$?
7160   echo "$as_me:7160: \$? = $ac_status" >&5
7161   (exit $ac_status); }; }; then
7162   break
7163 else
7164   echo "$as_me: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7166 fi
7167 rm -f conftest.$ac_objext conftest.$ac_ext
7168 done
7169 rm -f conftest*
7170 if test -n "$ac_declaration"; then
7171   echo '#ifdef __cplusplus' >>confdefs.h
7172   echo $ac_declaration      >>confdefs.h
7173   echo '#endif'             >>confdefs.h
7174 fi
7175
7176 else
7177   echo "$as_me: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7179 fi
7180 rm -f conftest.$ac_objext conftest.$ac_ext
7181 ac_ext=c
7182 ac_cpp='$CPP $CPPFLAGS'
7183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7186
7187 # Find a good install program.  We prefer a C program (faster),
7188 # so one script is as good as another.  But avoid the broken or
7189 # incompatible versions:
7190 # SysV /etc/install, /usr/sbin/install
7191 # SunOS /usr/etc/install
7192 # IRIX /sbin/install
7193 # AIX /bin/install
7194 # AmigaOS /C/install, which installs bootblocks on floppy discs
7195 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7196 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7197 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7198 # ./install, which can be erroneously created by make from ./install.sh.
7199 echo "$as_me:7199: checking for a BSD compatible install" >&5
7200 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
7201 if test -z "$INSTALL"; then
7202 if test "${ac_cv_path_install+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205     ac_save_IFS=$IFS; IFS=$ac_path_separator
7206   for ac_dir in $PATH; do
7207     IFS=$ac_save_IFS
7208     # Account for people who put trailing slashes in PATH elements.
7209     case $ac_dir/ in
7210     / | ./ | .// | /cC/* \
7211     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
7212     | /usr/ucb/* ) ;;
7213     *)
7214       # OSF1 and SCO ODT 3.0 have their own names for install.
7215       # Don't use installbsd from OSF since it installs stuff as root
7216       # by default.
7217       for ac_prog in ginstall scoinst install; do
7218         if $as_executable_p "$ac_dir/$ac_prog"; then
7219           if test $ac_prog = install &&
7220             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
7221             # AIX install.  It has an incompatible calling convention.
7222             :
7223           elif test $ac_prog = install &&
7224             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
7225             # program-specific install script used by HP pwplus--don't use.
7226             :
7227           else
7228             ac_cv_path_install="$ac_dir/$ac_prog -c"
7229             break 2
7230           fi
7231         fi
7232       done
7233       ;;
7234     esac
7235   done
7236
7237 fi
7238   if test "${ac_cv_path_install+set}" = set; then
7239     INSTALL=$ac_cv_path_install
7240   else
7241     # As a last resort, use the slow shell script.  We don't cache a
7242     # path for INSTALL within a source directory, because that will
7243     # break other packages using the cache if that directory is
7244     # removed, or if the path is relative.
7245     INSTALL=$ac_install_sh
7246   fi
7247 fi
7248 echo "$as_me:7248: result: $INSTALL" >&5
7249 echo "${ECHO_T}$INSTALL" >&6
7250
7251 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7252 # It thinks the first close brace ends the variable substitution.
7253 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7254
7255 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7256
7257 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7258
7259 if test "$GCC" = yes ; then
7260                         OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
7261     CFLAGS="$OLDCFLAGS -fexceptions"
7262     echo "$as_me:7262: checking whether gcc accepts -fexceptions" >&5
7263 echo $ECHO_N "checking whether gcc accepts -fexceptions... $ECHO_C" >&6
7264     cat >conftest.$ac_ext <<_ACEOF
7265 #line 7265 "configure"
7266 #include "confdefs.h"
7267
7268 int
7269 main ()
7270 {
7271 (void)1
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   echo "$as_me:7288: result: yes" >&5
7289 echo "${ECHO_T}yes" >&6
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293 echo "$as_me:7293: result: no" >&5
7294 echo "${ECHO_T}no" >&6; CFLAGS="$OLDCFLAGS"
7295 fi
7296 rm -f conftest.$ac_objext conftest.$ac_ext
7297 fi
7298
7299 echo "$as_me:7299: checking for ANSI C header files" >&5
7300 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7301 if test "${ac_cv_header_stdc+set}" = set; then
7302   echo $ECHO_N "(cached) $ECHO_C" >&6
7303 else
7304   cat >conftest.$ac_ext <<_ACEOF
7305 #line 7305 "configure"
7306 #include "confdefs.h"
7307 #include <stdlib.h>
7308 #include <stdarg.h>
7309 #include <string.h>
7310 #include <float.h>
7311
7312 _ACEOF
7313 if { (eval echo "$as_me:7313: \"$ac_cpp conftest.$ac_ext\"") >&5
7314   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7315   ac_status=$?
7316   egrep -v '^ *\+' conftest.er1 >conftest.err
7317   rm -f conftest.er1
7318   cat conftest.err >&5
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); } >/dev/null; then
7321   if test -s conftest.err; then
7322     ac_cpp_err=$ac_c_preproc_warn_flag
7323   else
7324     ac_cpp_err=
7325   fi
7326 else
7327   ac_cpp_err=yes
7328 fi
7329 if test -z "$ac_cpp_err"; then
7330   ac_cv_header_stdc=yes
7331 else
7332   echo "$as_me: failed program was:" >&5
7333   cat conftest.$ac_ext >&5
7334   ac_cv_header_stdc=no
7335 fi
7336 rm -f conftest.err conftest.$ac_ext
7337
7338 if test $ac_cv_header_stdc = yes; then
7339   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7340   cat >conftest.$ac_ext <<_ACEOF
7341 #line 7341 "configure"
7342 #include "confdefs.h"
7343 #include <string.h>
7344
7345 _ACEOF
7346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7347   egrep "memchr" >/dev/null 2>&1; then
7348   :
7349 else
7350   ac_cv_header_stdc=no
7351 fi
7352 rm -f conftest*
7353
7354 fi
7355
7356 if test $ac_cv_header_stdc = yes; then
7357   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7358   cat >conftest.$ac_ext <<_ACEOF
7359 #line 7359 "configure"
7360 #include "confdefs.h"
7361 #include <stdlib.h>
7362
7363 _ACEOF
7364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7365   egrep "free" >/dev/null 2>&1; then
7366   :
7367 else
7368   ac_cv_header_stdc=no
7369 fi
7370 rm -f conftest*
7371
7372 fi
7373
7374 if test $ac_cv_header_stdc = yes; then
7375   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7376   if test "$cross_compiling" = yes; then
7377   :
7378 else
7379   cat >conftest.$ac_ext <<_ACEOF
7380 #line 7380 "configure"
7381 #include "confdefs.h"
7382 #include <ctype.h>
7383 #if ((' ' & 0x0FF) == 0x020)
7384 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7385 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7386 #else
7387 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
7388                      || ('j' <= (c) && (c) <= 'r') \
7389                      || ('s' <= (c) && (c) <= 'z'))
7390 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7391 #endif
7392
7393 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7394 int
7395 main ()
7396 {
7397   int i;
7398   for (i = 0; i < 256; i++)
7399     if (XOR (islower (i), ISLOWER (i))
7400         || toupper (i) != TOUPPER (i))
7401       exit(2);
7402   exit (0);
7403 }
7404 _ACEOF
7405 rm -f conftest$ac_exeext
7406 if { (eval echo "$as_me:7406: \"$ac_link\"") >&5
7407   (eval $ac_link) 2>&5
7408   ac_status=$?
7409   echo "$as_me:7409: \$? = $ac_status" >&5
7410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7411   { (eval echo "$as_me:7411: \"$ac_try\"") >&5
7412   (eval $ac_try) 2>&5
7413   ac_status=$?
7414   echo "$as_me:7414: \$? = $ac_status" >&5
7415   (exit $ac_status); }; }; then
7416   :
7417 else
7418   echo "$as_me: program exited with status $ac_status" >&5
7419 echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 ac_cv_header_stdc=no
7422 fi
7423 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7424 fi
7425 fi
7426 fi
7427 echo "$as_me:7427: result: $ac_cv_header_stdc" >&5
7428 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7429 if test $ac_cv_header_stdc = yes; then
7430
7431 cat >>confdefs.h <<\EOF
7432 #define STDC_HEADERS 1
7433 EOF
7434
7435 fi
7436
7437 for ac_header in fcntl.h unistd.h
7438 do
7439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7440 echo "$as_me:7440: checking for $ac_header" >&5
7441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7443   echo $ECHO_N "(cached) $ECHO_C" >&6
7444 else
7445   cat >conftest.$ac_ext <<_ACEOF
7446 #line 7446 "configure"
7447 #include "confdefs.h"
7448 #include <$ac_header>
7449 _ACEOF
7450 if { (eval echo "$as_me:7450: \"$ac_cpp conftest.$ac_ext\"") >&5
7451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7452   ac_status=$?
7453   egrep -v '^ *\+' conftest.er1 >conftest.err
7454   rm -f conftest.er1
7455   cat conftest.err >&5
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); } >/dev/null; then
7458   if test -s conftest.err; then
7459     ac_cpp_err=$ac_c_preproc_warn_flag
7460   else
7461     ac_cpp_err=
7462   fi
7463 else
7464   ac_cpp_err=yes
7465 fi
7466 if test -z "$ac_cpp_err"; then
7467   eval "$as_ac_Header=yes"
7468 else
7469   echo "$as_me: failed program was:" >&5
7470   cat conftest.$ac_ext >&5
7471   eval "$as_ac_Header=no"
7472 fi
7473 rm -f conftest.err conftest.$ac_ext
7474 fi
7475 echo "$as_me:7475: result: `eval echo '${'$as_ac_Header'}'`" >&5
7476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7478   cat >>confdefs.h <<EOF
7479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7480 EOF
7481
7482 fi
7483 done
7484
7485 echo "$as_me:7485: checking whether byte ordering is bigendian" >&5
7486 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
7487 if test "${ac_cv_c_bigendian+set}" = set; then
7488   echo $ECHO_N "(cached) $ECHO_C" >&6
7489 else
7490   ac_cv_c_bigendian=unknown
7491 # See if sys/param.h defines the BYTE_ORDER macro.
7492 cat >conftest.$ac_ext <<_ACEOF
7493 #line 7493 "configure"
7494 #include "confdefs.h"
7495 #include <sys/types.h>
7496 #include <sys/param.h>
7497 int
7498 main ()
7499 {
7500
7501 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7502  bogus endian macros
7503 #endif
7504   ;
7505   return 0;
7506 }
7507 _ACEOF
7508 rm -f conftest.$ac_objext
7509 if { (eval echo "$as_me:7509: \"$ac_compile\"") >&5
7510   (eval $ac_compile) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); } &&
7514          { ac_try='test -s conftest.$ac_objext'
7515   { (eval echo "$as_me:7515: \"$ac_try\"") >&5
7516   (eval $ac_try) 2>&5
7517   ac_status=$?
7518   echo "$as_me:7518: \$? = $ac_status" >&5
7519   (exit $ac_status); }; }; then
7520   # It does; now see whether it defined to BIG_ENDIAN or not.
7521 cat >conftest.$ac_ext <<_ACEOF
7522 #line 7522 "configure"
7523 #include "confdefs.h"
7524 #include <sys/types.h>
7525 #include <sys/param.h>
7526 int
7527 main ()
7528 {
7529
7530 #if BYTE_ORDER != BIG_ENDIAN
7531  not big endian
7532 #endif
7533   ;
7534   return 0;
7535 }
7536 _ACEOF
7537 rm -f conftest.$ac_objext
7538 if { (eval echo "$as_me:7538: \"$ac_compile\"") >&5
7539   (eval $ac_compile) 2>&5
7540   ac_status=$?
7541   echo "$as_me:7541: \$? = $ac_status" >&5
7542   (exit $ac_status); } &&
7543          { ac_try='test -s conftest.$ac_objext'
7544   { (eval echo "$as_me:7544: \"$ac_try\"") >&5
7545   (eval $ac_try) 2>&5
7546   ac_status=$?
7547   echo "$as_me:7547: \$? = $ac_status" >&5
7548   (exit $ac_status); }; }; then
7549   ac_cv_c_bigendian=yes
7550 else
7551   echo "$as_me: failed program was:" >&5
7552 cat conftest.$ac_ext >&5
7553 ac_cv_c_bigendian=no
7554 fi
7555 rm -f conftest.$ac_objext conftest.$ac_ext
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 cat conftest.$ac_ext >&5
7559 fi
7560 rm -f conftest.$ac_objext conftest.$ac_ext
7561 if test $ac_cv_c_bigendian = unknown; then
7562 if test "$cross_compiling" = yes; then
7563    echo $ac_n "cross-compiling... " 2>&6
7564 else
7565   cat >conftest.$ac_ext <<_ACEOF
7566 #line 7566 "configure"
7567 #include "confdefs.h"
7568 main () {
7569   /* Are we little or big endian?  From Harbison&Steele.  */
7570   union
7571   {
7572     long l;
7573     char c[sizeof (long)];
7574   } u;
7575   u.l = 1;
7576   exit (u.c[sizeof (long) - 1] == 1);
7577 }
7578 _ACEOF
7579 rm -f conftest$ac_exeext
7580 if { (eval echo "$as_me:7580: \"$ac_link\"") >&5
7581   (eval $ac_link) 2>&5
7582   ac_status=$?
7583   echo "$as_me:7583: \$? = $ac_status" >&5
7584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   ac_cv_c_bigendian=no
7591 else
7592   echo "$as_me: program exited with status $ac_status" >&5
7593 echo "$as_me: failed program was:" >&5
7594 cat conftest.$ac_ext >&5
7595 ac_cv_c_bigendian=yes
7596 fi
7597 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7598 fi
7599 fi
7600 fi
7601 echo "$as_me:7601: result: $ac_cv_c_bigendian" >&5
7602 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
7603 if test $ac_cv_c_bigendian = unknown; then
7604 echo "$as_me:7604: checking to probe for byte ordering" >&5
7605 echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
7606
7607 cat >conftest.c <<EOF
7608 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7609 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7610 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
7611 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7612 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7613 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
7614 int main() { _ascii (); _ebcdic (); return 0; }
7615 EOF
7616  if test -f conftest.c ; then
7617      if ${CC-cc} -c conftest.c -o conftest.o && test -f conftest.o ; then
7618         if test `grep -l BIGenDianSyS conftest.o` ; then
7619            echo $ac_n ' big endian probe OK, ' 1>&6
7620            ac_cv_c_bigendian=yes
7621         fi
7622         if test `grep -l LiTTleEnDian conftest.o` ; then
7623            echo $ac_n ' little endian probe OK, ' 1>&6
7624            if test $ac_cv_c_bigendian = yes ; then
7625             ac_cv_c_bigendian=unknown;
7626            else
7627             ac_cv_c_bigendian=no
7628            fi
7629         fi
7630         echo $ac_n 'guessing bigendian ...  ' >&6
7631      fi
7632   fi
7633 echo "$as_me:7633: result: $ac_cv_c_bigendian" >&5
7634 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
7635 fi
7636 if test $ac_cv_c_bigendian = yes; then
7637
7638 cat >>confdefs.h <<\EOF
7639 #define WORDS_BIGENDIAN 1
7640 EOF
7641
7642   BYTEORDER=4321
7643 else
7644   BYTEORDER=1234
7645 fi
7646
7647 cat >>confdefs.h <<EOF
7648 #define BYTEORDER $BYTEORDER
7649 EOF
7650
7651 if test $ac_cv_c_bigendian = unknown; then
7652   { { echo "$as_me:7652: error: unknown endianess - sorry" >&5
7653 echo "$as_me: error: unknown endianess - sorry" >&2;}
7654    { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
7655 fi
7656
7657 echo "$as_me:7657: checking for $CC option to accept ANSI C" >&5
7658 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
7659 if test "${ac_cv_prog_cc_stdc+set}" = set; then
7660   echo $ECHO_N "(cached) $ECHO_C" >&6
7661 else
7662   ac_cv_prog_cc_stdc=no
7663 ac_save_CC=$CC
7664 cat >conftest.$ac_ext <<_ACEOF
7665 #line 7665 "configure"
7666 #include "confdefs.h"
7667 #include <stdarg.h>
7668 #include <stdio.h>
7669 #include <sys/types.h>
7670 #include <sys/stat.h>
7671 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7672 struct buf { int x; };
7673 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7674 static char *e (p, i)
7675      char **p;
7676      int i;
7677 {
7678   return p[i];
7679 }
7680 static char *f (char * (*g) (char **, int), char **p, ...)
7681 {
7682   char *s;
7683   va_list v;
7684   va_start (v,p);
7685   s = g (p, va_arg (v,int));
7686   va_end (v);
7687   return s;
7688 }
7689 int test (int i, double x);
7690 struct s1 {int (*f) (int a);};
7691 struct s2 {int (*f) (double a);};
7692 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7693 int argc;
7694 char **argv;
7695 int
7696 main ()
7697 {
7698 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7699   ;
7700   return 0;
7701 }
7702 _ACEOF
7703 # Don't try gcc -ansi; that turns off useful extensions and
7704 # breaks some systems' header files.
7705 # AIX                   -qlanglvl=ansi
7706 # Ultrix and OSF/1      -std1
7707 # HP-UX 10.20 and later -Ae
7708 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7709 # SVR4                  -Xc -D__EXTENSIONS__
7710 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7711 do
7712   CC="$ac_save_CC $ac_arg"
7713   rm -f conftest.$ac_objext
7714 if { (eval echo "$as_me:7714: \"$ac_compile\"") >&5
7715   (eval $ac_compile) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit $ac_status); } &&
7719          { ac_try='test -s conftest.$ac_objext'
7720   { (eval echo "$as_me:7720: \"$ac_try\"") >&5
7721   (eval $ac_try) 2>&5
7722   ac_status=$?
7723   echo "$as_me:7723: \$? = $ac_status" >&5
7724   (exit $ac_status); }; }; then
7725   ac_cv_prog_cc_stdc=$ac_arg
7726 break
7727 else
7728   echo "$as_me: failed program was:" >&5
7729 cat conftest.$ac_ext >&5
7730 fi
7731 rm -f conftest.$ac_objext
7732 done
7733 rm -f conftest.$ac_ext conftest.$ac_objext
7734 CC=$ac_save_CC
7735
7736 fi
7737
7738 case "x$ac_cv_prog_cc_stdc" in
7739   x|xno)
7740     echo "$as_me:7740: result: none needed" >&5
7741 echo "${ECHO_T}none needed" >&6 ;;
7742   *)
7743     echo "$as_me:7743: result: $ac_cv_prog_cc_stdc" >&5
7744 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7745     CC="$CC $ac_cv_prog_cc_stdc" ;;
7746 esac
7747
7748 echo "$as_me:7748: checking for an ANSI C-conforming const" >&5
7749 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7750 if test "${ac_cv_c_const+set}" = set; then
7751   echo $ECHO_N "(cached) $ECHO_C" >&6
7752 else
7753   cat >conftest.$ac_ext <<_ACEOF
7754 #line 7754 "configure"
7755 #include "confdefs.h"
7756
7757 int
7758 main ()
7759 {
7760 /* FIXME: Include the comments suggested by Paul. */
7761 #ifndef __cplusplus
7762   /* Ultrix mips cc rejects this.  */
7763   typedef int charset[2];
7764   const charset x;
7765   /* SunOS 4.1.1 cc rejects this.  */
7766   char const *const *ccp;
7767   char **p;
7768   /* NEC SVR4.0.2 mips cc rejects this.  */
7769   struct point {int x, y;};
7770   static struct point const zero = {0,0};
7771   /* AIX XL C 1.02.0.0 rejects this.
7772      It does not let you subtract one const X* pointer from another in
7773      an arm of an if-expression whose if-part is not a constant
7774      expression */
7775   const char *g = "string";
7776   ccp = &g + (g ? g-g : 0);
7777   /* HPUX 7.0 cc rejects these. */
7778   ++ccp;
7779   p = (char**) ccp;
7780   ccp = (char const *const *) p;
7781   { /* SCO 3.2v4 cc rejects this.  */
7782     char *t;
7783     char const *s = 0 ? (char *) 0 : (char const *) 0;
7784
7785     *t++ = 0;
7786   }
7787   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7788     int x[] = {25, 17};
7789     const int *foo = &x[0];
7790     ++foo;
7791   }
7792   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7793     typedef const int *iptr;
7794     iptr p = 0;
7795     ++p;
7796   }
7797   { /* AIX XL C 1.02.0.0 rejects this saying
7798        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7799     struct s { int j; const int *ap[3]; };
7800     struct s *b; b->j = 5;
7801   }
7802   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7803     const int foo = 10;
7804   }
7805 #endif
7806
7807   ;
7808   return 0;
7809 }
7810 _ACEOF
7811 rm -f conftest.$ac_objext
7812 if { (eval echo "$as_me:7812: \"$ac_compile\"") >&5
7813   (eval $ac_compile) 2>&5
7814   ac_status=$?
7815   echo "$as_me:7815: \$? = $ac_status" >&5
7816   (exit $ac_status); } &&
7817          { ac_try='test -s conftest.$ac_objext'
7818   { (eval echo "$as_me:7818: \"$ac_try\"") >&5
7819   (eval $ac_try) 2>&5
7820   ac_status=$?
7821   echo "$as_me:7821: \$? = $ac_status" >&5
7822   (exit $ac_status); }; }; then
7823   ac_cv_c_const=yes
7824 else
7825   echo "$as_me: failed program was:" >&5
7826 cat conftest.$ac_ext >&5
7827 ac_cv_c_const=no
7828 fi
7829 rm -f conftest.$ac_objext conftest.$ac_ext
7830 fi
7831 echo "$as_me:7831: result: $ac_cv_c_const" >&5
7832 echo "${ECHO_T}$ac_cv_c_const" >&6
7833 if test $ac_cv_c_const = no; then
7834
7835 cat >>confdefs.h <<\EOF
7836 #define const
7837 EOF
7838
7839 fi
7840
7841 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7842
7843 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7844                   inttypes.h stdint.h unistd.h
7845 do
7846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7847 echo "$as_me:7847: checking for $ac_header" >&5
7848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7850   echo $ECHO_N "(cached) $ECHO_C" >&6
7851 else
7852   cat >conftest.$ac_ext <<_ACEOF
7853 #line 7853 "configure"
7854 #include "confdefs.h"
7855 $ac_includes_default
7856 #include <$ac_header>
7857 _ACEOF
7858 rm -f conftest.$ac_objext
7859 if { (eval echo "$as_me:7859: \"$ac_compile\"") >&5
7860   (eval $ac_compile) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); } &&
7864          { ac_try='test -s conftest.$ac_objext'
7865   { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866   (eval $ac_try) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit $ac_status); }; }; then
7870   eval "$as_ac_Header=yes"
7871 else
7872   echo "$as_me: failed program was:" >&5
7873 cat conftest.$ac_ext >&5
7874 eval "$as_ac_Header=no"
7875 fi
7876 rm -f conftest.$ac_objext conftest.$ac_ext
7877 fi
7878 echo "$as_me:7878: result: `eval echo '${'$as_ac_Header'}'`" >&5
7879 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7880 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7881   cat >>confdefs.h <<EOF
7882 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7883 EOF
7884
7885 fi
7886 done
7887
7888 echo "$as_me:7888: checking for off_t" >&5
7889 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7890 if test "${ac_cv_type_off_t+set}" = set; then
7891   echo $ECHO_N "(cached) $ECHO_C" >&6
7892 else
7893   cat >conftest.$ac_ext <<_ACEOF
7894 #line 7894 "configure"
7895 #include "confdefs.h"
7896 $ac_includes_default
7897 int
7898 main ()
7899 {
7900 if ((off_t *) 0)
7901   return 0;
7902 if (sizeof (off_t))
7903   return 0;
7904   ;
7905   return 0;
7906 }
7907 _ACEOF
7908 rm -f conftest.$ac_objext
7909 if { (eval echo "$as_me:7909: \"$ac_compile\"") >&5
7910   (eval $ac_compile) 2>&5
7911   ac_status=$?
7912   echo "$as_me:7912: \$? = $ac_status" >&5
7913   (exit $ac_status); } &&
7914          { ac_try='test -s conftest.$ac_objext'
7915   { (eval echo "$as_me:7915: \"$ac_try\"") >&5
7916   (eval $ac_try) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); }; }; then
7920   ac_cv_type_off_t=yes
7921 else
7922   echo "$as_me: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7924 ac_cv_type_off_t=no
7925 fi
7926 rm -f conftest.$ac_objext conftest.$ac_ext
7927 fi
7928 echo "$as_me:7928: result: $ac_cv_type_off_t" >&5
7929 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7930 if test $ac_cv_type_off_t = yes; then
7931   :
7932 else
7933
7934 cat >>confdefs.h <<EOF
7935 #define off_t long
7936 EOF
7937
7938 fi
7939
7940 echo "$as_me:7940: checking for size_t" >&5
7941 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
7942 if test "${ac_cv_type_size_t+set}" = set; then
7943   echo $ECHO_N "(cached) $ECHO_C" >&6
7944 else
7945   cat >conftest.$ac_ext <<_ACEOF
7946 #line 7946 "configure"
7947 #include "confdefs.h"
7948 $ac_includes_default
7949 int
7950 main ()
7951 {
7952 if ((size_t *) 0)
7953   return 0;
7954 if (sizeof (size_t))
7955   return 0;
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 rm -f conftest.$ac_objext
7961 if { (eval echo "$as_me:7961: \"$ac_compile\"") >&5
7962   (eval $ac_compile) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit $ac_status); } &&
7966          { ac_try='test -s conftest.$ac_objext'
7967   { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7968   (eval $ac_try) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit $ac_status); }; }; then
7972   ac_cv_type_size_t=yes
7973 else
7974   echo "$as_me: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7976 ac_cv_type_size_t=no
7977 fi
7978 rm -f conftest.$ac_objext conftest.$ac_ext
7979 fi
7980 echo "$as_me:7980: result: $ac_cv_type_size_t" >&5
7981 echo "${ECHO_T}$ac_cv_type_size_t" >&6
7982 if test $ac_cv_type_size_t = yes; then
7983   :
7984 else
7985
7986 cat >>confdefs.h <<EOF
7987 #define size_t unsigned
7988 EOF
7989
7990 fi
7991
7992 echo "$as_me:7992: checking for working memcmp" >&5
7993 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
7994 if test "${ac_cv_func_memcmp_working+set}" = set; then
7995   echo $ECHO_N "(cached) $ECHO_C" >&6
7996 else
7997   if test "$cross_compiling" = yes; then
7998   ac_cv_func_memcmp_working=no
7999 else
8000   cat >conftest.$ac_ext <<_ACEOF
8001 #line 8001 "configure"
8002 #include "confdefs.h"
8003
8004 int
8005 main ()
8006 {
8007
8008   /* Some versions of memcmp are not 8-bit clean.  */
8009   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
8010   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
8011     exit (1);
8012
8013   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
8014      or more and with at least one buffer not starting on a 4-byte boundary.
8015      William Lewis provided this test program.   */
8016   {
8017     char foo[21];
8018     char bar[21];
8019     int i;
8020     for (i = 0; i < 4; i++)
8021       {
8022         char *a = foo + i;
8023         char *b = bar + i;
8024         strcpy (a, "--------01111111");
8025         strcpy (b, "--------10000000");
8026         if (memcmp (a, b, 16) >= 0)
8027           exit (1);
8028       }
8029     exit (0);
8030   }
8031
8032   ;
8033   return 0;
8034 }
8035 _ACEOF
8036 rm -f conftest$ac_exeext
8037 if { (eval echo "$as_me:8037: \"$ac_link\"") >&5
8038   (eval $ac_link) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8042   { (eval echo "$as_me:8042: \"$ac_try\"") >&5
8043   (eval $ac_try) 2>&5
8044   ac_status=$?
8045   echo "$as_me:8045: \$? = $ac_status" >&5
8046   (exit $ac_status); }; }; then
8047   ac_cv_func_memcmp_working=yes
8048 else
8049   echo "$as_me: program exited with status $ac_status" >&5
8050 echo "$as_me: failed program was:" >&5
8051 cat conftest.$ac_ext >&5
8052 ac_cv_func_memcmp_working=no
8053 fi
8054 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8055 fi
8056 fi
8057 echo "$as_me:8057: result: $ac_cv_func_memcmp_working" >&5
8058 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
8059 test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
8060
8061 for ac_header in stdlib.h unistd.h
8062 do
8063 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8064 echo "$as_me:8064: checking for $ac_header" >&5
8065 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8066 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8067   echo $ECHO_N "(cached) $ECHO_C" >&6
8068 else
8069   cat >conftest.$ac_ext <<_ACEOF
8070 #line 8070 "configure"
8071 #include "confdefs.h"
8072 #include <$ac_header>
8073 _ACEOF
8074 if { (eval echo "$as_me:8074: \"$ac_cpp conftest.$ac_ext\"") >&5
8075   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8076   ac_status=$?
8077   egrep -v '^ *\+' conftest.er1 >conftest.err
8078   rm -f conftest.er1
8079   cat conftest.err >&5
8080   echo "$as_me:8080: \$? = $ac_status" >&5
8081   (exit $ac_status); } >/dev/null; then
8082   if test -s conftest.err; then
8083     ac_cpp_err=$ac_c_preproc_warn_flag
8084   else
8085     ac_cpp_err=
8086   fi
8087 else
8088   ac_cpp_err=yes
8089 fi
8090 if test -z "$ac_cpp_err"; then
8091   eval "$as_ac_Header=yes"
8092 else
8093   echo "$as_me: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   eval "$as_ac_Header=no"
8096 fi
8097 rm -f conftest.err conftest.$ac_ext
8098 fi
8099 echo "$as_me:8099: result: `eval echo '${'$as_ac_Header'}'`" >&5
8100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8101 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8102   cat >>confdefs.h <<EOF
8103 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8104 EOF
8105
8106 fi
8107 done
8108
8109 for ac_func in getpagesize
8110 do
8111 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8112 echo "$as_me:8112: checking for $ac_func" >&5
8113 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8114 if eval "test \"\${$as_ac_var+set}\" = set"; then
8115   echo $ECHO_N "(cached) $ECHO_C" >&6
8116 else
8117   cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120 /* System header to define __stub macros and hopefully few prototypes,
8121     which can conflict with char $ac_func (); below.  */
8122 #include <assert.h>
8123 /* Override any gcc2 internal prototype to avoid an error.  */
8124 #ifdef __cplusplus
8125 extern "C"
8126 #endif
8127 /* We use char because int might match the return type of a gcc2
8128    builtin and then its argument prototype would still apply.  */
8129 char $ac_func ();
8130 char (*f) ();
8131
8132 int
8133 main ()
8134 {
8135 /* The GNU C library defines this for functions which it implements
8136     to always fail with ENOSYS.  Some functions are actually named
8137     something starting with __ and the normal name is an alias.  */
8138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8139 choke me
8140 #else
8141 f = $ac_func;
8142 #endif
8143
8144   ;
8145   return 0;
8146 }
8147 _ACEOF
8148 rm -f conftest.$ac_objext conftest$ac_exeext
8149 if { (eval echo "$as_me:8149: \"$ac_link\"") >&5
8150   (eval $ac_link) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit $ac_status); } &&
8154          { ac_try='test -s conftest$ac_exeext'
8155   { (eval echo "$as_me:8155: \"$ac_try\"") >&5
8156   (eval $ac_try) 2>&5
8157   ac_status=$?
8158   echo "$as_me:8158: \$? = $ac_status" >&5
8159   (exit $ac_status); }; }; then
8160   eval "$as_ac_var=yes"
8161 else
8162   echo "$as_me: failed program was:" >&5
8163 cat conftest.$ac_ext >&5
8164 eval "$as_ac_var=no"
8165 fi
8166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8167 fi
8168 echo "$as_me:8168: result: `eval echo '${'$as_ac_var'}'`" >&5
8169 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8170 if test `eval echo '${'$as_ac_var'}'` = yes; then
8171   cat >>confdefs.h <<EOF
8172 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8173 EOF
8174
8175 fi
8176 done
8177
8178 echo "$as_me:8178: checking for working mmap" >&5
8179 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8180 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8181   echo $ECHO_N "(cached) $ECHO_C" >&6
8182 else
8183   if test "$cross_compiling" = yes; then
8184   ac_cv_func_mmap_fixed_mapped=no
8185 else
8186   cat >conftest.$ac_ext <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8189 $ac_includes_default
8190 /* Thanks to Mike Haertel and Jim Avera for this test.
8191    Here is a matrix of mmap possibilities:
8192         mmap private not fixed
8193         mmap private fixed at somewhere currently unmapped
8194         mmap private fixed at somewhere already mapped
8195         mmap shared not fixed
8196         mmap shared fixed at somewhere currently unmapped
8197         mmap shared fixed at somewhere already mapped
8198    For private mappings, we should verify that changes cannot be read()
8199    back from the file, nor mmap's back from the file at a different
8200    address.  (There have been systems where private was not correctly
8201    implemented like the infamous i386 svr4.0, and systems where the
8202    VM page cache was not coherent with the file system buffer cache
8203    like early versions of FreeBSD and possibly contemporary NetBSD.)
8204    For shared mappings, we should conversely verify that changes get
8205    propogated back to all the places they're supposed to be.
8206
8207    Grep wants private fixed already mapped.
8208    The main things grep needs to know about mmap are:
8209    * does it exist and is it safe to write into the mmap'd area
8210    * how to use it (BSD variants)  */
8211
8212 #include <fcntl.h>
8213 #include <sys/mman.h>
8214
8215 #if !STDC_HEADERS && !HAVE_STDLIB_H
8216 char *malloc ();
8217 #endif
8218
8219 /* This mess was copied from the GNU getpagesize.h.  */
8220 #if !HAVE_GETPAGESIZE
8221 /* Assume that all systems that can run configure have sys/param.h.  */
8222 # if !HAVE_SYS_PARAM_H
8223 #  define HAVE_SYS_PARAM_H 1
8224 # endif
8225
8226 # ifdef _SC_PAGESIZE
8227 #  define getpagesize() sysconf(_SC_PAGESIZE)
8228 # else /* no _SC_PAGESIZE */
8229 #  if HAVE_SYS_PARAM_H
8230 #   include <sys/param.h>
8231 #   ifdef EXEC_PAGESIZE
8232 #    define getpagesize() EXEC_PAGESIZE
8233 #   else /* no EXEC_PAGESIZE */
8234 #    ifdef NBPG
8235 #     define getpagesize() NBPG * CLSIZE
8236 #     ifndef CLSIZE
8237 #      define CLSIZE 1
8238 #     endif /* no CLSIZE */
8239 #    else /* no NBPG */
8240 #     ifdef NBPC
8241 #      define getpagesize() NBPC
8242 #     else /* no NBPC */
8243 #      ifdef PAGESIZE
8244 #       define getpagesize() PAGESIZE
8245 #      endif /* PAGESIZE */
8246 #     endif /* no NBPC */
8247 #    endif /* no NBPG */
8248 #   endif /* no EXEC_PAGESIZE */
8249 #  else /* no HAVE_SYS_PARAM_H */
8250 #   define getpagesize() 8192   /* punt totally */
8251 #  endif /* no HAVE_SYS_PARAM_H */
8252 # endif /* no _SC_PAGESIZE */
8253
8254 #endif /* no HAVE_GETPAGESIZE */
8255
8256 int
8257 main ()
8258 {
8259   char *data, *data2, *data3;
8260   int i, pagesize;
8261   int fd;
8262
8263   pagesize = getpagesize ();
8264
8265   /* First, make a file with some known garbage in it. */
8266   data = (char *) malloc (pagesize);
8267   if (!data)
8268     exit (1);
8269   for (i = 0; i < pagesize; ++i)
8270     *(data + i) = rand ();
8271   umask (0);
8272   fd = creat ("conftest.mmap", 0600);
8273   if (fd < 0)
8274     exit (1);
8275   if (write (fd, data, pagesize) != pagesize)
8276     exit (1);
8277   close (fd);
8278
8279   /* Next, try to mmap the file at a fixed address which already has
8280      something else allocated at it.  If we can, also make sure that
8281      we see the same garbage.  */
8282   fd = open ("conftest.mmap", O_RDWR);
8283   if (fd < 0)
8284     exit (1);
8285   data2 = (char *) malloc (2 * pagesize);
8286   if (!data2)
8287     exit (1);
8288   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8289   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8290                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8291     exit (1);
8292   for (i = 0; i < pagesize; ++i)
8293     if (*(data + i) != *(data2 + i))
8294       exit (1);
8295
8296   /* Finally, make sure that changes to the mapped area do not
8297      percolate back to the file as seen by read().  (This is a bug on
8298      some variants of i386 svr4.0.)  */
8299   for (i = 0; i < pagesize; ++i)
8300     *(data2 + i) = *(data2 + i) + 1;
8301   data3 = (char *) malloc (pagesize);
8302   if (!data3)
8303     exit (1);
8304   if (read (fd, data3, pagesize) != pagesize)
8305     exit (1);
8306   for (i = 0; i < pagesize; ++i)
8307     if (*(data + i) != *(data3 + i))
8308       exit (1);
8309   close (fd);
8310   exit (0);
8311 }
8312 _ACEOF
8313 rm -f conftest$ac_exeext
8314 if { (eval echo "$as_me:8314: \"$ac_link\"") >&5
8315   (eval $ac_link) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8319   { (eval echo "$as_me:8319: \"$ac_try\"") >&5
8320   (eval $ac_try) 2>&5
8321   ac_status=$?
8322   echo "$as_me:8322: \$? = $ac_status" >&5
8323   (exit $ac_status); }; }; then
8324   ac_cv_func_mmap_fixed_mapped=yes
8325 else
8326   echo "$as_me: program exited with status $ac_status" >&5
8327 echo "$as_me: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 ac_cv_func_mmap_fixed_mapped=no
8330 fi
8331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8332 fi
8333 fi
8334 echo "$as_me:8334: result: $ac_cv_func_mmap_fixed_mapped" >&5
8335 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8336 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8337
8338 cat >>confdefs.h <<\EOF
8339 #define HAVE_MMAP 1
8340 EOF
8341
8342 fi
8343 rm -f conftest.mmap
8344
8345 if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
8346     FILEMAP=unixfilemap
8347 else
8348     FILEMAP=readfilemap
8349 fi
8350
8351 for ac_func in memmove bcopy
8352 do
8353 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8354 echo "$as_me:8354: checking for $ac_func" >&5
8355 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8356 if eval "test \"\${$as_ac_var+set}\" = set"; then
8357   echo $ECHO_N "(cached) $ECHO_C" >&6
8358 else
8359   cat >conftest.$ac_ext <<_ACEOF
8360 #line 8360 "configure"
8361 #include "confdefs.h"
8362 /* System header to define __stub macros and hopefully few prototypes,
8363     which can conflict with char $ac_func (); below.  */
8364 #include <assert.h>
8365 /* Override any gcc2 internal prototype to avoid an error.  */
8366 #ifdef __cplusplus
8367 extern "C"
8368 #endif
8369 /* We use char because int might match the return type of a gcc2
8370    builtin and then its argument prototype would still apply.  */
8371 char $ac_func ();
8372 char (*f) ();
8373
8374 int
8375 main ()
8376 {
8377 /* The GNU C library defines this for functions which it implements
8378     to always fail with ENOSYS.  Some functions are actually named
8379     something starting with __ and the normal name is an alias.  */
8380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8381 choke me
8382 #else
8383 f = $ac_func;
8384 #endif
8385
8386   ;
8387   return 0;
8388 }
8389 _ACEOF
8390 rm -f conftest.$ac_objext conftest$ac_exeext
8391 if { (eval echo "$as_me:8391: \"$ac_link\"") >&5
8392   (eval $ac_link) 2>&5
8393   ac_status=$?
8394   echo "$as_me:8394: \$? = $ac_status" >&5
8395   (exit $ac_status); } &&
8396          { ac_try='test -s conftest$ac_exeext'
8397   { (eval echo "$as_me:8397: \"$ac_try\"") >&5
8398   (eval $ac_try) 2>&5
8399   ac_status=$?
8400   echo "$as_me:8400: \$? = $ac_status" >&5
8401   (exit $ac_status); }; }; then
8402   eval "$as_ac_var=yes"
8403 else
8404   echo "$as_me: failed program was:" >&5
8405 cat conftest.$ac_ext >&5
8406 eval "$as_ac_var=no"
8407 fi
8408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8409 fi
8410 echo "$as_me:8410: result: `eval echo '${'$as_ac_var'}'`" >&5
8411 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8412 if test `eval echo '${'$as_ac_var'}'` = yes; then
8413   cat >>confdefs.h <<EOF
8414 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8415 EOF
8416
8417 fi
8418 done
8419
8420 cat >>confdefs.h <<\EOF
8421 #define XML_NS 1
8422 EOF
8423
8424 cat >>confdefs.h <<\EOF
8425 #define XML_DTD 1
8426 EOF
8427
8428 cat >>confdefs.h <<\EOF
8429 #define XML_CONTEXT_BYTES 1024
8430 EOF
8431
8432 ac_config_files="$ac_config_files Makefile"
8433
8434 cat >confcache <<\_ACEOF
8435 # This file is a shell script that caches the results of configure
8436 # tests run on this system so they can be shared between configure
8437 # scripts and configure runs, see configure's option --config-cache.
8438 # It is not useful on other systems.  If it contains results you don't
8439 # want to keep, you may remove or edit it.
8440 #
8441 # config.status only pays attention to the cache file if you give it
8442 # the --recheck option to rerun configure.
8443 #
8444 # `ac_cv_env_foo' variables (set or unset) will be overriden when
8445 # loading this file, other *unset* `ac_cv_foo' will be assigned the
8446 # following values.
8447
8448 _ACEOF
8449
8450 # The following way of writing the cache mishandles newlines in values,
8451 # but we know of no workaround that is simple, portable, and efficient.
8452 # So, don't put newlines in cache variables' values.
8453 # Ultrix sh set writes to stderr and can't be redirected directly,
8454 # and sets the high bit in the cache file unless we assign to the vars.
8455 {
8456   (set) 2>&1 |
8457     case `(ac_space=' '; set | grep ac_space) 2>&1` in
8458     *ac_space=\ *)
8459       # `set' does not quote correctly, so add quotes (double-quote
8460       # substitution turns \\\\ into \\, and sed turns \\ into \).
8461       sed -n \
8462         "s/'/'\\\\''/g;
8463           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8464       ;;
8465     *)
8466       # `set' quotes correctly as required by POSIX, so do not add quotes.
8467       sed -n \
8468         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8469       ;;
8470     esac;
8471 } |
8472   sed '
8473      t clear
8474      : clear
8475      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8476      t end
8477      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8478      : end' >>confcache
8479 if cmp -s $cache_file confcache; then :; else
8480   if test -w $cache_file; then
8481     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
8482     cat confcache >$cache_file
8483   else
8484     echo "not updating unwritable cache $cache_file"
8485   fi
8486 fi
8487 rm -f confcache
8488
8489 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8490 # Let make expand exec_prefix.
8491 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8492
8493 # VPATH may cause trouble with some makes, so we remove $(srcdir),
8494 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8495 # trailing colons and then remove the whole line if VPATH becomes empty
8496 # (actually we leave an empty line to preserve line numbers).
8497 if test "x$srcdir" = x.; then
8498   ac_vpsub='/^[         ]*VPATH[        ]*=/{
8499 s/:*\$(srcdir):*/:/;
8500 s/:*\${srcdir}:*/:/;
8501 s/:*@srcdir@:*/:/;
8502 s/^\([^=]*=[    ]*\):*/\1/;
8503 s/:*$//;
8504 s/^[^=]*=[      ]*$//;
8505 }'
8506 fi
8507
8508 DEFS=-DHAVE_CONFIG_H
8509
8510 : ${CONFIG_STATUS=./config.status}
8511 ac_clean_files_save=$ac_clean_files
8512 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8513 { echo "$as_me:8513: creating $CONFIG_STATUS" >&5
8514 echo "$as_me: creating $CONFIG_STATUS" >&6;}
8515 cat >$CONFIG_STATUS <<_ACEOF
8516 #! $SHELL
8517 # Generated automatically by configure.
8518 # Run this file to recreate the current configuration.
8519 # Compiler output produced by configure, useful for debugging
8520 # configure, is in config.log if it exists.
8521
8522 debug=false
8523 SHELL=\${CONFIG_SHELL-$SHELL}
8524 ac_cs_invocation="\$0 \$@"
8525
8526 _ACEOF
8527
8528 cat >>$CONFIG_STATUS <<\_ACEOF
8529 # Be Bourne compatible
8530 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
8531   emulate sh
8532   NULLCMD=:
8533 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
8534   set -o posix
8535 fi
8536
8537 # Name of the executable.
8538 as_me=`echo "$0" |sed 's,.*[\\/],,'`
8539
8540 if expr a : '\(a\)' >/dev/null 2>&1; then
8541   as_expr=expr
8542 else
8543   as_expr=false
8544 fi
8545
8546 rm -f conf$$ conf$$.exe conf$$.file
8547 echo >conf$$.file
8548 if ln -s conf$$.file conf$$ 2>/dev/null; then
8549   # We could just check for DJGPP; but this test a) works b) is more generic
8550   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
8551   if test -f conf$$.exe; then
8552     # Don't use ln at all; we don't have any links
8553     as_ln_s='cp -p'
8554   else
8555     as_ln_s='ln -s'
8556   fi
8557 elif ln conf$$.file conf$$ 2>/dev/null; then
8558   as_ln_s=ln
8559 else
8560   as_ln_s='cp -p'
8561 fi
8562 rm -f conf$$ conf$$.exe conf$$.file
8563
8564 as_executable_p="test -f"
8565
8566 # Support unset when possible.
8567 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
8568   as_unset=unset
8569 else
8570   as_unset=false
8571 fi
8572
8573 # NLS nuisances.
8574 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
8575 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
8576 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
8577 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
8578 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
8579 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
8580 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
8581 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
8582
8583 # IFS
8584 # We need space, tab and new line, in precisely that order.
8585 as_nl='
8586 '
8587 IFS="   $as_nl"
8588
8589 # CDPATH.
8590 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
8591
8592 exec 6>&1
8593
8594 _ACEOF
8595
8596 # Files that config.status was made for.
8597 if test -n "$ac_config_files"; then
8598   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
8599 fi
8600
8601 if test -n "$ac_config_headers"; then
8602   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
8603 fi
8604
8605 if test -n "$ac_config_links"; then
8606   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
8607 fi
8608
8609 if test -n "$ac_config_commands"; then
8610   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
8611 fi
8612
8613 cat >>$CONFIG_STATUS <<\EOF
8614
8615 ac_cs_usage="\
8616 \`$as_me' instantiates files from templates according to the
8617 current configuration.
8618
8619 Usage: $0 [OPTIONS] [FILE]...
8620
8621   -h, --help       print this help, then exit
8622   -V, --version    print version number, then exit
8623   -d, --debug      don't remove temporary files
8624       --recheck    update $as_me by reconfiguring in the same conditions
8625   --file=FILE[:TEMPLATE]
8626                    instantiate the configuration file FILE
8627   --header=FILE[:TEMPLATE]
8628                    instantiate the configuration header FILE
8629
8630 Configuration files:
8631 $config_files
8632
8633 Configuration headers:
8634 $config_headers
8635
8636 Report bugs to <bug-autoconf@gnu.org>."
8637 EOF
8638
8639 cat >>$CONFIG_STATUS <<EOF
8640 ac_cs_version="\\
8641 expat config.status 1.95.6
8642 configured by $0, generated by GNU Autoconf 2.52,
8643   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
8644
8645 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8646 Free Software Foundation, Inc.
8647 This config.status script is free software; the Free Software Foundation
8648 gives unlimited permission to copy, distribute and modify it."
8649 srcdir=$srcdir
8650 INSTALL="$INSTALL"
8651 EOF
8652
8653 cat >>$CONFIG_STATUS <<\EOF
8654 # If no file are specified by the user, then we need to provide default
8655 # value.  By we need to know if files were specified by the user.
8656 ac_need_defaults=:
8657 while test $# != 0
8658 do
8659   case $1 in
8660   --*=*)
8661     ac_option=`expr "x$1" : 'x\([^=]*\)='`
8662     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
8663     shift
8664     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
8665     shift
8666     ;;
8667   -*);;
8668   *) # This is not an option, so the user has probably given explicit
8669      # arguments.
8670      ac_need_defaults=false;;
8671   esac
8672
8673   case $1 in
8674   # Handling of the options.
8675 EOF
8676 cat >>$CONFIG_STATUS <<EOF
8677   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8678     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
8679     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
8680 EOF
8681 cat >>$CONFIG_STATUS <<\EOF
8682   --version | --vers* | -V )
8683     echo "$ac_cs_version"; exit 0 ;;
8684   --he | --h)
8685     # Conflict between --help and --header
8686     { { echo "$as_me:8686: error: ambiguous option: $1
8687 Try \`$0 --help' for more information." >&5
8688 echo "$as_me: error: ambiguous option: $1
8689 Try \`$0 --help' for more information." >&2;}
8690    { (exit 1); exit 1; }; };;
8691   --help | --hel | -h )
8692     echo "$ac_cs_usage"; exit 0 ;;
8693   --debug | --d* | -d )
8694     debug=: ;;
8695   --file | --fil | --fi | --f )
8696     shift
8697     CONFIG_FILES="$CONFIG_FILES $1"
8698     ac_need_defaults=false;;
8699   --header | --heade | --head | --hea )
8700     shift
8701     CONFIG_HEADERS="$CONFIG_HEADERS $1"
8702     ac_need_defaults=false;;
8703
8704   # This is an error.
8705   -*) { { echo "$as_me:8705: error: unrecognized option: $1
8706 Try \`$0 --help' for more information." >&5
8707 echo "$as_me: error: unrecognized option: $1
8708 Try \`$0 --help' for more information." >&2;}
8709    { (exit 1); exit 1; }; } ;;
8710
8711   *) ac_config_targets="$ac_config_targets $1" ;;
8712
8713   esac
8714   shift
8715 done
8716
8717 exec 5>>config.log
8718 cat >&5 << _ACEOF
8719
8720 ## ----------------------- ##
8721 ## Running config.status.  ##
8722 ## ----------------------- ##
8723
8724 This file was extended by $as_me (expat 1.95.6) 2.52, executed with
8725   CONFIG_FILES    = $CONFIG_FILES
8726   CONFIG_HEADERS  = $CONFIG_HEADERS
8727   CONFIG_LINKS    = $CONFIG_LINKS
8728   CONFIG_COMMANDS = $CONFIG_COMMANDS
8729   > $ac_cs_invocation
8730 on `(hostname || uname -n) 2>/dev/null | sed 1q`
8731
8732 _ACEOF
8733 EOF
8734
8735 cat >>$CONFIG_STATUS <<\EOF
8736 for ac_config_target in $ac_config_targets
8737 do
8738   case "$ac_config_target" in
8739   # Handling of arguments.
8740   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8741   "expat_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS expat_config.h" ;;
8742   *) { { echo "$as_me:8742: error: invalid argument: $ac_config_target" >&5
8743 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
8744    { (exit 1); exit 1; }; };;
8745   esac
8746 done
8747
8748 # If the user did not use the arguments to specify the items to instantiate,
8749 # then the envvar interface is used.  Set only those that are not.
8750 # We use the long form for the default assignment because of an extremely
8751 # bizarre bug on SunOS 4.1.3.
8752 if $ac_need_defaults; then
8753   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8754   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8755 fi
8756
8757 # Create a temporary directory, and hook for its removal unless debugging.
8758 $debug ||
8759 {
8760   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
8761   trap '{ (exit 1); exit 1; }' 1 2 13 15
8762 }
8763
8764 # Create a (secure) tmp directory for tmp files.
8765 : ${TMPDIR=/tmp}
8766 {
8767   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
8768   test -n "$tmp" && test -d "$tmp"
8769 }  ||
8770 {
8771   tmp=$TMPDIR/cs$$-$RANDOM
8772   (umask 077 && mkdir $tmp)
8773 } ||
8774 {
8775    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
8776    { (exit 1); exit 1; }
8777 }
8778
8779 EOF
8780
8781 cat >>$CONFIG_STATUS <<EOF
8782
8783 #
8784 # CONFIG_FILES section.
8785 #
8786
8787 # No need to generate the scripts if there are no CONFIG_FILES.
8788 # This happens for instance when ./config.status config.h
8789 if test -n "\$CONFIG_FILES"; then
8790   # Protect against being on the right side of a sed subst in config.status.
8791   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8792    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8793 s,@SHELL@,$SHELL,;t t
8794 s,@exec_prefix@,$exec_prefix,;t t
8795 s,@prefix@,$prefix,;t t
8796 s,@program_transform_name@,$program_transform_name,;t t
8797 s,@bindir@,$bindir,;t t
8798 s,@sbindir@,$sbindir,;t t
8799 s,@libexecdir@,$libexecdir,;t t
8800 s,@datadir@,$datadir,;t t
8801 s,@sysconfdir@,$sysconfdir,;t t
8802 s,@sharedstatedir@,$sharedstatedir,;t t
8803 s,@localstatedir@,$localstatedir,;t t
8804 s,@libdir@,$libdir,;t t
8805 s,@includedir@,$includedir,;t t
8806 s,@oldincludedir@,$oldincludedir,;t t
8807 s,@infodir@,$infodir,;t t
8808 s,@mandir@,$mandir,;t t
8809 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8810 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8811 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8812 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8813 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8814 s,@build_alias@,$build_alias,;t t
8815 s,@host_alias@,$host_alias,;t t
8816 s,@target_alias@,$target_alias,;t t
8817 s,@ECHO_C@,$ECHO_C,;t t
8818 s,@ECHO_N@,$ECHO_N,;t t
8819 s,@ECHO_T@,$ECHO_T,;t t
8820 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8821 s,@DEFS@,$DEFS,;t t
8822 s,@LIBS@,$LIBS,;t t
8823 s,@build@,$build,;t t
8824 s,@build_cpu@,$build_cpu,;t t
8825 s,@build_vendor@,$build_vendor,;t t
8826 s,@build_os@,$build_os,;t t
8827 s,@host@,$host,;t t
8828 s,@host_cpu@,$host_cpu,;t t
8829 s,@host_vendor@,$host_vendor,;t t
8830 s,@host_os@,$host_os,;t t
8831 s,@CC@,$CC,;t t
8832 s,@CFLAGS@,$CFLAGS,;t t
8833 s,@LDFLAGS@,$LDFLAGS,;t t
8834 s,@CPPFLAGS@,$CPPFLAGS,;t t
8835 s,@ac_ct_CC@,$ac_ct_CC,;t t
8836 s,@EXEEXT@,$EXEEXT,;t t
8837 s,@OBJEXT@,$OBJEXT,;t t
8838 s,@LN_S@,$LN_S,;t t
8839 s,@ECHO@,$ECHO,;t t
8840 s,@RANLIB@,$RANLIB,;t t
8841 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8842 s,@STRIP@,$STRIP,;t t
8843 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
8844 s,@DLLTOOL@,$DLLTOOL,;t t
8845 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
8846 s,@AS@,$AS,;t t
8847 s,@ac_ct_AS@,$ac_ct_AS,;t t
8848 s,@OBJDUMP@,$OBJDUMP,;t t
8849 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
8850 s,@CPP@,$CPP,;t t
8851 s,@LIBTOOL@,$LIBTOOL,;t t
8852 s,@LIBCURRENT@,$LIBCURRENT,;t t
8853 s,@LIBREVISION@,$LIBREVISION,;t t
8854 s,@LIBAGE@,$LIBAGE,;t t
8855 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
8856 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
8857 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
8858 s,@LIBOBJS@,$LIBOBJS,;t t
8859 s,@FILEMAP@,$FILEMAP,;t t
8860 CEOF
8861
8862 EOF
8863
8864   cat >>$CONFIG_STATUS <<\EOF
8865   # Split the substitutions into bite-sized pieces for seds with
8866   # small command number limits, like on Digital OSF/1 and HP-UX.
8867   ac_max_sed_lines=48
8868   ac_sed_frag=1 # Number of current file.
8869   ac_beg=1 # First line for current file.
8870   ac_end=$ac_max_sed_lines # Line after last line for current file.
8871   ac_more_lines=:
8872   ac_sed_cmds=
8873   while $ac_more_lines; do
8874     if test $ac_beg -gt 1; then
8875       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8876     else
8877       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8878     fi
8879     if test ! -s $tmp/subs.frag; then
8880       ac_more_lines=false
8881     else
8882       # The purpose of the label and of the branching condition is to
8883       # speed up the sed processing (if there are no `@' at all, there
8884       # is no need to browse any of the substitutions).
8885       # These are the two extra sed commands mentioned above.
8886       (echo ':t
8887   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8888       if test -z "$ac_sed_cmds"; then
8889         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8890       else
8891         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8892       fi
8893       ac_sed_frag=`expr $ac_sed_frag + 1`
8894       ac_beg=$ac_end
8895       ac_end=`expr $ac_end + $ac_max_sed_lines`
8896     fi
8897   done
8898   if test -z "$ac_sed_cmds"; then
8899     ac_sed_cmds=cat
8900   fi
8901 fi # test -n "$CONFIG_FILES"
8902
8903 EOF
8904 cat >>$CONFIG_STATUS <<\EOF
8905 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8906   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8907   case $ac_file in
8908   - | *:- | *:-:* ) # input from stdin
8909         cat >$tmp/stdin
8910         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8911         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8912   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8913         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8914   * )   ac_file_in=$ac_file.in ;;
8915   esac
8916
8917   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8918   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8919          X"$ac_file" : 'X\(//\)[^/]' \| \
8920          X"$ac_file" : 'X\(//\)$' \| \
8921          X"$ac_file" : 'X\(/\)' \| \
8922          .     : '\(.\)' 2>/dev/null ||
8923 echo X"$ac_file" |
8924     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8925           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8926           /^X\(\/\/\)$/{ s//\1/; q; }
8927           /^X\(\/\).*/{ s//\1/; q; }
8928           s/.*/./; q'`
8929   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8930     { case "$ac_dir" in
8931   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
8932   *)                      as_incr_dir=.;;
8933 esac
8934 as_dummy="$ac_dir"
8935 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
8936   case $as_mkdir_dir in
8937     # Skip DOS drivespec
8938     ?:) as_incr_dir=$as_mkdir_dir ;;
8939     *)
8940       as_incr_dir=$as_incr_dir/$as_mkdir_dir
8941       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
8942     ;;
8943   esac
8944 done; }
8945
8946     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
8947     # A "../" for each directory in $ac_dir_suffix.
8948     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
8949   else
8950     ac_dir_suffix= ac_dots=
8951   fi
8952
8953   case $srcdir in
8954   .)  ac_srcdir=.
8955       if test -z "$ac_dots"; then
8956          ac_top_srcdir=.
8957       else
8958          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
8959       fi ;;
8960   [\\/]* | ?:[\\/]* )
8961       ac_srcdir=$srcdir$ac_dir_suffix;
8962       ac_top_srcdir=$srcdir ;;
8963   *) # Relative path.
8964     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
8965     ac_top_srcdir=$ac_dots$srcdir ;;
8966   esac
8967
8968   case $INSTALL in
8969   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8970   *) ac_INSTALL=$ac_dots$INSTALL ;;
8971   esac
8972
8973   if test x"$ac_file" != x-; then
8974     { echo "$as_me:8974: creating $ac_file" >&5
8975 echo "$as_me: creating $ac_file" >&6;}
8976     rm -f "$ac_file"
8977   fi
8978   # Let's still pretend it is `configure' which instantiates (i.e., don't
8979   # use $as_me), people would be surprised to read:
8980   #    /* config.h.  Generated automatically by config.status.  */
8981   configure_input="Generated automatically from `echo $ac_file_in |
8982                                                  sed 's,.*/,,'` by configure."
8983
8984   # First look for the input files in the build tree, otherwise in the
8985   # src tree.
8986   ac_file_inputs=`IFS=:
8987     for f in $ac_file_in; do
8988       case $f in
8989       -) echo $tmp/stdin ;;
8990       [\\/$]*)
8991          # Absolute (can't be DOS-style, as IFS=:)
8992          test -f "$f" || { { echo "$as_me:8992: error: cannot find input file: $f" >&5
8993 echo "$as_me: error: cannot find input file: $f" >&2;}
8994    { (exit 1); exit 1; }; }
8995          echo $f;;
8996       *) # Relative
8997          if test -f "$f"; then
8998            # Build tree
8999            echo $f
9000          elif test -f "$srcdir/$f"; then
9001            # Source tree
9002            echo $srcdir/$f
9003          else
9004            # /dev/null tree
9005            { { echo "$as_me:9005: error: cannot find input file: $f" >&5
9006 echo "$as_me: error: cannot find input file: $f" >&2;}
9007    { (exit 1); exit 1; }; }
9008          fi;;
9009       esac
9010     done` || { (exit 1); exit 1; }
9011 EOF
9012 cat >>$CONFIG_STATUS <<EOF
9013   sed "$ac_vpsub
9014 $extrasub
9015 EOF
9016 cat >>$CONFIG_STATUS <<\EOF
9017 :t
9018 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9019 s,@configure_input@,$configure_input,;t t
9020 s,@srcdir@,$ac_srcdir,;t t
9021 s,@top_srcdir@,$ac_top_srcdir,;t t
9022 s,@INSTALL@,$ac_INSTALL,;t t
9023 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
9024   rm -f $tmp/stdin
9025   if test x"$ac_file" != x-; then
9026     mv $tmp/out $ac_file
9027   else
9028     cat $tmp/out
9029     rm -f $tmp/out
9030   fi
9031
9032 done
9033 EOF
9034 cat >>$CONFIG_STATUS <<\EOF
9035
9036 #
9037 # CONFIG_HEADER section.
9038 #
9039
9040 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9041 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9042 #
9043 # ac_d sets the value in "#define NAME VALUE" lines.
9044 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9045 ac_dB='[        ].*$,\1#\2'
9046 ac_dC=' '
9047 ac_dD=',;t'
9048 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9049 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9050 ac_uB='$,\1#\2define\3'
9051 ac_uC=' '
9052 ac_uD=',;t'
9053
9054 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
9055   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9056   case $ac_file in
9057   - | *:- | *:-:* ) # input from stdin
9058         cat >$tmp/stdin
9059         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9060         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9061   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9062         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9063   * )   ac_file_in=$ac_file.in ;;
9064   esac
9065
9066   test x"$ac_file" != x- && { echo "$as_me:9066: creating $ac_file" >&5
9067 echo "$as_me: creating $ac_file" >&6;}
9068
9069   # First look for the input files in the build tree, otherwise in the
9070   # src tree.
9071   ac_file_inputs=`IFS=:
9072     for f in $ac_file_in; do
9073       case $f in
9074       -) echo $tmp/stdin ;;
9075       [\\/$]*)
9076          # Absolute (can't be DOS-style, as IFS=:)
9077          test -f "$f" || { { echo "$as_me:9077: error: cannot find input file: $f" >&5
9078 echo "$as_me: error: cannot find input file: $f" >&2;}
9079    { (exit 1); exit 1; }; }
9080          echo $f;;
9081       *) # Relative
9082          if test -f "$f"; then
9083            # Build tree
9084            echo $f
9085          elif test -f "$srcdir/$f"; then
9086            # Source tree
9087            echo $srcdir/$f
9088          else
9089            # /dev/null tree
9090            { { echo "$as_me:9090: error: cannot find input file: $f" >&5
9091 echo "$as_me: error: cannot find input file: $f" >&2;}
9092    { (exit 1); exit 1; }; }
9093          fi;;
9094       esac
9095     done` || { (exit 1); exit 1; }
9096   # Remove the trailing spaces.
9097   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
9098
9099 EOF
9100
9101 # Transform confdefs.h into two sed scripts, `conftest.defines' and
9102 # `conftest.undefs', that substitutes the proper values into
9103 # config.h.in to produce config.h.  The first handles `#define'
9104 # templates, and the second `#undef' templates.
9105 # And first: Protect against being on the right side of a sed subst in
9106 # config.status.  Protect against being in an unquoted here document
9107 # in config.status.
9108 rm -f conftest.defines conftest.undefs
9109 # Using a here document instead of a string reduces the quoting nightmare.
9110 # Putting comments in sed scripts is not portable.
9111 #
9112 # `end' is used to avoid that the second main sed command (meant for
9113 # 0-ary CPP macros) applies to n-ary macro definitions.
9114 # See the Autoconf documentation for `clear'.
9115 cat >confdef2sed.sed <<\EOF
9116 s/[\\&,]/\\&/g
9117 s,[\\$`],\\&,g
9118 t clear
9119 : clear
9120 s,^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
9121 t end
9122 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
9123 : end
9124 EOF
9125 # If some macros were called several times there might be several times
9126 # the same #defines, which is useless.  Nevertheless, we may not want to
9127 # sort them, since we want the *last* AC-DEFINE to be honored.
9128 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
9129 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
9130 rm -f confdef2sed.sed
9131
9132 # This sed command replaces #undef with comments.  This is necessary, for
9133 # example, in the case of _POSIX_SOURCE, which is predefined and required
9134 # on some systems where configure will not decide to define it.
9135 cat >>conftest.undefs <<\EOF
9136 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
9137 EOF
9138
9139 # Break up conftest.defines because some shells have a limit on the size
9140 # of here documents, and old seds have small limits too (100 cmds).
9141 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
9142 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
9143 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
9144 echo '  :' >>$CONFIG_STATUS
9145 rm -f conftest.tail
9146 while grep . conftest.defines >/dev/null
9147 do
9148   # Write a limited-size here document to $tmp/defines.sed.
9149   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
9150   # Speed up: don't consider the non `#define' lines.
9151   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
9152   # Work around the forget-to-reset-the-flag bug.
9153   echo 't clr' >>$CONFIG_STATUS
9154   echo ': clr' >>$CONFIG_STATUS
9155   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
9156   echo 'CEOF
9157   sed -f $tmp/defines.sed $tmp/in >$tmp/out
9158   rm -f $tmp/in
9159   mv $tmp/out $tmp/in
9160 ' >>$CONFIG_STATUS
9161   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
9162   rm -f conftest.defines
9163   mv conftest.tail conftest.defines
9164 done
9165 rm -f conftest.defines
9166 echo '  fi # egrep' >>$CONFIG_STATUS
9167 echo >>$CONFIG_STATUS
9168
9169 # Break up conftest.undefs because some shells have a limit on the size
9170 # of here documents, and old seds have small limits too (100 cmds).
9171 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
9172 rm -f conftest.tail
9173 while grep . conftest.undefs >/dev/null
9174 do
9175   # Write a limited-size here document to $tmp/undefs.sed.
9176   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
9177   # Speed up: don't consider the non `#undef'
9178   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
9179   # Work around the forget-to-reset-the-flag bug.
9180   echo 't clr' >>$CONFIG_STATUS
9181   echo ': clr' >>$CONFIG_STATUS
9182   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
9183   echo 'CEOF
9184   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
9185   rm -f $tmp/in
9186   mv $tmp/out $tmp/in
9187 ' >>$CONFIG_STATUS
9188   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
9189   rm -f conftest.undefs
9190   mv conftest.tail conftest.undefs
9191 done
9192 rm -f conftest.undefs
9193
9194 cat >>$CONFIG_STATUS <<\EOF
9195   # Let's still pretend it is `configure' which instantiates (i.e., don't
9196   # use $as_me), people would be surprised to read:
9197   #    /* config.h.  Generated automatically by config.status.  */
9198   if test x"$ac_file" = x-; then
9199     echo "/* Generated automatically by configure.  */" >$tmp/config.h
9200   else
9201     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
9202   fi
9203   cat $tmp/in >>$tmp/config.h
9204   rm -f $tmp/in
9205   if test x"$ac_file" != x-; then
9206     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
9207       { echo "$as_me:9207: $ac_file is unchanged" >&5
9208 echo "$as_me: $ac_file is unchanged" >&6;}
9209     else
9210       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9211          X"$ac_file" : 'X\(//\)[^/]' \| \
9212          X"$ac_file" : 'X\(//\)$' \| \
9213          X"$ac_file" : 'X\(/\)' \| \
9214          .     : '\(.\)' 2>/dev/null ||
9215 echo X"$ac_file" |
9216     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9217           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9218           /^X\(\/\/\)$/{ s//\1/; q; }
9219           /^X\(\/\).*/{ s//\1/; q; }
9220           s/.*/./; q'`
9221       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9222         { case "$ac_dir" in
9223   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
9224   *)                      as_incr_dir=.;;
9225 esac
9226 as_dummy="$ac_dir"
9227 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
9228   case $as_mkdir_dir in
9229     # Skip DOS drivespec
9230     ?:) as_incr_dir=$as_mkdir_dir ;;
9231     *)
9232       as_incr_dir=$as_incr_dir/$as_mkdir_dir
9233       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
9234     ;;
9235   esac
9236 done; }
9237
9238       fi
9239       rm -f $ac_file
9240       mv $tmp/config.h $ac_file
9241     fi
9242   else
9243     cat $tmp/config.h
9244     rm -f $tmp/config.h
9245   fi
9246 done
9247 EOF
9248
9249 cat >>$CONFIG_STATUS <<\EOF
9250
9251 { (exit 0); exit 0; }
9252 EOF
9253 chmod +x $CONFIG_STATUS
9254 ac_clean_files=$ac_clean_files_save
9255
9256 # configure is writing to config.log, and then calls config.status.
9257 # config.status does its own redirection, appending to config.log.
9258 # Unfortunately, on DOS this fails, as config.log is still kept open
9259 # by configure, so config.status won't be able to write to it; its
9260 # output is simply discarded.  So we exec the FD to /dev/null,
9261 # effectively closing config.log, so it can be properly (re)opened and
9262 # appended to by config.status.  When coming back to configure, we
9263 # need to make the FD available again.
9264 if test "$no_create" != yes; then
9265   ac_cs_success=:
9266   exec 5>/dev/null
9267   $SHELL $CONFIG_STATUS || ac_cs_success=false
9268   exec 5>>config.log
9269   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9270   # would make configure fail if this is the last instruction.
9271   $ac_cs_success || { (exit 1); exit 1; }
9272 fi
9273
9274 abs_srcdir="`cd $srcdir && pwd`"
9275 abs_builddir="`pwd`"
9276 if test "$abs_srcdir" != "$abs_builddir"; then
9277   make mkdir-init
9278 fi