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