rebuild with current tools
[deliverable/binutils-gdb.git] / binutils / 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
a74801ba 23 --disable-libtool-lock avoid locking (might break parallel builds)"
252b5132
RH
24ac_help="$ac_help
25 --enable-targets alternative target configurations"
26ac_help="$ac_help
27 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
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=
f353eb8a 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
f353eb8a 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
f353eb8a
ILT
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=ar.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.
f353eb8a
ILT
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
f353eb8a
ILT
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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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=binutils
816
2844ed43 817VERSION=2.9.5
252b5132
RH
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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 1126#line 1127 "configure"
252b5132
RH
1127#include "confdefs.h"
1128
1129main(){return(0);}
1130EOF
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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
f353eb8a 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.
a74801ba 1237 [\\/]* | [A-Za-z]:[\\/]*)
252b5132
RH
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
f353eb8a 1257echo "configure:1258: checking for GNU ld" >&5
252b5132
RH
1258else
1259 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
f353eb8a 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
a74801ba 1266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1267 for ac_dir in $PATH; do
1268 test -z "$ac_dir" && ac_dir=.
a74801ba 1269 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
252b5132
RH
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; }
252b5132 1294echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
a74801ba 1295echo "configure:1296: checking if the linker ($LD) is GNU ld" >&5
252b5132
RH
1296if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1297 echo $ac_n "(cached) $ac_c" 1>&6
1298else
1299 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1300if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1301 ac_cv_prog_gnu_ld=yes
1302else
1303 ac_cv_prog_gnu_ld=no
1304fi
1305fi
1306
1307echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1308
1309
1310echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
a74801ba 1311echo "configure:1312: checking for BSD-compatible nm" >&5
252b5132
RH
1312if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1314else
1315 if test -n "$NM"; then
1316 # Let the user override the test.
1317 ac_cv_path_NM="$NM"
1318else
a74801ba 1319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1320 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1321 test -z "$ac_dir" && ac_dir=.
a74801ba 1322 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
252b5132
RH
1323 # Check to see if the nm accepts a BSD-compat flag.
1324 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1325 # nm: unknown option "B" ignored
1326 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1327 ac_cv_path_NM="$ac_dir/nm -B"
1328 break
1329 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1330 ac_cv_path_NM="$ac_dir/nm -p"
1331 break
1332 else
1333 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1334 continue # so that we can try to find one that supports BSD flags
1335 fi
1336 fi
1337 done
1338 IFS="$ac_save_ifs"
1339 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1340fi
1341fi
1342
1343NM="$ac_cv_path_NM"
1344echo "$ac_t""$NM" 1>&6
1345
252b5132 1346echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
a74801ba 1347echo "configure:1348: checking whether ln -s works" >&5
252b5132
RH
1348if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350else
1351 rm -f conftestdata
1352if ln -s X conftestdata 2>/dev/null
1353then
1354 rm -f conftestdata
1355 ac_cv_prog_LN_S="ln -s"
1356else
1357 ac_cv_prog_LN_S=ln
1358fi
1359fi
1360LN_S="$ac_cv_prog_LN_S"
1361if test "$ac_cv_prog_LN_S" = "ln -s"; then
1362 echo "$ac_t""yes" 1>&6
1363else
1364 echo "$ac_t""no" 1>&6
1365fi
1366
252b5132 1367
a74801ba
ILT
1368case "$target" in
1369NONE) lt_target="$host" ;;
1370*) lt_target="$target" ;;
1371esac
252b5132
RH
1372
1373# Check for any special flags to pass to ltconfig.
1374libtool_flags="--cache-file=$cache_file"
1375test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1376test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1377test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
252b5132
RH
1378test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1379test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1380
a74801ba
ILT
1381
1382# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1383if test "${enable_libtool_lock+set}" = set; then
1384 enableval="$enable_libtool_lock"
1385 :
1386fi
1387
1388test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1389test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1390
252b5132
RH
1391# Some flags need to be propagated to the compiler or linker for good
1392# libtool support.
a74801ba 1393case "$lt_target" in
252b5132
RH
1394*-*-irix6*)
1395 # Find out which ABI we are using.
a74801ba
ILT
1396 echo '#line 1397 "configure"' > conftest.$ac_ext
1397 if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
1398 case "`/usr/bin/file conftest.o`" in
1399 *32-bit*)
1400 LD="${LD-ld} -32"
1401 ;;
1402 *N32*)
1403 LD="${LD-ld} -n32"
1404 ;;
1405 *64-bit*)
1406 LD="${LD-ld} -64"
1407 ;;
1408 esac
1409 fi
1410 rm -rf conftest*
1411 ;;
1412
1413*-*-sco3.2v5*)
1414 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1415 SAVE_CFLAGS="$CFLAGS"
1416 CFLAGS="$CFLAGS -belf"
1417 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
a74801ba 1418echo "configure:1419: checking whether the C compiler needs -belf" >&5
252b5132
RH
1419if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1420 echo $ac_n "(cached) $ac_c" 1>&6
1421else
1422 cat > conftest.$ac_ext <<EOF
a74801ba 1423#line 1424 "configure"
252b5132
RH
1424#include "confdefs.h"
1425
1426int main() {
1427
1428; return 0; }
1429EOF
a74801ba 1430if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1431 rm -rf conftest*
1432 lt_cv_cc_needs_belf=yes
1433else
1434 echo "configure: failed program was:" >&5
1435 cat conftest.$ac_ext >&5
1436 rm -rf conftest*
1437 lt_cv_cc_needs_belf=no
1438fi
1439rm -f conftest*
1440fi
1441
1442echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1443 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1444 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1445 CFLAGS="$SAVE_CFLAGS"
1446 fi
1447 ;;
1448
252b5132
RH
1449
1450esac
1451
252b5132
RH
1452
1453# Save cache, so that ltconfig can load it
1454cat > confcache <<\EOF
1455# This file is a shell script that caches the results of configure
1456# tests run on this system so they can be shared between configure
1457# scripts and configure runs. It is not useful on other systems.
1458# If it contains results you don't want to keep, you may remove or edit it.
1459#
1460# By default, configure uses ./config.cache as the cache file,
1461# creating it if it does not exist already. You can give configure
1462# the --cache-file=FILE option to use a different cache file; that is
1463# what configure does when it calls configure scripts in
1464# subdirectories, so they share the cache.
1465# Giving --cache-file=/dev/null disables caching, for debugging configure.
1466# config.status only pays attention to the cache file if you give it the
1467# --recheck option to rerun configure.
1468#
1469EOF
1470# The following way of writing the cache mishandles newlines in values,
1471# but we know of no workaround that is simple, portable, and efficient.
1472# So, don't put newlines in cache variables' values.
1473# Ultrix sh set writes to stderr and can't be redirected directly,
1474# and sets the high bit in the cache file unless we assign to the vars.
1475(set) 2>&1 |
1476 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1477 *ac_space=\ *)
1478 # `set' does not quote correctly, so add quotes (double-quote substitution
1479 # turns \\\\ into \\, and sed turns \\ into \).
1480 sed -n \
1481 -e "s/'/'\\\\''/g" \
1482 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1483 ;;
1484 *)
1485 # `set' quotes correctly as required by POSIX, so do not add quotes.
1486 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1487 ;;
1488 esac >> confcache
1489if cmp -s $cache_file confcache; then
1490 :
1491else
1492 if test -w $cache_file; then
1493 echo "updating cache $cache_file"
1494 cat confcache > $cache_file
1495 else
1496 echo "not updating unwritable cache $cache_file"
1497 fi
1498fi
1499rm -f confcache
1500
1501
1502# Actually configure libtool. ac_aux_dir is where install-sh is found.
1503CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
a74801ba
ILT
1504LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1505LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1506DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
252b5132 1507${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
a74801ba 1508$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
252b5132
RH
1509|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1510
1511# Reload cache, that may have been modified by ltconfig
1512if test -r "$cache_file"; then
1513 echo "loading cache $cache_file"
1514 . $cache_file
1515else
1516 echo "creating cache $cache_file"
1517 > $cache_file
1518fi
1519
1520
1521# This can be used to rebuild libtool when needed
1522LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1523
1524# Always use our own libtool.
1525LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1526
1527# Redirect the config.log output again, so that the ltconfig log is not
1528# clobbered by the next message.
1529exec 5>>./config.log
1530
1531
1532# Check whether --enable-targets or --disable-targets was given.
1533if test "${enable_targets+set}" = set; then
1534 enableval="$enable_targets"
1535 case "${enableval}" in
1536 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1537 ;;
1538 no) enable_targets= ;;
1539 *) enable_targets=$enableval ;;
1540esac
1541fi
1542# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1543if test "${enable_commonbfdlib+set}" = set; then
1544 enableval="$enable_commonbfdlib"
1545 case "${enableval}" in
1546 yes) commonbfdlib=true ;;
1547 no) commonbfdlib=false ;;
1548 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1549esac
1550fi
1551
1552
1553
1554
1555
1556if test -z "$target" ; then
1557 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1558fi
1559if test -z "$host" ; then
1560 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1561fi
1562
1563# Extract the first word of "gcc", so it can be a program name with args.
1564set dummy gcc; ac_word=$2
1565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1566echo "configure:1567: checking for $ac_word" >&5
252b5132
RH
1567if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
1569else
1570 if test -n "$CC"; then
1571 ac_cv_prog_CC="$CC" # Let the user override the test.
1572else
1573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576 test -z "$ac_dir" && ac_dir=.
1577 if test -f $ac_dir/$ac_word; then
1578 ac_cv_prog_CC="gcc"
1579 break
1580 fi
1581 done
1582 IFS="$ac_save_ifs"
1583fi
1584fi
1585CC="$ac_cv_prog_CC"
1586if test -n "$CC"; then
1587 echo "$ac_t""$CC" 1>&6
1588else
1589 echo "$ac_t""no" 1>&6
1590fi
1591
1592if test -z "$CC"; then
1593 # Extract the first word of "cc", so it can be a program name with args.
1594set dummy cc; ac_word=$2
1595echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1596echo "configure:1597: checking for $ac_word" >&5
252b5132
RH
1597if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1598 echo $ac_n "(cached) $ac_c" 1>&6
1599else
1600 if test -n "$CC"; then
1601 ac_cv_prog_CC="$CC" # Let the user override the test.
1602else
1603 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1604 ac_prog_rejected=no
1605 ac_dummy="$PATH"
1606 for ac_dir in $ac_dummy; do
1607 test -z "$ac_dir" && ac_dir=.
1608 if test -f $ac_dir/$ac_word; then
1609 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1610 ac_prog_rejected=yes
1611 continue
1612 fi
1613 ac_cv_prog_CC="cc"
1614 break
1615 fi
1616 done
1617 IFS="$ac_save_ifs"
1618if test $ac_prog_rejected = yes; then
1619 # We found a bogon in the path, so make sure we never use it.
1620 set dummy $ac_cv_prog_CC
1621 shift
1622 if test $# -gt 0; then
1623 # We chose a different compiler from the bogus one.
1624 # However, it has the same basename, so the bogon will be chosen
1625 # first if we set CC to just the basename; use the full file name.
1626 shift
1627 set dummy "$ac_dir/$ac_word" "$@"
1628 shift
1629 ac_cv_prog_CC="$@"
1630 fi
1631fi
1632fi
1633fi
1634CC="$ac_cv_prog_CC"
1635if test -n "$CC"; then
1636 echo "$ac_t""$CC" 1>&6
1637else
1638 echo "$ac_t""no" 1>&6
1639fi
1640
1641 if test -z "$CC"; then
1642 case "`uname -s`" in
1643 *win32* | *WIN32*)
1644 # Extract the first word of "cl", so it can be a program name with args.
1645set dummy cl; ac_word=$2
1646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1647echo "configure:1648: checking for $ac_word" >&5
252b5132
RH
1648if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1649 echo $ac_n "(cached) $ac_c" 1>&6
1650else
1651 if test -n "$CC"; then
1652 ac_cv_prog_CC="$CC" # Let the user override the test.
1653else
1654 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1655 ac_dummy="$PATH"
1656 for ac_dir in $ac_dummy; do
1657 test -z "$ac_dir" && ac_dir=.
1658 if test -f $ac_dir/$ac_word; then
1659 ac_cv_prog_CC="cl"
1660 break
1661 fi
1662 done
1663 IFS="$ac_save_ifs"
1664fi
1665fi
1666CC="$ac_cv_prog_CC"
1667if test -n "$CC"; then
1668 echo "$ac_t""$CC" 1>&6
1669else
1670 echo "$ac_t""no" 1>&6
1671fi
1672 ;;
1673 esac
1674 fi
1675 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1676fi
1677
1678echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
a74801ba 1679echo "configure:1680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
1680
1681ac_ext=c
1682# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1683ac_cpp='$CPP $CPPFLAGS'
1684ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1685ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1686cross_compiling=$ac_cv_prog_cc_cross
1687
1688cat > conftest.$ac_ext << EOF
1689
a74801ba 1690#line 1691 "configure"
252b5132
RH
1691#include "confdefs.h"
1692
1693main(){return(0);}
1694EOF
a74801ba 1695if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1696 ac_cv_prog_cc_works=yes
1697 # If we can't run a trivial program, we are probably using a cross compiler.
1698 if (./conftest; exit) 2>/dev/null; then
1699 ac_cv_prog_cc_cross=no
1700 else
1701 ac_cv_prog_cc_cross=yes
1702 fi
1703else
1704 echo "configure: failed program was:" >&5
1705 cat conftest.$ac_ext >&5
1706 ac_cv_prog_cc_works=no
1707fi
1708rm -fr conftest*
1709ac_ext=c
1710# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1711ac_cpp='$CPP $CPPFLAGS'
1712ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1713ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1714cross_compiling=$ac_cv_prog_cc_cross
1715
1716echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1717if test $ac_cv_prog_cc_works = no; then
1718 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1719fi
1720echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
a74801ba 1721echo "configure:1722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
1722echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1723cross_compiling=$ac_cv_prog_cc_cross
1724
1725echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
a74801ba 1726echo "configure:1727: checking whether we are using GNU C" >&5
252b5132
RH
1727if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1729else
1730 cat > conftest.c <<EOF
1731#ifdef __GNUC__
1732 yes;
1733#endif
1734EOF
a74801ba 1735if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
1736 ac_cv_prog_gcc=yes
1737else
1738 ac_cv_prog_gcc=no
1739fi
1740fi
1741
1742echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1743
1744if test $ac_cv_prog_gcc = yes; then
1745 GCC=yes
1746else
1747 GCC=
1748fi
1749
1750ac_test_CFLAGS="${CFLAGS+set}"
1751ac_save_CFLAGS="$CFLAGS"
1752CFLAGS=
1753echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
a74801ba 1754echo "configure:1755: checking whether ${CC-cc} accepts -g" >&5
252b5132
RH
1755if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757else
1758 echo 'void f(){}' > conftest.c
1759if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1760 ac_cv_prog_cc_g=yes
1761else
1762 ac_cv_prog_cc_g=no
1763fi
1764rm -f conftest*
1765
1766fi
1767
1768echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1769if test "$ac_test_CFLAGS" = set; then
1770 CFLAGS="$ac_save_CFLAGS"
1771elif test $ac_cv_prog_cc_g = yes; then
1772 if test "$GCC" = yes; then
1773 CFLAGS="-g -O2"
1774 else
1775 CFLAGS="-g"
1776 fi
1777else
1778 if test "$GCC" = yes; then
1779 CFLAGS="-O2"
1780 else
1781 CFLAGS=
1782 fi
1783fi
1784
1785
1786for ac_prog in 'bison -y' byacc
1787do
1788# Extract the first word of "$ac_prog", so it can be a program name with args.
1789set dummy $ac_prog; ac_word=$2
1790echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1791echo "configure:1792: checking for $ac_word" >&5
252b5132
RH
1792if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794else
1795 if test -n "$YACC"; then
1796 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1797else
1798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1799 ac_dummy="$PATH"
1800 for ac_dir in $ac_dummy; do
1801 test -z "$ac_dir" && ac_dir=.
1802 if test -f $ac_dir/$ac_word; then
1803 ac_cv_prog_YACC="$ac_prog"
1804 break
1805 fi
1806 done
1807 IFS="$ac_save_ifs"
1808fi
1809fi
1810YACC="$ac_cv_prog_YACC"
1811if test -n "$YACC"; then
1812 echo "$ac_t""$YACC" 1>&6
1813else
1814 echo "$ac_t""no" 1>&6
1815fi
1816
1817test -n "$YACC" && break
1818done
1819test -n "$YACC" || YACC="yacc"
1820
1821echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
a74801ba 1822echo "configure:1823: checking how to run the C preprocessor" >&5
252b5132
RH
1823# On Suns, sometimes $CPP names a directory.
1824if test -n "$CPP" && test -d "$CPP"; then
1825 CPP=
1826fi
1827if test -z "$CPP"; then
1828if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1829 echo $ac_n "(cached) $ac_c" 1>&6
1830else
1831 # This must be in double quotes, not single quotes, because CPP may get
1832 # substituted into the Makefile and "${CC-cc}" will confuse make.
1833 CPP="${CC-cc} -E"
1834 # On the NeXT, cc -E runs the code through the compiler's parser,
1835 # not just through cpp.
1836 cat > conftest.$ac_ext <<EOF
a74801ba 1837#line 1838 "configure"
252b5132
RH
1838#include "confdefs.h"
1839#include <assert.h>
1840Syntax Error
1841EOF
1842ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 1843{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1844ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1845if test -z "$ac_err"; then
1846 :
1847else
1848 echo "$ac_err" >&5
1849 echo "configure: failed program was:" >&5
1850 cat conftest.$ac_ext >&5
1851 rm -rf conftest*
1852 CPP="${CC-cc} -E -traditional-cpp"
1853 cat > conftest.$ac_ext <<EOF
a74801ba 1854#line 1855 "configure"
252b5132
RH
1855#include "confdefs.h"
1856#include <assert.h>
1857Syntax Error
1858EOF
1859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 1860{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1862if test -z "$ac_err"; then
1863 :
1864else
1865 echo "$ac_err" >&5
1866 echo "configure: failed program was:" >&5
1867 cat conftest.$ac_ext >&5
1868 rm -rf conftest*
1869 CPP="${CC-cc} -nologo -E"
1870 cat > conftest.$ac_ext <<EOF
a74801ba 1871#line 1872 "configure"
252b5132
RH
1872#include "confdefs.h"
1873#include <assert.h>
1874Syntax Error
1875EOF
1876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 1877{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1879if test -z "$ac_err"; then
1880 :
1881else
1882 echo "$ac_err" >&5
1883 echo "configure: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 rm -rf conftest*
1886 CPP=/lib/cpp
1887fi
1888rm -f conftest*
1889fi
1890rm -f conftest*
1891fi
1892rm -f conftest*
1893 ac_cv_prog_CPP="$CPP"
1894fi
1895 CPP="$ac_cv_prog_CPP"
1896else
1897 ac_cv_prog_CPP="$CPP"
1898fi
1899echo "$ac_t""$CPP" 1>&6
1900
1901missing_dir=`cd $ac_aux_dir && pwd`
1902for ac_prog in flex lex
1903do
1904# Extract the first word of "$ac_prog", so it can be a program name with args.
1905set dummy $ac_prog; ac_word=$2
1906echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1907echo "configure:1908: checking for $ac_word" >&5
252b5132
RH
1908if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test -n "$LEX"; then
1912 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1913else
1914 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1915 ac_dummy="$PATH"
1916 for ac_dir in $ac_dummy; do
1917 test -z "$ac_dir" && ac_dir=.
1918 if test -f $ac_dir/$ac_word; then
1919 ac_cv_prog_LEX="$ac_prog"
1920 break
1921 fi
1922 done
1923 IFS="$ac_save_ifs"
1924fi
1925fi
1926LEX="$ac_cv_prog_LEX"
1927if test -n "$LEX"; then
1928 echo "$ac_t""$LEX" 1>&6
1929else
1930 echo "$ac_t""no" 1>&6
1931fi
1932
1933test -n "$LEX" && break
1934done
1935test -n "$LEX" || LEX=""$missing_dir/missing flex""
1936
1937# Extract the first word of "flex", so it can be a program name with args.
1938set dummy flex; ac_word=$2
1939echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 1940echo "configure:1941: checking for $ac_word" >&5
252b5132
RH
1941if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1943else
1944 if test -n "$LEX"; then
1945 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1946else
1947 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1948 ac_dummy="$PATH"
1949 for ac_dir in $ac_dummy; do
1950 test -z "$ac_dir" && ac_dir=.
1951 if test -f $ac_dir/$ac_word; then
1952 ac_cv_prog_LEX="flex"
1953 break
1954 fi
1955 done
1956 IFS="$ac_save_ifs"
1957 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1958fi
1959fi
1960LEX="$ac_cv_prog_LEX"
1961if test -n "$LEX"; then
1962 echo "$ac_t""$LEX" 1>&6
1963else
1964 echo "$ac_t""no" 1>&6
1965fi
1966
1967if test -z "$LEXLIB"
1968then
1969 case "$LEX" in
1970 flex*) ac_lib=fl ;;
1971 *) ac_lib=l ;;
1972 esac
1973 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
a74801ba 1974echo "configure:1975: checking for yywrap in -l$ac_lib" >&5
252b5132
RH
1975ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1976if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1977 echo $ac_n "(cached) $ac_c" 1>&6
1978else
1979 ac_save_LIBS="$LIBS"
1980LIBS="-l$ac_lib $LIBS"
1981cat > conftest.$ac_ext <<EOF
a74801ba 1982#line 1983 "configure"
252b5132
RH
1983#include "confdefs.h"
1984/* Override any gcc2 internal prototype to avoid an error. */
1985/* We use char because int might match the return type of a gcc2
1986 builtin and then its argument prototype would still apply. */
1987char yywrap();
1988
1989int main() {
1990yywrap()
1991; return 0; }
1992EOF
a74801ba 1993if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1994 rm -rf conftest*
1995 eval "ac_cv_lib_$ac_lib_var=yes"
1996else
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
1999 rm -rf conftest*
2000 eval "ac_cv_lib_$ac_lib_var=no"
2001fi
2002rm -f conftest*
2003LIBS="$ac_save_LIBS"
2004
2005fi
2006if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2007 echo "$ac_t""yes" 1>&6
2008 LEXLIB="-l$ac_lib"
2009else
2010 echo "$ac_t""no" 1>&6
2011fi
2012
2013fi
2014
2015echo $ac_n "checking lex output file root""... $ac_c" 1>&6
a74801ba 2016echo "configure:2017: checking lex output file root" >&5
252b5132
RH
2017if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2018 echo $ac_n "(cached) $ac_c" 1>&6
2019else
2020 # The minimal lex program is just a single line: %%. But some broken lexes
2021# (Solaris, I think it was) want two %% lines, so accommodate them.
2022echo '%%
2023%%' | $LEX
2024if test -f lex.yy.c; then
2025 ac_cv_prog_lex_root=lex.yy
2026elif test -f lexyy.c; then
2027 ac_cv_prog_lex_root=lexyy
2028else
2029 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2030fi
2031fi
2032
2033echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2034LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2035
2036echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
a74801ba 2037echo "configure:2038: checking whether yytext is a pointer" >&5
252b5132
RH
2038if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2039 echo $ac_n "(cached) $ac_c" 1>&6
2040else
2041 # POSIX says lex can declare yytext either as a pointer or an array; the
2042# default is implementation-dependent. Figure out which it is, since
2043# not all implementations provide the %pointer and %array declarations.
2044ac_cv_prog_lex_yytext_pointer=no
2045echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2046ac_save_LIBS="$LIBS"
2047LIBS="$LIBS $LEXLIB"
2048cat > conftest.$ac_ext <<EOF
a74801ba 2049#line 2050 "configure"
252b5132
RH
2050#include "confdefs.h"
2051`cat $LEX_OUTPUT_ROOT.c`
2052int main() {
2053
2054; return 0; }
2055EOF
a74801ba 2056if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2057 rm -rf conftest*
2058 ac_cv_prog_lex_yytext_pointer=yes
2059else
2060 echo "configure: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062fi
2063rm -f conftest*
2064LIBS="$ac_save_LIBS"
2065rm -f "${LEX_OUTPUT_ROOT}.c"
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2070if test $ac_cv_prog_lex_yytext_pointer = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define YYTEXT_POINTER 1
2073EOF
2074
2075fi
2076
2077
2078ALL_LINGUAS=
2079echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
a74801ba 2080echo "configure:2081: checking for POSIXized ISC" >&5
252b5132
RH
2081if test -d /etc/conf/kconfig.d &&
2082 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2083then
2084 echo "$ac_t""yes" 1>&6
2085 ISC=yes # If later tests want to check for ISC.
2086 cat >> confdefs.h <<\EOF
2087#define _POSIX_SOURCE 1
2088EOF
2089
2090 if test "$GCC" = yes; then
2091 CC="$CC -posix"
2092 else
2093 CC="$CC -Xp"
2094 fi
2095else
2096 echo "$ac_t""no" 1>&6
2097 ISC=
2098fi
2099
2100echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
a74801ba 2101echo "configure:2102: checking for ANSI C header files" >&5
252b5132
RH
2102if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104else
2105 cat > conftest.$ac_ext <<EOF
a74801ba 2106#line 2107 "configure"
252b5132
RH
2107#include "confdefs.h"
2108#include <stdlib.h>
2109#include <stdarg.h>
2110#include <string.h>
2111#include <float.h>
2112EOF
2113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 2114{ (eval echo configure:2115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2116if test -z "$ac_err"; then
2117 rm -rf conftest*
2118 ac_cv_header_stdc=yes
2119else
2120 echo "$ac_err" >&5
2121 echo "configure: failed program was:" >&5
2122 cat conftest.$ac_ext >&5
2123 rm -rf conftest*
2124 ac_cv_header_stdc=no
2125fi
2126rm -f conftest*
2127
2128if test $ac_cv_header_stdc = yes; then
2129 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2130cat > conftest.$ac_ext <<EOF
a74801ba 2131#line 2132 "configure"
252b5132
RH
2132#include "confdefs.h"
2133#include <string.h>
2134EOF
2135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2136 egrep "memchr" >/dev/null 2>&1; then
2137 :
2138else
2139 rm -rf conftest*
2140 ac_cv_header_stdc=no
2141fi
2142rm -f conftest*
2143
2144fi
2145
2146if test $ac_cv_header_stdc = yes; then
2147 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2148cat > conftest.$ac_ext <<EOF
a74801ba 2149#line 2150 "configure"
252b5132
RH
2150#include "confdefs.h"
2151#include <stdlib.h>
2152EOF
2153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2154 egrep "free" >/dev/null 2>&1; then
2155 :
2156else
2157 rm -rf conftest*
2158 ac_cv_header_stdc=no
2159fi
2160rm -f conftest*
2161
2162fi
2163
2164if test $ac_cv_header_stdc = yes; then
2165 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2166if test "$cross_compiling" = yes; then
2167 :
2168else
2169 cat > conftest.$ac_ext <<EOF
a74801ba 2170#line 2171 "configure"
252b5132
RH
2171#include "confdefs.h"
2172#include <ctype.h>
2173#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2174#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2175#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2176int main () { int i; for (i = 0; i < 256; i++)
2177if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2178exit (0); }
2179
2180EOF
a74801ba 2181if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2182then
2183 :
2184else
2185 echo "configure: failed program was:" >&5
2186 cat conftest.$ac_ext >&5
2187 rm -fr conftest*
2188 ac_cv_header_stdc=no
2189fi
2190rm -fr conftest*
2191fi
2192
2193fi
2194fi
2195
2196echo "$ac_t""$ac_cv_header_stdc" 1>&6
2197if test $ac_cv_header_stdc = yes; then
2198 cat >> confdefs.h <<\EOF
2199#define STDC_HEADERS 1
2200EOF
2201
2202fi
2203
2204echo $ac_n "checking for working const""... $ac_c" 1>&6
a74801ba 2205echo "configure:2206: checking for working const" >&5
252b5132
RH
2206if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2208else
2209 cat > conftest.$ac_ext <<EOF
a74801ba 2210#line 2211 "configure"
252b5132
RH
2211#include "confdefs.h"
2212
2213int main() {
2214
2215/* Ultrix mips cc rejects this. */
2216typedef int charset[2]; const charset x;
2217/* SunOS 4.1.1 cc rejects this. */
2218char const *const *ccp;
2219char **p;
2220/* NEC SVR4.0.2 mips cc rejects this. */
2221struct point {int x, y;};
2222static struct point const zero = {0,0};
2223/* AIX XL C 1.02.0.0 rejects this.
2224 It does not let you subtract one const X* pointer from another in an arm
2225 of an if-expression whose if-part is not a constant expression */
2226const char *g = "string";
2227ccp = &g + (g ? g-g : 0);
2228/* HPUX 7.0 cc rejects these. */
2229++ccp;
2230p = (char**) ccp;
2231ccp = (char const *const *) p;
2232{ /* SCO 3.2v4 cc rejects this. */
2233 char *t;
2234 char const *s = 0 ? (char *) 0 : (char const *) 0;
2235
2236 *t++ = 0;
2237}
2238{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2239 int x[] = {25, 17};
2240 const int *foo = &x[0];
2241 ++foo;
2242}
2243{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2244 typedef const int *iptr;
2245 iptr p = 0;
2246 ++p;
2247}
2248{ /* AIX XL C 1.02.0.0 rejects this saying
2249 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2250 struct s { int j; const int *ap[3]; };
2251 struct s *b; b->j = 5;
2252}
2253{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2254 const int foo = 10;
2255}
2256
2257; return 0; }
2258EOF
a74801ba 2259if { (eval echo configure:2260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2260 rm -rf conftest*
2261 ac_cv_c_const=yes
2262else
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2265 rm -rf conftest*
2266 ac_cv_c_const=no
2267fi
2268rm -f conftest*
2269fi
2270
2271echo "$ac_t""$ac_cv_c_const" 1>&6
2272if test $ac_cv_c_const = no; then
2273 cat >> confdefs.h <<\EOF
2274#define const
2275EOF
2276
2277fi
2278
2279echo $ac_n "checking for inline""... $ac_c" 1>&6
a74801ba 2280echo "configure:2281: checking for inline" >&5
252b5132
RH
2281if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2283else
2284 ac_cv_c_inline=no
2285for ac_kw in inline __inline__ __inline; do
2286 cat > conftest.$ac_ext <<EOF
a74801ba 2287#line 2288 "configure"
252b5132
RH
2288#include "confdefs.h"
2289
2290int main() {
2291} $ac_kw foo() {
2292; return 0; }
2293EOF
a74801ba 2294if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2295 rm -rf conftest*
2296 ac_cv_c_inline=$ac_kw; break
2297else
2298 echo "configure: failed program was:" >&5
2299 cat conftest.$ac_ext >&5
2300fi
2301rm -f conftest*
2302done
2303
2304fi
2305
2306echo "$ac_t""$ac_cv_c_inline" 1>&6
2307case "$ac_cv_c_inline" in
2308 inline | yes) ;;
2309 no) cat >> confdefs.h <<\EOF
2310#define inline
2311EOF
2312 ;;
2313 *) cat >> confdefs.h <<EOF
2314#define inline $ac_cv_c_inline
2315EOF
2316 ;;
2317esac
2318
2319echo $ac_n "checking for off_t""... $ac_c" 1>&6
a74801ba 2320echo "configure:2321: checking for off_t" >&5
252b5132
RH
2321if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2322 echo $ac_n "(cached) $ac_c" 1>&6
2323else
2324 cat > conftest.$ac_ext <<EOF
a74801ba 2325#line 2326 "configure"
252b5132
RH
2326#include "confdefs.h"
2327#include <sys/types.h>
2328#if STDC_HEADERS
2329#include <stdlib.h>
2330#include <stddef.h>
2331#endif
2332EOF
2333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2335 rm -rf conftest*
2336 ac_cv_type_off_t=yes
2337else
2338 rm -rf conftest*
2339 ac_cv_type_off_t=no
2340fi
2341rm -f conftest*
2342
2343fi
2344echo "$ac_t""$ac_cv_type_off_t" 1>&6
2345if test $ac_cv_type_off_t = no; then
2346 cat >> confdefs.h <<\EOF
2347#define off_t long
2348EOF
2349
2350fi
2351
2352echo $ac_n "checking for size_t""... $ac_c" 1>&6
a74801ba 2353echo "configure:2354: checking for size_t" >&5
252b5132
RH
2354if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357 cat > conftest.$ac_ext <<EOF
a74801ba 2358#line 2359 "configure"
252b5132
RH
2359#include "confdefs.h"
2360#include <sys/types.h>
2361#if STDC_HEADERS
2362#include <stdlib.h>
2363#include <stddef.h>
2364#endif
2365EOF
2366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2367 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2368 rm -rf conftest*
2369 ac_cv_type_size_t=yes
2370else
2371 rm -rf conftest*
2372 ac_cv_type_size_t=no
2373fi
2374rm -f conftest*
2375
2376fi
2377echo "$ac_t""$ac_cv_type_size_t" 1>&6
2378if test $ac_cv_type_size_t = no; then
2379 cat >> confdefs.h <<\EOF
2380#define size_t unsigned
2381EOF
2382
2383fi
2384
2385# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2386# for constant arguments. Useless!
2387echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a74801ba 2388echo "configure:2389: checking for working alloca.h" >&5
252b5132
RH
2389if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2390 echo $ac_n "(cached) $ac_c" 1>&6
2391else
2392 cat > conftest.$ac_ext <<EOF
a74801ba 2393#line 2394 "configure"
252b5132
RH
2394#include "confdefs.h"
2395#include <alloca.h>
2396int main() {
2397char *p = alloca(2 * sizeof(int));
2398; return 0; }
2399EOF
a74801ba 2400if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2401 rm -rf conftest*
2402 ac_cv_header_alloca_h=yes
2403else
2404 echo "configure: failed program was:" >&5
2405 cat conftest.$ac_ext >&5
2406 rm -rf conftest*
2407 ac_cv_header_alloca_h=no
2408fi
2409rm -f conftest*
2410fi
2411
2412echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2413if test $ac_cv_header_alloca_h = yes; then
2414 cat >> confdefs.h <<\EOF
2415#define HAVE_ALLOCA_H 1
2416EOF
2417
2418fi
2419
2420echo $ac_n "checking for alloca""... $ac_c" 1>&6
a74801ba 2421echo "configure:2422: checking for alloca" >&5
252b5132
RH
2422if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2424else
2425 cat > conftest.$ac_ext <<EOF
a74801ba 2426#line 2427 "configure"
252b5132
RH
2427#include "confdefs.h"
2428
2429#ifdef __GNUC__
2430# define alloca __builtin_alloca
2431#else
2432# ifdef _MSC_VER
2433# include <malloc.h>
2434# define alloca _alloca
2435# else
2436# if HAVE_ALLOCA_H
2437# include <alloca.h>
2438# else
2439# ifdef _AIX
2440 #pragma alloca
2441# else
2442# ifndef alloca /* predefined by HP cc +Olibcalls */
2443char *alloca ();
2444# endif
2445# endif
2446# endif
2447# endif
2448#endif
2449
2450int main() {
2451char *p = (char *) alloca(1);
2452; return 0; }
2453EOF
a74801ba 2454if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2455 rm -rf conftest*
2456 ac_cv_func_alloca_works=yes
2457else
2458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -rf conftest*
2461 ac_cv_func_alloca_works=no
2462fi
2463rm -f conftest*
2464fi
2465
2466echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2467if test $ac_cv_func_alloca_works = yes; then
2468 cat >> confdefs.h <<\EOF
2469#define HAVE_ALLOCA 1
2470EOF
2471
2472fi
2473
2474if test $ac_cv_func_alloca_works = no; then
2475 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2476 # that cause trouble. Some versions do not even contain alloca or
2477 # contain a buggy version. If you still want to use their alloca,
2478 # use ar to extract alloca.o from them instead of compiling alloca.c.
2479 ALLOCA=alloca.${ac_objext}
2480 cat >> confdefs.h <<\EOF
2481#define C_ALLOCA 1
2482EOF
2483
2484
2485echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a74801ba 2486echo "configure:2487: checking whether alloca needs Cray hooks" >&5
252b5132
RH
2487if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2488 echo $ac_n "(cached) $ac_c" 1>&6
2489else
2490 cat > conftest.$ac_ext <<EOF
a74801ba 2491#line 2492 "configure"
252b5132
RH
2492#include "confdefs.h"
2493#if defined(CRAY) && ! defined(CRAY2)
2494webecray
2495#else
2496wenotbecray
2497#endif
2498
2499EOF
2500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2501 egrep "webecray" >/dev/null 2>&1; then
2502 rm -rf conftest*
2503 ac_cv_os_cray=yes
2504else
2505 rm -rf conftest*
2506 ac_cv_os_cray=no
2507fi
2508rm -f conftest*
2509
2510fi
2511
2512echo "$ac_t""$ac_cv_os_cray" 1>&6
2513if test $ac_cv_os_cray = yes; then
2514for ac_func in _getb67 GETB67 getb67; do
2515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 2516echo "configure:2517: checking for $ac_func" >&5
252b5132
RH
2517if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2518 echo $ac_n "(cached) $ac_c" 1>&6
2519else
2520 cat > conftest.$ac_ext <<EOF
a74801ba 2521#line 2522 "configure"
252b5132
RH
2522#include "confdefs.h"
2523/* System header to define __stub macros and hopefully few prototypes,
2524 which can conflict with char $ac_func(); below. */
2525#include <assert.h>
2526/* Override any gcc2 internal prototype to avoid an error. */
2527/* We use char because int might match the return type of a gcc2
2528 builtin and then its argument prototype would still apply. */
2529char $ac_func();
2530
2531int main() {
2532
2533/* The GNU C library defines this for functions which it implements
2534 to always fail with ENOSYS. Some functions are actually named
2535 something starting with __ and the normal name is an alias. */
2536#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2537choke me
2538#else
2539$ac_func();
2540#endif
2541
2542; return 0; }
2543EOF
a74801ba 2544if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2545 rm -rf conftest*
2546 eval "ac_cv_func_$ac_func=yes"
2547else
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -rf conftest*
2551 eval "ac_cv_func_$ac_func=no"
2552fi
2553rm -f conftest*
2554fi
2555
2556if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2557 echo "$ac_t""yes" 1>&6
2558 cat >> confdefs.h <<EOF
2559#define CRAY_STACKSEG_END $ac_func
2560EOF
2561
2562 break
2563else
2564 echo "$ac_t""no" 1>&6
2565fi
2566
2567done
2568fi
2569
2570echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a74801ba 2571echo "configure:2572: checking stack direction for C alloca" >&5
252b5132
RH
2572if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574else
2575 if test "$cross_compiling" = yes; then
2576 ac_cv_c_stack_direction=0
2577else
2578 cat > conftest.$ac_ext <<EOF
a74801ba 2579#line 2580 "configure"
252b5132
RH
2580#include "confdefs.h"
2581find_stack_direction ()
2582{
2583 static char *addr = 0;
2584 auto char dummy;
2585 if (addr == 0)
2586 {
2587 addr = &dummy;
2588 return find_stack_direction ();
2589 }
2590 else
2591 return (&dummy > addr) ? 1 : -1;
2592}
2593main ()
2594{
2595 exit (find_stack_direction() < 0);
2596}
2597EOF
a74801ba 2598if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2599then
2600 ac_cv_c_stack_direction=1
2601else
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2604 rm -fr conftest*
2605 ac_cv_c_stack_direction=-1
2606fi
2607rm -fr conftest*
2608fi
2609
2610fi
2611
2612echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2613cat >> confdefs.h <<EOF
2614#define STACK_DIRECTION $ac_cv_c_stack_direction
2615EOF
2616
2617fi
2618
2619for ac_hdr in unistd.h
2620do
2621ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2622echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a74801ba 2623echo "configure:2624: checking for $ac_hdr" >&5
252b5132
RH
2624if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626else
2627 cat > conftest.$ac_ext <<EOF
a74801ba 2628#line 2629 "configure"
252b5132
RH
2629#include "confdefs.h"
2630#include <$ac_hdr>
2631EOF
2632ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 2633{ (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2634ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2635if test -z "$ac_err"; then
2636 rm -rf conftest*
2637 eval "ac_cv_header_$ac_safe=yes"
2638else
2639 echo "$ac_err" >&5
2640 echo "configure: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 rm -rf conftest*
2643 eval "ac_cv_header_$ac_safe=no"
2644fi
2645rm -f conftest*
2646fi
2647if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2648 echo "$ac_t""yes" 1>&6
2649 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2650 cat >> confdefs.h <<EOF
2651#define $ac_tr_hdr 1
2652EOF
2653
2654else
2655 echo "$ac_t""no" 1>&6
2656fi
2657done
2658
2659for ac_func in getpagesize
2660do
2661echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 2662echo "configure:2663: checking for $ac_func" >&5
252b5132
RH
2663if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2664 echo $ac_n "(cached) $ac_c" 1>&6
2665else
2666 cat > conftest.$ac_ext <<EOF
a74801ba 2667#line 2668 "configure"
252b5132
RH
2668#include "confdefs.h"
2669/* System header to define __stub macros and hopefully few prototypes,
2670 which can conflict with char $ac_func(); below. */
2671#include <assert.h>
2672/* Override any gcc2 internal prototype to avoid an error. */
2673/* We use char because int might match the return type of a gcc2
2674 builtin and then its argument prototype would still apply. */
2675char $ac_func();
2676
2677int main() {
2678
2679/* The GNU C library defines this for functions which it implements
2680 to always fail with ENOSYS. Some functions are actually named
2681 something starting with __ and the normal name is an alias. */
2682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2683choke me
2684#else
2685$ac_func();
2686#endif
2687
2688; return 0; }
2689EOF
a74801ba 2690if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2691 rm -rf conftest*
2692 eval "ac_cv_func_$ac_func=yes"
2693else
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2696 rm -rf conftest*
2697 eval "ac_cv_func_$ac_func=no"
2698fi
2699rm -f conftest*
2700fi
2701
2702if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2703 echo "$ac_t""yes" 1>&6
2704 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2705 cat >> confdefs.h <<EOF
2706#define $ac_tr_func 1
2707EOF
2708
2709else
2710 echo "$ac_t""no" 1>&6
2711fi
2712done
2713
2714echo $ac_n "checking for working mmap""... $ac_c" 1>&6
a74801ba 2715echo "configure:2716: checking for working mmap" >&5
252b5132
RH
2716if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2717 echo $ac_n "(cached) $ac_c" 1>&6
2718else
2719 if test "$cross_compiling" = yes; then
2720 ac_cv_func_mmap_fixed_mapped=no
2721else
2722 cat > conftest.$ac_ext <<EOF
a74801ba 2723#line 2724 "configure"
252b5132
RH
2724#include "confdefs.h"
2725
2726/* Thanks to Mike Haertel and Jim Avera for this test.
2727 Here is a matrix of mmap possibilities:
2728 mmap private not fixed
2729 mmap private fixed at somewhere currently unmapped
2730 mmap private fixed at somewhere already mapped
2731 mmap shared not fixed
2732 mmap shared fixed at somewhere currently unmapped
2733 mmap shared fixed at somewhere already mapped
2734 For private mappings, we should verify that changes cannot be read()
2735 back from the file, nor mmap's back from the file at a different
2736 address. (There have been systems where private was not correctly
2737 implemented like the infamous i386 svr4.0, and systems where the
2738 VM page cache was not coherent with the filesystem buffer cache
2739 like early versions of FreeBSD and possibly contemporary NetBSD.)
2740 For shared mappings, we should conversely verify that changes get
2741 propogated back to all the places they're supposed to be.
2742
2743 Grep wants private fixed already mapped.
2744 The main things grep needs to know about mmap are:
2745 * does it exist and is it safe to write into the mmap'd area
2746 * how to use it (BSD variants) */
2747#include <sys/types.h>
2748#include <fcntl.h>
2749#include <sys/mman.h>
2750
2751/* This mess was copied from the GNU getpagesize.h. */
2752#ifndef HAVE_GETPAGESIZE
2753# ifdef HAVE_UNISTD_H
2754# include <unistd.h>
2755# endif
2756
2757/* Assume that all systems that can run configure have sys/param.h. */
2758# ifndef HAVE_SYS_PARAM_H
2759# define HAVE_SYS_PARAM_H 1
2760# endif
2761
2762# ifdef _SC_PAGESIZE
2763# define getpagesize() sysconf(_SC_PAGESIZE)
2764# else /* no _SC_PAGESIZE */
2765# ifdef HAVE_SYS_PARAM_H
2766# include <sys/param.h>
2767# ifdef EXEC_PAGESIZE
2768# define getpagesize() EXEC_PAGESIZE
2769# else /* no EXEC_PAGESIZE */
2770# ifdef NBPG
2771# define getpagesize() NBPG * CLSIZE
2772# ifndef CLSIZE
2773# define CLSIZE 1
2774# endif /* no CLSIZE */
2775# else /* no NBPG */
2776# ifdef NBPC
2777# define getpagesize() NBPC
2778# else /* no NBPC */
2779# ifdef PAGESIZE
2780# define getpagesize() PAGESIZE
2781# endif /* PAGESIZE */
2782# endif /* no NBPC */
2783# endif /* no NBPG */
2784# endif /* no EXEC_PAGESIZE */
2785# else /* no HAVE_SYS_PARAM_H */
2786# define getpagesize() 8192 /* punt totally */
2787# endif /* no HAVE_SYS_PARAM_H */
2788# endif /* no _SC_PAGESIZE */
2789
2790#endif /* no HAVE_GETPAGESIZE */
2791
2792#ifdef __cplusplus
2793extern "C" { void *malloc(unsigned); }
2794#else
2795char *malloc();
2796#endif
2797
2798int
2799main()
2800{
2801 char *data, *data2, *data3;
2802 int i, pagesize;
2803 int fd;
2804
2805 pagesize = getpagesize();
2806
2807 /*
2808 * First, make a file with some known garbage in it.
2809 */
2810 data = malloc(pagesize);
2811 if (!data)
2812 exit(1);
2813 for (i = 0; i < pagesize; ++i)
2814 *(data + i) = rand();
2815 umask(0);
2816 fd = creat("conftestmmap", 0600);
2817 if (fd < 0)
2818 exit(1);
2819 if (write(fd, data, pagesize) != pagesize)
2820 exit(1);
2821 close(fd);
2822
2823 /*
2824 * Next, try to mmap the file at a fixed address which
2825 * already has something else allocated at it. If we can,
2826 * also make sure that we see the same garbage.
2827 */
2828 fd = open("conftestmmap", O_RDWR);
2829 if (fd < 0)
2830 exit(1);
2831 data2 = malloc(2 * pagesize);
2832 if (!data2)
2833 exit(1);
2834 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2835 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2836 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2837 exit(1);
2838 for (i = 0; i < pagesize; ++i)
2839 if (*(data + i) != *(data2 + i))
2840 exit(1);
2841
2842 /*
2843 * Finally, make sure that changes to the mapped area
2844 * do not percolate back to the file as seen by read().
2845 * (This is a bug on some variants of i386 svr4.0.)
2846 */
2847 for (i = 0; i < pagesize; ++i)
2848 *(data2 + i) = *(data2 + i) + 1;
2849 data3 = malloc(pagesize);
2850 if (!data3)
2851 exit(1);
2852 if (read(fd, data3, pagesize) != pagesize)
2853 exit(1);
2854 for (i = 0; i < pagesize; ++i)
2855 if (*(data + i) != *(data3 + i))
2856 exit(1);
2857 close(fd);
2858 unlink("conftestmmap");
2859 exit(0);
2860}
2861
2862EOF
a74801ba 2863if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2864then
2865 ac_cv_func_mmap_fixed_mapped=yes
2866else
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 rm -fr conftest*
2870 ac_cv_func_mmap_fixed_mapped=no
2871fi
2872rm -fr conftest*
2873fi
2874
2875fi
2876
2877echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2878if test $ac_cv_func_mmap_fixed_mapped = yes; then
2879 cat >> confdefs.h <<\EOF
2880#define HAVE_MMAP 1
2881EOF
2882
2883fi
2884
2885
2886 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2887unistd.h values.h sys/param.h
2888do
2889ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2890echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a74801ba 2891echo "configure:2892: checking for $ac_hdr" >&5
252b5132
RH
2892if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2893 echo $ac_n "(cached) $ac_c" 1>&6
2894else
2895 cat > conftest.$ac_ext <<EOF
a74801ba 2896#line 2897 "configure"
252b5132
RH
2897#include "confdefs.h"
2898#include <$ac_hdr>
2899EOF
2900ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 2901{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2902ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2903if test -z "$ac_err"; then
2904 rm -rf conftest*
2905 eval "ac_cv_header_$ac_safe=yes"
2906else
2907 echo "$ac_err" >&5
2908 echo "configure: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 rm -rf conftest*
2911 eval "ac_cv_header_$ac_safe=no"
2912fi
2913rm -f conftest*
2914fi
2915if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2916 echo "$ac_t""yes" 1>&6
2917 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2918 cat >> confdefs.h <<EOF
2919#define $ac_tr_hdr 1
2920EOF
2921
2922else
2923 echo "$ac_t""no" 1>&6
2924fi
2925done
2926
2927 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2928__argz_count __argz_stringify __argz_next
2929do
2930echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 2931echo "configure:2932: checking for $ac_func" >&5
252b5132
RH
2932if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2933 echo $ac_n "(cached) $ac_c" 1>&6
2934else
2935 cat > conftest.$ac_ext <<EOF
a74801ba 2936#line 2937 "configure"
252b5132
RH
2937#include "confdefs.h"
2938/* System header to define __stub macros and hopefully few prototypes,
2939 which can conflict with char $ac_func(); below. */
2940#include <assert.h>
2941/* Override any gcc2 internal prototype to avoid an error. */
2942/* We use char because int might match the return type of a gcc2
2943 builtin and then its argument prototype would still apply. */
2944char $ac_func();
2945
2946int main() {
2947
2948/* The GNU C library defines this for functions which it implements
2949 to always fail with ENOSYS. Some functions are actually named
2950 something starting with __ and the normal name is an alias. */
2951#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2952choke me
2953#else
2954$ac_func();
2955#endif
2956
2957; return 0; }
2958EOF
a74801ba 2959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2960 rm -rf conftest*
2961 eval "ac_cv_func_$ac_func=yes"
2962else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 eval "ac_cv_func_$ac_func=no"
2967fi
2968rm -f conftest*
2969fi
2970
2971if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2972 echo "$ac_t""yes" 1>&6
2973 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2974 cat >> confdefs.h <<EOF
2975#define $ac_tr_func 1
2976EOF
2977
2978else
2979 echo "$ac_t""no" 1>&6
2980fi
2981done
2982
2983
2984 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2985 for ac_func in stpcpy
2986do
2987echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 2988echo "configure:2989: checking for $ac_func" >&5
252b5132
RH
2989if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2990 echo $ac_n "(cached) $ac_c" 1>&6
2991else
2992 cat > conftest.$ac_ext <<EOF
a74801ba 2993#line 2994 "configure"
252b5132
RH
2994#include "confdefs.h"
2995/* System header to define __stub macros and hopefully few prototypes,
2996 which can conflict with char $ac_func(); below. */
2997#include <assert.h>
2998/* Override any gcc2 internal prototype to avoid an error. */
2999/* We use char because int might match the return type of a gcc2
3000 builtin and then its argument prototype would still apply. */
3001char $ac_func();
3002
3003int main() {
3004
3005/* The GNU C library defines this for functions which it implements
3006 to always fail with ENOSYS. Some functions are actually named
3007 something starting with __ and the normal name is an alias. */
3008#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3009choke me
3010#else
3011$ac_func();
3012#endif
3013
3014; return 0; }
3015EOF
a74801ba 3016if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3017 rm -rf conftest*
3018 eval "ac_cv_func_$ac_func=yes"
3019else
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3022 rm -rf conftest*
3023 eval "ac_cv_func_$ac_func=no"
3024fi
3025rm -f conftest*
3026fi
3027
3028if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3029 echo "$ac_t""yes" 1>&6
3030 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3031 cat >> confdefs.h <<EOF
3032#define $ac_tr_func 1
3033EOF
3034
3035else
3036 echo "$ac_t""no" 1>&6
3037fi
3038done
3039
3040 fi
3041 if test "${ac_cv_func_stpcpy}" = "yes"; then
3042 cat >> confdefs.h <<\EOF
3043#define HAVE_STPCPY 1
3044EOF
3045
3046 fi
3047
3048 if test $ac_cv_header_locale_h = yes; then
3049 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
a74801ba 3050echo "configure:3051: checking for LC_MESSAGES" >&5
252b5132
RH
3051if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3052 echo $ac_n "(cached) $ac_c" 1>&6
3053else
3054 cat > conftest.$ac_ext <<EOF
a74801ba 3055#line 3056 "configure"
252b5132
RH
3056#include "confdefs.h"
3057#include <locale.h>
3058int main() {
3059return LC_MESSAGES
3060; return 0; }
3061EOF
a74801ba 3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3063 rm -rf conftest*
3064 am_cv_val_LC_MESSAGES=yes
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 rm -rf conftest*
3069 am_cv_val_LC_MESSAGES=no
3070fi
3071rm -f conftest*
3072fi
3073
3074echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3075 if test $am_cv_val_LC_MESSAGES = yes; then
3076 cat >> confdefs.h <<\EOF
3077#define HAVE_LC_MESSAGES 1
3078EOF
3079
3080 fi
3081 fi
3082 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
a74801ba 3083echo "configure:3084: checking whether NLS is requested" >&5
252b5132
RH
3084 # Check whether --enable-nls or --disable-nls was given.
3085if test "${enable_nls+set}" = set; then
3086 enableval="$enable_nls"
3087 USE_NLS=$enableval
3088else
3089 USE_NLS=yes
3090fi
3091
3092 echo "$ac_t""$USE_NLS" 1>&6
3093
3094
3095 USE_INCLUDED_LIBINTL=no
3096
3097 if test "$USE_NLS" = "yes"; then
3098 cat >> confdefs.h <<\EOF
3099#define ENABLE_NLS 1
3100EOF
3101
3102 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
a74801ba 3103echo "configure:3104: checking whether included gettext is requested" >&5
252b5132
RH
3104 # Check whether --with-included-gettext or --without-included-gettext was given.
3105if test "${with_included_gettext+set}" = set; then
3106 withval="$with_included_gettext"
3107 nls_cv_force_use_gnu_gettext=$withval
3108else
3109 nls_cv_force_use_gnu_gettext=no
3110fi
3111
3112 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3113
3114 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3115 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3116 nls_cv_header_intl=
3117 nls_cv_header_libgt=
3118 CATOBJEXT=NONE
3119
3120 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3121echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
a74801ba 3122echo "configure:3123: checking for libintl.h" >&5
252b5132
RH
3123if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3124 echo $ac_n "(cached) $ac_c" 1>&6
3125else
3126 cat > conftest.$ac_ext <<EOF
a74801ba 3127#line 3128 "configure"
252b5132
RH
3128#include "confdefs.h"
3129#include <libintl.h>
3130EOF
3131ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 3132{ (eval echo configure:3133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3133ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3134if test -z "$ac_err"; then
3135 rm -rf conftest*
3136 eval "ac_cv_header_$ac_safe=yes"
3137else
3138 echo "$ac_err" >&5
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3141 rm -rf conftest*
3142 eval "ac_cv_header_$ac_safe=no"
3143fi
3144rm -f conftest*
3145fi
3146if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3147 echo "$ac_t""yes" 1>&6
3148 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
a74801ba 3149echo "configure:3150: checking for gettext in libc" >&5
252b5132
RH
3150if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153 cat > conftest.$ac_ext <<EOF
a74801ba 3154#line 3155 "configure"
252b5132
RH
3155#include "confdefs.h"
3156#include <libintl.h>
3157int main() {
3158return (int) gettext ("")
3159; return 0; }
3160EOF
a74801ba 3161if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3162 rm -rf conftest*
3163 gt_cv_func_gettext_libc=yes
3164else
3165 echo "configure: failed program was:" >&5
3166 cat conftest.$ac_ext >&5
3167 rm -rf conftest*
3168 gt_cv_func_gettext_libc=no
3169fi
3170rm -f conftest*
3171fi
3172
3173echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3174
3175 if test "$gt_cv_func_gettext_libc" != "yes"; then
3176 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
a74801ba 3177echo "configure:3178: checking for bindtextdomain in -lintl" >&5
252b5132
RH
3178ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3179if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3180 echo $ac_n "(cached) $ac_c" 1>&6
3181else
3182 ac_save_LIBS="$LIBS"
3183LIBS="-lintl $LIBS"
3184cat > conftest.$ac_ext <<EOF
a74801ba 3185#line 3186 "configure"
252b5132
RH
3186#include "confdefs.h"
3187/* Override any gcc2 internal prototype to avoid an error. */
3188/* We use char because int might match the return type of a gcc2
3189 builtin and then its argument prototype would still apply. */
3190char bindtextdomain();
3191
3192int main() {
3193bindtextdomain()
3194; return 0; }
3195EOF
a74801ba 3196if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3197 rm -rf conftest*
3198 eval "ac_cv_lib_$ac_lib_var=yes"
3199else
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3202 rm -rf conftest*
3203 eval "ac_cv_lib_$ac_lib_var=no"
3204fi
3205rm -f conftest*
3206LIBS="$ac_save_LIBS"
3207
3208fi
3209if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3210 echo "$ac_t""yes" 1>&6
3211 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
a74801ba 3212echo "configure:3213: checking for gettext in libintl" >&5
252b5132
RH
3213if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3214 echo $ac_n "(cached) $ac_c" 1>&6
3215else
3216 cat > conftest.$ac_ext <<EOF
a74801ba 3217#line 3218 "configure"
252b5132
RH
3218#include "confdefs.h"
3219
3220int main() {
3221return (int) gettext ("")
3222; return 0; }
3223EOF
a74801ba 3224if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3225 rm -rf conftest*
3226 gt_cv_func_gettext_libintl=yes
3227else
3228 echo "configure: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 rm -rf conftest*
3231 gt_cv_func_gettext_libintl=no
3232fi
3233rm -f conftest*
3234fi
3235
3236echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3237else
3238 echo "$ac_t""no" 1>&6
3239fi
3240
3241 fi
3242
3243 if test "$gt_cv_func_gettext_libc" = "yes" \
3244 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3245 cat >> confdefs.h <<\EOF
3246#define HAVE_GETTEXT 1
3247EOF
3248
3249 # Extract the first word of "msgfmt", so it can be a program name with args.
3250set dummy msgfmt; ac_word=$2
3251echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3252echo "configure:3253: checking for $ac_word" >&5
252b5132
RH
3253if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3255else
3256 case "$MSGFMT" in
3257 /*)
3258 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3259 ;;
3260 *)
3261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3262 for ac_dir in $PATH; do
3263 test -z "$ac_dir" && ac_dir=.
3264 if test -f $ac_dir/$ac_word; then
3265 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3266 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3267 break
3268 fi
3269 fi
3270 done
3271 IFS="$ac_save_ifs"
3272 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3273 ;;
3274esac
3275fi
3276MSGFMT="$ac_cv_path_MSGFMT"
3277if test -n "$MSGFMT"; then
3278 echo "$ac_t""$MSGFMT" 1>&6
3279else
3280 echo "$ac_t""no" 1>&6
3281fi
3282 if test "$MSGFMT" != "no"; then
3283 for ac_func in dcgettext
3284do
3285echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 3286echo "configure:3287: checking for $ac_func" >&5
252b5132
RH
3287if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3288 echo $ac_n "(cached) $ac_c" 1>&6
3289else
3290 cat > conftest.$ac_ext <<EOF
a74801ba 3291#line 3292 "configure"
252b5132
RH
3292#include "confdefs.h"
3293/* System header to define __stub macros and hopefully few prototypes,
3294 which can conflict with char $ac_func(); below. */
3295#include <assert.h>
3296/* Override any gcc2 internal prototype to avoid an error. */
3297/* We use char because int might match the return type of a gcc2
3298 builtin and then its argument prototype would still apply. */
3299char $ac_func();
3300
3301int main() {
3302
3303/* The GNU C library defines this for functions which it implements
3304 to always fail with ENOSYS. Some functions are actually named
3305 something starting with __ and the normal name is an alias. */
3306#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3307choke me
3308#else
3309$ac_func();
3310#endif
3311
3312; return 0; }
3313EOF
a74801ba 3314if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3315 rm -rf conftest*
3316 eval "ac_cv_func_$ac_func=yes"
3317else
3318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
3320 rm -rf conftest*
3321 eval "ac_cv_func_$ac_func=no"
3322fi
3323rm -f conftest*
3324fi
3325
3326if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3327 echo "$ac_t""yes" 1>&6
3328 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3329 cat >> confdefs.h <<EOF
3330#define $ac_tr_func 1
3331EOF
3332
3333else
3334 echo "$ac_t""no" 1>&6
3335fi
3336done
3337
3338 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3339set dummy gmsgfmt; ac_word=$2
3340echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3341echo "configure:3342: checking for $ac_word" >&5
252b5132
RH
3342if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3343 echo $ac_n "(cached) $ac_c" 1>&6
3344else
3345 case "$GMSGFMT" in
3346 /*)
3347 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3348 ;;
3349 ?:/*)
3350 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3351 ;;
3352 *)
3353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3354 ac_dummy="$PATH"
3355 for ac_dir in $ac_dummy; do
3356 test -z "$ac_dir" && ac_dir=.
3357 if test -f $ac_dir/$ac_word; then
3358 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3359 break
3360 fi
3361 done
3362 IFS="$ac_save_ifs"
3363 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3364 ;;
3365esac
3366fi
3367GMSGFMT="$ac_cv_path_GMSGFMT"
3368if test -n "$GMSGFMT"; then
3369 echo "$ac_t""$GMSGFMT" 1>&6
3370else
3371 echo "$ac_t""no" 1>&6
3372fi
3373
3374 # Extract the first word of "xgettext", so it can be a program name with args.
3375set dummy xgettext; ac_word=$2
3376echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3377echo "configure:3378: checking for $ac_word" >&5
252b5132
RH
3378if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3379 echo $ac_n "(cached) $ac_c" 1>&6
3380else
3381 case "$XGETTEXT" in
3382 /*)
3383 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3384 ;;
3385 *)
3386 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3387 for ac_dir in $PATH; do
3388 test -z "$ac_dir" && ac_dir=.
3389 if test -f $ac_dir/$ac_word; then
3390 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3391 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3392 break
3393 fi
3394 fi
3395 done
3396 IFS="$ac_save_ifs"
3397 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3398 ;;
3399esac
3400fi
3401XGETTEXT="$ac_cv_path_XGETTEXT"
3402if test -n "$XGETTEXT"; then
3403 echo "$ac_t""$XGETTEXT" 1>&6
3404else
3405 echo "$ac_t""no" 1>&6
3406fi
3407
3408 cat > conftest.$ac_ext <<EOF
a74801ba 3409#line 3410 "configure"
252b5132
RH
3410#include "confdefs.h"
3411
3412int main() {
3413extern int _nl_msg_cat_cntr;
3414 return _nl_msg_cat_cntr
3415; return 0; }
3416EOF
a74801ba 3417if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3418 rm -rf conftest*
3419 CATOBJEXT=.gmo
3420 DATADIRNAME=share
3421else
3422 echo "configure: failed program was:" >&5
3423 cat conftest.$ac_ext >&5
3424 rm -rf conftest*
3425 CATOBJEXT=.mo
3426 DATADIRNAME=lib
3427fi
3428rm -f conftest*
3429 INSTOBJEXT=.mo
3430 fi
3431 fi
3432
3433else
3434 echo "$ac_t""no" 1>&6
3435fi
3436
3437
3438
3439 if test "$CATOBJEXT" = "NONE"; then
3440 nls_cv_use_gnu_gettext=yes
3441 fi
3442 fi
3443
3444 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3445 INTLOBJS="\$(GETTOBJS)"
3446 # Extract the first word of "msgfmt", so it can be a program name with args.
3447set dummy msgfmt; ac_word=$2
3448echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3449echo "configure:3450: checking for $ac_word" >&5
252b5132
RH
3450if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3451 echo $ac_n "(cached) $ac_c" 1>&6
3452else
3453 case "$MSGFMT" in
3454 /*)
3455 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3456 ;;
3457 *)
3458 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3459 for ac_dir in $PATH; do
3460 test -z "$ac_dir" && ac_dir=.
3461 if test -f $ac_dir/$ac_word; then
3462 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3463 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3464 break
3465 fi
3466 fi
3467 done
3468 IFS="$ac_save_ifs"
3469 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3470 ;;
3471esac
3472fi
3473MSGFMT="$ac_cv_path_MSGFMT"
3474if test -n "$MSGFMT"; then
3475 echo "$ac_t""$MSGFMT" 1>&6
3476else
3477 echo "$ac_t""no" 1>&6
3478fi
3479
3480 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3481set dummy gmsgfmt; ac_word=$2
3482echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3483echo "configure:3484: checking for $ac_word" >&5
252b5132
RH
3484if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3485 echo $ac_n "(cached) $ac_c" 1>&6
3486else
3487 case "$GMSGFMT" in
3488 /*)
3489 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3490 ;;
3491 ?:/*)
3492 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3493 ;;
3494 *)
3495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3496 ac_dummy="$PATH"
3497 for ac_dir in $ac_dummy; do
3498 test -z "$ac_dir" && ac_dir=.
3499 if test -f $ac_dir/$ac_word; then
3500 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3501 break
3502 fi
3503 done
3504 IFS="$ac_save_ifs"
3505 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3506 ;;
3507esac
3508fi
3509GMSGFMT="$ac_cv_path_GMSGFMT"
3510if test -n "$GMSGFMT"; then
3511 echo "$ac_t""$GMSGFMT" 1>&6
3512else
3513 echo "$ac_t""no" 1>&6
3514fi
3515
3516 # Extract the first word of "xgettext", so it can be a program name with args.
3517set dummy xgettext; ac_word=$2
3518echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3519echo "configure:3520: checking for $ac_word" >&5
252b5132
RH
3520if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3522else
3523 case "$XGETTEXT" in
3524 /*)
3525 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3526 ;;
3527 *)
3528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3529 for ac_dir in $PATH; do
3530 test -z "$ac_dir" && ac_dir=.
3531 if test -f $ac_dir/$ac_word; then
3532 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3533 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3534 break
3535 fi
3536 fi
3537 done
3538 IFS="$ac_save_ifs"
3539 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3540 ;;
3541esac
3542fi
3543XGETTEXT="$ac_cv_path_XGETTEXT"
3544if test -n "$XGETTEXT"; then
3545 echo "$ac_t""$XGETTEXT" 1>&6
3546else
3547 echo "$ac_t""no" 1>&6
3548fi
3549
3550
3551 USE_INCLUDED_LIBINTL=yes
3552 CATOBJEXT=.gmo
3553 INSTOBJEXT=.mo
3554 DATADIRNAME=share
3555 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3556 INTLLIBS=$INTLDEPS
3557 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3558 nls_cv_header_intl=libintl.h
3559 nls_cv_header_libgt=libgettext.h
3560 fi
3561
3562 if test "$XGETTEXT" != ":"; then
3563 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3564 : ;
3565 else
3566 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3567 XGETTEXT=":"
3568 fi
3569 fi
3570
3571 # We need to process the po/ directory.
3572 POSUB=po
3573 else
3574 DATADIRNAME=share
3575 nls_cv_header_intl=libintl.h
3576 nls_cv_header_libgt=libgettext.h
3577 fi
3578
3579 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3580 # because some of the sources are only built for this goal.
3581 if test "$PACKAGE" = gettext; then
3582 USE_NLS=yes
3583 USE_INCLUDED_LIBINTL=yes
3584 fi
3585
3586 for lang in $ALL_LINGUAS; do
3587 GMOFILES="$GMOFILES $lang.gmo"
3588 POFILES="$POFILES $lang.po"
3589 done
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604 if test "x$CATOBJEXT" != "x"; then
3605 if test "x$ALL_LINGUAS" = "x"; then
3606 LINGUAS=
3607 else
3608 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
a74801ba 3609echo "configure:3610: checking for catalogs to be installed" >&5
252b5132
RH
3610 NEW_LINGUAS=
3611 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3612 case "$ALL_LINGUAS" in
3613 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3614 esac
3615 done
3616 LINGUAS=$NEW_LINGUAS
3617 echo "$ac_t""$LINGUAS" 1>&6
3618 fi
3619
3620 if test -n "$LINGUAS"; then
3621 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3622 fi
3623 fi
3624
3625 if test $ac_cv_header_locale_h = yes; then
3626 INCLUDE_LOCALE_H="#include <locale.h>"
3627 else
3628 INCLUDE_LOCALE_H="\
3629/* The system does not provide the header <locale.h>. Take care yourself. */"
3630 fi
3631
3632
3633 if test -f $srcdir/po2tbl.sed.in; then
3634 if test "$CATOBJEXT" = ".cat"; then
3635 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3636echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
a74801ba 3637echo "configure:3638: checking for linux/version.h" >&5
252b5132
RH
3638if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3639 echo $ac_n "(cached) $ac_c" 1>&6
3640else
3641 cat > conftest.$ac_ext <<EOF
a74801ba 3642#line 3643 "configure"
252b5132
RH
3643#include "confdefs.h"
3644#include <linux/version.h>
3645EOF
3646ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 3647{ (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3648ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3649if test -z "$ac_err"; then
3650 rm -rf conftest*
3651 eval "ac_cv_header_$ac_safe=yes"
3652else
3653 echo "$ac_err" >&5
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 eval "ac_cv_header_$ac_safe=no"
3658fi
3659rm -f conftest*
3660fi
3661if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3662 echo "$ac_t""yes" 1>&6
3663 msgformat=linux
3664else
3665 echo "$ac_t""no" 1>&6
3666msgformat=xopen
3667fi
3668
3669
3670 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3671 fi
3672 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3673 $srcdir/po2tbl.sed.in > po2tbl.sed
3674 fi
3675
3676 if test "$PACKAGE" = "gettext"; then
3677 GT_NO="#NO#"
3678 GT_YES=
3679 else
3680 GT_NO=
3681 GT_YES="#YES#"
3682 fi
3683
3684
3685
3686 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3687
3688
3689 l=
3690
3691
3692 if test -d $srcdir/po; then
3693 test -d po || mkdir po
3694 if test "x$srcdir" != "x."; then
3695 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3696 posrcprefix="$srcdir/"
3697 else
3698 posrcprefix="../$srcdir/"
3699 fi
3700 else
3701 posrcprefix="../"
3702 fi
3703 rm -f po/POTFILES
3704 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3705 < $srcdir/po/POTFILES.in > po/POTFILES
3706 fi
3707
3708
3709echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
a74801ba 3710echo "configure:3711: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
3711 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3712if test "${enable_maintainer_mode+set}" = set; then
3713 enableval="$enable_maintainer_mode"
3714 USE_MAINTAINER_MODE=$enableval
3715else
3716 USE_MAINTAINER_MODE=no
3717fi
3718
3719 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
3720
3721
3722if test $USE_MAINTAINER_MODE = yes; then
3723 MAINTAINER_MODE_TRUE=
3724 MAINTAINER_MODE_FALSE='#'
3725else
3726 MAINTAINER_MODE_TRUE='#'
3727 MAINTAINER_MODE_FALSE=
3728fi
3729 MAINT=$MAINTAINER_MODE_TRUE
3730
3731
3732echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
a74801ba 3733echo "configure:3734: checking for Cygwin environment" >&5
252b5132
RH
3734if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3735 echo $ac_n "(cached) $ac_c" 1>&6
3736else
3737 cat > conftest.$ac_ext <<EOF
a74801ba 3738#line 3739 "configure"
252b5132
RH
3739#include "confdefs.h"
3740
3741int main() {
3742
3743#ifndef __CYGWIN__
3744#define __CYGWIN__ __CYGWIN32__
3745#endif
3746return __CYGWIN__;
3747; return 0; }
3748EOF
a74801ba 3749if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3750 rm -rf conftest*
3751 ac_cv_cygwin=yes
3752else
3753 echo "configure: failed program was:" >&5
3754 cat conftest.$ac_ext >&5
3755 rm -rf conftest*
3756 ac_cv_cygwin=no
3757fi
3758rm -f conftest*
3759rm -f conftest*
3760fi
3761
3762echo "$ac_t""$ac_cv_cygwin" 1>&6
3763CYGWIN=
3764test "$ac_cv_cygwin" = yes && CYGWIN=yes
3765echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
a74801ba 3766echo "configure:3767: checking for mingw32 environment" >&5
252b5132
RH
3767if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3768 echo $ac_n "(cached) $ac_c" 1>&6
3769else
3770 cat > conftest.$ac_ext <<EOF
a74801ba 3771#line 3772 "configure"
252b5132
RH
3772#include "confdefs.h"
3773
3774int main() {
3775return __MINGW32__;
3776; return 0; }
3777EOF
a74801ba 3778if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3779 rm -rf conftest*
3780 ac_cv_mingw32=yes
3781else
3782 echo "configure: failed program was:" >&5
3783 cat conftest.$ac_ext >&5
3784 rm -rf conftest*
3785 ac_cv_mingw32=no
3786fi
3787rm -f conftest*
3788rm -f conftest*
3789fi
3790
3791echo "$ac_t""$ac_cv_mingw32" 1>&6
3792MINGW32=
3793test "$ac_cv_mingw32" = yes && MINGW32=yes
3794
3795
3796echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
a74801ba 3797echo "configure:3798: checking for executable suffix" >&5
252b5132
RH
3798if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3802 ac_cv_exeext=.exe
3803else
3804 rm -f conftest*
3805 echo 'int main () { return 0; }' > conftest.$ac_ext
3806 ac_cv_exeext=
a74801ba 3807 if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
252b5132
RH
3808 for file in conftest.*; do
3809 case $file in
3810 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3811 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3812 esac
3813 done
3814 else
3815 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3816 fi
3817 rm -f conftest*
3818 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3819fi
3820fi
3821
3822EXEEXT=""
3823test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3824echo "$ac_t""${ac_cv_exeext}" 1>&6
3825ac_exeext=$EXEEXT
3826
2481e6a2
ILT
3827if test -n "$EXEEXT"; then
3828 cat >> confdefs.h <<\EOF
3829#define HAVE_EXECUTABLE_SUFFIX 1
3830EOF
3831
3832fi
bb0cb4db
ILT
3833cat >> confdefs.h <<EOF
3834#define EXECUTABLE_SUFFIX "${EXEEXT}"
3835EOF
3836
252b5132
RH
3837
3838# host-specific stuff:
3839
3840HDEFINES=
3841
3842. ${srcdir}/../bfd/configure.host
3843
3844
3845AR=${AR-ar}
3846
3847# Extract the first word of "ranlib", so it can be a program name with args.
3848set dummy ranlib; ac_word=$2
3849echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a74801ba 3850echo "configure:3851: checking for $ac_word" >&5
252b5132
RH
3851if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3852 echo $ac_n "(cached) $ac_c" 1>&6
3853else
3854 if test -n "$RANLIB"; then
3855 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3856else
3857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3858 ac_dummy="$PATH"
3859 for ac_dir in $ac_dummy; do
3860 test -z "$ac_dir" && ac_dir=.
3861 if test -f $ac_dir/$ac_word; then
3862 ac_cv_prog_RANLIB="ranlib"
3863 break
3864 fi
3865 done
3866 IFS="$ac_save_ifs"
3867 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3868fi
3869fi
3870RANLIB="$ac_cv_prog_RANLIB"
3871if test -n "$RANLIB"; then
3872 echo "$ac_t""$RANLIB" 1>&6
3873else
3874 echo "$ac_t""no" 1>&6
3875fi
3876
3877# Find a good install program. We prefer a C program (faster),
3878# so one script is as good as another. But avoid the broken or
3879# incompatible versions:
3880# SysV /etc/install, /usr/sbin/install
3881# SunOS /usr/etc/install
3882# IRIX /sbin/install
3883# AIX /bin/install
3884# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3885# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3886# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3887# ./install, which can be erroneously created by make from ./install.sh.
3888echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
a74801ba 3889echo "configure:3890: checking for a BSD compatible install" >&5
252b5132
RH
3890if test -z "$INSTALL"; then
3891if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3892 echo $ac_n "(cached) $ac_c" 1>&6
3893else
3894 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3895 for ac_dir in $PATH; do
3896 # Account for people who put trailing slashes in PATH elements.
3897 case "$ac_dir/" in
3898 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3899 *)
3900 # OSF1 and SCO ODT 3.0 have their own names for install.
3901 # Don't use installbsd from OSF since it installs stuff as root
3902 # by default.
3903 for ac_prog in ginstall scoinst install; do
3904 if test -f $ac_dir/$ac_prog; then
3905 if test $ac_prog = install &&
3906 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3907 # AIX install. It has an incompatible calling convention.
3908 :
3909 else
3910 ac_cv_path_install="$ac_dir/$ac_prog -c"
3911 break 2
3912 fi
3913 fi
3914 done
3915 ;;
3916 esac
3917 done
3918 IFS="$ac_save_IFS"
3919
3920fi
3921 if test "${ac_cv_path_install+set}" = set; then
3922 INSTALL="$ac_cv_path_install"
3923 else
3924 # As a last resort, use the slow shell script. We don't cache a
3925 # path for INSTALL within a source directory, because that will
3926 # break other packages using the cache if that directory is
3927 # removed, or if the path is relative.
3928 INSTALL="$ac_install_sh"
3929 fi
3930fi
3931echo "$ac_t""$INSTALL" 1>&6
3932
3933# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3934# It thinks the first close brace ends the variable substitution.
3935test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3936
3937test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3938
3939test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3940
3941
3942# Put a plausible default for CC_FOR_BUILD in Makefile.
3943if test -z "$CC_FOR_BUILD"; then
3944 if test "x$cross_compiling" = "xno"; then
3945 CC_FOR_BUILD='$(CC)'
3946 else
3947 CC_FOR_BUILD=gcc
3948 fi
3949fi
3950
3951# Also set EXEEXT_FOR_BUILD.
3952if test "x$cross_compiling" = "xno"; then
3953 EXEEXT_FOR_BUILD='$(EXEEXT)'
3954else
3955 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
a74801ba 3956echo "configure:3957: checking for build system executable suffix" >&5
252b5132
RH
3957if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
3959else
7a7b06ef
ILT
3960 rm -f conftest*
3961 echo 'int main () { return 0; }' > conftest.c
3962 bfd_cv_build_exeext=
3963 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
3964 for file in conftest.*; do
3965 case $file in
3966 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3967 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
3968 esac
3969 done
3970 rm -f conftest*
3971 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
252b5132
RH
3972fi
3973
3974echo "$ac_t""$bfd_cv_build_exeext" 1>&6
3975 EXEEXT_FOR_BUILD=""
3976 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
3977fi
3978
3979
8a965946
ILT
3980DEMANGLER_NAME=c++filt
3981case "${host}" in
3982 *-*-go32* | *-*-msdos*)
3983 DEMANGLER_NAME=cxxfilt
3984esac
3985
3986
252b5132
RH
3987for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
3988do
3989ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3990echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a74801ba 3991echo "configure:3992: checking for $ac_hdr" >&5
252b5132
RH
3992if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3993 echo $ac_n "(cached) $ac_c" 1>&6
3994else
3995 cat > conftest.$ac_ext <<EOF
a74801ba 3996#line 3997 "configure"
252b5132
RH
3997#include "confdefs.h"
3998#include <$ac_hdr>
3999EOF
4000ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a74801ba 4001{ (eval echo configure:4002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4002ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4003if test -z "$ac_err"; then
4004 rm -rf conftest*
4005 eval "ac_cv_header_$ac_safe=yes"
4006else
4007 echo "$ac_err" >&5
4008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
4010 rm -rf conftest*
4011 eval "ac_cv_header_$ac_safe=no"
4012fi
4013rm -f conftest*
4014fi
4015if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4016 echo "$ac_t""yes" 1>&6
4017 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4018 cat >> confdefs.h <<EOF
4019#define $ac_tr_hdr 1
4020EOF
4021
4022else
4023 echo "$ac_t""no" 1>&6
4024fi
4025done
4026
4027echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
a74801ba 4028echo "configure:4029: checking for sys/wait.h that is POSIX.1 compatible" >&5
252b5132
RH
4029if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4031else
4032 cat > conftest.$ac_ext <<EOF
a74801ba 4033#line 4034 "configure"
252b5132
RH
4034#include "confdefs.h"
4035#include <sys/types.h>
4036#include <sys/wait.h>
4037#ifndef WEXITSTATUS
4038#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4039#endif
4040#ifndef WIFEXITED
4041#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4042#endif
4043int main() {
4044int s;
4045wait (&s);
4046s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4047; return 0; }
4048EOF
a74801ba 4049if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4050 rm -rf conftest*
4051 ac_cv_header_sys_wait_h=yes
4052else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 rm -rf conftest*
4056 ac_cv_header_sys_wait_h=no
4057fi
4058rm -f conftest*
4059fi
4060
4061echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4062if test $ac_cv_header_sys_wait_h = yes; then
4063 cat >> confdefs.h <<\EOF
4064#define HAVE_SYS_WAIT_H 1
4065EOF
4066
4067fi
4068
4069# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4070# for constant arguments. Useless!
4071echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a74801ba 4072echo "configure:4073: checking for working alloca.h" >&5
252b5132
RH
4073if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4074 echo $ac_n "(cached) $ac_c" 1>&6
4075else
4076 cat > conftest.$ac_ext <<EOF
a74801ba 4077#line 4078 "configure"
252b5132
RH
4078#include "confdefs.h"
4079#include <alloca.h>
4080int main() {
4081char *p = alloca(2 * sizeof(int));
4082; return 0; }
4083EOF
a74801ba 4084if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4085 rm -rf conftest*
4086 ac_cv_header_alloca_h=yes
4087else
4088 echo "configure: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 rm -rf conftest*
4091 ac_cv_header_alloca_h=no
4092fi
4093rm -f conftest*
4094fi
4095
4096echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4097if test $ac_cv_header_alloca_h = yes; then
4098 cat >> confdefs.h <<\EOF
4099#define HAVE_ALLOCA_H 1
4100EOF
4101
4102fi
4103
4104echo $ac_n "checking for alloca""... $ac_c" 1>&6
a74801ba 4105echo "configure:4106: checking for alloca" >&5
252b5132
RH
4106if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108else
4109 cat > conftest.$ac_ext <<EOF
a74801ba 4110#line 4111 "configure"
252b5132
RH
4111#include "confdefs.h"
4112
4113#ifdef __GNUC__
4114# define alloca __builtin_alloca
4115#else
4116# ifdef _MSC_VER
4117# include <malloc.h>
4118# define alloca _alloca
4119# else
4120# if HAVE_ALLOCA_H
4121# include <alloca.h>
4122# else
4123# ifdef _AIX
4124 #pragma alloca
4125# else
4126# ifndef alloca /* predefined by HP cc +Olibcalls */
4127char *alloca ();
4128# endif
4129# endif
4130# endif
4131# endif
4132#endif
4133
4134int main() {
4135char *p = (char *) alloca(1);
4136; return 0; }
4137EOF
a74801ba 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 ac_cv_func_alloca_works=yes
4141else
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144 rm -rf conftest*
4145 ac_cv_func_alloca_works=no
4146fi
4147rm -f conftest*
4148fi
4149
4150echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4151if test $ac_cv_func_alloca_works = yes; then
4152 cat >> confdefs.h <<\EOF
4153#define HAVE_ALLOCA 1
4154EOF
4155
4156fi
4157
4158if test $ac_cv_func_alloca_works = no; then
4159 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4160 # that cause trouble. Some versions do not even contain alloca or
4161 # contain a buggy version. If you still want to use their alloca,
4162 # use ar to extract alloca.o from them instead of compiling alloca.c.
4163 ALLOCA=alloca.${ac_objext}
4164 cat >> confdefs.h <<\EOF
4165#define C_ALLOCA 1
4166EOF
4167
4168
4169echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a74801ba 4170echo "configure:4171: checking whether alloca needs Cray hooks" >&5
252b5132
RH
4171if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4172 echo $ac_n "(cached) $ac_c" 1>&6
4173else
4174 cat > conftest.$ac_ext <<EOF
a74801ba 4175#line 4176 "configure"
252b5132
RH
4176#include "confdefs.h"
4177#if defined(CRAY) && ! defined(CRAY2)
4178webecray
4179#else
4180wenotbecray
4181#endif
4182
4183EOF
4184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4185 egrep "webecray" >/dev/null 2>&1; then
4186 rm -rf conftest*
4187 ac_cv_os_cray=yes
4188else
4189 rm -rf conftest*
4190 ac_cv_os_cray=no
4191fi
4192rm -f conftest*
4193
4194fi
4195
4196echo "$ac_t""$ac_cv_os_cray" 1>&6
4197if test $ac_cv_os_cray = yes; then
4198for ac_func in _getb67 GETB67 getb67; do
4199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 4200echo "configure:4201: checking for $ac_func" >&5
252b5132
RH
4201if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203else
4204 cat > conftest.$ac_ext <<EOF
a74801ba 4205#line 4206 "configure"
252b5132
RH
4206#include "confdefs.h"
4207/* System header to define __stub macros and hopefully few prototypes,
4208 which can conflict with char $ac_func(); below. */
4209#include <assert.h>
4210/* Override any gcc2 internal prototype to avoid an error. */
4211/* We use char because int might match the return type of a gcc2
4212 builtin and then its argument prototype would still apply. */
4213char $ac_func();
4214
4215int main() {
4216
4217/* The GNU C library defines this for functions which it implements
4218 to always fail with ENOSYS. Some functions are actually named
4219 something starting with __ and the normal name is an alias. */
4220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4221choke me
4222#else
4223$ac_func();
4224#endif
4225
4226; return 0; }
4227EOF
a74801ba 4228if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4229 rm -rf conftest*
4230 eval "ac_cv_func_$ac_func=yes"
4231else
4232 echo "configure: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 rm -rf conftest*
4235 eval "ac_cv_func_$ac_func=no"
4236fi
4237rm -f conftest*
4238fi
4239
4240if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4241 echo "$ac_t""yes" 1>&6
4242 cat >> confdefs.h <<EOF
4243#define CRAY_STACKSEG_END $ac_func
4244EOF
4245
4246 break
4247else
4248 echo "$ac_t""no" 1>&6
4249fi
4250
4251done
4252fi
4253
4254echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a74801ba 4255echo "configure:4256: checking stack direction for C alloca" >&5
252b5132
RH
4256if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4257 echo $ac_n "(cached) $ac_c" 1>&6
4258else
4259 if test "$cross_compiling" = yes; then
4260 ac_cv_c_stack_direction=0
4261else
4262 cat > conftest.$ac_ext <<EOF
a74801ba 4263#line 4264 "configure"
252b5132
RH
4264#include "confdefs.h"
4265find_stack_direction ()
4266{
4267 static char *addr = 0;
4268 auto char dummy;
4269 if (addr == 0)
4270 {
4271 addr = &dummy;
4272 return find_stack_direction ();
4273 }
4274 else
4275 return (&dummy > addr) ? 1 : -1;
4276}
4277main ()
4278{
4279 exit (find_stack_direction() < 0);
4280}
4281EOF
a74801ba 4282if { (eval echo configure:4283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
4283then
4284 ac_cv_c_stack_direction=1
4285else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -fr conftest*
4289 ac_cv_c_stack_direction=-1
4290fi
4291rm -fr conftest*
4292fi
4293
4294fi
4295
4296echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4297cat >> confdefs.h <<EOF
4298#define STACK_DIRECTION $ac_cv_c_stack_direction
4299EOF
4300
4301fi
4302
4303for ac_func in sbrk utimes
4304do
4305echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a74801ba 4306echo "configure:4307: checking for $ac_func" >&5
252b5132
RH
4307if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
4309else
4310 cat > conftest.$ac_ext <<EOF
a74801ba 4311#line 4312 "configure"
252b5132
RH
4312#include "confdefs.h"
4313/* System header to define __stub macros and hopefully few prototypes,
4314 which can conflict with char $ac_func(); below. */
4315#include <assert.h>
4316/* Override any gcc2 internal prototype to avoid an error. */
4317/* We use char because int might match the return type of a gcc2
4318 builtin and then its argument prototype would still apply. */
4319char $ac_func();
4320
4321int main() {
4322
4323/* The GNU C library defines this for functions which it implements
4324 to always fail with ENOSYS. Some functions are actually named
4325 something starting with __ and the normal name is an alias. */
4326#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4327choke me
4328#else
4329$ac_func();
4330#endif
4331
4332; return 0; }
4333EOF
a74801ba 4334if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4335 rm -rf conftest*
4336 eval "ac_cv_func_$ac_func=yes"
4337else
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4340 rm -rf conftest*
4341 eval "ac_cv_func_$ac_func=no"
4342fi
4343rm -f conftest*
4344fi
4345
4346if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4347 echo "$ac_t""yes" 1>&6
4348 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4349 cat >> confdefs.h <<EOF
4350#define $ac_tr_func 1
4351EOF
4352
4353else
4354 echo "$ac_t""no" 1>&6
4355fi
4356done
4357
4358
f353eb8a
ILT
4359# Some systems have frexp only in -lm, not in -lc.
4360
4361echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
a74801ba 4362echo "configure:4363: checking for library containing frexp" >&5
f353eb8a
ILT
4363if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
4364 echo $ac_n "(cached) $ac_c" 1>&6
4365else
4366 ac_func_search_save_LIBS="$LIBS"
4367ac_cv_search_frexp="no"
4368cat > conftest.$ac_ext <<EOF
a74801ba 4369#line 4370 "configure"
f353eb8a
ILT
4370#include "confdefs.h"
4371/* Override any gcc2 internal prototype to avoid an error. */
4372/* We use char because int might match the return type of a gcc2
4373 builtin and then its argument prototype would still apply. */
4374char frexp();
4375
4376int main() {
4377frexp()
4378; return 0; }
4379EOF
a74801ba 4380if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f353eb8a
ILT
4381 rm -rf conftest*
4382 ac_cv_search_frexp="none required"
4383else
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4386fi
4387rm -f conftest*
9a1cab10 4388test "$ac_cv_search_frexp" = "no" && for i in m; do
f353eb8a
ILT
4389LIBS="-l$i $ac_func_search_save_LIBS"
4390cat > conftest.$ac_ext <<EOF
a74801ba 4391#line 4392 "configure"
f353eb8a
ILT
4392#include "confdefs.h"
4393/* Override any gcc2 internal prototype to avoid an error. */
4394/* We use char because int might match the return type of a gcc2
4395 builtin and then its argument prototype would still apply. */
4396char frexp();
4397
4398int main() {
4399frexp()
4400; return 0; }
4401EOF
a74801ba 4402if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f353eb8a
ILT
4403 rm -rf conftest*
4404 ac_cv_search_frexp="-l$i"
4405break
4406else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409fi
4410rm -f conftest*
4411done
4412LIBS="$ac_func_search_save_LIBS"
4413fi
4414
4415echo "$ac_t""$ac_cv_search_frexp" 1>&6
4416if test "$ac_cv_search_frexp" != "no"; then
4417 test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
4418
4419else :
4420
4421fi
4422
252b5132 4423echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
a74801ba 4424echo "configure:4425: checking for time_t in time.h" >&5
252b5132
RH
4425if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
4426 echo $ac_n "(cached) $ac_c" 1>&6
4427else
4428 cat > conftest.$ac_ext <<EOF
a74801ba 4429#line 4430 "configure"
252b5132
RH
4430#include "confdefs.h"
4431#include <time.h>
4432int main() {
4433time_t i;
4434; return 0; }
4435EOF
a74801ba 4436if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4437 rm -rf conftest*
4438 bu_cv_decl_time_t_time_h=yes
4439else
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 rm -rf conftest*
4443 bu_cv_decl_time_t_time_h=no
4444fi
4445rm -f conftest*
4446fi
4447
4448echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
4449if test $bu_cv_decl_time_t_time_h = yes; then
4450 cat >> confdefs.h <<\EOF
4451#define HAVE_TIME_T_IN_TIME_H 1
4452EOF
4453
4454fi
4455
4456echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
a74801ba 4457echo "configure:4458: checking for time_t in sys/types.h" >&5
252b5132
RH
4458if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
4459 echo $ac_n "(cached) $ac_c" 1>&6
4460else
4461 cat > conftest.$ac_ext <<EOF
a74801ba 4462#line 4463 "configure"
252b5132
RH
4463#include "confdefs.h"
4464#include <sys/types.h>
4465int main() {
4466time_t i;
4467; return 0; }
4468EOF
a74801ba 4469if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4470 rm -rf conftest*
4471 bu_cv_decl_time_t_types_h=yes
4472else
4473 echo "configure: failed program was:" >&5
4474 cat conftest.$ac_ext >&5
4475 rm -rf conftest*
4476 bu_cv_decl_time_t_types_h=no
4477fi
4478rm -f conftest*
4479fi
4480
4481echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
4482if test $bu_cv_decl_time_t_types_h = yes; then
4483 cat >> confdefs.h <<\EOF
4484#define HAVE_TIME_T_IN_TYPES_H 1
4485EOF
4486
4487fi
4488
4489# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
4490# by default.
4491echo $ac_n "checking for utime.h""... $ac_c" 1>&6
a74801ba 4492echo "configure:4493: checking for utime.h" >&5
252b5132
RH
4493if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
4494 echo $ac_n "(cached) $ac_c" 1>&6
4495else
4496 cat > conftest.$ac_ext <<EOF
a74801ba 4497#line 4498 "configure"
252b5132
RH
4498#include "confdefs.h"
4499#include <sys/types.h>
4500#ifdef HAVE_TIME_H
4501#include <time.h>
4502#endif
4503#include <utime.h>
4504int main() {
4505struct utimbuf s;
4506; return 0; }
4507EOF
a74801ba 4508if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4509 rm -rf conftest*
4510 bu_cv_header_utime_h=yes
4511else
4512 echo "configure: failed program was:" >&5
4513 cat conftest.$ac_ext >&5
4514 rm -rf conftest*
4515 bu_cv_header_utime_h=no
4516fi
4517rm -f conftest*
4518fi
4519
4520echo "$ac_t""$bu_cv_header_utime_h" 1>&6
4521if test $bu_cv_header_utime_h = yes; then
4522 cat >> confdefs.h <<\EOF
4523#define HAVE_GOOD_UTIME_H 1
4524EOF
4525
4526fi
4527
4528echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
a74801ba 4529echo "configure:4530: checking whether fprintf must be declared" >&5
252b5132
RH
4530if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
4532else
4533 cat > conftest.$ac_ext <<EOF
a74801ba 4534#line 4535 "configure"
252b5132
RH
4535#include "confdefs.h"
4536
4537#include <stdio.h>
4538#ifdef HAVE_STRING_H
4539#include <string.h>
4540#else
4541#ifdef HAVE_STRINGS_H
4542#include <strings.h>
4543#endif
4544#endif
4545#ifdef HAVE_STDLIB_H
4546#include <stdlib.h>
4547#endif
4548#ifdef HAVE_UNISTD_H
4549#include <unistd.h>
4550#endif
4551int main() {
4552char *(*pfn) = (char *(*)) fprintf
4553; return 0; }
4554EOF
a74801ba 4555if { (eval echo configure:4556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4556 rm -rf conftest*
4557 bfd_cv_decl_needed_fprintf=no
4558else
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 bfd_cv_decl_needed_fprintf=yes
4563fi
4564rm -f conftest*
4565fi
4566
4567echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
4568if test $bfd_cv_decl_needed_fprintf = yes; then
4569 cat >> confdefs.h <<\EOF
4570#define NEED_DECLARATION_FPRINTF 1
4571EOF
4572
4573fi
4574
4575echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
a74801ba 4576echo "configure:4577: checking whether strstr must be declared" >&5
252b5132
RH
4577if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579else
4580 cat > conftest.$ac_ext <<EOF
a74801ba 4581#line 4582 "configure"
252b5132
RH
4582#include "confdefs.h"
4583
4584#include <stdio.h>
4585#ifdef HAVE_STRING_H
4586#include <string.h>
4587#else
4588#ifdef HAVE_STRINGS_H
4589#include <strings.h>
4590#endif
4591#endif
4592#ifdef HAVE_STDLIB_H
4593#include <stdlib.h>
4594#endif
4595#ifdef HAVE_UNISTD_H
4596#include <unistd.h>
4597#endif
4598int main() {
4599char *(*pfn) = (char *(*)) strstr
4600; return 0; }
4601EOF
a74801ba 4602if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4603 rm -rf conftest*
4604 bfd_cv_decl_needed_strstr=no
4605else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 bfd_cv_decl_needed_strstr=yes
4610fi
4611rm -f conftest*
4612fi
4613
4614echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4615if test $bfd_cv_decl_needed_strstr = yes; then
4616 cat >> confdefs.h <<\EOF
4617#define NEED_DECLARATION_STRSTR 1
4618EOF
4619
4620fi
4621
4622echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
a74801ba 4623echo "configure:4624: checking whether sbrk must be declared" >&5
252b5132
RH
4624if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4625 echo $ac_n "(cached) $ac_c" 1>&6
4626else
4627 cat > conftest.$ac_ext <<EOF
a74801ba 4628#line 4629 "configure"
252b5132
RH
4629#include "confdefs.h"
4630
4631#include <stdio.h>
4632#ifdef HAVE_STRING_H
4633#include <string.h>
4634#else
4635#ifdef HAVE_STRINGS_H
4636#include <strings.h>
4637#endif
4638#endif
4639#ifdef HAVE_STDLIB_H
4640#include <stdlib.h>
4641#endif
4642#ifdef HAVE_UNISTD_H
4643#include <unistd.h>
4644#endif
4645int main() {
4646char *(*pfn) = (char *(*)) sbrk
4647; return 0; }
4648EOF
a74801ba 4649if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4650 rm -rf conftest*
4651 bfd_cv_decl_needed_sbrk=no
4652else
4653 echo "configure: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 rm -rf conftest*
4656 bfd_cv_decl_needed_sbrk=yes
4657fi
4658rm -f conftest*
4659fi
4660
4661echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4662if test $bfd_cv_decl_needed_sbrk = yes; then
4663 cat >> confdefs.h <<\EOF
4664#define NEED_DECLARATION_SBRK 1
4665EOF
4666
4667fi
4668
4669echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
a74801ba 4670echo "configure:4671: checking whether getenv must be declared" >&5
252b5132
RH
4671if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4672 echo $ac_n "(cached) $ac_c" 1>&6
4673else
4674 cat > conftest.$ac_ext <<EOF
a74801ba 4675#line 4676 "configure"
252b5132
RH
4676#include "confdefs.h"
4677
4678#include <stdio.h>
4679#ifdef HAVE_STRING_H
4680#include <string.h>
4681#else
4682#ifdef HAVE_STRINGS_H
4683#include <strings.h>
4684#endif
4685#endif
4686#ifdef HAVE_STDLIB_H
4687#include <stdlib.h>
4688#endif
4689#ifdef HAVE_UNISTD_H
4690#include <unistd.h>
4691#endif
4692int main() {
4693char *(*pfn) = (char *(*)) getenv
4694; return 0; }
4695EOF
a74801ba 4696if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4697 rm -rf conftest*
4698 bfd_cv_decl_needed_getenv=no
4699else
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -rf conftest*
4703 bfd_cv_decl_needed_getenv=yes
4704fi
4705rm -f conftest*
4706fi
4707
4708echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4709if test $bfd_cv_decl_needed_getenv = yes; then
4710 cat >> confdefs.h <<\EOF
4711#define NEED_DECLARATION_GETENV 1
4712EOF
4713
4714fi
4715
4716echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
a74801ba 4717echo "configure:4718: checking whether environ must be declared" >&5
252b5132
RH
4718if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
4719 echo $ac_n "(cached) $ac_c" 1>&6
4720else
4721 cat > conftest.$ac_ext <<EOF
a74801ba 4722#line 4723 "configure"
252b5132
RH
4723#include "confdefs.h"
4724
4725#include <stdio.h>
4726#ifdef HAVE_STRING_H
4727#include <string.h>
4728#else
4729#ifdef HAVE_STRINGS_H
4730#include <strings.h>
4731#endif
4732#endif
4733#ifdef HAVE_STDLIB_H
4734#include <stdlib.h>
4735#endif
4736#ifdef HAVE_UNISTD_H
4737#include <unistd.h>
4738#endif
4739int main() {
4740char *(*pfn) = (char *(*)) environ
4741; return 0; }
4742EOF
a74801ba 4743if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4744 rm -rf conftest*
4745 bfd_cv_decl_needed_environ=no
4746else
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 rm -rf conftest*
4750 bfd_cv_decl_needed_environ=yes
4751fi
4752rm -f conftest*
4753fi
4754
4755echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
4756if test $bfd_cv_decl_needed_environ = yes; then
4757 cat >> confdefs.h <<\EOF
4758#define NEED_DECLARATION_ENVIRON 1
4759EOF
4760
4761fi
4762
4763
4764
4765case "${host}" in
8a965946 4766*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
252b5132
RH
4767 cat >> confdefs.h <<\EOF
4768#define USE_BINARY_FOPEN 1
4769EOF
4770 ;;
4771esac
4772
4773# target-specific stuff:
4774
4775# Canonicalize the secondary target names.
4776if test -n "$enable_targets"; then
4777 for targ in `echo $enable_targets | sed 's/,/ /g'`
4778 do
6d83c84b 4779 result=`$ac_config_sub $targ 2>/dev/null`
252b5132
RH
4780 if test -n "$result"; then
4781 canon_targets="$canon_targets $result"
4782 else
4783 # Allow targets that config.sub doesn't recognize, like "all".
4784 canon_targets="$canon_targets $targ"
4785 fi
4786 done
4787fi
4788
4789all_targets=false
4790BUILD_NLMCONV=
4791NLMCONV_DEFS=
4792BUILD_SRCONV=
4793BUILD_DLLTOOL=
4794DLLTOOL_DEFS=
4795BUILD_WINDRES=
4796BUILD_DLLWRAP=
4797BUILD_MISC=
4798
4799for targ in $target $canon_targets
4800do
4801 if test "x$targ" = "xall"; then
4802 all_targets=true
4803 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4804 BUILD_SRCONV='$(SRCONV_PROG)'
4805 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
4806 else
4807 case $targ in
4808 i[3456]86*-*-netware*)
4809 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4810 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
4811 ;;
4812 alpha*-*-netware*)
4813 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4814 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
4815 ;;
4816 powerpc*-*-netware*)
4817 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4818 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
4819 ;;
4820 sparc*-*-netware*)
4821 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4822 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
4823 ;;
4824 esac
4825 case $targ in
4826 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
4827 esac
4828 case $targ in
8a0e0f38 4829 arm-*pe* | arm-*-wince)
252b5132
RH
4830 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4831 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4832 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4833 ;;
252b5132
RH
4834 thumb-*pe*)
4835 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4836 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4837 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4838 ;;
252b5132
RH
4839 i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
4840 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4841 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4842 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4843 BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
7a7b06ef
ILT
4844 ;;
4845 i3-686-*-interix)
4846 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
4847 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4848 ;;
252b5132
RH
4849 powerpc*-*-*pe* | powerpc*-*-cygwin*)
4850 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4851 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
4852 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
8a0e0f38
NC
4853 ;;
4854 sh*-*-*pe)
4855 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4856 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
4857 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4858 ;;
4859 mips*-*-*pe)
4860 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4861 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
4862 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4863 ;;
661016bb
NC
4864 mcore-*pe)
4865 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4866 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
4867 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4868 ;;
661016bb
NC
4869 mcore-*elf)
4870 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4871 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
7a7b06ef 4872 ;;
252b5132
RH
4873 esac
4874 fi
4875done
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886cat >> confdefs.h <<EOF
4887#define TARGET "${target}"
4888EOF
4889
4890
4891targ=$target
4892. $srcdir/../bfd/config.bfd
4893if test "x$targ_underscore" = "xyes"; then
4894 UNDERSCORE=1
4895else
4896 UNDERSCORE=0
4897fi
4898
4899
4900trap '' 1 2 15
4901cat > confcache <<\EOF
4902# This file is a shell script that caches the results of configure
4903# tests run on this system so they can be shared between configure
4904# scripts and configure runs. It is not useful on other systems.
4905# If it contains results you don't want to keep, you may remove or edit it.
4906#
4907# By default, configure uses ./config.cache as the cache file,
4908# creating it if it does not exist already. You can give configure
4909# the --cache-file=FILE option to use a different cache file; that is
4910# what configure does when it calls configure scripts in
4911# subdirectories, so they share the cache.
4912# Giving --cache-file=/dev/null disables caching, for debugging configure.
4913# config.status only pays attention to the cache file if you give it the
4914# --recheck option to rerun configure.
4915#
4916EOF
4917# The following way of writing the cache mishandles newlines in values,
4918# but we know of no workaround that is simple, portable, and efficient.
4919# So, don't put newlines in cache variables' values.
4920# Ultrix sh set writes to stderr and can't be redirected directly,
4921# and sets the high bit in the cache file unless we assign to the vars.
4922(set) 2>&1 |
4923 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4924 *ac_space=\ *)
4925 # `set' does not quote correctly, so add quotes (double-quote substitution
4926 # turns \\\\ into \\, and sed turns \\ into \).
4927 sed -n \
4928 -e "s/'/'\\\\''/g" \
4929 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4930 ;;
4931 *)
4932 # `set' quotes correctly as required by POSIX, so do not add quotes.
4933 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4934 ;;
4935 esac >> confcache
4936if cmp -s $cache_file confcache; then
4937 :
4938else
4939 if test -w $cache_file; then
4940 echo "updating cache $cache_file"
4941 cat confcache > $cache_file
4942 else
4943 echo "not updating unwritable cache $cache_file"
4944 fi
4945fi
4946rm -f confcache
4947
4948trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4949
4950test "x$prefix" = xNONE && prefix=$ac_default_prefix
4951# Let make expand exec_prefix.
4952test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4953
4954# Any assignment to VPATH causes Sun make to only execute
4955# the first set of double-colon rules, so remove it if not needed.
4956# If there is a colon in the path, we need to keep it.
4957if test "x$srcdir" = x.; then
4958 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4959fi
4960
4961trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4962
4963DEFS=-DHAVE_CONFIG_H
4964
4965# Without the "./", some shells look in PATH for config.status.
4966: ${CONFIG_STATUS=./config.status}
4967
4968echo creating $CONFIG_STATUS
4969rm -f $CONFIG_STATUS
4970cat > $CONFIG_STATUS <<EOF
4971#! /bin/sh
4972# Generated automatically by configure.
4973# Run this file to recreate the current configuration.
4974# This directory was configured as follows,
4975# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4976#
4977# $0 $ac_configure_args
4978#
4979# Compiler output produced by configure, useful for debugging
4980# configure, is in ./config.log if it exists.
4981
4982ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4983for ac_option
4984do
4985 case "\$ac_option" in
4986 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4987 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4988 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4989 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4990 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4991 exit 0 ;;
4992 -help | --help | --hel | --he | --h)
4993 echo "\$ac_cs_usage"; exit 0 ;;
4994 *) echo "\$ac_cs_usage"; exit 1 ;;
4995 esac
4996done
4997
4998ac_given_srcdir=$srcdir
4999ac_given_INSTALL="$INSTALL"
5000
5001trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5002EOF
5003cat >> $CONFIG_STATUS <<EOF
5004
5005# Protect against being on the right side of a sed subst in config.status.
5006sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5007 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5008$ac_vpsub
5009$extrasub
5010s%@SHELL@%$SHELL%g
5011s%@CFLAGS@%$CFLAGS%g
5012s%@CPPFLAGS@%$CPPFLAGS%g
5013s%@CXXFLAGS@%$CXXFLAGS%g
5014s%@FFLAGS@%$FFLAGS%g
5015s%@DEFS@%$DEFS%g
5016s%@LDFLAGS@%$LDFLAGS%g
5017s%@LIBS@%$LIBS%g
5018s%@exec_prefix@%$exec_prefix%g
5019s%@prefix@%$prefix%g
5020s%@program_transform_name@%$program_transform_name%g
5021s%@bindir@%$bindir%g
5022s%@sbindir@%$sbindir%g
5023s%@libexecdir@%$libexecdir%g
5024s%@datadir@%$datadir%g
5025s%@sysconfdir@%$sysconfdir%g
5026s%@sharedstatedir@%$sharedstatedir%g
5027s%@localstatedir@%$localstatedir%g
5028s%@libdir@%$libdir%g
5029s%@includedir@%$includedir%g
5030s%@oldincludedir@%$oldincludedir%g
5031s%@infodir@%$infodir%g
5032s%@mandir@%$mandir%g
5033s%@host@%$host%g
5034s%@host_alias@%$host_alias%g
5035s%@host_cpu@%$host_cpu%g
5036s%@host_vendor@%$host_vendor%g
5037s%@host_os@%$host_os%g
5038s%@target@%$target%g
5039s%@target_alias@%$target_alias%g
5040s%@target_cpu@%$target_cpu%g
5041s%@target_vendor@%$target_vendor%g
5042s%@target_os@%$target_os%g
5043s%@build@%$build%g
5044s%@build_alias@%$build_alias%g
5045s%@build_cpu@%$build_cpu%g
5046s%@build_vendor@%$build_vendor%g
5047s%@build_os@%$build_os%g
5048s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5049s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5050s%@INSTALL_DATA@%$INSTALL_DATA%g
5051s%@PACKAGE@%$PACKAGE%g
5052s%@VERSION@%$VERSION%g
5053s%@ACLOCAL@%$ACLOCAL%g
5054s%@AUTOCONF@%$AUTOCONF%g
5055s%@AUTOMAKE@%$AUTOMAKE%g
5056s%@AUTOHEADER@%$AUTOHEADER%g
5057s%@MAKEINFO@%$MAKEINFO%g
5058s%@SET_MAKE@%$SET_MAKE%g
5059s%@RANLIB@%$RANLIB%g
5060s%@CC@%$CC%g
252b5132 5061s%@LN_S@%$LN_S%g
252b5132
RH
5062s%@LIBTOOL@%$LIBTOOL%g
5063s%@YACC@%$YACC%g
5064s%@LEX@%$LEX%g
5065s%@LEXLIB@%$LEXLIB%g
5066s%@CPP@%$CPP%g
5067s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5068s%@ALLOCA@%$ALLOCA%g
5069s%@USE_NLS@%$USE_NLS%g
5070s%@MSGFMT@%$MSGFMT%g
5071s%@GMSGFMT@%$GMSGFMT%g
5072s%@XGETTEXT@%$XGETTEXT%g
5073s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5074s%@CATALOGS@%$CATALOGS%g
5075s%@CATOBJEXT@%$CATOBJEXT%g
5076s%@DATADIRNAME@%$DATADIRNAME%g
5077s%@GMOFILES@%$GMOFILES%g
5078s%@INSTOBJEXT@%$INSTOBJEXT%g
5079s%@INTLDEPS@%$INTLDEPS%g
5080s%@INTLLIBS@%$INTLLIBS%g
5081s%@INTLOBJS@%$INTLOBJS%g
5082s%@POFILES@%$POFILES%g
5083s%@POSUB@%$POSUB%g
5084s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5085s%@GT_NO@%$GT_NO%g
5086s%@GT_YES@%$GT_YES%g
5087s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5088s%@l@%$l%g
5089s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5090s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5091s%@MAINT@%$MAINT%g
5092s%@EXEEXT@%$EXEEXT%g
5093s%@HDEFINES@%$HDEFINES%g
5094s%@AR@%$AR%g
5095s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5096s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
8a965946 5097s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
252b5132
RH
5098s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5099s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5100s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5101s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5102s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5103s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5104s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5105s%@BUILD_MISC@%$BUILD_MISC%g
5106s%@UNDERSCORE@%$UNDERSCORE%g
5107
5108CEOF
5109EOF
5110
5111cat >> $CONFIG_STATUS <<\EOF
5112
5113# Split the substitutions into bite-sized pieces for seds with
5114# small command number limits, like on Digital OSF/1 and HP-UX.
5115ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5116ac_file=1 # Number of current file.
5117ac_beg=1 # First line for current file.
5118ac_end=$ac_max_sed_cmds # Line after last line for current file.
5119ac_more_lines=:
5120ac_sed_cmds=""
5121while $ac_more_lines; do
5122 if test $ac_beg -gt 1; then
5123 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5124 else
5125 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5126 fi
5127 if test ! -s conftest.s$ac_file; then
5128 ac_more_lines=false
5129 rm -f conftest.s$ac_file
5130 else
5131 if test -z "$ac_sed_cmds"; then
5132 ac_sed_cmds="sed -f conftest.s$ac_file"
5133 else
5134 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5135 fi
5136 ac_file=`expr $ac_file + 1`
5137 ac_beg=$ac_end
5138 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5139 fi
5140done
5141if test -z "$ac_sed_cmds"; then
5142 ac_sed_cmds=cat
5143fi
5144EOF
5145
5146cat >> $CONFIG_STATUS <<EOF
5147
5148CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5149EOF
5150cat >> $CONFIG_STATUS <<\EOF
5151for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5152 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5153 case "$ac_file" in
5154 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5155 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5156 *) ac_file_in="${ac_file}.in" ;;
5157 esac
5158
5159 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5160
5161 # Remove last slash and all that follows it. Not all systems have dirname.
5162 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5163 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5164 # The file is in a subdirectory.
5165 test ! -d "$ac_dir" && mkdir "$ac_dir"
5166 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5167 # A "../" for each directory in $ac_dir_suffix.
5168 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5169 else
5170 ac_dir_suffix= ac_dots=
5171 fi
5172
5173 case "$ac_given_srcdir" in
5174 .) srcdir=.
5175 if test -z "$ac_dots"; then top_srcdir=.
5176 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5177 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5178 *) # Relative path.
5179 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5180 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5181 esac
5182
5183 case "$ac_given_INSTALL" in
5184 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5185 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5186 esac
5187
5188 echo creating "$ac_file"
5189 rm -f "$ac_file"
5190 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5191 case "$ac_file" in
5192 *Makefile*) ac_comsub="1i\\
5193# $configure_input" ;;
5194 *) ac_comsub= ;;
5195 esac
5196
5197 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5198 sed -e "$ac_comsub
5199s%@configure_input@%$configure_input%g
5200s%@srcdir@%$srcdir%g
5201s%@top_srcdir@%$top_srcdir%g
5202s%@INSTALL@%$INSTALL%g
5203" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5204fi; done
5205rm -f conftest.s*
5206
5207# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5208# NAME is the cpp macro being defined and VALUE is the value it is being given.
5209#
5210# ac_d sets the value in "#define NAME VALUE" lines.
5211ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5212ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5213ac_dC='\3'
5214ac_dD='%g'
5215# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5216ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5217ac_uB='\([ ]\)%\1#\2define\3'
5218ac_uC=' '
5219ac_uD='\4%g'
5220# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5221ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5222ac_eB='$%\1#\2define\3'
5223ac_eC=' '
5224ac_eD='%g'
5225
5226if test "${CONFIG_HEADERS+set}" != set; then
5227EOF
5228cat >> $CONFIG_STATUS <<EOF
5229 CONFIG_HEADERS="config.h:config.in"
5230EOF
5231cat >> $CONFIG_STATUS <<\EOF
5232fi
5233for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5234 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5235 case "$ac_file" in
5236 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5237 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5238 *) ac_file_in="${ac_file}.in" ;;
5239 esac
5240
5241 echo creating $ac_file
5242
5243 rm -f conftest.frag conftest.in conftest.out
5244 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5245 cat $ac_file_inputs > conftest.in
5246
5247EOF
5248
5249# Transform confdefs.h into a sed script conftest.vals that substitutes
5250# the proper values into config.h.in to produce config.h. And first:
5251# Protect against being on the right side of a sed subst in config.status.
5252# Protect against being in an unquoted here document in config.status.
5253rm -f conftest.vals
5254cat > conftest.hdr <<\EOF
5255s/[\\&%]/\\&/g
5256s%[\\$`]%\\&%g
5257s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5258s%ac_d%ac_u%gp
5259s%ac_u%ac_e%gp
5260EOF
5261sed -n -f conftest.hdr confdefs.h > conftest.vals
5262rm -f conftest.hdr
5263
5264# This sed command replaces #undef with comments. This is necessary, for
5265# example, in the case of _POSIX_SOURCE, which is predefined and required
5266# on some systems where configure will not decide to define it.
5267cat >> conftest.vals <<\EOF
5268s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5269EOF
5270
5271# Break up conftest.vals because some shells have a limit on
5272# the size of here documents, and old seds have small limits too.
5273
5274rm -f conftest.tail
5275while :
5276do
5277 ac_lines=`grep -c . conftest.vals`
5278 # grep -c gives empty output for an empty file on some AIX systems.
5279 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5280 # Write a limited-size here document to conftest.frag.
5281 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5282 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5283 echo 'CEOF
5284 sed -f conftest.frag conftest.in > conftest.out
5285 rm -f conftest.in
5286 mv conftest.out conftest.in
5287' >> $CONFIG_STATUS
5288 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5289 rm -f conftest.vals
5290 mv conftest.tail conftest.vals
5291done
5292rm -f conftest.vals
5293
5294cat >> $CONFIG_STATUS <<\EOF
5295 rm -f conftest.frag conftest.h
5296 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5297 cat conftest.in >> conftest.h
5298 rm -f conftest.in
5299 if cmp -s $ac_file conftest.h 2>/dev/null; then
5300 echo "$ac_file is unchanged"
5301 rm -f conftest.h
5302 else
5303 # Remove last slash and all that follows it. Not all systems have dirname.
5304 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5305 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5306 # The file is in a subdirectory.
5307 test ! -d "$ac_dir" && mkdir "$ac_dir"
5308 fi
5309 rm -f $ac_file
5310 mv conftest.h $ac_file
5311 fi
5312fi; done
5313
5314EOF
5315cat >> $CONFIG_STATUS <<EOF
5316
5317
5318EOF
5319cat >> $CONFIG_STATUS <<\EOF
5320test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5321
5322case "x$CONFIG_FILES" in
5323*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
5324esac
5325
5326exit 0
5327EOF
5328chmod +x $CONFIG_STATUS
5329rm -fr confdefs* $ac_clean_files
5330test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5331
This page took 0.253226 seconds and 4 git commands to generate.