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