Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
[external/binutils.git] / ld / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-shared[=PKGS]  build shared libraries [default=yes]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  force libtool not to do file locking"
24 ac_help="$ac_help
25   --enable-targets        alternative target configurations"
26 ac_help="$ac_help
27   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)"
28 ac_help="$ac_help
29   --disable-nls           do not use Native Language Support"
30 ac_help="$ac_help
31   --with-included-gettext use the GNU gettext library included here"
32 ac_help="$ac_help
33   --enable-maintainer-mode enable make rules and dependencies not useful
34                           (and sometimes confusing) to the casual installer"
35
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
69
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
76
77 ac_prev=
78 for ac_option
79 do
80
81   # If the previous option needs an argument, assign it.
82   if test -n "$ac_prev"; then
83     eval "$ac_prev=\$ac_option"
84     ac_prev=
85     continue
86   fi
87
88   case "$ac_option" in
89   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90   *) ac_optarg= ;;
91   esac
92
93   # Accept the important Cygnus configure options, so we can diagnose typos.
94
95   case "$ac_option" in
96
97   -bindir | --bindir | --bindi | --bind | --bin | --bi)
98     ac_prev=bindir ;;
99   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100     bindir="$ac_optarg" ;;
101
102   -build | --build | --buil | --bui | --bu)
103     ac_prev=build ;;
104   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105     build="$ac_optarg" ;;
106
107   -cache-file | --cache-file | --cache-fil | --cache-fi \
108   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109     ac_prev=cache_file ;;
110   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112     cache_file="$ac_optarg" ;;
113
114   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115     ac_prev=datadir ;;
116   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117   | --da=*)
118     datadir="$ac_optarg" ;;
119
120   -disable-* | --disable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     eval "enable_${ac_feature}=no" ;;
128
129   -enable-* | --enable-*)
130     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131     # Reject names that are not valid shell variable names.
132     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134     fi
135     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136     case "$ac_option" in
137       *=*) ;;
138       *) ac_optarg=yes ;;
139     esac
140     eval "enable_${ac_feature}='$ac_optarg'" ;;
141
142   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144   | --exec | --exe | --ex)
145     ac_prev=exec_prefix ;;
146   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148   | --exec=* | --exe=* | --ex=*)
149     exec_prefix="$ac_optarg" ;;
150
151   -gas | --gas | --ga | --g)
152     # Obsolete; use --with-gas.
153     with_gas=yes ;;
154
155   -help | --help | --hel | --he)
156     # Omit some internal or obsolete options to make the list less imposing.
157     # This message is too long to be a string in the A/UX 3.1 sh.
158     cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162   --cache-file=FILE       cache test results in FILE
163   --help                  print this message
164   --no-create             do not create output files
165   --quiet, --silent       do not print \`checking...' messages
166   --version               print the version of autoconf that created configure
167 Directory and file names:
168   --prefix=PREFIX         install architecture-independent files in PREFIX
169                           [$ac_default_prefix]
170   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
171                           [same as prefix]
172   --bindir=DIR            user executables in DIR [EPREFIX/bin]
173   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
174   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
175   --datadir=DIR           read-only architecture-independent data in DIR
176                           [PREFIX/share]
177   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
178   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
179                           [PREFIX/com]
180   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
181   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
182   --includedir=DIR        C header files in DIR [PREFIX/include]
183   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
184   --infodir=DIR           info documentation in DIR [PREFIX/info]
185   --mandir=DIR            man documentation in DIR [PREFIX/man]
186   --srcdir=DIR            find the sources in DIR [configure dir or ..]
187   --program-prefix=PREFIX prepend PREFIX to installed program names
188   --program-suffix=SUFFIX append SUFFIX to installed program names
189   --program-transform-name=PROGRAM
190                           run sed PROGRAM on installed program names
191 EOF
192     cat << EOF
193 Host type:
194   --build=BUILD           configure for building on BUILD [BUILD=HOST]
195   --host=HOST             configure for HOST [guessed]
196   --target=TARGET         configure for TARGET [TARGET=HOST]
197 Features and packages:
198   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
199   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
200   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
201   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
202   --x-includes=DIR        X include files are in DIR
203   --x-libraries=DIR       X library files are in DIR
204 EOF
205     if test -n "$ac_help"; then
206       echo "--enable and --with options recognized:$ac_help"
207     fi
208     exit 0 ;;
209
210   -host | --host | --hos | --ho)
211     ac_prev=host ;;
212   -host=* | --host=* | --hos=* | --ho=*)
213     host="$ac_optarg" ;;
214
215   -includedir | --includedir | --includedi | --included | --include \
216   | --includ | --inclu | --incl | --inc)
217     ac_prev=includedir ;;
218   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219   | --includ=* | --inclu=* | --incl=* | --inc=*)
220     includedir="$ac_optarg" ;;
221
222   -infodir | --infodir | --infodi | --infod | --info | --inf)
223     ac_prev=infodir ;;
224   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225     infodir="$ac_optarg" ;;
226
227   -libdir | --libdir | --libdi | --libd)
228     ac_prev=libdir ;;
229   -libdir=* | --libdir=* | --libdi=* | --libd=*)
230     libdir="$ac_optarg" ;;
231
232   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233   | --libexe | --libex | --libe)
234     ac_prev=libexecdir ;;
235   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236   | --libexe=* | --libex=* | --libe=*)
237     libexecdir="$ac_optarg" ;;
238
239   -localstatedir | --localstatedir | --localstatedi | --localstated \
240   | --localstate | --localstat | --localsta | --localst \
241   | --locals | --local | --loca | --loc | --lo)
242     ac_prev=localstatedir ;;
243   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246     localstatedir="$ac_optarg" ;;
247
248   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249     ac_prev=mandir ;;
250   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251     mandir="$ac_optarg" ;;
252
253   -nfp | --nfp | --nf)
254     # Obsolete; use --without-fp.
255     with_fp=no ;;
256
257   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258   | --no-cr | --no-c)
259     no_create=yes ;;
260
261   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263     no_recursion=yes ;;
264
265   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267   | --oldin | --oldi | --old | --ol | --o)
268     ac_prev=oldincludedir ;;
269   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272     oldincludedir="$ac_optarg" ;;
273
274   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275     ac_prev=prefix ;;
276   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277     prefix="$ac_optarg" ;;
278
279   -program-prefix | --program-prefix | --program-prefi | --program-pref \
280   | --program-pre | --program-pr | --program-p)
281     ac_prev=program_prefix ;;
282   -program-prefix=* | --program-prefix=* | --program-prefi=* \
283   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284     program_prefix="$ac_optarg" ;;
285
286   -program-suffix | --program-suffix | --program-suffi | --program-suff \
287   | --program-suf | --program-su | --program-s)
288     ac_prev=program_suffix ;;
289   -program-suffix=* | --program-suffix=* | --program-suffi=* \
290   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291     program_suffix="$ac_optarg" ;;
292
293   -program-transform-name | --program-transform-name \
294   | --program-transform-nam | --program-transform-na \
295   | --program-transform-n | --program-transform- \
296   | --program-transform | --program-transfor \
297   | --program-transfo | --program-transf \
298   | --program-trans | --program-tran \
299   | --progr-tra | --program-tr | --program-t)
300     ac_prev=program_transform_name ;;
301   -program-transform-name=* | --program-transform-name=* \
302   | --program-transform-nam=* | --program-transform-na=* \
303   | --program-transform-n=* | --program-transform-=* \
304   | --program-transform=* | --program-transfor=* \
305   | --program-transfo=* | --program-transf=* \
306   | --program-trans=* | --program-tran=* \
307   | --progr-tra=* | --program-tr=* | --program-t=*)
308     program_transform_name="$ac_optarg" ;;
309
310   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311   | -silent | --silent | --silen | --sile | --sil)
312     silent=yes ;;
313
314   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315     ac_prev=sbindir ;;
316   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317   | --sbi=* | --sb=*)
318     sbindir="$ac_optarg" ;;
319
320   -sharedstatedir | --sharedstatedir | --sharedstatedi \
321   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322   | --sharedst | --shareds | --shared | --share | --shar \
323   | --sha | --sh)
324     ac_prev=sharedstatedir ;;
325   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328   | --sha=* | --sh=*)
329     sharedstatedir="$ac_optarg" ;;
330
331   -site | --site | --sit)
332     ac_prev=site ;;
333   -site=* | --site=* | --sit=*)
334     site="$ac_optarg" ;;
335
336   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337     ac_prev=srcdir ;;
338   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339     srcdir="$ac_optarg" ;;
340
341   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342   | --syscon | --sysco | --sysc | --sys | --sy)
343     ac_prev=sysconfdir ;;
344   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346     sysconfdir="$ac_optarg" ;;
347
348   -target | --target | --targe | --targ | --tar | --ta | --t)
349     ac_prev=target ;;
350   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351     target="$ac_optarg" ;;
352
353   -v | -verbose | --verbose | --verbos | --verbo | --verb)
354     verbose=yes ;;
355
356   -version | --version | --versio | --versi | --vers)
357     echo "configure generated by autoconf version 2.13"
358     exit 0 ;;
359
360   -with-* | --with-*)
361     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362     # Reject names that are not valid shell variable names.
363     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365     fi
366     ac_package=`echo $ac_package| sed 's/-/_/g'`
367     case "$ac_option" in
368       *=*) ;;
369       *) ac_optarg=yes ;;
370     esac
371     eval "with_${ac_package}='$ac_optarg'" ;;
372
373   -without-* | --without-*)
374     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375     # Reject names that are not valid shell variable names.
376     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
378     fi
379     ac_package=`echo $ac_package| sed 's/-/_/g'`
380     eval "with_${ac_package}=no" ;;
381
382   --x)
383     # Obsolete; use --with-x.
384     with_x=yes ;;
385
386   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387   | --x-incl | --x-inc | --x-in | --x-i)
388     ac_prev=x_includes ;;
389   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391     x_includes="$ac_optarg" ;;
392
393   -x-libraries | --x-libraries | --x-librarie | --x-librari \
394   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395     ac_prev=x_libraries ;;
396   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398     x_libraries="$ac_optarg" ;;
399
400   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
401     ;;
402
403   *)
404     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405       echo "configure: warning: $ac_option: invalid host type" 1>&2
406     fi
407     if test "x$nonopt" != xNONE; then
408       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
409     fi
410     nonopt="$ac_option"
411     ;;
412
413   esac
414 done
415
416 if test -n "$ac_prev"; then
417   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418 fi
419
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
421
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431   exec 6>/dev/null
432 else
433   exec 6>&1
434 fi
435 exec 5>./config.log
436
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
441
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
446 do
447   case "$ac_arg" in
448   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449   | --no-cr | --no-c) ;;
450   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455   esac
456 done
457
458 # NLS nuisances.
459 # Only set these to C if already set.  These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
467
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
472
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=ldmain.c
476
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479   ac_srcdir_defaulted=yes
480   # Try the directory containing this script, then its parent.
481   ac_prog=$0
482   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484   srcdir=$ac_confdir
485   if test ! -r $srcdir/$ac_unique_file; then
486     srcdir=..
487   fi
488 else
489   ac_srcdir_defaulted=no
490 fi
491 if test ! -r $srcdir/$ac_unique_file; then
492   if test "$ac_srcdir_defaulted" = yes; then
493     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494   else
495     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
496   fi
497 fi
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
499
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502   if test "x$prefix" != xNONE; then
503     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504   else
505     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
506   fi
507 fi
508 for ac_site_file in $CONFIG_SITE; do
509   if test -r "$ac_site_file"; then
510     echo "loading site script $ac_site_file"
511     . "$ac_site_file"
512   fi
513 done
514
515 if test -r "$cache_file"; then
516   echo "loading cache $cache_file"
517   . $cache_file
518 else
519   echo "creating cache $cache_file"
520   > $cache_file
521 fi
522
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
529
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535     ac_n= ac_c='
536 ' ac_t='        '
537   else
538     ac_n=-n ac_c= ac_t=
539   fi
540 else
541   ac_n= ac_c='\c' ac_t=
542 fi
543
544
545
546 ac_aux_dir=
547 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
548   if test -f $ac_dir/install-sh; then
549     ac_aux_dir=$ac_dir
550     ac_install_sh="$ac_aux_dir/install-sh -c"
551     break
552   elif test -f $ac_dir/install.sh; then
553     ac_aux_dir=$ac_dir
554     ac_install_sh="$ac_aux_dir/install.sh -c"
555     break
556   fi
557 done
558 if test -z "$ac_aux_dir"; then
559   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
560 fi
561 ac_config_guess=$ac_aux_dir/config.guess
562 ac_config_sub=$ac_aux_dir/config.sub
563 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
564
565
566 # Do some error checking and defaulting for the host and target type.
567 # The inputs are:
568 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
569 #
570 # The rules are:
571 # 1. You are not allowed to specify --host, --target, and nonopt at the
572 #    same time.
573 # 2. Host defaults to nonopt.
574 # 3. If nonopt is not specified, then host defaults to the current host,
575 #    as determined by config.guess.
576 # 4. Target and build default to nonopt.
577 # 5. If nonopt is not specified, then target and build default to host.
578
579 # The aliases save the names the user supplied, while $host etc.
580 # will get canonicalized.
581 case $host---$target---$nonopt in
582 NONE---*---* | *---NONE---* | *---*---NONE) ;;
583 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
584 esac
585
586
587 # Make sure we can run config.sub.
588 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
589 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
590 fi
591
592 echo $ac_n "checking host system type""... $ac_c" 1>&6
593 echo "configure:594: checking host system type" >&5
594
595 host_alias=$host
596 case "$host_alias" in
597 NONE)
598   case $nonopt in
599   NONE)
600     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
601     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
602     fi ;;
603   *) host_alias=$nonopt ;;
604   esac ;;
605 esac
606
607 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
608 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
609 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
610 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
611 echo "$ac_t""$host" 1>&6
612
613 echo $ac_n "checking target system type""... $ac_c" 1>&6
614 echo "configure:615: checking target system type" >&5
615
616 target_alias=$target
617 case "$target_alias" in
618 NONE)
619   case $nonopt in
620   NONE) target_alias=$host_alias ;;
621   *) target_alias=$nonopt ;;
622   esac ;;
623 esac
624
625 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
626 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
627 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
628 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
629 echo "$ac_t""$target" 1>&6
630
631 echo $ac_n "checking build system type""... $ac_c" 1>&6
632 echo "configure:633: checking build system type" >&5
633
634 build_alias=$build
635 case "$build_alias" in
636 NONE)
637   case $nonopt in
638   NONE) build_alias=$host_alias ;;
639   *) build_alias=$nonopt ;;
640   esac ;;
641 esac
642
643 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
644 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
645 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
646 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
647 echo "$ac_t""$build" 1>&6
648
649 test "$host_alias" != "$target_alias" &&
650   test "$program_prefix$program_suffix$program_transform_name" = \
651     NONENONEs,x,x, &&
652   program_prefix=${target_alias}-
653
654
655 # Find a good install program.  We prefer a C program (faster),
656 # so one script is as good as another.  But avoid the broken or
657 # incompatible versions:
658 # SysV /etc/install, /usr/sbin/install
659 # SunOS /usr/etc/install
660 # IRIX /sbin/install
661 # AIX /bin/install
662 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
663 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
664 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
665 # ./install, which can be erroneously created by make from ./install.sh.
666 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
667 echo "configure:668: checking for a BSD compatible install" >&5
668 if test -z "$INSTALL"; then
669 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
670   echo $ac_n "(cached) $ac_c" 1>&6
671 else
672     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
673   for ac_dir in $PATH; do
674     # Account for people who put trailing slashes in PATH elements.
675     case "$ac_dir/" in
676     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
677     *)
678       # OSF1 and SCO ODT 3.0 have their own names for install.
679       # Don't use installbsd from OSF since it installs stuff as root
680       # by default.
681       for ac_prog in ginstall scoinst install; do
682         if test -f $ac_dir/$ac_prog; then
683           if test $ac_prog = install &&
684             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
685             # AIX install.  It has an incompatible calling convention.
686             :
687           else
688             ac_cv_path_install="$ac_dir/$ac_prog -c"
689             break 2
690           fi
691         fi
692       done
693       ;;
694     esac
695   done
696   IFS="$ac_save_IFS"
697
698 fi
699   if test "${ac_cv_path_install+set}" = set; then
700     INSTALL="$ac_cv_path_install"
701   else
702     # As a last resort, use the slow shell script.  We don't cache a
703     # path for INSTALL within a source directory, because that will
704     # break other packages using the cache if that directory is
705     # removed, or if the path is relative.
706     INSTALL="$ac_install_sh"
707   fi
708 fi
709 echo "$ac_t""$INSTALL" 1>&6
710
711 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
712 # It thinks the first close brace ends the variable substitution.
713 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
714
715 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
716
717 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
718
719 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
720 echo "configure:721: checking whether build environment is sane" >&5
721 # Just in case
722 sleep 1
723 echo timestamp > conftestfile
724 # Do `set' in a subshell so we don't clobber the current shell's
725 # arguments.  Must try -L first in case configure is actually a
726 # symlink; some systems play weird games with the mod time of symlinks
727 # (eg FreeBSD returns the mod time of the symlink's containing
728 # directory).
729 if (
730    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
731    if test "$*" = "X"; then
732       # -L didn't work.
733       set X `ls -t $srcdir/configure conftestfile`
734    fi
735    if test "$*" != "X $srcdir/configure conftestfile" \
736       && test "$*" != "X conftestfile $srcdir/configure"; then
737
738       # If neither matched, then we have a broken ls.  This can happen
739       # if, for instance, CONFIG_SHELL is bash and it inherits a
740       # broken ls alias from the environment.  This has actually
741       # happened.  Such a system could not be considered "sane".
742       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
743 alias in your environment" 1>&2; exit 1; }
744    fi
745
746    test "$2" = conftestfile
747    )
748 then
749    # Ok.
750    :
751 else
752    { echo "configure: error: newly created file is older than distributed files!
753 Check your system clock" 1>&2; exit 1; }
754 fi
755 rm -f conftest*
756 echo "$ac_t""yes" 1>&6
757 if test "$program_transform_name" = s,x,x,; then
758   program_transform_name=
759 else
760   # Double any \ or $.  echo might interpret backslashes.
761   cat <<\EOF_SED > conftestsed
762 s,\\,\\\\,g; s,\$,$$,g
763 EOF_SED
764   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
765   rm -f conftestsed
766 fi
767 test "$program_prefix" != NONE &&
768   program_transform_name="s,^,${program_prefix},; $program_transform_name"
769 # Use a double $ so make ignores it.
770 test "$program_suffix" != NONE &&
771   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
772
773 # sed with no file args requires a program.
774 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
775
776 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
777 echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
778 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
779 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
780   echo $ac_n "(cached) $ac_c" 1>&6
781 else
782   cat > conftestmake <<\EOF
783 all:
784         @echo 'ac_maketemp="${MAKE}"'
785 EOF
786 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
787 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
788 if test -n "$ac_maketemp"; then
789   eval ac_cv_prog_make_${ac_make}_set=yes
790 else
791   eval ac_cv_prog_make_${ac_make}_set=no
792 fi
793 rm -f conftestmake
794 fi
795 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
796   echo "$ac_t""yes" 1>&6
797   SET_MAKE=
798 else
799   echo "$ac_t""no" 1>&6
800   SET_MAKE="MAKE=${MAKE-make}"
801 fi
802
803
804 PACKAGE=ld
805
806 VERSION=2.9.5
807
808 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
809   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
810 fi
811 cat >> confdefs.h <<EOF
812 #define PACKAGE "$PACKAGE"
813 EOF
814
815 cat >> confdefs.h <<EOF
816 #define VERSION "$VERSION"
817 EOF
818
819
820
821 missing_dir=`cd $ac_aux_dir && pwd`
822 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
823 echo "configure:824: checking for working aclocal" >&5
824 # Run test in a subshell; some versions of sh will print an error if
825 # an executable is not found, even if stderr is redirected.
826 # Redirect stdin to placate older versions of autoconf.  Sigh.
827 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
828    ACLOCAL=aclocal
829    echo "$ac_t""found" 1>&6
830 else
831    ACLOCAL="$missing_dir/missing aclocal"
832    echo "$ac_t""missing" 1>&6
833 fi
834
835 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
836 echo "configure:837: checking for working autoconf" >&5
837 # Run test in a subshell; some versions of sh will print an error if
838 # an executable is not found, even if stderr is redirected.
839 # Redirect stdin to placate older versions of autoconf.  Sigh.
840 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
841    AUTOCONF=autoconf
842    echo "$ac_t""found" 1>&6
843 else
844    AUTOCONF="$missing_dir/missing autoconf"
845    echo "$ac_t""missing" 1>&6
846 fi
847
848 echo $ac_n "checking for working automake""... $ac_c" 1>&6
849 echo "configure:850: checking for working automake" >&5
850 # Run test in a subshell; some versions of sh will print an error if
851 # an executable is not found, even if stderr is redirected.
852 # Redirect stdin to placate older versions of autoconf.  Sigh.
853 if (automake --version) < /dev/null > /dev/null 2>&1; then
854    AUTOMAKE=automake
855    echo "$ac_t""found" 1>&6
856 else
857    AUTOMAKE="$missing_dir/missing automake"
858    echo "$ac_t""missing" 1>&6
859 fi
860
861 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
862 echo "configure:863: checking for working autoheader" >&5
863 # Run test in a subshell; some versions of sh will print an error if
864 # an executable is not found, even if stderr is redirected.
865 # Redirect stdin to placate older versions of autoconf.  Sigh.
866 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
867    AUTOHEADER=autoheader
868    echo "$ac_t""found" 1>&6
869 else
870    AUTOHEADER="$missing_dir/missing autoheader"
871    echo "$ac_t""missing" 1>&6
872 fi
873
874 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
875 echo "configure:876: checking for working makeinfo" >&5
876 # Run test in a subshell; some versions of sh will print an error if
877 # an executable is not found, even if stderr is redirected.
878 # Redirect stdin to placate older versions of autoconf.  Sigh.
879 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
880    MAKEINFO=makeinfo
881    echo "$ac_t""found" 1>&6
882 else
883    MAKEINFO="$missing_dir/missing makeinfo"
884    echo "$ac_t""missing" 1>&6
885 fi
886
887
888
889 # Check whether --enable-shared or --disable-shared was given.
890 if test "${enable_shared+set}" = set; then
891   enableval="$enable_shared"
892   p=${PACKAGE-default}
893 case "$enableval" in
894 yes) enable_shared=yes ;;
895 no) enable_shared=no ;;
896 *)
897   enable_shared=no
898   # Look at the argument we got.  We use all the common list separators.
899   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
900   for pkg in $enableval; do
901     if test "X$pkg" = "X$p"; then
902       enable_shared=yes
903     fi
904   done
905   IFS="$ac_save_ifs"
906   ;;
907 esac
908 else
909   enable_shared=yes
910 fi
911
912 # Check whether --enable-static or --disable-static was given.
913 if test "${enable_static+set}" = set; then
914   enableval="$enable_static"
915   p=${PACKAGE-default}
916 case "$enableval" in
917 yes) enable_static=yes ;;
918 no) enable_static=no ;;
919 *)
920   enable_static=no
921   # Look at the argument we got.  We use all the common list separators.
922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
923   for pkg in $enableval; do
924     if test "X$pkg" = "X$p"; then
925       enable_static=yes
926     fi
927   done
928   IFS="$ac_save_ifs"
929   ;;
930 esac
931 else
932   enable_static=yes
933 fi
934
935 # Check whether --enable-fast-install or --disable-fast-install was given.
936 if test "${enable_fast_install+set}" = set; then
937   enableval="$enable_fast_install"
938   p=${PACKAGE-default}
939 case "$enableval" in
940 yes) enable_fast_install=yes ;;
941 no) enable_fast_install=no ;;
942 *)
943   enable_fast_install=no
944   # Look at the argument we got.  We use all the common list separators.
945   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
946   for pkg in $enableval; do
947     if test "X$pkg" = "X$p"; then
948       enable_fast_install=yes
949     fi
950   done
951   IFS="$ac_save_ifs"
952   ;;
953 esac
954 else
955   enable_fast_install=yes
956 fi
957
958 # Extract the first word of "ranlib", so it can be a program name with args.
959 set dummy ranlib; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$RANLIB"; then
966   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_RANLIB="ranlib"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
979 fi
980 fi
981 RANLIB="$ac_cv_prog_RANLIB"
982 if test -n "$RANLIB"; then
983   echo "$ac_t""$RANLIB" 1>&6
984 else
985   echo "$ac_t""no" 1>&6
986 fi
987
988 # Extract the first word of "gcc", so it can be a program name with args.
989 set dummy gcc; ac_word=$2
990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
991 echo "configure:992: checking for $ac_word" >&5
992 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
993   echo $ac_n "(cached) $ac_c" 1>&6
994 else
995   if test -n "$CC"; then
996   ac_cv_prog_CC="$CC" # Let the user override the test.
997 else
998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
999   ac_dummy="$PATH"
1000   for ac_dir in $ac_dummy; do
1001     test -z "$ac_dir" && ac_dir=.
1002     if test -f $ac_dir/$ac_word; then
1003       ac_cv_prog_CC="gcc"
1004       break
1005     fi
1006   done
1007   IFS="$ac_save_ifs"
1008 fi
1009 fi
1010 CC="$ac_cv_prog_CC"
1011 if test -n "$CC"; then
1012   echo "$ac_t""$CC" 1>&6
1013 else
1014   echo "$ac_t""no" 1>&6
1015 fi
1016
1017 if test -z "$CC"; then
1018   # Extract the first word of "cc", so it can be a program name with args.
1019 set dummy cc; ac_word=$2
1020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1021 echo "configure:1022: checking for $ac_word" >&5
1022 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1023   echo $ac_n "(cached) $ac_c" 1>&6
1024 else
1025   if test -n "$CC"; then
1026   ac_cv_prog_CC="$CC" # Let the user override the test.
1027 else
1028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1029   ac_prog_rejected=no
1030   ac_dummy="$PATH"
1031   for ac_dir in $ac_dummy; do
1032     test -z "$ac_dir" && ac_dir=.
1033     if test -f $ac_dir/$ac_word; then
1034       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1035         ac_prog_rejected=yes
1036         continue
1037       fi
1038       ac_cv_prog_CC="cc"
1039       break
1040     fi
1041   done
1042   IFS="$ac_save_ifs"
1043 if test $ac_prog_rejected = yes; then
1044   # We found a bogon in the path, so make sure we never use it.
1045   set dummy $ac_cv_prog_CC
1046   shift
1047   if test $# -gt 0; then
1048     # We chose a different compiler from the bogus one.
1049     # However, it has the same basename, so the bogon will be chosen
1050     # first if we set CC to just the basename; use the full file name.
1051     shift
1052     set dummy "$ac_dir/$ac_word" "$@"
1053     shift
1054     ac_cv_prog_CC="$@"
1055   fi
1056 fi
1057 fi
1058 fi
1059 CC="$ac_cv_prog_CC"
1060 if test -n "$CC"; then
1061   echo "$ac_t""$CC" 1>&6
1062 else
1063   echo "$ac_t""no" 1>&6
1064 fi
1065
1066   if test -z "$CC"; then
1067     case "`uname -s`" in
1068     *win32* | *WIN32*)
1069       # Extract the first word of "cl", so it can be a program name with args.
1070 set dummy cl; ac_word=$2
1071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1072 echo "configure:1073: checking for $ac_word" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1074   echo $ac_n "(cached) $ac_c" 1>&6
1075 else
1076   if test -n "$CC"; then
1077   ac_cv_prog_CC="$CC" # Let the user override the test.
1078 else
1079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1080   ac_dummy="$PATH"
1081   for ac_dir in $ac_dummy; do
1082     test -z "$ac_dir" && ac_dir=.
1083     if test -f $ac_dir/$ac_word; then
1084       ac_cv_prog_CC="cl"
1085       break
1086     fi
1087   done
1088   IFS="$ac_save_ifs"
1089 fi
1090 fi
1091 CC="$ac_cv_prog_CC"
1092 if test -n "$CC"; then
1093   echo "$ac_t""$CC" 1>&6
1094 else
1095   echo "$ac_t""no" 1>&6
1096 fi
1097  ;;
1098     esac
1099   fi
1100   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1101 fi
1102
1103 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1105
1106 ac_ext=c
1107 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1110 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1111 cross_compiling=$ac_cv_prog_cc_cross
1112
1113 cat > conftest.$ac_ext << EOF
1114
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1117
1118 main(){return(0);}
1119 EOF
1120 if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1121   ac_cv_prog_cc_works=yes
1122   # If we can't run a trivial program, we are probably using a cross compiler.
1123   if (./conftest; exit) 2>/dev/null; then
1124     ac_cv_prog_cc_cross=no
1125   else
1126     ac_cv_prog_cc_cross=yes
1127   fi
1128 else
1129   echo "configure: failed program was:" >&5
1130   cat conftest.$ac_ext >&5
1131   ac_cv_prog_cc_works=no
1132 fi
1133 rm -fr conftest*
1134 ac_ext=c
1135 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1136 ac_cpp='$CPP $CPPFLAGS'
1137 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1138 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1139 cross_compiling=$ac_cv_prog_cc_cross
1140
1141 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1142 if test $ac_cv_prog_cc_works = no; then
1143   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1144 fi
1145 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1146 echo "configure:1147: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1147 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1148 cross_compiling=$ac_cv_prog_cc_cross
1149
1150 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1151 echo "configure:1152: checking whether we are using GNU C" >&5
1152 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1153   echo $ac_n "(cached) $ac_c" 1>&6
1154 else
1155   cat > conftest.c <<EOF
1156 #ifdef __GNUC__
1157   yes;
1158 #endif
1159 EOF
1160 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1161   ac_cv_prog_gcc=yes
1162 else
1163   ac_cv_prog_gcc=no
1164 fi
1165 fi
1166
1167 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1168
1169 if test $ac_cv_prog_gcc = yes; then
1170   GCC=yes
1171 else
1172   GCC=
1173 fi
1174
1175 ac_test_CFLAGS="${CFLAGS+set}"
1176 ac_save_CFLAGS="$CFLAGS"
1177 CFLAGS=
1178 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1179 echo "configure:1180: checking whether ${CC-cc} accepts -g" >&5
1180 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1181   echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183   echo 'void f(){}' > conftest.c
1184 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1185   ac_cv_prog_cc_g=yes
1186 else
1187   ac_cv_prog_cc_g=no
1188 fi
1189 rm -f conftest*
1190
1191 fi
1192
1193 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1194 if test "$ac_test_CFLAGS" = set; then
1195   CFLAGS="$ac_save_CFLAGS"
1196 elif test $ac_cv_prog_cc_g = yes; then
1197   if test "$GCC" = yes; then
1198     CFLAGS="-g -O2"
1199   else
1200     CFLAGS="-g"
1201   fi
1202 else
1203   if test "$GCC" = yes; then
1204     CFLAGS="-O2"
1205   else
1206     CFLAGS=
1207   fi
1208 fi
1209
1210 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1211 if test "${with_gnu_ld+set}" = set; then
1212   withval="$with_gnu_ld"
1213   test "$withval" = no || with_gnu_ld=yes
1214 else
1215   with_gnu_ld=no
1216 fi
1217
1218 ac_prog=ld
1219 if test "$ac_cv_prog_gcc" = yes; then
1220   # Check if gcc -print-prog-name=ld gives a path.
1221   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1222 echo "configure:1223: checking for ld used by GCC" >&5
1223   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1224   case "$ac_prog" in
1225     # Accept absolute paths.
1226     /* | [A-Za-z]:[\\/]*)
1227       re_direlt='/[^/][^/]*/\.\./'
1228       # Canonicalize the path of ld
1229       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1230       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1231         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1232       done
1233       test -z "$LD" && LD="$ac_prog"
1234       ;;
1235   "")
1236     # If it fails, then pretend we aren't using GCC.
1237     ac_prog=ld
1238     ;;
1239   *)
1240     # If it is relative, then search for the first ld in PATH.
1241     with_gnu_ld=unknown
1242     ;;
1243   esac
1244 elif test "$with_gnu_ld" = yes; then
1245   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1246 echo "configure:1247: checking for GNU ld" >&5
1247 else
1248   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1249 echo "configure:1250: checking for non-GNU ld" >&5
1250 fi
1251 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1252   echo $ac_n "(cached) $ac_c" 1>&6
1253 else
1254   if test -z "$LD"; then
1255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1256   for ac_dir in $PATH; do
1257     test -z "$ac_dir" && ac_dir=.
1258     if test -f "$ac_dir/$ac_prog"; then
1259       ac_cv_path_LD="$ac_dir/$ac_prog"
1260       # Check to see if the program is GNU ld.  I'd rather use --version,
1261       # but apparently some GNU ld's only accept -v.
1262       # Break only if it was the GNU/non-GNU ld that we prefer.
1263       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1264         test "$with_gnu_ld" != no && break
1265       else
1266         test "$with_gnu_ld" != yes && break
1267       fi
1268     fi
1269   done
1270   IFS="$ac_save_ifs"
1271 else
1272   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1273 fi
1274 fi
1275
1276 LD="$ac_cv_path_LD"
1277 if test -n "$LD"; then
1278   echo "$ac_t""$LD" 1>&6
1279 else
1280   echo "$ac_t""no" 1>&6
1281 fi
1282 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1283
1284 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1285 echo "configure:1286: checking if the linker ($LD) is GNU ld" >&5
1286 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1287   echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1290 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1291   ac_cv_prog_gnu_ld=yes
1292 else
1293   ac_cv_prog_gnu_ld=no
1294 fi
1295 fi
1296
1297 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1298
1299
1300 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1301 echo "configure:1302: checking for BSD-compatible nm" >&5
1302 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1303   echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305   if test -n "$NM"; then
1306   # Let the user override the test.
1307   ac_cv_path_NM="$NM"
1308 else
1309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1310   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1311     test -z "$ac_dir" && ac_dir=.
1312     if test -f $ac_dir/nm; then
1313       # Check to see if the nm accepts a BSD-compat flag.
1314       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1315       #   nm: unknown option "B" ignored
1316       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1317         ac_cv_path_NM="$ac_dir/nm -B"
1318         break
1319       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1320         ac_cv_path_NM="$ac_dir/nm -p"
1321         break
1322       else
1323         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1324         continue # so that we can try to find one that supports BSD flags
1325       fi
1326     fi
1327   done
1328   IFS="$ac_save_ifs"
1329   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1330 fi
1331 fi
1332
1333 NM="$ac_cv_path_NM"
1334 echo "$ac_t""$NM" 1>&6
1335
1336
1337 # Check for command to grab the raw symbol name followed by C symbol from nm.
1338 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1339 echo "configure:1340: checking command to parse $NM output" >&5
1340 if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1341   echo $ac_n "(cached) $ac_c" 1>&6
1342 else
1343   # These are sane defaults that work on at least a few old systems.
1344 # {They come from Ultrix.  What could be older than Ultrix?!! ;)}
1345
1346 # Character class describing NM global symbol codes.
1347 ac_symcode='[BCDEGRST]'
1348
1349 # Regexp to match symbols that can be accessed directly from C.
1350 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1351
1352 # Transform the above into a raw symbol and a C symbol.
1353 ac_symxfrm='\1 \2\3 \3'
1354
1355 # Transform an extracted symbol line into a proper C declaration
1356 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1357
1358 # Define system-specific variables.
1359 case "$host_os" in
1360 aix*)
1361   ac_symcode='[BCDT]'
1362   ;;
1363 cygwin* | mingw*)
1364   ac_symcode='[ABCDGISTW]'
1365   ;;
1366 hpux*)
1367   ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1368   ;;
1369 irix*)
1370   ac_symcode='[BCDEGRST]'
1371   ;;
1372 solaris*)
1373   ac_symcode='[BDT]'
1374   ;;
1375 esac
1376
1377 # If we're using GNU nm, then use its standard symbol codes.
1378 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1379   ac_symcode='[ABCDGISTW]'
1380 fi
1381
1382 # Try without a prefix undercore, then with it.
1383 for ac_symprfx in "" "_"; do
1384
1385   ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*        \($ac_symcode\)                 *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
1386
1387   # Check to see that the pipe works correctly.
1388   ac_pipe_works=no
1389   rm -f conftest.$ac_ext
1390   cat > conftest.$ac_ext <<EOF
1391 #ifdef __cplusplus
1392 extern "C" {
1393 #endif
1394 char nm_test_var;
1395 void nm_test_func(){}
1396 #ifdef __cplusplus
1397 }
1398 #endif
1399 int main(){nm_test_var='a';nm_test_func;return 0;}
1400 EOF
1401
1402   if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1403     # Now try to grab the symbols.
1404     ac_nlist=conftest.nm
1405   
1406     if { (eval echo configure:1407: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1407
1408       # Try sorting and uniquifying the output.
1409       if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
1410         mv -f "$ac_nlist"T "$ac_nlist"
1411       else
1412         rm -f "$ac_nlist"T
1413       fi
1414
1415       # Make sure that we snagged all the symbols we need.
1416       if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
1417         if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
1418           cat <<EOF > conftest.c
1419 #ifdef __cplusplus
1420 extern "C" {
1421 #endif
1422
1423 EOF
1424           # Now generate the symbol file.
1425           eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
1426
1427           cat <<EOF >> conftest.c
1428 #if defined (__STDC__) && __STDC__
1429 # define lt_ptr_t void *
1430 #else
1431 # define lt_ptr_t char *
1432 # define const
1433 #endif
1434
1435 /* The mapping between symbol names and symbols. */
1436 const struct {
1437   const char *name;
1438   lt_ptr_t address;
1439 }
1440 lt_preloaded_symbols[] =
1441 {
1442 EOF
1443         sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1444         cat <<\EOF >> conftest.c
1445   {0, (lt_ptr_t) 0}
1446 };
1447
1448 #ifdef __cplusplus
1449 }
1450 #endif
1451 EOF
1452           # Now try linking the two files.
1453           mv conftest.$ac_objext conftestm.$ac_objext
1454           ac_save_LIBS="$LIBS"
1455           ac_save_CFLAGS="$CFLAGS"
1456           LIBS="conftestm.$ac_objext"
1457           CFLAGS="$CFLAGS$no_builtin_flag"
1458           if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1459             ac_pipe_works=yes
1460           else
1461             echo "configure: failed program was:" >&5
1462             cat conftest.c >&5
1463           fi
1464           LIBS="$ac_save_LIBS"
1465           CFLAGS="$ac_save_CFLAGS"
1466         else
1467           echo "cannot find nm_test_func in $ac_nlist" >&5
1468         fi
1469       else
1470         echo "cannot find nm_test_var in $ac_nlist" >&5
1471       fi
1472     else
1473       echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
1474     fi
1475   else
1476     echo "$progname: failed program was:" >&5
1477     cat conftest.c >&5
1478   fi
1479   rm -rf conftest*
1480
1481   # Do not use the global_symbol_pipe unless it works.
1482   if test "$ac_pipe_works" = yes; then
1483     if test x"$ac_symprfx" = x"_"; then
1484       ac_cv_sys_symbol_underscore=yes
1485     else
1486       ac_cv_sys_symbol_underscore=no
1487     fi
1488     break
1489   else
1490     ac_cv_sys_global_symbol_pipe=
1491   fi
1492 done
1493
1494 fi
1495
1496
1497 ac_result=yes
1498 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1499    ac_result=no
1500 fi
1501 echo "$ac_t""$ac_result" 1>&6
1502
1503 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
1504 echo "configure:1505: checking for _ prefix in compiled symbols" >&5
1505 if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
1506   echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508   ac_cv_sys_symbol_underscore=no
1509 cat > conftest.$ac_ext <<EOF
1510 void nm_test_func(){}
1511 int main(){nm_test_func;return 0;}
1512 EOF
1513 if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1514   # Now try to grab the symbols.
1515   ac_nlist=conftest.nm
1516   if { (eval echo configure:1517: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1517     # See whether the symbols have a leading underscore.
1518     if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1519       ac_cv_sys_symbol_underscore=yes
1520     else
1521       if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1522         :
1523       else
1524         echo "configure: cannot find nm_test_func in $ac_nlist" >&5
1525       fi
1526     fi
1527   else
1528     echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
1529   fi
1530 else
1531   echo "configure: failed program was:" >&5
1532   cat conftest.c >&5
1533 fi
1534 rm -rf conftest*
1535
1536 fi
1537
1538 echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
1539 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
1540
1541 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1542 echo "configure:1543: checking whether ln -s works" >&5
1543 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1544   echo $ac_n "(cached) $ac_c" 1>&6
1545 else
1546   rm -f conftestdata
1547 if ln -s X conftestdata 2>/dev/null
1548 then
1549   rm -f conftestdata
1550   ac_cv_prog_LN_S="ln -s"
1551 else
1552   ac_cv_prog_LN_S=ln
1553 fi
1554 fi
1555 LN_S="$ac_cv_prog_LN_S"
1556 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1557   echo "$ac_t""yes" 1>&6
1558 else
1559   echo "$ac_t""no" 1>&6
1560 fi
1561
1562 if test $host != $build; then
1563   ac_tool_prefix=${host_alias}-
1564 else
1565   ac_tool_prefix=
1566 fi
1567
1568
1569 # Check for any special flags to pass to ltconfig.
1570 libtool_flags="--cache-file=$cache_file"
1571 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1572 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1573 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1574 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
1575 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1576 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1577 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1578
1579 # Some flags need to be propagated to the compiler or linker for good
1580 # libtool support.
1581 case "$host" in
1582 *-*-irix6*)
1583   # Find out which ABI we are using.
1584   echo '#line 1585 "configure"' > conftest.$ac_ext
1585   if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1586     case "`/usr/bin/file conftest.o`" in
1587     *32-bit*)
1588       LD="${LD-ld} -32"
1589       ;;
1590     *N32*)
1591       LD="${LD-ld} -n32"
1592       ;;
1593     *64-bit*)
1594       LD="${LD-ld} -64"
1595       ;;
1596     esac
1597   fi
1598   rm -rf conftest*
1599   ;;
1600
1601 *-*-sco3.2v5*)
1602   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1603   SAVE_CFLAGS="$CFLAGS"
1604   CFLAGS="$CFLAGS -belf"
1605   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1606 echo "configure:1607: checking whether the C compiler needs -belf" >&5
1607 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1608   echo $ac_n "(cached) $ac_c" 1>&6
1609 else
1610   cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1613
1614 int main() {
1615
1616 ; return 0; }
1617 EOF
1618 if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1619   rm -rf conftest*
1620   lt_cv_cc_needs_belf=yes
1621 else
1622   echo "configure: failed program was:" >&5
1623   cat conftest.$ac_ext >&5
1624   rm -rf conftest*
1625   lt_cv_cc_needs_belf=no
1626 fi
1627 rm -f conftest*
1628 fi
1629
1630 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1631   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1632     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1633     CFLAGS="$SAVE_CFLAGS"
1634   fi
1635   ;;
1636
1637 *-*-cygwin*)
1638   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1639 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1641 echo "configure:1642: checking for $ac_word" >&5
1642 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1643   echo $ac_n "(cached) $ac_c" 1>&6
1644 else
1645   if test -n "$DLLTOOL"; then
1646   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1647 else
1648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1649   ac_dummy="$PATH"
1650   for ac_dir in $ac_dummy; do
1651     test -z "$ac_dir" && ac_dir=.
1652     if test -f $ac_dir/$ac_word; then
1653       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1654       break
1655     fi
1656   done
1657   IFS="$ac_save_ifs"
1658 fi
1659 fi
1660 DLLTOOL="$ac_cv_prog_DLLTOOL"
1661 if test -n "$DLLTOOL"; then
1662   echo "$ac_t""$DLLTOOL" 1>&6
1663 else
1664   echo "$ac_t""no" 1>&6
1665 fi
1666
1667
1668 if test -z "$ac_cv_prog_DLLTOOL"; then
1669 if test -n "$ac_tool_prefix"; then
1670   # Extract the first word of "dlltool", so it can be a program name with args.
1671 set dummy dlltool; ac_word=$2
1672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_word" >&5
1674 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   if test -n "$DLLTOOL"; then
1678   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1679 else
1680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1681   ac_dummy="$PATH"
1682   for ac_dir in $ac_dummy; do
1683     test -z "$ac_dir" && ac_dir=.
1684     if test -f $ac_dir/$ac_word; then
1685       ac_cv_prog_DLLTOOL="dlltool"
1686       break
1687     fi
1688   done
1689   IFS="$ac_save_ifs"
1690   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1691 fi
1692 fi
1693 DLLTOOL="$ac_cv_prog_DLLTOOL"
1694 if test -n "$DLLTOOL"; then
1695   echo "$ac_t""$DLLTOOL" 1>&6
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699
1700 else
1701   DLLTOOL="false"
1702 fi
1703 fi
1704
1705 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1706 set dummy ${ac_tool_prefix}as; ac_word=$2
1707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_word" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1710   echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712   if test -n "$AS"; then
1713   ac_cv_prog_AS="$AS" # Let the user override the test.
1714 else
1715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1716   ac_dummy="$PATH"
1717   for ac_dir in $ac_dummy; do
1718     test -z "$ac_dir" && ac_dir=.
1719     if test -f $ac_dir/$ac_word; then
1720       ac_cv_prog_AS="${ac_tool_prefix}as"
1721       break
1722     fi
1723   done
1724   IFS="$ac_save_ifs"
1725 fi
1726 fi
1727 AS="$ac_cv_prog_AS"
1728 if test -n "$AS"; then
1729   echo "$ac_t""$AS" 1>&6
1730 else
1731   echo "$ac_t""no" 1>&6
1732 fi
1733
1734
1735 if test -z "$ac_cv_prog_AS"; then
1736 if test -n "$ac_tool_prefix"; then
1737   # Extract the first word of "as", so it can be a program name with args.
1738 set dummy as; ac_word=$2
1739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1740 echo "configure:1741: checking for $ac_word" >&5
1741 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1742   echo $ac_n "(cached) $ac_c" 1>&6
1743 else
1744   if test -n "$AS"; then
1745   ac_cv_prog_AS="$AS" # Let the user override the test.
1746 else
1747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1748   ac_dummy="$PATH"
1749   for ac_dir in $ac_dummy; do
1750     test -z "$ac_dir" && ac_dir=.
1751     if test -f $ac_dir/$ac_word; then
1752       ac_cv_prog_AS="as"
1753       break
1754     fi
1755   done
1756   IFS="$ac_save_ifs"
1757   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1758 fi
1759 fi
1760 AS="$ac_cv_prog_AS"
1761 if test -n "$AS"; then
1762   echo "$ac_t""$AS" 1>&6
1763 else
1764   echo "$ac_t""no" 1>&6
1765 fi
1766
1767 else
1768   AS="false"
1769 fi
1770 fi
1771
1772
1773   ;;
1774
1775 esac
1776
1777 # enable the --disable-libtool-lock switch
1778
1779 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1780 if test "${enable_libtool_lock+set}" = set; then
1781   enableval="$enable_libtool_lock"
1782   need_locks=$enableval
1783 else
1784   need_locks=yes
1785 fi
1786
1787
1788 if test x"$need_locks" = xno; then
1789   libtool_flags="$libtool_flags --disable-lock"
1790 fi
1791
1792
1793 # Save cache, so that ltconfig can load it
1794 cat > confcache <<\EOF
1795 # This file is a shell script that caches the results of configure
1796 # tests run on this system so they can be shared between configure
1797 # scripts and configure runs.  It is not useful on other systems.
1798 # If it contains results you don't want to keep, you may remove or edit it.
1799 #
1800 # By default, configure uses ./config.cache as the cache file,
1801 # creating it if it does not exist already.  You can give configure
1802 # the --cache-file=FILE option to use a different cache file; that is
1803 # what configure does when it calls configure scripts in
1804 # subdirectories, so they share the cache.
1805 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1806 # config.status only pays attention to the cache file if you give it the
1807 # --recheck option to rerun configure.
1808 #
1809 EOF
1810 # The following way of writing the cache mishandles newlines in values,
1811 # but we know of no workaround that is simple, portable, and efficient.
1812 # So, don't put newlines in cache variables' values.
1813 # Ultrix sh set writes to stderr and can't be redirected directly,
1814 # and sets the high bit in the cache file unless we assign to the vars.
1815 (set) 2>&1 |
1816   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1817   *ac_space=\ *)
1818     # `set' does not quote correctly, so add quotes (double-quote substitution
1819     # turns \\\\ into \\, and sed turns \\ into \).
1820     sed -n \
1821       -e "s/'/'\\\\''/g" \
1822       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1823     ;;
1824   *)
1825     # `set' quotes correctly as required by POSIX, so do not add quotes.
1826     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1827     ;;
1828   esac >> confcache
1829 if cmp -s $cache_file confcache; then
1830   :
1831 else
1832   if test -w $cache_file; then
1833     echo "updating cache $cache_file"
1834     cat confcache > $cache_file
1835   else
1836     echo "not updating unwritable cache $cache_file"
1837   fi
1838 fi
1839 rm -f confcache
1840
1841
1842 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1843 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1844 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1845 DLLTOOL="$DLLTOOL" AS="$AS" \
1846 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1847 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1848 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1849
1850 # Reload cache, that may have been modified by ltconfig
1851 if test -r "$cache_file"; then
1852   echo "loading cache $cache_file"
1853   . $cache_file
1854 else
1855   echo "creating cache $cache_file"
1856   > $cache_file
1857 fi
1858
1859
1860 # This can be used to rebuild libtool when needed
1861 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1862
1863 # Always use our own libtool.
1864 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1865
1866 # Redirect the config.log output again, so that the ltconfig log is not
1867 # clobbered by the next message.
1868 exec 5>>./config.log
1869
1870
1871 # Check whether --enable-targets or --disable-targets was given.
1872 if test "${enable_targets+set}" = set; then
1873   enableval="$enable_targets"
1874   case "${enableval}" in
1875   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1876             ;;
1877   no)       enable_targets= ;;
1878   *)        enable_targets=$enableval ;;
1879 esac
1880 fi
1881 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1882 if test "${enable_64_bit_bfd+set}" = set; then
1883   enableval="$enable_64_bit_bfd"
1884   case "${enableval}" in
1885   yes)  want64=true  ;;
1886   no)   want64=false ;;
1887   *)    { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
1888 esac
1889 else
1890   want64=false
1891 fi
1892
1893
1894
1895
1896
1897 if test -z "$target" ; then
1898     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1899 fi
1900 if test -z "$host" ; then
1901     { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1902 fi
1903
1904 # host-specific stuff:
1905
1906 # Extract the first word of "gcc", so it can be a program name with args.
1907 set dummy gcc; ac_word=$2
1908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1909 echo "configure:1910: checking for $ac_word" >&5
1910 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1911   echo $ac_n "(cached) $ac_c" 1>&6
1912 else
1913   if test -n "$CC"; then
1914   ac_cv_prog_CC="$CC" # Let the user override the test.
1915 else
1916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1917   ac_dummy="$PATH"
1918   for ac_dir in $ac_dummy; do
1919     test -z "$ac_dir" && ac_dir=.
1920     if test -f $ac_dir/$ac_word; then
1921       ac_cv_prog_CC="gcc"
1922       break
1923     fi
1924   done
1925   IFS="$ac_save_ifs"
1926 fi
1927 fi
1928 CC="$ac_cv_prog_CC"
1929 if test -n "$CC"; then
1930   echo "$ac_t""$CC" 1>&6
1931 else
1932   echo "$ac_t""no" 1>&6
1933 fi
1934
1935 if test -z "$CC"; then
1936   # Extract the first word of "cc", so it can be a program name with args.
1937 set dummy cc; ac_word=$2
1938 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1939 echo "configure:1940: checking for $ac_word" >&5
1940 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1941   echo $ac_n "(cached) $ac_c" 1>&6
1942 else
1943   if test -n "$CC"; then
1944   ac_cv_prog_CC="$CC" # Let the user override the test.
1945 else
1946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1947   ac_prog_rejected=no
1948   ac_dummy="$PATH"
1949   for ac_dir in $ac_dummy; do
1950     test -z "$ac_dir" && ac_dir=.
1951     if test -f $ac_dir/$ac_word; then
1952       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1953         ac_prog_rejected=yes
1954         continue
1955       fi
1956       ac_cv_prog_CC="cc"
1957       break
1958     fi
1959   done
1960   IFS="$ac_save_ifs"
1961 if test $ac_prog_rejected = yes; then
1962   # We found a bogon in the path, so make sure we never use it.
1963   set dummy $ac_cv_prog_CC
1964   shift
1965   if test $# -gt 0; then
1966     # We chose a different compiler from the bogus one.
1967     # However, it has the same basename, so the bogon will be chosen
1968     # first if we set CC to just the basename; use the full file name.
1969     shift
1970     set dummy "$ac_dir/$ac_word" "$@"
1971     shift
1972     ac_cv_prog_CC="$@"
1973   fi
1974 fi
1975 fi
1976 fi
1977 CC="$ac_cv_prog_CC"
1978 if test -n "$CC"; then
1979   echo "$ac_t""$CC" 1>&6
1980 else
1981   echo "$ac_t""no" 1>&6
1982 fi
1983
1984   if test -z "$CC"; then
1985     case "`uname -s`" in
1986     *win32* | *WIN32*)
1987       # Extract the first word of "cl", so it can be a program name with args.
1988 set dummy cl; ac_word=$2
1989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1990 echo "configure:1991: checking for $ac_word" >&5
1991 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1992   echo $ac_n "(cached) $ac_c" 1>&6
1993 else
1994   if test -n "$CC"; then
1995   ac_cv_prog_CC="$CC" # Let the user override the test.
1996 else
1997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1998   ac_dummy="$PATH"
1999   for ac_dir in $ac_dummy; do
2000     test -z "$ac_dir" && ac_dir=.
2001     if test -f $ac_dir/$ac_word; then
2002       ac_cv_prog_CC="cl"
2003       break
2004     fi
2005   done
2006   IFS="$ac_save_ifs"
2007 fi
2008 fi
2009 CC="$ac_cv_prog_CC"
2010 if test -n "$CC"; then
2011   echo "$ac_t""$CC" 1>&6
2012 else
2013   echo "$ac_t""no" 1>&6
2014 fi
2015  ;;
2016     esac
2017   fi
2018   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2019 fi
2020
2021 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2022 echo "configure:2023: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2023
2024 ac_ext=c
2025 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2026 ac_cpp='$CPP $CPPFLAGS'
2027 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2028 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2029 cross_compiling=$ac_cv_prog_cc_cross
2030
2031 cat > conftest.$ac_ext << EOF
2032
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035
2036 main(){return(0);}
2037 EOF
2038 if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2039   ac_cv_prog_cc_works=yes
2040   # If we can't run a trivial program, we are probably using a cross compiler.
2041   if (./conftest; exit) 2>/dev/null; then
2042     ac_cv_prog_cc_cross=no
2043   else
2044     ac_cv_prog_cc_cross=yes
2045   fi
2046 else
2047   echo "configure: failed program was:" >&5
2048   cat conftest.$ac_ext >&5
2049   ac_cv_prog_cc_works=no
2050 fi
2051 rm -fr conftest*
2052 ac_ext=c
2053 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2054 ac_cpp='$CPP $CPPFLAGS'
2055 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2056 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2057 cross_compiling=$ac_cv_prog_cc_cross
2058
2059 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2060 if test $ac_cv_prog_cc_works = no; then
2061   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2062 fi
2063 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2064 echo "configure:2065: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2065 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2066 cross_compiling=$ac_cv_prog_cc_cross
2067
2068 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2069 echo "configure:2070: checking whether we are using GNU C" >&5
2070 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2071   echo $ac_n "(cached) $ac_c" 1>&6
2072 else
2073   cat > conftest.c <<EOF
2074 #ifdef __GNUC__
2075   yes;
2076 #endif
2077 EOF
2078 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2079   ac_cv_prog_gcc=yes
2080 else
2081   ac_cv_prog_gcc=no
2082 fi
2083 fi
2084
2085 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2086
2087 if test $ac_cv_prog_gcc = yes; then
2088   GCC=yes
2089 else
2090   GCC=
2091 fi
2092
2093 ac_test_CFLAGS="${CFLAGS+set}"
2094 ac_save_CFLAGS="$CFLAGS"
2095 CFLAGS=
2096 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2097 echo "configure:2098: checking whether ${CC-cc} accepts -g" >&5
2098 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2099   echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101   echo 'void f(){}' > conftest.c
2102 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2103   ac_cv_prog_cc_g=yes
2104 else
2105   ac_cv_prog_cc_g=no
2106 fi
2107 rm -f conftest*
2108
2109 fi
2110
2111 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2112 if test "$ac_test_CFLAGS" = set; then
2113   CFLAGS="$ac_save_CFLAGS"
2114 elif test $ac_cv_prog_cc_g = yes; then
2115   if test "$GCC" = yes; then
2116     CFLAGS="-g -O2"
2117   else
2118     CFLAGS="-g"
2119   fi
2120 else
2121   if test "$GCC" = yes; then
2122     CFLAGS="-O2"
2123   else
2124     CFLAGS=
2125   fi
2126 fi
2127
2128 # Find a good install program.  We prefer a C program (faster),
2129 # so one script is as good as another.  But avoid the broken or
2130 # incompatible versions:
2131 # SysV /etc/install, /usr/sbin/install
2132 # SunOS /usr/etc/install
2133 # IRIX /sbin/install
2134 # AIX /bin/install
2135 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2136 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2137 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2138 # ./install, which can be erroneously created by make from ./install.sh.
2139 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2140 echo "configure:2141: checking for a BSD compatible install" >&5
2141 if test -z "$INSTALL"; then
2142 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2143   echo $ac_n "(cached) $ac_c" 1>&6
2144 else
2145     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2146   for ac_dir in $PATH; do
2147     # Account for people who put trailing slashes in PATH elements.
2148     case "$ac_dir/" in
2149     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2150     *)
2151       # OSF1 and SCO ODT 3.0 have their own names for install.
2152       # Don't use installbsd from OSF since it installs stuff as root
2153       # by default.
2154       for ac_prog in ginstall scoinst install; do
2155         if test -f $ac_dir/$ac_prog; then
2156           if test $ac_prog = install &&
2157             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2158             # AIX install.  It has an incompatible calling convention.
2159             :
2160           else
2161             ac_cv_path_install="$ac_dir/$ac_prog -c"
2162             break 2
2163           fi
2164         fi
2165       done
2166       ;;
2167     esac
2168   done
2169   IFS="$ac_save_IFS"
2170
2171 fi
2172   if test "${ac_cv_path_install+set}" = set; then
2173     INSTALL="$ac_cv_path_install"
2174   else
2175     # As a last resort, use the slow shell script.  We don't cache a
2176     # path for INSTALL within a source directory, because that will
2177     # break other packages using the cache if that directory is
2178     # removed, or if the path is relative.
2179     INSTALL="$ac_install_sh"
2180   fi
2181 fi
2182 echo "$ac_t""$INSTALL" 1>&6
2183
2184 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2185 # It thinks the first close brace ends the variable substitution.
2186 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2187
2188 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2189
2190 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2191
2192
2193 ALL_LINGUAS=
2194 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2195 echo "configure:2196: checking how to run the C preprocessor" >&5
2196 # On Suns, sometimes $CPP names a directory.
2197 if test -n "$CPP" && test -d "$CPP"; then
2198   CPP=
2199 fi
2200 if test -z "$CPP"; then
2201 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2202   echo $ac_n "(cached) $ac_c" 1>&6
2203 else
2204     # This must be in double quotes, not single quotes, because CPP may get
2205   # substituted into the Makefile and "${CC-cc}" will confuse make.
2206   CPP="${CC-cc} -E"
2207   # On the NeXT, cc -E runs the code through the compiler's parser,
2208   # not just through cpp.
2209   cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212 #include <assert.h>
2213 Syntax Error
2214 EOF
2215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2216 { (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2218 if test -z "$ac_err"; then
2219   :
2220 else
2221   echo "$ac_err" >&5
2222   echo "configure: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   rm -rf conftest*
2225   CPP="${CC-cc} -E -traditional-cpp"
2226   cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230 Syntax Error
2231 EOF
2232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2233 { (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2235 if test -z "$ac_err"; then
2236   :
2237 else
2238   echo "$ac_err" >&5
2239   echo "configure: failed program was:" >&5
2240   cat conftest.$ac_ext >&5
2241   rm -rf conftest*
2242   CPP="${CC-cc} -nologo -E"
2243   cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #include <assert.h>
2247 Syntax Error
2248 EOF
2249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2250 { (eval echo configure:2251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2252 if test -z "$ac_err"; then
2253   :
2254 else
2255   echo "$ac_err" >&5
2256   echo "configure: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   rm -rf conftest*
2259   CPP=/lib/cpp
2260 fi
2261 rm -f conftest*
2262 fi
2263 rm -f conftest*
2264 fi
2265 rm -f conftest*
2266   ac_cv_prog_CPP="$CPP"
2267 fi
2268   CPP="$ac_cv_prog_CPP"
2269 else
2270   ac_cv_prog_CPP="$CPP"
2271 fi
2272 echo "$ac_t""$CPP" 1>&6
2273
2274 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2275 echo "configure:2276: checking for POSIXized ISC" >&5
2276 if test -d /etc/conf/kconfig.d &&
2277   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2278 then
2279   echo "$ac_t""yes" 1>&6
2280   ISC=yes # If later tests want to check for ISC.
2281   cat >> confdefs.h <<\EOF
2282 #define _POSIX_SOURCE 1
2283 EOF
2284
2285   if test "$GCC" = yes; then
2286     CC="$CC -posix"
2287   else
2288     CC="$CC -Xp"
2289   fi
2290 else
2291   echo "$ac_t""no" 1>&6
2292   ISC=
2293 fi
2294
2295 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2296 echo "configure:2297: checking for ANSI C header files" >&5
2297 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2298   echo $ac_n "(cached) $ac_c" 1>&6
2299 else
2300   cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 #include <stdlib.h>
2304 #include <stdarg.h>
2305 #include <string.h>
2306 #include <float.h>
2307 EOF
2308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2309 { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2311 if test -z "$ac_err"; then
2312   rm -rf conftest*
2313   ac_cv_header_stdc=yes
2314 else
2315   echo "$ac_err" >&5
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -rf conftest*
2319   ac_cv_header_stdc=no
2320 fi
2321 rm -f conftest*
2322
2323 if test $ac_cv_header_stdc = yes; then
2324   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2325 cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <string.h>
2329 EOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "memchr" >/dev/null 2>&1; then
2332   :
2333 else
2334   rm -rf conftest*
2335   ac_cv_header_stdc=no
2336 fi
2337 rm -f conftest*
2338
2339 fi
2340
2341 if test $ac_cv_header_stdc = yes; then
2342   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2343 cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 #include <stdlib.h>
2347 EOF
2348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349   egrep "free" >/dev/null 2>&1; then
2350   :
2351 else
2352   rm -rf conftest*
2353   ac_cv_header_stdc=no
2354 fi
2355 rm -f conftest*
2356
2357 fi
2358
2359 if test $ac_cv_header_stdc = yes; then
2360   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2361 if test "$cross_compiling" = yes; then
2362   :
2363 else
2364   cat > conftest.$ac_ext <<EOF
2365 #line 2366 "configure"
2366 #include "confdefs.h"
2367 #include <ctype.h>
2368 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2369 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2370 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2371 int main () { int i; for (i = 0; i < 256; i++)
2372 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2373 exit (0); }
2374
2375 EOF
2376 if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2377 then
2378   :
2379 else
2380   echo "configure: failed program was:" >&5
2381   cat conftest.$ac_ext >&5
2382   rm -fr conftest*
2383   ac_cv_header_stdc=no
2384 fi
2385 rm -fr conftest*
2386 fi
2387
2388 fi
2389 fi
2390
2391 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2392 if test $ac_cv_header_stdc = yes; then
2393   cat >> confdefs.h <<\EOF
2394 #define STDC_HEADERS 1
2395 EOF
2396
2397 fi
2398
2399 echo $ac_n "checking for working const""... $ac_c" 1>&6
2400 echo "configure:2401: checking for working const" >&5
2401 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407
2408 int main() {
2409
2410 /* Ultrix mips cc rejects this.  */
2411 typedef int charset[2]; const charset x;
2412 /* SunOS 4.1.1 cc rejects this.  */
2413 char const *const *ccp;
2414 char **p;
2415 /* NEC SVR4.0.2 mips cc rejects this.  */
2416 struct point {int x, y;};
2417 static struct point const zero = {0,0};
2418 /* AIX XL C 1.02.0.0 rejects this.
2419    It does not let you subtract one const X* pointer from another in an arm
2420    of an if-expression whose if-part is not a constant expression */
2421 const char *g = "string";
2422 ccp = &g + (g ? g-g : 0);
2423 /* HPUX 7.0 cc rejects these. */
2424 ++ccp;
2425 p = (char**) ccp;
2426 ccp = (char const *const *) p;
2427 { /* SCO 3.2v4 cc rejects this.  */
2428   char *t;
2429   char const *s = 0 ? (char *) 0 : (char const *) 0;
2430
2431   *t++ = 0;
2432 }
2433 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2434   int x[] = {25, 17};
2435   const int *foo = &x[0];
2436   ++foo;
2437 }
2438 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2439   typedef const int *iptr;
2440   iptr p = 0;
2441   ++p;
2442 }
2443 { /* AIX XL C 1.02.0.0 rejects this saying
2444      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2445   struct s { int j; const int *ap[3]; };
2446   struct s *b; b->j = 5;
2447 }
2448 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2449   const int foo = 10;
2450 }
2451
2452 ; return 0; }
2453 EOF
2454 if { (eval echo configure:2455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2455   rm -rf conftest*
2456   ac_cv_c_const=yes
2457 else
2458   echo "configure: failed program was:" >&5
2459   cat conftest.$ac_ext >&5
2460   rm -rf conftest*
2461   ac_cv_c_const=no
2462 fi
2463 rm -f conftest*
2464 fi
2465
2466 echo "$ac_t""$ac_cv_c_const" 1>&6
2467 if test $ac_cv_c_const = no; then
2468   cat >> confdefs.h <<\EOF
2469 #define const 
2470 EOF
2471
2472 fi
2473
2474 echo $ac_n "checking for inline""... $ac_c" 1>&6
2475 echo "configure:2476: checking for inline" >&5
2476 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   ac_cv_c_inline=no
2480 for ac_kw in inline __inline__ __inline; do
2481   cat > conftest.$ac_ext <<EOF
2482 #line 2483 "configure"
2483 #include "confdefs.h"
2484
2485 int main() {
2486 } $ac_kw foo() {
2487 ; return 0; }
2488 EOF
2489 if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2490   rm -rf conftest*
2491   ac_cv_c_inline=$ac_kw; break
2492 else
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495 fi
2496 rm -f conftest*
2497 done
2498
2499 fi
2500
2501 echo "$ac_t""$ac_cv_c_inline" 1>&6
2502 case "$ac_cv_c_inline" in
2503   inline | yes) ;;
2504   no) cat >> confdefs.h <<\EOF
2505 #define inline 
2506 EOF
2507  ;;
2508   *)  cat >> confdefs.h <<EOF
2509 #define inline $ac_cv_c_inline
2510 EOF
2511  ;;
2512 esac
2513
2514 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2515 echo "configure:2516: checking for off_t" >&5
2516 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 #include <sys/types.h>
2523 #if STDC_HEADERS
2524 #include <stdlib.h>
2525 #include <stddef.h>
2526 #endif
2527 EOF
2528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2529   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2530   rm -rf conftest*
2531   ac_cv_type_off_t=yes
2532 else
2533   rm -rf conftest*
2534   ac_cv_type_off_t=no
2535 fi
2536 rm -f conftest*
2537
2538 fi
2539 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2540 if test $ac_cv_type_off_t = no; then
2541   cat >> confdefs.h <<\EOF
2542 #define off_t long
2543 EOF
2544
2545 fi
2546
2547 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2548 echo "configure:2549: checking for size_t" >&5
2549 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2550   echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552   cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #include <sys/types.h>
2556 #if STDC_HEADERS
2557 #include <stdlib.h>
2558 #include <stddef.h>
2559 #endif
2560 EOF
2561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2562   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2563   rm -rf conftest*
2564   ac_cv_type_size_t=yes
2565 else
2566   rm -rf conftest*
2567   ac_cv_type_size_t=no
2568 fi
2569 rm -f conftest*
2570
2571 fi
2572 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2573 if test $ac_cv_type_size_t = no; then
2574   cat >> confdefs.h <<\EOF
2575 #define size_t unsigned
2576 EOF
2577
2578 fi
2579
2580 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2581 # for constant arguments.  Useless!
2582 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2583 echo "configure:2584: checking for working alloca.h" >&5
2584 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 #include <alloca.h>
2591 int main() {
2592 char *p = alloca(2 * sizeof(int));
2593 ; return 0; }
2594 EOF
2595 if { (eval echo configure:2596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2596   rm -rf conftest*
2597   ac_cv_header_alloca_h=yes
2598 else
2599   echo "configure: failed program was:" >&5
2600   cat conftest.$ac_ext >&5
2601   rm -rf conftest*
2602   ac_cv_header_alloca_h=no
2603 fi
2604 rm -f conftest*
2605 fi
2606
2607 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2608 if test $ac_cv_header_alloca_h = yes; then
2609   cat >> confdefs.h <<\EOF
2610 #define HAVE_ALLOCA_H 1
2611 EOF
2612
2613 fi
2614
2615 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2616 echo "configure:2617: checking for alloca" >&5
2617 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   cat > conftest.$ac_ext <<EOF
2621 #line 2622 "configure"
2622 #include "confdefs.h"
2623
2624 #ifdef __GNUC__
2625 # define alloca __builtin_alloca
2626 #else
2627 # ifdef _MSC_VER
2628 #  include <malloc.h>
2629 #  define alloca _alloca
2630 # else
2631 #  if HAVE_ALLOCA_H
2632 #   include <alloca.h>
2633 #  else
2634 #   ifdef _AIX
2635  #pragma alloca
2636 #   else
2637 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2638 char *alloca ();
2639 #    endif
2640 #   endif
2641 #  endif
2642 # endif
2643 #endif
2644
2645 int main() {
2646 char *p = (char *) alloca(1);
2647 ; return 0; }
2648 EOF
2649 if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2650   rm -rf conftest*
2651   ac_cv_func_alloca_works=yes
2652 else
2653   echo "configure: failed program was:" >&5
2654   cat conftest.$ac_ext >&5
2655   rm -rf conftest*
2656   ac_cv_func_alloca_works=no
2657 fi
2658 rm -f conftest*
2659 fi
2660
2661 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2662 if test $ac_cv_func_alloca_works = yes; then
2663   cat >> confdefs.h <<\EOF
2664 #define HAVE_ALLOCA 1
2665 EOF
2666
2667 fi
2668
2669 if test $ac_cv_func_alloca_works = no; then
2670   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2671   # that cause trouble.  Some versions do not even contain alloca or
2672   # contain a buggy version.  If you still want to use their alloca,
2673   # use ar to extract alloca.o from them instead of compiling alloca.c.
2674   ALLOCA=alloca.${ac_objext}
2675   cat >> confdefs.h <<\EOF
2676 #define C_ALLOCA 1
2677 EOF
2678
2679
2680 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2681 echo "configure:2682: checking whether alloca needs Cray hooks" >&5
2682 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2683   echo $ac_n "(cached) $ac_c" 1>&6
2684 else
2685   cat > conftest.$ac_ext <<EOF
2686 #line 2687 "configure"
2687 #include "confdefs.h"
2688 #if defined(CRAY) && ! defined(CRAY2)
2689 webecray
2690 #else
2691 wenotbecray
2692 #endif
2693
2694 EOF
2695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2696   egrep "webecray" >/dev/null 2>&1; then
2697   rm -rf conftest*
2698   ac_cv_os_cray=yes
2699 else
2700   rm -rf conftest*
2701   ac_cv_os_cray=no
2702 fi
2703 rm -f conftest*
2704
2705 fi
2706
2707 echo "$ac_t""$ac_cv_os_cray" 1>&6
2708 if test $ac_cv_os_cray = yes; then
2709 for ac_func in _getb67 GETB67 getb67; do
2710   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2711 echo "configure:2712: checking for $ac_func" >&5
2712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2713   echo $ac_n "(cached) $ac_c" 1>&6
2714 else
2715   cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 /* System header to define __stub macros and hopefully few prototypes,
2719     which can conflict with char $ac_func(); below.  */
2720 #include <assert.h>
2721 /* Override any gcc2 internal prototype to avoid an error.  */
2722 /* We use char because int might match the return type of a gcc2
2723     builtin and then its argument prototype would still apply.  */
2724 char $ac_func();
2725
2726 int main() {
2727
2728 /* The GNU C library defines this for functions which it implements
2729     to always fail with ENOSYS.  Some functions are actually named
2730     something starting with __ and the normal name is an alias.  */
2731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2732 choke me
2733 #else
2734 $ac_func();
2735 #endif
2736
2737 ; return 0; }
2738 EOF
2739 if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2740   rm -rf conftest*
2741   eval "ac_cv_func_$ac_func=yes"
2742 else
2743   echo "configure: failed program was:" >&5
2744   cat conftest.$ac_ext >&5
2745   rm -rf conftest*
2746   eval "ac_cv_func_$ac_func=no"
2747 fi
2748 rm -f conftest*
2749 fi
2750
2751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2752   echo "$ac_t""yes" 1>&6
2753   cat >> confdefs.h <<EOF
2754 #define CRAY_STACKSEG_END $ac_func
2755 EOF
2756
2757   break
2758 else
2759   echo "$ac_t""no" 1>&6
2760 fi
2761
2762 done
2763 fi
2764
2765 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2766 echo "configure:2767: checking stack direction for C alloca" >&5
2767 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2768   echo $ac_n "(cached) $ac_c" 1>&6
2769 else
2770   if test "$cross_compiling" = yes; then
2771   ac_cv_c_stack_direction=0
2772 else
2773   cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 find_stack_direction ()
2777 {
2778   static char *addr = 0;
2779   auto char dummy;
2780   if (addr == 0)
2781     {
2782       addr = &dummy;
2783       return find_stack_direction ();
2784     }
2785   else
2786     return (&dummy > addr) ? 1 : -1;
2787 }
2788 main ()
2789 {
2790   exit (find_stack_direction() < 0);
2791 }
2792 EOF
2793 if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2794 then
2795   ac_cv_c_stack_direction=1
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -fr conftest*
2800   ac_cv_c_stack_direction=-1
2801 fi
2802 rm -fr conftest*
2803 fi
2804
2805 fi
2806
2807 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2808 cat >> confdefs.h <<EOF
2809 #define STACK_DIRECTION $ac_cv_c_stack_direction
2810 EOF
2811
2812 fi
2813
2814 for ac_hdr in unistd.h
2815 do
2816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2818 echo "configure:2819: checking for $ac_hdr" >&5
2819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2820   echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822   cat > conftest.$ac_ext <<EOF
2823 #line 2824 "configure"
2824 #include "confdefs.h"
2825 #include <$ac_hdr>
2826 EOF
2827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2828 { (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2830 if test -z "$ac_err"; then
2831   rm -rf conftest*
2832   eval "ac_cv_header_$ac_safe=yes"
2833 else
2834   echo "$ac_err" >&5
2835   echo "configure: failed program was:" >&5
2836   cat conftest.$ac_ext >&5
2837   rm -rf conftest*
2838   eval "ac_cv_header_$ac_safe=no"
2839 fi
2840 rm -f conftest*
2841 fi
2842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2843   echo "$ac_t""yes" 1>&6
2844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2845   cat >> confdefs.h <<EOF
2846 #define $ac_tr_hdr 1
2847 EOF
2848  
2849 else
2850   echo "$ac_t""no" 1>&6
2851 fi
2852 done
2853
2854 for ac_func in getpagesize
2855 do
2856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2857 echo "configure:2858: checking for $ac_func" >&5
2858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2859   echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861   cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864 /* System header to define __stub macros and hopefully few prototypes,
2865     which can conflict with char $ac_func(); below.  */
2866 #include <assert.h>
2867 /* Override any gcc2 internal prototype to avoid an error.  */
2868 /* We use char because int might match the return type of a gcc2
2869     builtin and then its argument prototype would still apply.  */
2870 char $ac_func();
2871
2872 int main() {
2873
2874 /* The GNU C library defines this for functions which it implements
2875     to always fail with ENOSYS.  Some functions are actually named
2876     something starting with __ and the normal name is an alias.  */
2877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2878 choke me
2879 #else
2880 $ac_func();
2881 #endif
2882
2883 ; return 0; }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2886   rm -rf conftest*
2887   eval "ac_cv_func_$ac_func=yes"
2888 else
2889   echo "configure: failed program was:" >&5
2890   cat conftest.$ac_ext >&5
2891   rm -rf conftest*
2892   eval "ac_cv_func_$ac_func=no"
2893 fi
2894 rm -f conftest*
2895 fi
2896
2897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2898   echo "$ac_t""yes" 1>&6
2899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2900   cat >> confdefs.h <<EOF
2901 #define $ac_tr_func 1
2902 EOF
2903  
2904 else
2905   echo "$ac_t""no" 1>&6
2906 fi
2907 done
2908
2909 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2910 echo "configure:2911: checking for working mmap" >&5
2911 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   if test "$cross_compiling" = yes; then
2915   ac_cv_func_mmap_fixed_mapped=no
2916 else
2917   cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920
2921 /* Thanks to Mike Haertel and Jim Avera for this test.
2922    Here is a matrix of mmap possibilities:
2923         mmap private not fixed
2924         mmap private fixed at somewhere currently unmapped
2925         mmap private fixed at somewhere already mapped
2926         mmap shared not fixed
2927         mmap shared fixed at somewhere currently unmapped
2928         mmap shared fixed at somewhere already mapped
2929    For private mappings, we should verify that changes cannot be read()
2930    back from the file, nor mmap's back from the file at a different
2931    address.  (There have been systems where private was not correctly
2932    implemented like the infamous i386 svr4.0, and systems where the
2933    VM page cache was not coherent with the filesystem buffer cache
2934    like early versions of FreeBSD and possibly contemporary NetBSD.)
2935    For shared mappings, we should conversely verify that changes get
2936    propogated back to all the places they're supposed to be.
2937
2938    Grep wants private fixed already mapped.
2939    The main things grep needs to know about mmap are:
2940    * does it exist and is it safe to write into the mmap'd area
2941    * how to use it (BSD variants)  */
2942 #include <sys/types.h>
2943 #include <fcntl.h>
2944 #include <sys/mman.h>
2945
2946 /* This mess was copied from the GNU getpagesize.h.  */
2947 #ifndef HAVE_GETPAGESIZE
2948 # ifdef HAVE_UNISTD_H
2949 #  include <unistd.h>
2950 # endif
2951
2952 /* Assume that all systems that can run configure have sys/param.h.  */
2953 # ifndef HAVE_SYS_PARAM_H
2954 #  define HAVE_SYS_PARAM_H 1
2955 # endif
2956
2957 # ifdef _SC_PAGESIZE
2958 #  define getpagesize() sysconf(_SC_PAGESIZE)
2959 # else /* no _SC_PAGESIZE */
2960 #  ifdef HAVE_SYS_PARAM_H
2961 #   include <sys/param.h>
2962 #   ifdef EXEC_PAGESIZE
2963 #    define getpagesize() EXEC_PAGESIZE
2964 #   else /* no EXEC_PAGESIZE */
2965 #    ifdef NBPG
2966 #     define getpagesize() NBPG * CLSIZE
2967 #     ifndef CLSIZE
2968 #      define CLSIZE 1
2969 #     endif /* no CLSIZE */
2970 #    else /* no NBPG */
2971 #     ifdef NBPC
2972 #      define getpagesize() NBPC
2973 #     else /* no NBPC */
2974 #      ifdef PAGESIZE
2975 #       define getpagesize() PAGESIZE
2976 #      endif /* PAGESIZE */
2977 #     endif /* no NBPC */
2978 #    endif /* no NBPG */
2979 #   endif /* no EXEC_PAGESIZE */
2980 #  else /* no HAVE_SYS_PARAM_H */
2981 #   define getpagesize() 8192   /* punt totally */
2982 #  endif /* no HAVE_SYS_PARAM_H */
2983 # endif /* no _SC_PAGESIZE */
2984
2985 #endif /* no HAVE_GETPAGESIZE */
2986
2987 #ifdef __cplusplus
2988 extern "C" { void *malloc(unsigned); }
2989 #else
2990 char *malloc();
2991 #endif
2992
2993 int
2994 main()
2995 {
2996         char *data, *data2, *data3;
2997         int i, pagesize;
2998         int fd;
2999
3000         pagesize = getpagesize();
3001
3002         /*
3003          * First, make a file with some known garbage in it.
3004          */
3005         data = malloc(pagesize);
3006         if (!data)
3007                 exit(1);
3008         for (i = 0; i < pagesize; ++i)
3009                 *(data + i) = rand();
3010         umask(0);
3011         fd = creat("conftestmmap", 0600);
3012         if (fd < 0)
3013                 exit(1);
3014         if (write(fd, data, pagesize) != pagesize)
3015                 exit(1);
3016         close(fd);
3017
3018         /*
3019          * Next, try to mmap the file at a fixed address which
3020          * already has something else allocated at it.  If we can,
3021          * also make sure that we see the same garbage.
3022          */
3023         fd = open("conftestmmap", O_RDWR);
3024         if (fd < 0)
3025                 exit(1);
3026         data2 = malloc(2 * pagesize);
3027         if (!data2)
3028                 exit(1);
3029         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3030         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3031             MAP_PRIVATE | MAP_FIXED, fd, 0L))
3032                 exit(1);
3033         for (i = 0; i < pagesize; ++i)
3034                 if (*(data + i) != *(data2 + i))
3035                         exit(1);
3036
3037         /*
3038          * Finally, make sure that changes to the mapped area
3039          * do not percolate back to the file as seen by read().
3040          * (This is a bug on some variants of i386 svr4.0.)
3041          */
3042         for (i = 0; i < pagesize; ++i)
3043                 *(data2 + i) = *(data2 + i) + 1;
3044         data3 = malloc(pagesize);
3045         if (!data3)
3046                 exit(1);
3047         if (read(fd, data3, pagesize) != pagesize)
3048                 exit(1);
3049         for (i = 0; i < pagesize; ++i)
3050                 if (*(data + i) != *(data3 + i))
3051                         exit(1);
3052         close(fd);
3053         unlink("conftestmmap");
3054         exit(0);
3055 }
3056
3057 EOF
3058 if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3059 then
3060   ac_cv_func_mmap_fixed_mapped=yes
3061 else
3062   echo "configure: failed program was:" >&5
3063   cat conftest.$ac_ext >&5
3064   rm -fr conftest*
3065   ac_cv_func_mmap_fixed_mapped=no
3066 fi
3067 rm -fr conftest*
3068 fi
3069
3070 fi
3071
3072 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3073 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3074   cat >> confdefs.h <<\EOF
3075 #define HAVE_MMAP 1
3076 EOF
3077
3078 fi
3079
3080                               
3081    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3082 unistd.h values.h sys/param.h
3083 do
3084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3086 echo "configure:3087: checking for $ac_hdr" >&5
3087 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3093 #include <$ac_hdr>
3094 EOF
3095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3096 { (eval echo configure:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3098 if test -z "$ac_err"; then
3099   rm -rf conftest*
3100   eval "ac_cv_header_$ac_safe=yes"
3101 else
3102   echo "$ac_err" >&5
3103   echo "configure: failed program was:" >&5
3104   cat conftest.$ac_ext >&5
3105   rm -rf conftest*
3106   eval "ac_cv_header_$ac_safe=no"
3107 fi
3108 rm -f conftest*
3109 fi
3110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3111   echo "$ac_t""yes" 1>&6
3112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3113   cat >> confdefs.h <<EOF
3114 #define $ac_tr_hdr 1
3115 EOF
3116  
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120 done
3121
3122    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3123 __argz_count __argz_stringify __argz_next
3124 do
3125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3126 echo "configure:3127: checking for $ac_func" >&5
3127 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130   cat > conftest.$ac_ext <<EOF
3131 #line 3132 "configure"
3132 #include "confdefs.h"
3133 /* System header to define __stub macros and hopefully few prototypes,
3134     which can conflict with char $ac_func(); below.  */
3135 #include <assert.h>
3136 /* Override any gcc2 internal prototype to avoid an error.  */
3137 /* We use char because int might match the return type of a gcc2
3138     builtin and then its argument prototype would still apply.  */
3139 char $ac_func();
3140
3141 int main() {
3142
3143 /* The GNU C library defines this for functions which it implements
3144     to always fail with ENOSYS.  Some functions are actually named
3145     something starting with __ and the normal name is an alias.  */
3146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3147 choke me
3148 #else
3149 $ac_func();
3150 #endif
3151
3152 ; return 0; }
3153 EOF
3154 if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3155   rm -rf conftest*
3156   eval "ac_cv_func_$ac_func=yes"
3157 else
3158   echo "configure: failed program was:" >&5
3159   cat conftest.$ac_ext >&5
3160   rm -rf conftest*
3161   eval "ac_cv_func_$ac_func=no"
3162 fi
3163 rm -f conftest*
3164 fi
3165
3166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3167   echo "$ac_t""yes" 1>&6
3168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3169   cat >> confdefs.h <<EOF
3170 #define $ac_tr_func 1
3171 EOF
3172  
3173 else
3174   echo "$ac_t""no" 1>&6
3175 fi
3176 done
3177
3178
3179    if test "${ac_cv_func_stpcpy+set}" != "set"; then
3180      for ac_func in stpcpy
3181 do
3182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3183 echo "configure:3184: checking for $ac_func" >&5
3184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 /* System header to define __stub macros and hopefully few prototypes,
3191     which can conflict with char $ac_func(); below.  */
3192 #include <assert.h>
3193 /* Override any gcc2 internal prototype to avoid an error.  */
3194 /* We use char because int might match the return type of a gcc2
3195     builtin and then its argument prototype would still apply.  */
3196 char $ac_func();
3197
3198 int main() {
3199
3200 /* The GNU C library defines this for functions which it implements
3201     to always fail with ENOSYS.  Some functions are actually named
3202     something starting with __ and the normal name is an alias.  */
3203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3204 choke me
3205 #else
3206 $ac_func();
3207 #endif
3208
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3212   rm -rf conftest*
3213   eval "ac_cv_func_$ac_func=yes"
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   eval "ac_cv_func_$ac_func=no"
3219 fi
3220 rm -f conftest*
3221 fi
3222
3223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3224   echo "$ac_t""yes" 1>&6
3225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3226   cat >> confdefs.h <<EOF
3227 #define $ac_tr_func 1
3228 EOF
3229  
3230 else
3231   echo "$ac_t""no" 1>&6
3232 fi
3233 done
3234
3235    fi
3236    if test "${ac_cv_func_stpcpy}" = "yes"; then
3237      cat >> confdefs.h <<\EOF
3238 #define HAVE_STPCPY 1
3239 EOF
3240
3241    fi
3242
3243    if test $ac_cv_header_locale_h = yes; then
3244     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3245 echo "configure:3246: checking for LC_MESSAGES" >&5
3246 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3247   echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <locale.h>
3253 int main() {
3254 return LC_MESSAGES
3255 ; return 0; }
3256 EOF
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3258   rm -rf conftest*
3259   am_cv_val_LC_MESSAGES=yes
3260 else
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   am_cv_val_LC_MESSAGES=no
3265 fi
3266 rm -f conftest*
3267 fi
3268
3269 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3270     if test $am_cv_val_LC_MESSAGES = yes; then
3271       cat >> confdefs.h <<\EOF
3272 #define HAVE_LC_MESSAGES 1
3273 EOF
3274
3275     fi
3276   fi
3277    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3278 echo "configure:3279: checking whether NLS is requested" >&5
3279         # Check whether --enable-nls or --disable-nls was given.
3280 if test "${enable_nls+set}" = set; then
3281   enableval="$enable_nls"
3282   USE_NLS=$enableval
3283 else
3284   USE_NLS=yes
3285 fi
3286
3287     echo "$ac_t""$USE_NLS" 1>&6
3288     
3289
3290     USE_INCLUDED_LIBINTL=no
3291
3292         if test "$USE_NLS" = "yes"; then
3293       cat >> confdefs.h <<\EOF
3294 #define ENABLE_NLS 1
3295 EOF
3296
3297       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3298 echo "configure:3299: checking whether included gettext is requested" >&5
3299       # Check whether --with-included-gettext or --without-included-gettext was given.
3300 if test "${with_included_gettext+set}" = set; then
3301   withval="$with_included_gettext"
3302   nls_cv_force_use_gnu_gettext=$withval
3303 else
3304   nls_cv_force_use_gnu_gettext=no
3305 fi
3306
3307       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3308
3309       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3310       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3311                                         nls_cv_header_intl=
3312         nls_cv_header_libgt=
3313         CATOBJEXT=NONE
3314
3315         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3316 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3317 echo "configure:3318: checking for libintl.h" >&5
3318 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3319   echo $ac_n "(cached) $ac_c" 1>&6
3320 else
3321   cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3324 #include <libintl.h>
3325 EOF
3326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3327 { (eval echo configure:3328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3329 if test -z "$ac_err"; then
3330   rm -rf conftest*
3331   eval "ac_cv_header_$ac_safe=yes"
3332 else
3333   echo "$ac_err" >&5
3334   echo "configure: failed program was:" >&5
3335   cat conftest.$ac_ext >&5
3336   rm -rf conftest*
3337   eval "ac_cv_header_$ac_safe=no"
3338 fi
3339 rm -f conftest*
3340 fi
3341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3342   echo "$ac_t""yes" 1>&6
3343   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3344 echo "configure:3345: checking for gettext in libc" >&5
3345 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3346   echo $ac_n "(cached) $ac_c" 1>&6
3347 else
3348   cat > conftest.$ac_ext <<EOF
3349 #line 3350 "configure"
3350 #include "confdefs.h"
3351 #include <libintl.h>
3352 int main() {
3353 return (int) gettext ("")
3354 ; return 0; }
3355 EOF
3356 if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3357   rm -rf conftest*
3358   gt_cv_func_gettext_libc=yes
3359 else
3360   echo "configure: failed program was:" >&5
3361   cat conftest.$ac_ext >&5
3362   rm -rf conftest*
3363   gt_cv_func_gettext_libc=no
3364 fi
3365 rm -f conftest*
3366 fi
3367
3368 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3369
3370            if test "$gt_cv_func_gettext_libc" != "yes"; then
3371              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3372 echo "configure:3373: checking for bindtextdomain in -lintl" >&5
3373 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3374 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   ac_save_LIBS="$LIBS"
3378 LIBS="-lintl  $LIBS"
3379 cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382 /* Override any gcc2 internal prototype to avoid an error.  */
3383 /* We use char because int might match the return type of a gcc2
3384     builtin and then its argument prototype would still apply.  */
3385 char bindtextdomain();
3386
3387 int main() {
3388 bindtextdomain()
3389 ; return 0; }
3390 EOF
3391 if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392   rm -rf conftest*
3393   eval "ac_cv_lib_$ac_lib_var=yes"
3394 else
3395   echo "configure: failed program was:" >&5
3396   cat conftest.$ac_ext >&5
3397   rm -rf conftest*
3398   eval "ac_cv_lib_$ac_lib_var=no"
3399 fi
3400 rm -f conftest*
3401 LIBS="$ac_save_LIBS"
3402
3403 fi
3404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3405   echo "$ac_t""yes" 1>&6
3406   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3407 echo "configure:3408: checking for gettext in libintl" >&5
3408 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414
3415 int main() {
3416 return (int) gettext ("")
3417 ; return 0; }
3418 EOF
3419 if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3420   rm -rf conftest*
3421   gt_cv_func_gettext_libintl=yes
3422 else
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   gt_cv_func_gettext_libintl=no
3427 fi
3428 rm -f conftest*
3429 fi
3430
3431 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3432 else
3433   echo "$ac_t""no" 1>&6
3434 fi
3435
3436            fi
3437
3438            if test "$gt_cv_func_gettext_libc" = "yes" \
3439               || test "$gt_cv_func_gettext_libintl" = "yes"; then
3440               cat >> confdefs.h <<\EOF
3441 #define HAVE_GETTEXT 1
3442 EOF
3443
3444               # Extract the first word of "msgfmt", so it can be a program name with args.
3445 set dummy msgfmt; ac_word=$2
3446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3447 echo "configure:3448: checking for $ac_word" >&5
3448 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   case "$MSGFMT" in
3452   /*)
3453   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3454   ;;
3455   *)
3456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3457   for ac_dir in $PATH; do
3458     test -z "$ac_dir" && ac_dir=.
3459     if test -f $ac_dir/$ac_word; then
3460       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3461         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3462         break
3463       fi
3464     fi
3465   done
3466   IFS="$ac_save_ifs"
3467   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3468   ;;
3469 esac
3470 fi
3471 MSGFMT="$ac_cv_path_MSGFMT"
3472 if test -n "$MSGFMT"; then
3473   echo "$ac_t""$MSGFMT" 1>&6
3474 else
3475   echo "$ac_t""no" 1>&6
3476 fi
3477               if test "$MSGFMT" != "no"; then
3478                 for ac_func in dcgettext
3479 do
3480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3481 echo "configure:3482: checking for $ac_func" >&5
3482 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3483   echo $ac_n "(cached) $ac_c" 1>&6
3484 else
3485   cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 /* System header to define __stub macros and hopefully few prototypes,
3489     which can conflict with char $ac_func(); below.  */
3490 #include <assert.h>
3491 /* Override any gcc2 internal prototype to avoid an error.  */
3492 /* We use char because int might match the return type of a gcc2
3493     builtin and then its argument prototype would still apply.  */
3494 char $ac_func();
3495
3496 int main() {
3497
3498 /* The GNU C library defines this for functions which it implements
3499     to always fail with ENOSYS.  Some functions are actually named
3500     something starting with __ and the normal name is an alias.  */
3501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3502 choke me
3503 #else
3504 $ac_func();
3505 #endif
3506
3507 ; return 0; }
3508 EOF
3509 if { (eval echo configure:3510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3510   rm -rf conftest*
3511   eval "ac_cv_func_$ac_func=yes"
3512 else
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   rm -rf conftest*
3516   eval "ac_cv_func_$ac_func=no"
3517 fi
3518 rm -f conftest*
3519 fi
3520
3521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3522   echo "$ac_t""yes" 1>&6
3523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3524   cat >> confdefs.h <<EOF
3525 #define $ac_tr_func 1
3526 EOF
3527  
3528 else
3529   echo "$ac_t""no" 1>&6
3530 fi
3531 done
3532
3533                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3534 set dummy gmsgfmt; ac_word=$2
3535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3536 echo "configure:3537: checking for $ac_word" >&5
3537 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   case "$GMSGFMT" in
3541   /*)
3542   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3543   ;;
3544   ?:/*)                  
3545   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3546   ;;
3547   *)
3548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3549   ac_dummy="$PATH"
3550   for ac_dir in $ac_dummy; do 
3551     test -z "$ac_dir" && ac_dir=.
3552     if test -f $ac_dir/$ac_word; then
3553       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3554       break
3555     fi
3556   done
3557   IFS="$ac_save_ifs"
3558   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3559   ;;
3560 esac
3561 fi
3562 GMSGFMT="$ac_cv_path_GMSGFMT"
3563 if test -n "$GMSGFMT"; then
3564   echo "$ac_t""$GMSGFMT" 1>&6
3565 else
3566   echo "$ac_t""no" 1>&6
3567 fi
3568
3569                 # Extract the first word of "xgettext", so it can be a program name with args.
3570 set dummy xgettext; ac_word=$2
3571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3572 echo "configure:3573: checking for $ac_word" >&5
3573 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   case "$XGETTEXT" in
3577   /*)
3578   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3579   ;;
3580   *)
3581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3582   for ac_dir in $PATH; do
3583     test -z "$ac_dir" && ac_dir=.
3584     if test -f $ac_dir/$ac_word; then
3585       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3586         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3587         break
3588       fi
3589     fi
3590   done
3591   IFS="$ac_save_ifs"
3592   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3593   ;;
3594 esac
3595 fi
3596 XGETTEXT="$ac_cv_path_XGETTEXT"
3597 if test -n "$XGETTEXT"; then
3598   echo "$ac_t""$XGETTEXT" 1>&6
3599 else
3600   echo "$ac_t""no" 1>&6
3601 fi
3602
3603                 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606
3607 int main() {
3608 extern int _nl_msg_cat_cntr;
3609                                return _nl_msg_cat_cntr
3610 ; return 0; }
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3613   rm -rf conftest*
3614   CATOBJEXT=.gmo
3615                    DATADIRNAME=share
3616 else
3617   echo "configure: failed program was:" >&5
3618   cat conftest.$ac_ext >&5
3619   rm -rf conftest*
3620   CATOBJEXT=.mo
3621                    DATADIRNAME=lib
3622 fi
3623 rm -f conftest*
3624                 INSTOBJEXT=.mo
3625               fi
3626             fi
3627         
3628 else
3629   echo "$ac_t""no" 1>&6
3630 fi
3631
3632
3633                 
3634         if test "$CATOBJEXT" = "NONE"; then
3635                           nls_cv_use_gnu_gettext=yes
3636         fi
3637       fi
3638
3639       if test "$nls_cv_use_gnu_gettext" = "yes"; then
3640                 INTLOBJS="\$(GETTOBJS)"
3641         # Extract the first word of "msgfmt", so it can be a program name with args.
3642 set dummy msgfmt; ac_word=$2
3643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3644 echo "configure:3645: checking for $ac_word" >&5
3645 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   case "$MSGFMT" in
3649   /*)
3650   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3651   ;;
3652   *)
3653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3654   for ac_dir in $PATH; do
3655     test -z "$ac_dir" && ac_dir=.
3656     if test -f $ac_dir/$ac_word; then
3657       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3658         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3659         break
3660       fi
3661     fi
3662   done
3663   IFS="$ac_save_ifs"
3664   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3665   ;;
3666 esac
3667 fi
3668 MSGFMT="$ac_cv_path_MSGFMT"
3669 if test -n "$MSGFMT"; then
3670   echo "$ac_t""$MSGFMT" 1>&6
3671 else
3672   echo "$ac_t""no" 1>&6
3673 fi
3674
3675         # Extract the first word of "gmsgfmt", so it can be a program name with args.
3676 set dummy gmsgfmt; ac_word=$2
3677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3678 echo "configure:3679: checking for $ac_word" >&5
3679 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682   case "$GMSGFMT" in
3683   /*)
3684   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3685   ;;
3686   ?:/*)                  
3687   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3688   ;;
3689   *)
3690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3691   ac_dummy="$PATH"
3692   for ac_dir in $ac_dummy; do 
3693     test -z "$ac_dir" && ac_dir=.
3694     if test -f $ac_dir/$ac_word; then
3695       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3696       break
3697     fi
3698   done
3699   IFS="$ac_save_ifs"
3700   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3701   ;;
3702 esac
3703 fi
3704 GMSGFMT="$ac_cv_path_GMSGFMT"
3705 if test -n "$GMSGFMT"; then
3706   echo "$ac_t""$GMSGFMT" 1>&6
3707 else
3708   echo "$ac_t""no" 1>&6
3709 fi
3710
3711         # Extract the first word of "xgettext", so it can be a program name with args.
3712 set dummy xgettext; ac_word=$2
3713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3714 echo "configure:3715: checking for $ac_word" >&5
3715 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   case "$XGETTEXT" in
3719   /*)
3720   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3721   ;;
3722   *)
3723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3724   for ac_dir in $PATH; do
3725     test -z "$ac_dir" && ac_dir=.
3726     if test -f $ac_dir/$ac_word; then
3727       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3728         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3729         break
3730       fi
3731     fi
3732   done
3733   IFS="$ac_save_ifs"
3734   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3735   ;;
3736 esac
3737 fi
3738 XGETTEXT="$ac_cv_path_XGETTEXT"
3739 if test -n "$XGETTEXT"; then
3740   echo "$ac_t""$XGETTEXT" 1>&6
3741 else
3742   echo "$ac_t""no" 1>&6
3743 fi
3744
3745         
3746         USE_INCLUDED_LIBINTL=yes
3747         CATOBJEXT=.gmo
3748         INSTOBJEXT=.mo
3749         DATADIRNAME=share
3750         INTLDEPS='$(top_builddir)/../intl/libintl.a'
3751         INTLLIBS=$INTLDEPS
3752         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3753         nls_cv_header_intl=libintl.h
3754         nls_cv_header_libgt=libgettext.h
3755       fi
3756
3757             if test "$XGETTEXT" != ":"; then
3758                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3759           : ;
3760         else
3761           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3762           XGETTEXT=":"
3763         fi
3764       fi
3765
3766       # We need to process the po/ directory.
3767       POSUB=po
3768     else
3769       DATADIRNAME=share
3770       nls_cv_header_intl=libintl.h
3771       nls_cv_header_libgt=libgettext.h
3772     fi
3773
3774     # If this is used in GNU gettext we have to set USE_NLS to `yes'
3775     # because some of the sources are only built for this goal.
3776     if test "$PACKAGE" = gettext; then
3777       USE_NLS=yes
3778       USE_INCLUDED_LIBINTL=yes
3779     fi
3780
3781                 for lang in $ALL_LINGUAS; do
3782       GMOFILES="$GMOFILES $lang.gmo"
3783       POFILES="$POFILES $lang.po"
3784     done
3785
3786         
3787     
3788     
3789     
3790     
3791     
3792     
3793     
3794     
3795     
3796     
3797   
3798
3799    if test "x$CATOBJEXT" != "x"; then
3800      if test "x$ALL_LINGUAS" = "x"; then
3801        LINGUAS=
3802      else
3803        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3804 echo "configure:3805: checking for catalogs to be installed" >&5
3805        NEW_LINGUAS=
3806        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3807          case "$ALL_LINGUAS" in
3808           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3809          esac
3810        done
3811        LINGUAS=$NEW_LINGUAS
3812        echo "$ac_t""$LINGUAS" 1>&6
3813      fi
3814
3815           if test -n "$LINGUAS"; then
3816        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3817      fi
3818    fi
3819
3820             if test $ac_cv_header_locale_h = yes; then
3821      INCLUDE_LOCALE_H="#include <locale.h>"
3822    else
3823      INCLUDE_LOCALE_H="\
3824 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
3825    fi
3826    
3827
3828             if test -f $srcdir/po2tbl.sed.in; then
3829       if test "$CATOBJEXT" = ".cat"; then
3830          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3831 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3832 echo "configure:3833: checking for linux/version.h" >&5
3833 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <linux/version.h>
3840 EOF
3841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3842 { (eval echo configure:3843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3844 if test -z "$ac_err"; then
3845   rm -rf conftest*
3846   eval "ac_cv_header_$ac_safe=yes"
3847 else
3848   echo "$ac_err" >&5
3849   echo "configure: failed program was:" >&5
3850   cat conftest.$ac_ext >&5
3851   rm -rf conftest*
3852   eval "ac_cv_header_$ac_safe=no"
3853 fi
3854 rm -f conftest*
3855 fi
3856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3857   echo "$ac_t""yes" 1>&6
3858   msgformat=linux
3859 else
3860   echo "$ac_t""no" 1>&6
3861 msgformat=xopen
3862 fi
3863
3864
3865                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3866       fi
3867             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3868          $srcdir/po2tbl.sed.in > po2tbl.sed
3869    fi
3870
3871             if test "$PACKAGE" = "gettext"; then
3872      GT_NO="#NO#"
3873      GT_YES=
3874    else
3875      GT_NO=
3876      GT_YES="#YES#"
3877    fi
3878    
3879    
3880
3881    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3882    
3883
3884       l=
3885    
3886
3887             if test -d $srcdir/po; then
3888       test -d po || mkdir po
3889       if test "x$srcdir" != "x."; then
3890          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3891             posrcprefix="$srcdir/"
3892          else
3893             posrcprefix="../$srcdir/"
3894          fi
3895       else
3896          posrcprefix="../"
3897       fi
3898       rm -f po/POTFILES
3899       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3900          < $srcdir/po/POTFILES.in > po/POTFILES
3901    fi
3902   
3903
3904 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3905 echo "configure:3906: checking for Cygwin environment" >&5
3906 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912
3913 int main() {
3914
3915 #ifndef __CYGWIN__
3916 #define __CYGWIN__ __CYGWIN32__
3917 #endif
3918 return __CYGWIN__;
3919 ; return 0; }
3920 EOF
3921 if { (eval echo configure:3922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3922   rm -rf conftest*
3923   ac_cv_cygwin=yes
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -rf conftest*
3928   ac_cv_cygwin=no
3929 fi
3930 rm -f conftest*
3931 rm -f conftest*
3932 fi
3933
3934 echo "$ac_t""$ac_cv_cygwin" 1>&6
3935 CYGWIN=
3936 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3937 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3938 echo "configure:3939: checking for mingw32 environment" >&5
3939 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3940   echo $ac_n "(cached) $ac_c" 1>&6
3941 else
3942   cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945
3946 int main() {
3947 return __MINGW32__;
3948 ; return 0; }
3949 EOF
3950 if { (eval echo configure:3951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3951   rm -rf conftest*
3952   ac_cv_mingw32=yes
3953 else
3954   echo "configure: failed program was:" >&5
3955   cat conftest.$ac_ext >&5
3956   rm -rf conftest*
3957   ac_cv_mingw32=no
3958 fi
3959 rm -f conftest*
3960 rm -f conftest*
3961 fi
3962
3963 echo "$ac_t""$ac_cv_mingw32" 1>&6
3964 MINGW32=
3965 test "$ac_cv_mingw32" = yes && MINGW32=yes
3966
3967
3968 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3969 echo "configure:3970: checking for executable suffix" >&5
3970 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3971   echo $ac_n "(cached) $ac_c" 1>&6
3972 else
3973   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3974   ac_cv_exeext=.exe
3975 else
3976   rm -f conftest*
3977   echo 'int main () { return 0; }' > conftest.$ac_ext
3978   ac_cv_exeext=
3979   if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3980     for file in conftest.*; do
3981       case $file in
3982       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3983       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3984       esac
3985     done
3986   else
3987     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3988   fi
3989   rm -f conftest*
3990   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3991 fi
3992 fi
3993
3994 EXEEXT=""
3995 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3996 echo "$ac_t""${ac_cv_exeext}" 1>&6
3997 ac_exeext=$EXEEXT
3998
3999
4000 for ac_prog in 'bison -y' byacc
4001 do
4002 # Extract the first word of "$ac_prog", so it can be a program name with args.
4003 set dummy $ac_prog; ac_word=$2
4004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4005 echo "configure:4006: checking for $ac_word" >&5
4006 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   if test -n "$YACC"; then
4010   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4011 else
4012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4013   ac_dummy="$PATH"
4014   for ac_dir in $ac_dummy; do
4015     test -z "$ac_dir" && ac_dir=.
4016     if test -f $ac_dir/$ac_word; then
4017       ac_cv_prog_YACC="$ac_prog"
4018       break
4019     fi
4020   done
4021   IFS="$ac_save_ifs"
4022 fi
4023 fi
4024 YACC="$ac_cv_prog_YACC"
4025 if test -n "$YACC"; then
4026   echo "$ac_t""$YACC" 1>&6
4027 else
4028   echo "$ac_t""no" 1>&6
4029 fi
4030
4031 test -n "$YACC" && break
4032 done
4033 test -n "$YACC" || YACC="yacc"
4034
4035 missing_dir=`cd $ac_aux_dir && pwd`
4036 for ac_prog in flex lex
4037 do
4038 # Extract the first word of "$ac_prog", so it can be a program name with args.
4039 set dummy $ac_prog; ac_word=$2
4040 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4041 echo "configure:4042: checking for $ac_word" >&5
4042 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   if test -n "$LEX"; then
4046   ac_cv_prog_LEX="$LEX" # Let the user override the test.
4047 else
4048   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4049   ac_dummy="$PATH"
4050   for ac_dir in $ac_dummy; do
4051     test -z "$ac_dir" && ac_dir=.
4052     if test -f $ac_dir/$ac_word; then
4053       ac_cv_prog_LEX="$ac_prog"
4054       break
4055     fi
4056   done
4057   IFS="$ac_save_ifs"
4058 fi
4059 fi
4060 LEX="$ac_cv_prog_LEX"
4061 if test -n "$LEX"; then
4062   echo "$ac_t""$LEX" 1>&6
4063 else
4064   echo "$ac_t""no" 1>&6
4065 fi
4066
4067 test -n "$LEX" && break
4068 done
4069 test -n "$LEX" || LEX=""$missing_dir/missing flex""
4070
4071 # Extract the first word of "flex", so it can be a program name with args.
4072 set dummy flex; ac_word=$2
4073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4074 echo "configure:4075: checking for $ac_word" >&5
4075 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
4076   echo $ac_n "(cached) $ac_c" 1>&6
4077 else
4078   if test -n "$LEX"; then
4079   ac_cv_prog_LEX="$LEX" # Let the user override the test.
4080 else
4081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4082   ac_dummy="$PATH"
4083   for ac_dir in $ac_dummy; do
4084     test -z "$ac_dir" && ac_dir=.
4085     if test -f $ac_dir/$ac_word; then
4086       ac_cv_prog_LEX="flex"
4087       break
4088     fi
4089   done
4090   IFS="$ac_save_ifs"
4091   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
4092 fi
4093 fi
4094 LEX="$ac_cv_prog_LEX"
4095 if test -n "$LEX"; then
4096   echo "$ac_t""$LEX" 1>&6
4097 else
4098   echo "$ac_t""no" 1>&6
4099 fi
4100
4101 if test -z "$LEXLIB"
4102 then
4103   case "$LEX" in
4104   flex*) ac_lib=fl ;;
4105   *) ac_lib=l ;;
4106   esac
4107   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
4108 echo "configure:4109: checking for yywrap in -l$ac_lib" >&5
4109 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
4110 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4111   echo $ac_n "(cached) $ac_c" 1>&6
4112 else
4113   ac_save_LIBS="$LIBS"
4114 LIBS="-l$ac_lib  $LIBS"
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 /* Override any gcc2 internal prototype to avoid an error.  */
4119 /* We use char because int might match the return type of a gcc2
4120     builtin and then its argument prototype would still apply.  */
4121 char yywrap();
4122
4123 int main() {
4124 yywrap()
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4128   rm -rf conftest*
4129   eval "ac_cv_lib_$ac_lib_var=yes"
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   eval "ac_cv_lib_$ac_lib_var=no"
4135 fi
4136 rm -f conftest*
4137 LIBS="$ac_save_LIBS"
4138
4139 fi
4140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4141   echo "$ac_t""yes" 1>&6
4142   LEXLIB="-l$ac_lib"
4143 else
4144   echo "$ac_t""no" 1>&6
4145 fi
4146
4147 fi
4148
4149 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
4150 echo "configure:4151: checking lex output file root" >&5
4151 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   # The minimal lex program is just a single line: %%.  But some broken lexes
4155 # (Solaris, I think it was) want two %% lines, so accommodate them.
4156 echo '%%
4157 %%' | $LEX
4158 if test -f lex.yy.c; then
4159   ac_cv_prog_lex_root=lex.yy
4160 elif test -f lexyy.c; then
4161   ac_cv_prog_lex_root=lexyy
4162 else
4163   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
4164 fi
4165 fi
4166
4167 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
4168 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
4169
4170 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
4171 echo "configure:4172: checking whether yytext is a pointer" >&5
4172 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
4173   echo $ac_n "(cached) $ac_c" 1>&6
4174 else
4175   # POSIX says lex can declare yytext either as a pointer or an array; the
4176 # default is implementation-dependent. Figure out which it is, since
4177 # not all implementations provide the %pointer and %array declarations.
4178 ac_cv_prog_lex_yytext_pointer=no
4179 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
4180 ac_save_LIBS="$LIBS"
4181 LIBS="$LIBS $LEXLIB"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 `cat $LEX_OUTPUT_ROOT.c`
4186 int main() {
4187
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4191   rm -rf conftest*
4192   ac_cv_prog_lex_yytext_pointer=yes
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196 fi
4197 rm -f conftest*
4198 LIBS="$ac_save_LIBS"
4199 rm -f "${LEX_OUTPUT_ROOT}.c"
4200
4201 fi
4202
4203 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
4204 if test $ac_cv_prog_lex_yytext_pointer = yes; then
4205   cat >> confdefs.h <<\EOF
4206 #define YYTEXT_POINTER 1
4207 EOF
4208
4209 fi
4210
4211
4212 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4213 echo "configure:4214: checking whether to enable maintainer-specific portions of Makefiles" >&5
4214     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4215 if test "${enable_maintainer_mode+set}" = set; then
4216   enableval="$enable_maintainer_mode"
4217   USE_MAINTAINER_MODE=$enableval
4218 else
4219   USE_MAINTAINER_MODE=no
4220 fi
4221
4222   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4223   
4224
4225 if test $USE_MAINTAINER_MODE = yes; then
4226   MAINTAINER_MODE_TRUE=
4227   MAINTAINER_MODE_FALSE='#'
4228 else
4229   MAINTAINER_MODE_TRUE='#'
4230   MAINTAINER_MODE_FALSE=
4231 fi
4232   MAINT=$MAINTAINER_MODE_TRUE
4233   
4234
4235
4236 . ${srcdir}/configure.host
4237
4238
4239
4240
4241
4242
4243 for ac_hdr in string.h strings.h stdlib.h unistd.h
4244 do
4245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4247 echo "configure:4248: checking for $ac_hdr" >&5
4248 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <$ac_hdr>
4255 EOF
4256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4257 { (eval echo configure:4258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4259 if test -z "$ac_err"; then
4260   rm -rf conftest*
4261   eval "ac_cv_header_$ac_safe=yes"
4262 else
4263   echo "$ac_err" >&5
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_header_$ac_safe=no"
4268 fi
4269 rm -f conftest*
4270 fi
4271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4272   echo "$ac_t""yes" 1>&6
4273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4274   cat >> confdefs.h <<EOF
4275 #define $ac_tr_hdr 1
4276 EOF
4277  
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281 done
4282
4283 for ac_func in sbrk
4284 do
4285 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4286 echo "configure:4287: checking for $ac_func" >&5
4287 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 /* System header to define __stub macros and hopefully few prototypes,
4294     which can conflict with char $ac_func(); below.  */
4295 #include <assert.h>
4296 /* Override any gcc2 internal prototype to avoid an error.  */
4297 /* We use char because int might match the return type of a gcc2
4298     builtin and then its argument prototype would still apply.  */
4299 char $ac_func();
4300
4301 int main() {
4302
4303 /* The GNU C library defines this for functions which it implements
4304     to always fail with ENOSYS.  Some functions are actually named
4305     something starting with __ and the normal name is an alias.  */
4306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4307 choke me
4308 #else
4309 $ac_func();
4310 #endif
4311
4312 ; return 0; }
4313 EOF
4314 if { (eval echo configure:4315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4315   rm -rf conftest*
4316   eval "ac_cv_func_$ac_func=yes"
4317 else
4318   echo "configure: failed program was:" >&5
4319   cat conftest.$ac_ext >&5
4320   rm -rf conftest*
4321   eval "ac_cv_func_$ac_func=no"
4322 fi
4323 rm -f conftest*
4324 fi
4325
4326 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4327   echo "$ac_t""yes" 1>&6
4328     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4329   cat >> confdefs.h <<EOF
4330 #define $ac_tr_func 1
4331 EOF
4332  
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336 done
4337
4338 ac_header_dirent=no
4339 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4340 do
4341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4342 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4343 echo "configure:4344: checking for $ac_hdr that defines DIR" >&5
4344 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4345   echo $ac_n "(cached) $ac_c" 1>&6
4346 else
4347   cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 #include <sys/types.h>
4351 #include <$ac_hdr>
4352 int main() {
4353 DIR *dirp = 0;
4354 ; return 0; }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4357   rm -rf conftest*
4358   eval "ac_cv_header_dirent_$ac_safe=yes"
4359 else
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -rf conftest*
4363   eval "ac_cv_header_dirent_$ac_safe=no"
4364 fi
4365 rm -f conftest*
4366 fi
4367 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4368   echo "$ac_t""yes" 1>&6
4369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4370   cat >> confdefs.h <<EOF
4371 #define $ac_tr_hdr 1
4372 EOF
4373  ac_header_dirent=$ac_hdr; break
4374 else
4375   echo "$ac_t""no" 1>&6
4376 fi
4377 done
4378 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4379 if test $ac_header_dirent = dirent.h; then
4380 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4381 echo "configure:4382: checking for opendir in -ldir" >&5
4382 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4384   echo $ac_n "(cached) $ac_c" 1>&6
4385 else
4386   ac_save_LIBS="$LIBS"
4387 LIBS="-ldir  $LIBS"
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 /* Override any gcc2 internal prototype to avoid an error.  */
4392 /* We use char because int might match the return type of a gcc2
4393     builtin and then its argument prototype would still apply.  */
4394 char opendir();
4395
4396 int main() {
4397 opendir()
4398 ; return 0; }
4399 EOF
4400 if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4401   rm -rf conftest*
4402   eval "ac_cv_lib_$ac_lib_var=yes"
4403 else
4404   echo "configure: failed program was:" >&5
4405   cat conftest.$ac_ext >&5
4406   rm -rf conftest*
4407   eval "ac_cv_lib_$ac_lib_var=no"
4408 fi
4409 rm -f conftest*
4410 LIBS="$ac_save_LIBS"
4411
4412 fi
4413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4414   echo "$ac_t""yes" 1>&6
4415   LIBS="$LIBS -ldir"
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419
4420 else
4421 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4422 echo "configure:4423: checking for opendir in -lx" >&5
4423 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4424 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   ac_save_LIBS="$LIBS"
4428 LIBS="-lx  $LIBS"
4429 cat > conftest.$ac_ext <<EOF
4430 #line 4431 "configure"
4431 #include "confdefs.h"
4432 /* Override any gcc2 internal prototype to avoid an error.  */
4433 /* We use char because int might match the return type of a gcc2
4434     builtin and then its argument prototype would still apply.  */
4435 char opendir();
4436
4437 int main() {
4438 opendir()
4439 ; return 0; }
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4442   rm -rf conftest*
4443   eval "ac_cv_lib_$ac_lib_var=yes"
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447   rm -rf conftest*
4448   eval "ac_cv_lib_$ac_lib_var=no"
4449 fi
4450 rm -f conftest*
4451 LIBS="$ac_save_LIBS"
4452
4453 fi
4454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4455   echo "$ac_t""yes" 1>&6
4456   LIBS="$LIBS -lx"
4457 else
4458   echo "$ac_t""no" 1>&6
4459 fi
4460
4461 fi
4462
4463
4464
4465 case "${host}" in
4466 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
4467   cat >> confdefs.h <<\EOF
4468 #define USE_BINARY_FOPEN 1
4469 EOF
4470  ;;
4471 esac
4472
4473 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4474 echo "configure:4475: checking whether strstr must be declared" >&5
4475 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481
4482 #include <stdio.h>
4483 #ifdef HAVE_STRING_H
4484 #include <string.h>
4485 #else
4486 #ifdef HAVE_STRINGS_H
4487 #include <strings.h>
4488 #endif
4489 #endif
4490 #ifdef HAVE_STDLIB_H
4491 #include <stdlib.h>
4492 #endif
4493 #ifdef HAVE_UNISTD_H
4494 #include <unistd.h>
4495 #endif
4496 int main() {
4497 char *(*pfn) = (char *(*)) strstr
4498 ; return 0; }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4501   rm -rf conftest*
4502   bfd_cv_decl_needed_strstr=no
4503 else
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   bfd_cv_decl_needed_strstr=yes
4508 fi
4509 rm -f conftest*
4510 fi
4511
4512 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4513 if test $bfd_cv_decl_needed_strstr = yes; then
4514   cat >> confdefs.h <<\EOF
4515 #define NEED_DECLARATION_STRSTR 1
4516 EOF
4517
4518 fi
4519
4520 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4521 echo "configure:4522: checking whether free must be declared" >&5
4522 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528
4529 #include <stdio.h>
4530 #ifdef HAVE_STRING_H
4531 #include <string.h>
4532 #else
4533 #ifdef HAVE_STRINGS_H
4534 #include <strings.h>
4535 #endif
4536 #endif
4537 #ifdef HAVE_STDLIB_H
4538 #include <stdlib.h>
4539 #endif
4540 #ifdef HAVE_UNISTD_H
4541 #include <unistd.h>
4542 #endif
4543 int main() {
4544 char *(*pfn) = (char *(*)) free
4545 ; return 0; }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4548   rm -rf conftest*
4549   bfd_cv_decl_needed_free=no
4550 else
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   bfd_cv_decl_needed_free=yes
4555 fi
4556 rm -f conftest*
4557 fi
4558
4559 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4560 if test $bfd_cv_decl_needed_free = yes; then
4561   cat >> confdefs.h <<\EOF
4562 #define NEED_DECLARATION_FREE 1
4563 EOF
4564
4565 fi
4566
4567 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
4568 echo "configure:4569: checking whether sbrk must be declared" >&5
4569 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575
4576 #include <stdio.h>
4577 #ifdef HAVE_STRING_H
4578 #include <string.h>
4579 #else
4580 #ifdef HAVE_STRINGS_H
4581 #include <strings.h>
4582 #endif
4583 #endif
4584 #ifdef HAVE_STDLIB_H
4585 #include <stdlib.h>
4586 #endif
4587 #ifdef HAVE_UNISTD_H
4588 #include <unistd.h>
4589 #endif
4590 int main() {
4591 char *(*pfn) = (char *(*)) sbrk
4592 ; return 0; }
4593 EOF
4594 if { (eval echo configure:4595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4595   rm -rf conftest*
4596   bfd_cv_decl_needed_sbrk=no
4597 else
4598   echo "configure: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   rm -rf conftest*
4601   bfd_cv_decl_needed_sbrk=yes
4602 fi
4603 rm -f conftest*
4604 fi
4605
4606 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4607 if test $bfd_cv_decl_needed_sbrk = yes; then
4608   cat >> confdefs.h <<\EOF
4609 #define NEED_DECLARATION_SBRK 1
4610 EOF
4611
4612 fi
4613
4614 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4615 echo "configure:4616: checking whether getenv must be declared" >&5
4616 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4617   echo $ac_n "(cached) $ac_c" 1>&6
4618 else
4619   cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622
4623 #include <stdio.h>
4624 #ifdef HAVE_STRING_H
4625 #include <string.h>
4626 #else
4627 #ifdef HAVE_STRINGS_H
4628 #include <strings.h>
4629 #endif
4630 #endif
4631 #ifdef HAVE_STDLIB_H
4632 #include <stdlib.h>
4633 #endif
4634 #ifdef HAVE_UNISTD_H
4635 #include <unistd.h>
4636 #endif
4637 int main() {
4638 char *(*pfn) = (char *(*)) getenv
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4642   rm -rf conftest*
4643   bfd_cv_decl_needed_getenv=no
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   bfd_cv_decl_needed_getenv=yes
4649 fi
4650 rm -f conftest*
4651 fi
4652
4653 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4654 if test $bfd_cv_decl_needed_getenv = yes; then
4655   cat >> confdefs.h <<\EOF
4656 #define NEED_DECLARATION_GETENV 1
4657 EOF
4658
4659 fi
4660
4661 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
4662 echo "configure:4663: checking whether environ must be declared" >&5
4663 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669
4670 #include <stdio.h>
4671 #ifdef HAVE_STRING_H
4672 #include <string.h>
4673 #else
4674 #ifdef HAVE_STRINGS_H
4675 #include <strings.h>
4676 #endif
4677 #endif
4678 #ifdef HAVE_STDLIB_H
4679 #include <stdlib.h>
4680 #endif
4681 #ifdef HAVE_UNISTD_H
4682 #include <unistd.h>
4683 #endif
4684 int main() {
4685 char *(*pfn) = (char *(*)) environ
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4689   rm -rf conftest*
4690   bfd_cv_decl_needed_environ=no
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   bfd_cv_decl_needed_environ=yes
4696 fi
4697 rm -f conftest*
4698 fi
4699
4700 echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
4701 if test $bfd_cv_decl_needed_environ = yes; then
4702   cat >> confdefs.h <<\EOF
4703 #define NEED_DECLARATION_ENVIRON 1
4704 EOF
4705
4706 fi
4707
4708
4709 # When converting linker scripts into strings for use in emulation
4710 # files, use astring.sed if the compiler supports ANSI string
4711 # concatenation, or ostring.sed otherwise.  This is to support the
4712 # broken Microsoft MSVC compiler, which limits the length of string
4713 # constants, while still supporting pre-ANSI compilers which do not
4714 # support string concatenation.
4715 if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
4716   echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718   cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721
4722 int main() {
4723 char *a = "a" "a";
4724 ; return 0; }
4725 EOF
4726 if { (eval echo configure:4727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4727   rm -rf conftest*
4728   ld_cv_string_concatenation=true
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   ld_cv_string_concatenation=false
4734 fi
4735 rm -f conftest*
4736 fi
4737
4738 if test "$ld_cv_string_concatenation" = "true"; then
4739   STRINGIFY=astring.sed
4740 else
4741   STRINGIFY=ostring.sed
4742 fi
4743
4744
4745 # target-specific stuff:
4746
4747 all_targets=
4748 EMUL=
4749 all_emuls=
4750 all_emul_extras=
4751 all_libpath=
4752
4753 rm -f tdirs
4754
4755 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
4756 do
4757   if test "$targ_alias" = "all"; then
4758     all_targets=true
4759   else
4760     # Canonicalize the secondary target names.
4761     result=`$ac_config_sub $targ_alias 2>/dev/null`
4762     if test -n "$result"; then
4763         targ=$result
4764     else
4765         targ=$targ_alias
4766     fi
4767
4768     . ${srcdir}/configure.tgt
4769
4770     if test "$targ" = "$target"; then
4771       EMUL=$targ_emul
4772     fi
4773
4774     for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
4775         case " $all_emuls " in
4776         *" e${i}.o "*) ;;
4777         *)
4778           all_emuls="$all_emuls e${i}.o"
4779           eval result=\$tdir_$i
4780           test -z "$result" && result=$targ_alias
4781           echo tdir_$i=$result >> tdirs
4782           ;;
4783         esac
4784     done
4785
4786     for i in $targ_emul $targ_extra_libpath; do
4787         case " $all_libpath " in
4788         *" ${i} "*) ;;
4789         *)
4790           if test -z "$all_libpath"; then
4791             all_libpath=${i}
4792           else
4793             all_libpath="$all_libpath ${i}"
4794           fi
4795           ;;
4796         esac
4797     done
4798
4799     for i in $targ_extra_ofiles; do
4800         case " $all_emul_extras " in
4801         *" ${i} "*) ;;
4802         *)
4803           all_emul_extras="$all_emul_extras ${i}"
4804           ;;
4805         esac
4806     done
4807   fi
4808 done
4809
4810
4811
4812 TDIRS=tdirs
4813
4814
4815 if test x${all_targets} = xtrue; then
4816   if test x${want64} = xtrue; then
4817     EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
4818   else
4819     EMULATION_OFILES='$(ALL_EMULATIONS)'
4820   fi
4821   EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
4822 else
4823   EMULATION_OFILES=$all_emuls
4824   EMUL_EXTRA_OFILES=$all_emul_extras
4825 fi
4826
4827
4828
4829 EMULATION_LIBPATH=$all_libpath
4830
4831
4832 if test x${enable_static} = xno; then
4833   TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
4834 else
4835   TESTBFDLIB="../bfd/.libs/libbfd.a"
4836 fi
4837
4838
4839 target_vendor=${target_vendor=$host_vendor}
4840 case "$target_vendor" in
4841   hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
4842   *)  EXTRA_SHLIB_EXTENSION= ;;
4843 esac
4844 if test x${EXTRA_SHLIB_EXTENSION} != x ; then
4845   cat >> confdefs.h <<EOF
4846 #define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
4847 EOF
4848
4849 fi
4850
4851 trap '' 1 2 15
4852 cat > confcache <<\EOF
4853 # This file is a shell script that caches the results of configure
4854 # tests run on this system so they can be shared between configure
4855 # scripts and configure runs.  It is not useful on other systems.
4856 # If it contains results you don't want to keep, you may remove or edit it.
4857 #
4858 # By default, configure uses ./config.cache as the cache file,
4859 # creating it if it does not exist already.  You can give configure
4860 # the --cache-file=FILE option to use a different cache file; that is
4861 # what configure does when it calls configure scripts in
4862 # subdirectories, so they share the cache.
4863 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4864 # config.status only pays attention to the cache file if you give it the
4865 # --recheck option to rerun configure.
4866 #
4867 EOF
4868 # The following way of writing the cache mishandles newlines in values,
4869 # but we know of no workaround that is simple, portable, and efficient.
4870 # So, don't put newlines in cache variables' values.
4871 # Ultrix sh set writes to stderr and can't be redirected directly,
4872 # and sets the high bit in the cache file unless we assign to the vars.
4873 (set) 2>&1 |
4874   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4875   *ac_space=\ *)
4876     # `set' does not quote correctly, so add quotes (double-quote substitution
4877     # turns \\\\ into \\, and sed turns \\ into \).
4878     sed -n \
4879       -e "s/'/'\\\\''/g" \
4880       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4881     ;;
4882   *)
4883     # `set' quotes correctly as required by POSIX, so do not add quotes.
4884     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4885     ;;
4886   esac >> confcache
4887 if cmp -s $cache_file confcache; then
4888   :
4889 else
4890   if test -w $cache_file; then
4891     echo "updating cache $cache_file"
4892     cat confcache > $cache_file
4893   else
4894     echo "not updating unwritable cache $cache_file"
4895   fi
4896 fi
4897 rm -f confcache
4898
4899 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4900
4901 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4902 # Let make expand exec_prefix.
4903 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4904
4905 # Any assignment to VPATH causes Sun make to only execute
4906 # the first set of double-colon rules, so remove it if not needed.
4907 # If there is a colon in the path, we need to keep it.
4908 if test "x$srcdir" = x.; then
4909   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4910 fi
4911
4912 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4913
4914 DEFS=-DHAVE_CONFIG_H
4915
4916 # Without the "./", some shells look in PATH for config.status.
4917 : ${CONFIG_STATUS=./config.status}
4918
4919 echo creating $CONFIG_STATUS
4920 rm -f $CONFIG_STATUS
4921 cat > $CONFIG_STATUS <<EOF
4922 #! /bin/sh
4923 # Generated automatically by configure.
4924 # Run this file to recreate the current configuration.
4925 # This directory was configured as follows,
4926 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4927 #
4928 # $0 $ac_configure_args
4929 #
4930 # Compiler output produced by configure, useful for debugging
4931 # configure, is in ./config.log if it exists.
4932
4933 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4934 for ac_option
4935 do
4936   case "\$ac_option" in
4937   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4938     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4939     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4940   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4941     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4942     exit 0 ;;
4943   -help | --help | --hel | --he | --h)
4944     echo "\$ac_cs_usage"; exit 0 ;;
4945   *) echo "\$ac_cs_usage"; exit 1 ;;
4946   esac
4947 done
4948
4949 ac_given_srcdir=$srcdir
4950 ac_given_INSTALL="$INSTALL"
4951
4952 trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4953 EOF
4954 cat >> $CONFIG_STATUS <<EOF
4955
4956 # Protect against being on the right side of a sed subst in config.status.
4957 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4958  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4959 $ac_vpsub
4960 $extrasub
4961 s%@SHELL@%$SHELL%g
4962 s%@CFLAGS@%$CFLAGS%g
4963 s%@CPPFLAGS@%$CPPFLAGS%g
4964 s%@CXXFLAGS@%$CXXFLAGS%g
4965 s%@FFLAGS@%$FFLAGS%g
4966 s%@DEFS@%$DEFS%g
4967 s%@LDFLAGS@%$LDFLAGS%g
4968 s%@LIBS@%$LIBS%g
4969 s%@exec_prefix@%$exec_prefix%g
4970 s%@prefix@%$prefix%g
4971 s%@program_transform_name@%$program_transform_name%g
4972 s%@bindir@%$bindir%g
4973 s%@sbindir@%$sbindir%g
4974 s%@libexecdir@%$libexecdir%g
4975 s%@datadir@%$datadir%g
4976 s%@sysconfdir@%$sysconfdir%g
4977 s%@sharedstatedir@%$sharedstatedir%g
4978 s%@localstatedir@%$localstatedir%g
4979 s%@libdir@%$libdir%g
4980 s%@includedir@%$includedir%g
4981 s%@oldincludedir@%$oldincludedir%g
4982 s%@infodir@%$infodir%g
4983 s%@mandir@%$mandir%g
4984 s%@host@%$host%g
4985 s%@host_alias@%$host_alias%g
4986 s%@host_cpu@%$host_cpu%g
4987 s%@host_vendor@%$host_vendor%g
4988 s%@host_os@%$host_os%g
4989 s%@target@%$target%g
4990 s%@target_alias@%$target_alias%g
4991 s%@target_cpu@%$target_cpu%g
4992 s%@target_vendor@%$target_vendor%g
4993 s%@target_os@%$target_os%g
4994 s%@build@%$build%g
4995 s%@build_alias@%$build_alias%g
4996 s%@build_cpu@%$build_cpu%g
4997 s%@build_vendor@%$build_vendor%g
4998 s%@build_os@%$build_os%g
4999 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5000 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5001 s%@INSTALL_DATA@%$INSTALL_DATA%g
5002 s%@PACKAGE@%$PACKAGE%g
5003 s%@VERSION@%$VERSION%g
5004 s%@ACLOCAL@%$ACLOCAL%g
5005 s%@AUTOCONF@%$AUTOCONF%g
5006 s%@AUTOMAKE@%$AUTOMAKE%g
5007 s%@AUTOHEADER@%$AUTOHEADER%g
5008 s%@MAKEINFO@%$MAKEINFO%g
5009 s%@SET_MAKE@%$SET_MAKE%g
5010 s%@RANLIB@%$RANLIB%g
5011 s%@CC@%$CC%g
5012 s%@LD@%$LD%g
5013 s%@NM@%$NM%g
5014 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
5015 s%@LN_S@%$LN_S%g
5016 s%@DLLTOOL@%$DLLTOOL%g
5017 s%@AS@%$AS%g
5018 s%@LIBTOOL@%$LIBTOOL%g
5019 s%@CPP@%$CPP%g
5020 s%@ALLOCA@%$ALLOCA%g
5021 s%@USE_NLS@%$USE_NLS%g
5022 s%@MSGFMT@%$MSGFMT%g
5023 s%@GMSGFMT@%$GMSGFMT%g
5024 s%@XGETTEXT@%$XGETTEXT%g
5025 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5026 s%@CATALOGS@%$CATALOGS%g
5027 s%@CATOBJEXT@%$CATOBJEXT%g
5028 s%@DATADIRNAME@%$DATADIRNAME%g
5029 s%@GMOFILES@%$GMOFILES%g
5030 s%@INSTOBJEXT@%$INSTOBJEXT%g
5031 s%@INTLDEPS@%$INTLDEPS%g
5032 s%@INTLLIBS@%$INTLLIBS%g
5033 s%@INTLOBJS@%$INTLOBJS%g
5034 s%@POFILES@%$POFILES%g
5035 s%@POSUB@%$POSUB%g
5036 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5037 s%@GT_NO@%$GT_NO%g
5038 s%@GT_YES@%$GT_YES%g
5039 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5040 s%@l@%$l%g
5041 s%@EXEEXT@%$EXEEXT%g
5042 s%@YACC@%$YACC%g
5043 s%@LEX@%$LEX%g
5044 s%@LEXLIB@%$LEXLIB%g
5045 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5046 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5047 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5048 s%@MAINT@%$MAINT%g
5049 s%@HDEFINES@%$HDEFINES%g
5050 s%@HOSTING_CRT0@%$HOSTING_CRT0%g
5051 s%@HOSTING_LIBS@%$HOSTING_LIBS%g
5052 s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
5053 s%@STRINGIFY@%$STRINGIFY%g
5054 s%@EMUL@%$EMUL%g
5055 /@TDIRS@/r $TDIRS
5056 s%@TDIRS@%%g
5057 s%@EMULATION_OFILES@%$EMULATION_OFILES%g
5058 s%@EMUL_EXTRA_OFILES@%$EMUL_EXTRA_OFILES%g
5059 s%@EMULATION_LIBPATH@%$EMULATION_LIBPATH%g
5060 s%@TESTBFDLIB@%$TESTBFDLIB%g
5061
5062 CEOF
5063 EOF
5064
5065 cat >> $CONFIG_STATUS <<\EOF
5066
5067 # Split the substitutions into bite-sized pieces for seds with
5068 # small command number limits, like on Digital OSF/1 and HP-UX.
5069 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5070 ac_file=1 # Number of current file.
5071 ac_beg=1 # First line for current file.
5072 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5073 ac_more_lines=:
5074 ac_sed_cmds=""
5075 while $ac_more_lines; do
5076   if test $ac_beg -gt 1; then
5077     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5078   else
5079     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5080   fi
5081   if test ! -s conftest.s$ac_file; then
5082     ac_more_lines=false
5083     rm -f conftest.s$ac_file
5084   else
5085     if test -z "$ac_sed_cmds"; then
5086       ac_sed_cmds="sed -f conftest.s$ac_file"
5087     else
5088       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5089     fi
5090     ac_file=`expr $ac_file + 1`
5091     ac_beg=$ac_end
5092     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5093   fi
5094 done
5095 if test -z "$ac_sed_cmds"; then
5096   ac_sed_cmds=cat
5097 fi
5098 EOF
5099
5100 cat >> $CONFIG_STATUS <<EOF
5101
5102 CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5103 EOF
5104 cat >> $CONFIG_STATUS <<\EOF
5105 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5106   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5107   case "$ac_file" in
5108   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5109        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5110   *) ac_file_in="${ac_file}.in" ;;
5111   esac
5112
5113   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5114
5115   # Remove last slash and all that follows it.  Not all systems have dirname.
5116   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5117   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5118     # The file is in a subdirectory.
5119     test ! -d "$ac_dir" && mkdir "$ac_dir"
5120     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5121     # A "../" for each directory in $ac_dir_suffix.
5122     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5123   else
5124     ac_dir_suffix= ac_dots=
5125   fi
5126
5127   case "$ac_given_srcdir" in
5128   .)  srcdir=.
5129       if test -z "$ac_dots"; then top_srcdir=.
5130       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5131   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5132   *) # Relative path.
5133     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5134     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5135   esac
5136
5137   case "$ac_given_INSTALL" in
5138   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5139   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5140   esac
5141
5142   echo creating "$ac_file"
5143   rm -f "$ac_file"
5144   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5145   case "$ac_file" in
5146   *Makefile*) ac_comsub="1i\\
5147 # $configure_input" ;;
5148   *) ac_comsub= ;;
5149   esac
5150
5151   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5152   sed -e "$ac_comsub
5153 s%@configure_input@%$configure_input%g
5154 s%@srcdir@%$srcdir%g
5155 s%@top_srcdir@%$top_srcdir%g
5156 s%@INSTALL@%$INSTALL%g
5157 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5158 fi; done
5159 rm -f conftest.s*
5160
5161 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5162 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5163 #
5164 # ac_d sets the value in "#define NAME VALUE" lines.
5165 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5166 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5167 ac_dC='\3'
5168 ac_dD='%g'
5169 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5170 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5171 ac_uB='\([      ]\)%\1#\2define\3'
5172 ac_uC=' '
5173 ac_uD='\4%g'
5174 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5175 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5176 ac_eB='$%\1#\2define\3'
5177 ac_eC=' '
5178 ac_eD='%g'
5179
5180 if test "${CONFIG_HEADERS+set}" != set; then
5181 EOF
5182 cat >> $CONFIG_STATUS <<EOF
5183   CONFIG_HEADERS="config.h:config.in"
5184 EOF
5185 cat >> $CONFIG_STATUS <<\EOF
5186 fi
5187 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5188   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5189   case "$ac_file" in
5190   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5191        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5192   *) ac_file_in="${ac_file}.in" ;;
5193   esac
5194
5195   echo creating $ac_file
5196
5197   rm -f conftest.frag conftest.in conftest.out
5198   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5199   cat $ac_file_inputs > conftest.in
5200
5201 EOF
5202
5203 # Transform confdefs.h into a sed script conftest.vals that substitutes
5204 # the proper values into config.h.in to produce config.h.  And first:
5205 # Protect against being on the right side of a sed subst in config.status.
5206 # Protect against being in an unquoted here document in config.status.
5207 rm -f conftest.vals
5208 cat > conftest.hdr <<\EOF
5209 s/[\\&%]/\\&/g
5210 s%[\\$`]%\\&%g
5211 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5212 s%ac_d%ac_u%gp
5213 s%ac_u%ac_e%gp
5214 EOF
5215 sed -n -f conftest.hdr confdefs.h > conftest.vals
5216 rm -f conftest.hdr
5217
5218 # This sed command replaces #undef with comments.  This is necessary, for
5219 # example, in the case of _POSIX_SOURCE, which is predefined and required
5220 # on some systems where configure will not decide to define it.
5221 cat >> conftest.vals <<\EOF
5222 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5223 EOF
5224
5225 # Break up conftest.vals because some shells have a limit on
5226 # the size of here documents, and old seds have small limits too.
5227
5228 rm -f conftest.tail
5229 while :
5230 do
5231   ac_lines=`grep -c . conftest.vals`
5232   # grep -c gives empty output for an empty file on some AIX systems.
5233   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5234   # Write a limited-size here document to conftest.frag.
5235   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5236   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5237   echo 'CEOF
5238   sed -f conftest.frag conftest.in > conftest.out
5239   rm -f conftest.in
5240   mv conftest.out conftest.in
5241 ' >> $CONFIG_STATUS
5242   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5243   rm -f conftest.vals
5244   mv conftest.tail conftest.vals
5245 done
5246 rm -f conftest.vals
5247
5248 cat >> $CONFIG_STATUS <<\EOF
5249   rm -f conftest.frag conftest.h
5250   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5251   cat conftest.in >> conftest.h
5252   rm -f conftest.in
5253   if cmp -s $ac_file conftest.h 2>/dev/null; then
5254     echo "$ac_file is unchanged"
5255     rm -f conftest.h
5256   else
5257     # Remove last slash and all that follows it.  Not all systems have dirname.
5258       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5259       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5260       # The file is in a subdirectory.
5261       test ! -d "$ac_dir" && mkdir "$ac_dir"
5262     fi
5263     rm -f $ac_file
5264     mv conftest.h $ac_file
5265   fi
5266 fi; done
5267
5268 EOF
5269 cat >> $CONFIG_STATUS <<EOF
5270
5271
5272 EOF
5273 cat >> $CONFIG_STATUS <<\EOF
5274 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5275 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5276 exit 0
5277 EOF
5278 chmod +x $CONFIG_STATUS
5279 rm -fr confdefs* $ac_clean_files
5280 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5281