* configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
[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)"
b5db0960
ILT
28ac_help="$ac_help
29 --enable-maintainer-mode enable make rules and dependencies not useful
30 (and sometimes confusing) to the casual installer"
ef346f1a
ILT
31
32# Initialize some variables set by options.
33# The variables have the same names as the options, with
34# dashes changed to underlines.
35build=NONE
36cache_file=./config.cache
37exec_prefix=NONE
38host=NONE
39no_create=
40nonopt=NONE
41no_recursion=
42prefix=NONE
43program_prefix=NONE
44program_suffix=NONE
45program_transform_name=s,x,x,
46silent=
47site=
48srcdir=
49target=NONE
50verbose=
51x_includes=NONE
52x_libraries=NONE
caf2a913
ILT
53bindir='${exec_prefix}/bin'
54sbindir='${exec_prefix}/sbin'
55libexecdir='${exec_prefix}/libexec'
56datadir='${prefix}/share'
57sysconfdir='${prefix}/etc'
58sharedstatedir='${prefix}/com'
59localstatedir='${prefix}/var'
60libdir='${exec_prefix}/lib'
61includedir='${prefix}/include'
62oldincludedir='/usr/include'
63infodir='${prefix}/info'
64mandir='${prefix}/man'
eb02fd64 65
ef346f1a
ILT
66# Initialize some other variables.
67subdirs=
caf2a913 68MFLAGS= MAKEFLAGS=
12e0afe5 69SHELL=${CONFIG_SHELL-/bin/sh}
b9a5c27f
RS
70# Maximum number of lines to put in a shell here document.
71ac_max_here_lines=12
eb02fd64 72
ef346f1a
ILT
73ac_prev=
74for ac_option
75do
eb02fd64 76
ef346f1a
ILT
77 # If the previous option needs an argument, assign it.
78 if test -n "$ac_prev"; then
79 eval "$ac_prev=\$ac_option"
80 ac_prev=
81 continue
82 fi
83
84 case "$ac_option" in
85 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86 *) ac_optarg= ;;
87 esac
88
89 # Accept the important Cygnus configure options, so we can diagnose typos.
90
91 case "$ac_option" in
92
caf2a913
ILT
93 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 ac_prev=bindir ;;
95 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96 bindir="$ac_optarg" ;;
97
98 -build | --build | --buil | --bui | --bu)
ef346f1a 99 ac_prev=build ;;
caf2a913 100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ef346f1a
ILT
101 build="$ac_optarg" ;;
102
103 -cache-file | --cache-file | --cache-fil | --cache-fi \
104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105 ac_prev=cache_file ;;
106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108 cache_file="$ac_optarg" ;;
109
caf2a913
ILT
110 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 ac_prev=datadir ;;
112 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 | --da=*)
114 datadir="$ac_optarg" ;;
115
ef346f1a
ILT
116 -disable-* | --disable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}=no" ;;
124
125 -enable-* | --enable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130 fi
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 case "$ac_option" in
133 *=*) ;;
134 *) ac_optarg=yes ;;
135 esac
136 eval "enable_${ac_feature}='$ac_optarg'" ;;
137
138 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140 | --exec | --exe | --ex)
141 ac_prev=exec_prefix ;;
142 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144 | --exec=* | --exe=* | --ex=*)
145 exec_prefix="$ac_optarg" ;;
146
147 -gas | --gas | --ga | --g)
148 # Obsolete; use --with-gas.
149 with_gas=yes ;;
150
151 -help | --help | --hel | --he)
152 # Omit some internal or obsolete options to make the list less imposing.
153 # This message is too long to be a string in the A/UX 3.1 sh.
154 cat << EOF
155Usage: configure [options] [host]
156Options: [defaults in brackets after descriptions]
157Configuration:
158 --cache-file=FILE cache test results in FILE
159 --help print this message
160 --no-create do not create output files
161 --quiet, --silent do not print \`checking...' messages
162 --version print the version of autoconf that created configure
163Directory and file names:
164 --prefix=PREFIX install architecture-independent files in PREFIX
165 [$ac_default_prefix]
caf2a913 166 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ef346f1a 167 [same as prefix]
caf2a913
ILT
168 --bindir=DIR user executables in DIR [EPREFIX/bin]
169 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
170 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
171 --datadir=DIR read-only architecture-independent data in DIR
172 [PREFIX/share]
173 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
174 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 [PREFIX/com]
176 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
177 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
178 --includedir=DIR C header files in DIR [PREFIX/include]
179 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
180 --infodir=DIR info documentation in DIR [PREFIX/info]
181 --mandir=DIR man documentation in DIR [PREFIX/man]
ef346f1a
ILT
182 --srcdir=DIR find the sources in DIR [configure dir or ..]
183 --program-prefix=PREFIX prepend PREFIX to installed program names
184 --program-suffix=SUFFIX append SUFFIX to installed program names
caf2a913
ILT
185 --program-transform-name=PROGRAM
186 run sed PROGRAM on installed program names
187EOF
188 cat << EOF
ef346f1a
ILT
189Host type:
190 --build=BUILD configure for building on BUILD [BUILD=HOST]
191 --host=HOST configure for HOST [guessed]
192 --target=TARGET configure for TARGET [TARGET=HOST]
193Features and packages:
194 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
195 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
196 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
197 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
198 --x-includes=DIR X include files are in DIR
199 --x-libraries=DIR X library files are in DIR
ef346f1a 200EOF
caf2a913
ILT
201 if test -n "$ac_help"; then
202 echo "--enable and --with options recognized:$ac_help"
203 fi
ef346f1a
ILT
204 exit 0 ;;
205
206 -host | --host | --hos | --ho)
207 ac_prev=host ;;
208 -host=* | --host=* | --hos=* | --ho=*)
209 host="$ac_optarg" ;;
210
caf2a913
ILT
211 -includedir | --includedir | --includedi | --included | --include \
212 | --includ | --inclu | --incl | --inc)
213 ac_prev=includedir ;;
214 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215 | --includ=* | --inclu=* | --incl=* | --inc=*)
216 includedir="$ac_optarg" ;;
217
218 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 ac_prev=infodir ;;
220 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221 infodir="$ac_optarg" ;;
222
223 -libdir | --libdir | --libdi | --libd)
224 ac_prev=libdir ;;
225 -libdir=* | --libdir=* | --libdi=* | --libd=*)
226 libdir="$ac_optarg" ;;
227
228 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229 | --libexe | --libex | --libe)
230 ac_prev=libexecdir ;;
231 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232 | --libexe=* | --libex=* | --libe=*)
233 libexecdir="$ac_optarg" ;;
234
235 -localstatedir | --localstatedir | --localstatedi | --localstated \
236 | --localstate | --localstat | --localsta | --localst \
237 | --locals | --local | --loca | --loc | --lo)
238 ac_prev=localstatedir ;;
239 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242 localstatedir="$ac_optarg" ;;
243
244 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 ac_prev=mandir ;;
246 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247 mandir="$ac_optarg" ;;
248
ef346f1a
ILT
249 -nfp | --nfp | --nf)
250 # Obsolete; use --without-fp.
251 with_fp=no ;;
252
253 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254 | --no-cr | --no-c)
255 no_create=yes ;;
256
257 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 no_recursion=yes ;;
260
caf2a913
ILT
261 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263 | --oldin | --oldi | --old | --ol | --o)
264 ac_prev=oldincludedir ;;
265 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268 oldincludedir="$ac_optarg" ;;
269
ef346f1a
ILT
270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 ac_prev=prefix ;;
272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273 prefix="$ac_optarg" ;;
274
275 -program-prefix | --program-prefix | --program-prefi | --program-pref \
276 | --program-pre | --program-pr | --program-p)
277 ac_prev=program_prefix ;;
278 -program-prefix=* | --program-prefix=* | --program-prefi=* \
279 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280 program_prefix="$ac_optarg" ;;
281
282 -program-suffix | --program-suffix | --program-suffi | --program-suff \
283 | --program-suf | --program-su | --program-s)
284 ac_prev=program_suffix ;;
285 -program-suffix=* | --program-suffix=* | --program-suffi=* \
286 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287 program_suffix="$ac_optarg" ;;
288
289 -program-transform-name | --program-transform-name \
290 | --program-transform-nam | --program-transform-na \
291 | --program-transform-n | --program-transform- \
292 | --program-transform | --program-transfor \
293 | --program-transfo | --program-transf \
294 | --program-trans | --program-tran \
295 | --progr-tra | --program-tr | --program-t)
296 ac_prev=program_transform_name ;;
297 -program-transform-name=* | --program-transform-name=* \
298 | --program-transform-nam=* | --program-transform-na=* \
299 | --program-transform-n=* | --program-transform-=* \
300 | --program-transform=* | --program-transfor=* \
301 | --program-transfo=* | --program-transf=* \
302 | --program-trans=* | --program-tran=* \
303 | --progr-tra=* | --program-tr=* | --program-t=*)
304 program_transform_name="$ac_optarg" ;;
305
306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307 | -silent | --silent | --silen | --sile | --sil)
308 silent=yes ;;
309
caf2a913
ILT
310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 ac_prev=sbindir ;;
312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 | --sbi=* | --sb=*)
314 sbindir="$ac_optarg" ;;
315
316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318 | --sharedst | --shareds | --shared | --share | --shar \
319 | --sha | --sh)
320 ac_prev=sharedstatedir ;;
321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 | --sha=* | --sh=*)
325 sharedstatedir="$ac_optarg" ;;
326
ef346f1a
ILT
327 -site | --site | --sit)
328 ac_prev=site ;;
329 -site=* | --site=* | --sit=*)
330 site="$ac_optarg" ;;
331
332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 ac_prev=srcdir ;;
334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335 srcdir="$ac_optarg" ;;
336
caf2a913
ILT
337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338 | --syscon | --sysco | --sysc | --sys | --sy)
339 ac_prev=sysconfdir ;;
340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342 sysconfdir="$ac_optarg" ;;
343
ef346f1a
ILT
344 -target | --target | --targe | --targ | --tar | --ta | --t)
345 ac_prev=target ;;
346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347 target="$ac_optarg" ;;
348
349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 verbose=yes ;;
351
352 -version | --version | --versio | --versi | --vers)
b5db0960 353 echo "configure generated by autoconf version 2.12.1"
ef346f1a
ILT
354 exit 0 ;;
355
356 -with-* | --with-*)
357 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 case "$ac_option" in
364 *=*) ;;
365 *) ac_optarg=yes ;;
366 esac
367 eval "with_${ac_package}='$ac_optarg'" ;;
368
369 -without-* | --without-*)
370 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}=no" ;;
377
378 --x)
379 # Obsolete; use --with-x.
380 with_x=yes ;;
381
382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383 | --x-incl | --x-inc | --x-in | --x-i)
384 ac_prev=x_includes ;;
385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387 x_includes="$ac_optarg" ;;
388
389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391 ac_prev=x_libraries ;;
392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394 x_libraries="$ac_optarg" ;;
395
396 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
397 ;;
398
caf2a913 399 *)
ef346f1a
ILT
400 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
401 echo "configure: warning: $ac_option: invalid host type" 1>&2
402 fi
403 if test "x$nonopt" != xNONE; then
404 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405 fi
406 nonopt="$ac_option"
407 ;;
408
409 esac
410done
2ee11735 411
ef346f1a
ILT
412if test -n "$ac_prev"; then
413 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414fi
eb02fd64 415
ef346f1a
ILT
416trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
417
418# File descriptor usage:
419# 0 standard input
420# 1 file creation
421# 2 errors and warnings
422# 3 some systems may open it to /dev/tty
423# 4 used on the Kubota Titan
424# 6 checking for... messages and results
425# 5 compiler messages saved in config.log
426if test "$silent" = yes; then
427 exec 6>/dev/null
428else
429 exec 6>&1
430fi
431exec 5>./config.log
432
433echo "\
434This file contains any messages produced by compilers while
435running configure, to aid debugging if configure makes a mistake.
436" 1>&5
eb02fd64 437
ef346f1a
ILT
438# Strip out --no-create and --no-recursion so they do not pile up.
439# Also quote any args containing shell metacharacters.
440ac_configure_args=
441for ac_arg
eb02fd64 442do
ef346f1a
ILT
443 case "$ac_arg" in
444 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445 | --no-cr | --no-c) ;;
446 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
451 esac
eb02fd64
RP
452done
453
ef346f1a 454# NLS nuisances.
b9a5c27f
RS
455# Only set these to C if already set. These must not be set unconditionally
456# because not all systems understand e.g. LANG=C (notably SCO).
457# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
458# Non-C LC_CTYPE values break the ctype check.
ef346f1a 459if test "${LANG+set}" = set; then LANG=C; export LANG; fi
b9a5c27f
RS
460if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
461if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
462if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
ef346f1a
ILT
463
464# confdefs.h avoids OS command line length limits that DEFS can exceed.
465rm -rf conftest* confdefs.h
466# AIX cpp loses on an empty file, so make sure it contains at least a newline.
467echo > confdefs.h
468
469# A filename unique to this package, relative to the directory that
470# configure is in, which we can look for to find out if srcdir is correct.
471ac_unique_file=ldmain.c
472
473# Find the source files, if location was not specified.
474if test -z "$srcdir"; then
475 ac_srcdir_defaulted=yes
476 # Try the directory containing this script, then its parent.
477 ac_prog=$0
478 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480 srcdir=$ac_confdir
481 if test ! -r $srcdir/$ac_unique_file; then
482 srcdir=..
483 fi
484else
485 ac_srcdir_defaulted=no
486fi
487if test ! -r $srcdir/$ac_unique_file; then
488 if test "$ac_srcdir_defaulted" = yes; then
489 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490 else
491 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492 fi
8c32cf6e 493fi
ef346f1a
ILT
494srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495
496# Prefer explicitly selected file to automatically selected ones.
497if test -z "$CONFIG_SITE"; then
498 if test "x$prefix" != xNONE; then
499 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500 else
501 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502 fi
503fi
504for ac_site_file in $CONFIG_SITE; do
505 if test -r "$ac_site_file"; then
506 echo "loading site script $ac_site_file"
507 . "$ac_site_file"
508 fi
509done
8c32cf6e 510
ef346f1a
ILT
511if test -r "$cache_file"; then
512 echo "loading cache $cache_file"
513 . $cache_file
514else
515 echo "creating cache $cache_file"
516 > $cache_file
f2e91404 517fi
eb02fd64 518
ef346f1a
ILT
519ac_ext=c
520# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
b9a5c27f
RS
521ac_cpp='$CPP $CPPFLAGS'
522ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524cross_compiling=$ac_cv_prog_cc_cross
ef346f1a
ILT
525
526if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
529 ac_n= ac_c='
530' ac_t=' '
531 else
532 ac_n=-n ac_c= ac_t=
533 fi
534else
535 ac_n= ac_c='\c' ac_t=
536fi
537
538
8c32cf6e 539
ef346f1a 540ac_aux_dir=
b5db0960 541for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ef346f1a
ILT
542 if test -f $ac_dir/install-sh; then
543 ac_aux_dir=$ac_dir
544 ac_install_sh="$ac_aux_dir/install-sh -c"
545 break
546 elif 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 fi
551done
552if test -z "$ac_aux_dir"; then
b5db0960 553 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
ef346f1a
ILT
554fi
555ac_config_guess=$ac_aux_dir/config.guess
556ac_config_sub=$ac_aux_dir/config.sub
557ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
eb02fd64 558
eb02fd64 559
ef346f1a
ILT
560# Do some error checking and defaulting for the host and target type.
561# The inputs are:
562# configure --host=HOST --target=TARGET --build=BUILD NONOPT
563#
564# The rules are:
565# 1. You are not allowed to specify --host, --target, and nonopt at the
caf2a913 566# same time.
ef346f1a
ILT
567# 2. Host defaults to nonopt.
568# 3. If nonopt is not specified, then host defaults to the current host,
569# as determined by config.guess.
570# 4. Target and build default to nonopt.
571# 5. If nonopt is not specified, then target and build default to host.
572
573# The aliases save the names the user supplied, while $host etc.
574# will get canonicalized.
575case $host---$target---$nonopt in
576NONE---*---* | *---NONE---* | *---*---NONE) ;;
577*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
578esac
eb02fd64 579
c0b47bae 580
ef346f1a 581# Make sure we can run config.sub.
b5db0960 582if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
ef346f1a
ILT
583else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
584fi
c0b47bae 585
ef346f1a 586echo $ac_n "checking host system type""... $ac_c" 1>&6
0d3e84dd 587echo "configure:588: checking host system type" >&5
ef346f1a
ILT
588
589host_alias=$host
590case "$host_alias" in
591NONE)
592 case $nonopt in
593 NONE)
b5db0960 594 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
ef346f1a
ILT
595 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
596 fi ;;
597 *) host_alias=$nonopt ;;
598 esac ;;
599esac
c0b47bae 600
b5db0960 601host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
b9a5c27f
RS
602host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
603host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
604host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ef346f1a
ILT
605echo "$ac_t""$host" 1>&6
606
607echo $ac_n "checking target system type""... $ac_c" 1>&6
0d3e84dd 608echo "configure:609: checking target system type" >&5
b5db0960
ILT
609
610target_alias=$target
611case "$target_alias" in
612NONE)
613 case $nonopt in
614 NONE) target_alias=$host_alias ;;
615 *) target_alias=$nonopt ;;
616 esac ;;
617esac
618
619target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
620target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
621target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
622target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
623echo "$ac_t""$target" 1>&6
624
625echo $ac_n "checking build system type""... $ac_c" 1>&6
0d3e84dd 626echo "configure:627: checking build system type" >&5
b5db0960
ILT
627
628build_alias=$build
629case "$build_alias" in
630NONE)
631 case $nonopt in
632 NONE) build_alias=$host_alias ;;
633 *) build_alias=$nonopt ;;
634 esac ;;
635esac
636
637build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
638build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
639build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
640build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
641echo "$ac_t""$build" 1>&6
642
643test "$host_alias" != "$target_alias" &&
644 test "$program_prefix$program_suffix$program_transform_name" = \
645 NONENONEs,x,x, &&
646 program_prefix=${target_alias}-
647
648
649# Find a good install program. We prefer a C program (faster),
650# so one script is as good as another. But avoid the broken or
651# incompatible versions:
652# SysV /etc/install, /usr/sbin/install
653# SunOS /usr/etc/install
654# IRIX /sbin/install
655# AIX /bin/install
12e0afe5 656# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
b5db0960
ILT
657# AFS /usr/afsws/bin/install, which mishandles nonexistent args
658# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
659# ./install, which can be erroneously created by make from ./install.sh.
660echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
0d3e84dd 661echo "configure:662: checking for a BSD compatible install" >&5
b5db0960
ILT
662if test -z "$INSTALL"; then
663if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
664 echo $ac_n "(cached) $ac_c" 1>&6
665else
666 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
667 for ac_dir in $PATH; do
668 # Account for people who put trailing slashes in PATH elements.
669 case "$ac_dir/" in
670 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
671 *)
672 # OSF1 and SCO ODT 3.0 have their own names for install.
12e0afe5
ILT
673 # Don't use installbsd from OSF since it installs stuff as root
674 # by default.
675 for ac_prog in ginstall scoinst install; do
b5db0960
ILT
676 if test -f $ac_dir/$ac_prog; then
677 if test $ac_prog = install &&
678 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
679 # AIX install. It has an incompatible calling convention.
b5db0960
ILT
680 :
681 else
682 ac_cv_path_install="$ac_dir/$ac_prog -c"
683 break 2
684 fi
685 fi
686 done
687 ;;
688 esac
689 done
690 IFS="$ac_save_IFS"
691
692fi
693 if test "${ac_cv_path_install+set}" = set; then
694 INSTALL="$ac_cv_path_install"
695 else
696 # As a last resort, use the slow shell script. We don't cache a
697 # path for INSTALL within a source directory, because that will
698 # break other packages using the cache if that directory is
699 # removed, or if the path is relative.
700 INSTALL="$ac_install_sh"
701 fi
702fi
703echo "$ac_t""$INSTALL" 1>&6
704
705# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
706# It thinks the first close brace ends the variable substitution.
707test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
708
709test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
710
711
712test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
713
b5db0960 714echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
0d3e84dd 715echo "configure:716: checking whether build environment is sane" >&5
b5db0960
ILT
716# Just in case
717sleep 1
718echo timestamp > conftestfile
719# Do `set' in a subshell so we don't clobber the current shell's
720# arguments. Must try -L first in case configure is actually a
721# symlink; some systems play weird games with the mod time of symlinks
722# (eg FreeBSD returns the mod time of the symlink's containing
723# directory).
724if (
725 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
0d3e84dd 726 if test "$*" = "X"; then
b5db0960
ILT
727 # -L didn't work.
728 set X `ls -t $srcdir/configure conftestfile`
729 fi
0d3e84dd
ILT
730 if test "$*" != "X $srcdir/configure conftestfile" \
731 && test "$*" != "X conftestfile $srcdir/configure"; then
732
733 # If neither matched, then we have a broken ls. This can happen
734 # if, for instance, CONFIG_SHELL is bash and it inherits a
735 # broken ls alias from the environment. This has actually
736 # happened. Such a system could not be considered "sane".
737 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
738alias in your environment" 1>&2; exit 1; }
739 fi
740
b5db0960
ILT
741 test "$2" = conftestfile
742 )
743then
744 # Ok.
745 :
746else
747 { echo "configure: error: newly created file is older than distributed files!
748Check your system clock" 1>&2; exit 1; }
749fi
750rm -f conftest*
751echo "$ac_t""yes" 1>&6
752if test "$program_transform_name" = s,x,x,; then
753 program_transform_name=
754else
755 # Double any \ or $. echo might interpret backslashes.
756 cat <<\EOF_SED > conftestsed
757s,\\,\\\\,g; s,\$,$$,g
758EOF_SED
759 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
760 rm -f conftestsed
761fi
762test "$program_prefix" != NONE &&
763 program_transform_name="s,^,${program_prefix},; $program_transform_name"
764# Use a double $ so make ignores it.
765test "$program_suffix" != NONE &&
766 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
767
768# sed with no file args requires a program.
769test "$program_transform_name" = "" && program_transform_name="s,x,x,"
770
0d3e84dd
ILT
771echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
772echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
773set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
774if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
776else
777 cat > conftestmake <<\EOF
778all:
779 @echo 'ac_maketemp="${MAKE}"'
780EOF
781# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
782eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
783if test -n "$ac_maketemp"; then
784 eval ac_cv_prog_make_${ac_make}_set=yes
785else
786 eval ac_cv_prog_make_${ac_make}_set=no
787fi
788rm -f conftestmake
789fi
790if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
791 echo "$ac_t""yes" 1>&6
792 SET_MAKE=
793else
794 echo "$ac_t""no" 1>&6
795 SET_MAKE="MAKE=${MAKE-make}"
796fi
797
798
799PACKAGE=ld
800
801VERSION=2.9.1
802
803if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
804 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
805fi
806cat >> confdefs.h <<EOF
807#define PACKAGE "$PACKAGE"
808EOF
809
810cat >> confdefs.h <<EOF
811#define VERSION "$VERSION"
812EOF
813
814
815
b5db0960
ILT
816missing_dir=`cd $ac_aux_dir && pwd`
817echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
0d3e84dd 818echo "configure:819: checking for working aclocal" >&5
b5db0960
ILT
819# Run test in a subshell; some versions of sh will print an error if
820# an executable is not found, even if stderr is redirected.
821# Redirect stdin to placate older versions of autoconf. Sigh.
822if (aclocal --version) < /dev/null > /dev/null 2>&1; then
823 ACLOCAL=aclocal
824 echo "$ac_t""found" 1>&6
825else
826 ACLOCAL="$missing_dir/missing aclocal"
827 echo "$ac_t""missing" 1>&6
828fi
829
830echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
0d3e84dd 831echo "configure:832: checking for working autoconf" >&5
b5db0960
ILT
832# Run test in a subshell; some versions of sh will print an error if
833# an executable is not found, even if stderr is redirected.
834# Redirect stdin to placate older versions of autoconf. Sigh.
835if (autoconf --version) < /dev/null > /dev/null 2>&1; then
836 AUTOCONF=autoconf
837 echo "$ac_t""found" 1>&6
838else
839 AUTOCONF="$missing_dir/missing autoconf"
840 echo "$ac_t""missing" 1>&6
841fi
842
843echo $ac_n "checking for working automake""... $ac_c" 1>&6
0d3e84dd 844echo "configure:845: checking for working automake" >&5
b5db0960
ILT
845# Run test in a subshell; some versions of sh will print an error if
846# an executable is not found, even if stderr is redirected.
847# Redirect stdin to placate older versions of autoconf. Sigh.
848if (automake --version) < /dev/null > /dev/null 2>&1; then
849 AUTOMAKE=automake
850 echo "$ac_t""found" 1>&6
851else
852 AUTOMAKE="$missing_dir/missing automake"
853 echo "$ac_t""missing" 1>&6
854fi
855
856echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
0d3e84dd 857echo "configure:858: checking for working autoheader" >&5
b5db0960
ILT
858# Run test in a subshell; some versions of sh will print an error if
859# an executable is not found, even if stderr is redirected.
860# Redirect stdin to placate older versions of autoconf. Sigh.
861if (autoheader --version) < /dev/null > /dev/null 2>&1; then
862 AUTOHEADER=autoheader
863 echo "$ac_t""found" 1>&6
864else
865 AUTOHEADER="$missing_dir/missing autoheader"
866 echo "$ac_t""missing" 1>&6
867fi
868
869echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
0d3e84dd 870echo "configure:871: checking for working makeinfo" >&5
b5db0960
ILT
871# Run test in a subshell; some versions of sh will print an error if
872# an executable is not found, even if stderr is redirected.
873# Redirect stdin to placate older versions of autoconf. Sigh.
874if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
875 MAKEINFO=makeinfo
876 echo "$ac_t""found" 1>&6
877else
878 MAKEINFO="$missing_dir/missing makeinfo"
879 echo "$ac_t""missing" 1>&6
880fi
881
0d3e84dd
ILT
882
883
884# Check whether --enable-shared or --disable-shared was given.
885if test "${enable_shared+set}" = set; then
886 enableval="$enable_shared"
887 p=${PACKAGE-default}
888case "$enableval" in
889yes) enable_shared=yes ;;
890no) enable_shared=no ;;
891*)
892 enable_shared=no
893 # Look at the argument we got. We use all the common list separators.
894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
895 for pkg in $enableval; do
896 if test "X$pkg" = "X$p"; then
897 enable_shared=yes
898 fi
899 done
900 IFS="$ac_save_ifs"
901 ;;
902esac
b5db0960 903else
0d3e84dd 904 enable_shared=yes
b5db0960 905fi
0d3e84dd
ILT
906
907# Check whether --enable-static or --disable-static was given.
908if test "${enable_static+set}" = set; then
909 enableval="$enable_static"
910 p=${PACKAGE-default}
911case "$enableval" in
912yes) enable_static=yes ;;
913no) enable_static=no ;;
914*)
915 enable_static=no
916 # Look at the argument we got. We use all the common list separators.
917 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
918 for pkg in $enableval; do
919 if test "X$pkg" = "X$p"; then
920 enable_static=yes
921 fi
922 done
923 IFS="$ac_save_ifs"
924 ;;
925esac
b5db0960 926else
0d3e84dd 927 enable_static=yes
b5db0960
ILT
928fi
929
12e0afe5
ILT
930# Extract the first word of "ranlib", so it can be a program name with args.
931set dummy ranlib; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 933echo "configure:934: checking for $ac_word" >&5
12e0afe5
ILT
934if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
936else
937 if test -n "$RANLIB"; then
938 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
939else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
941 for ac_dir in $PATH; do
942 test -z "$ac_dir" && ac_dir=.
943 if test -f $ac_dir/$ac_word; then
944 ac_cv_prog_RANLIB="ranlib"
945 break
946 fi
947 done
948 IFS="$ac_save_ifs"
949 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
950fi
951fi
952RANLIB="$ac_cv_prog_RANLIB"
953if test -n "$RANLIB"; then
954 echo "$ac_t""$RANLIB" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958
b5db0960
ILT
959# Extract the first word of "gcc", so it can be a program name with args.
960set dummy gcc; ac_word=$2
961echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 962echo "configure:963: checking for $ac_word" >&5
b5db0960
ILT
963if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
965else
966 if test -n "$CC"; then
967 ac_cv_prog_CC="$CC" # Let the user override the test.
968else
969 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
970 for ac_dir in $PATH; do
971 test -z "$ac_dir" && ac_dir=.
972 if test -f $ac_dir/$ac_word; then
973 ac_cv_prog_CC="gcc"
974 break
975 fi
976 done
977 IFS="$ac_save_ifs"
978fi
979fi
980CC="$ac_cv_prog_CC"
981if test -n "$CC"; then
982 echo "$ac_t""$CC" 1>&6
983else
984 echo "$ac_t""no" 1>&6
985fi
986
987if test -z "$CC"; then
988 # Extract the first word of "cc", so it can be a program name with args.
989set dummy cc; ac_word=$2
990echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 991echo "configure:992: checking for $ac_word" >&5
b5db0960
ILT
992if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
993 echo $ac_n "(cached) $ac_c" 1>&6
994else
995 if test -n "$CC"; then
996 ac_cv_prog_CC="$CC" # Let the user override the test.
997else
998 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
999 ac_prog_rejected=no
1000 for ac_dir in $PATH; do
1001 test -z "$ac_dir" && ac_dir=.
1002 if test -f $ac_dir/$ac_word; then
1003 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1004 ac_prog_rejected=yes
1005 continue
1006 fi
1007 ac_cv_prog_CC="cc"
1008 break
1009 fi
1010 done
1011 IFS="$ac_save_ifs"
1012if test $ac_prog_rejected = yes; then
1013 # We found a bogon in the path, so make sure we never use it.
1014 set dummy $ac_cv_prog_CC
1015 shift
1016 if test $# -gt 0; then
1017 # We chose a different compiler from the bogus one.
1018 # However, it has the same basename, so the bogon will be chosen
1019 # first if we set CC to just the basename; use the full file name.
1020 shift
1021 set dummy "$ac_dir/$ac_word" "$@"
1022 shift
1023 ac_cv_prog_CC="$@"
1024 fi
1025fi
1026fi
1027fi
1028CC="$ac_cv_prog_CC"
1029if test -n "$CC"; then
1030 echo "$ac_t""$CC" 1>&6
1031else
1032 echo "$ac_t""no" 1>&6
1033fi
1034
1035 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1036fi
1037
1038echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
0d3e84dd 1039echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
b5db0960
ILT
1040
1041ac_ext=c
1042# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1043ac_cpp='$CPP $CPPFLAGS'
1044ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1045ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1046cross_compiling=$ac_cv_prog_cc_cross
1047
1048cat > conftest.$ac_ext <<EOF
0d3e84dd 1049#line 1050 "configure"
b5db0960
ILT
1050#include "confdefs.h"
1051main(){return(0);}
1052EOF
0d3e84dd 1053if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b5db0960
ILT
1054 ac_cv_prog_cc_works=yes
1055 # If we can't run a trivial program, we are probably using a cross compiler.
1056 if (./conftest; exit) 2>/dev/null; then
1057 ac_cv_prog_cc_cross=no
1058 else
1059 ac_cv_prog_cc_cross=yes
1060 fi
1061else
1062 echo "configure: failed program was:" >&5
1063 cat conftest.$ac_ext >&5
1064 ac_cv_prog_cc_works=no
1065fi
1066rm -fr conftest*
1067
1068echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1069if test $ac_cv_prog_cc_works = no; then
1070 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1071fi
1072echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
0d3e84dd 1073echo "configure:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
b5db0960
ILT
1074echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1075cross_compiling=$ac_cv_prog_cc_cross
1076
1077echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
0d3e84dd 1078echo "configure:1079: checking whether we are using GNU C" >&5
b5db0960
ILT
1079if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1080 echo $ac_n "(cached) $ac_c" 1>&6
1081else
1082 cat > conftest.c <<EOF
1083#ifdef __GNUC__
1084 yes;
1085#endif
1086EOF
0d3e84dd 1087if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b5db0960
ILT
1088 ac_cv_prog_gcc=yes
1089else
1090 ac_cv_prog_gcc=no
1091fi
1092fi
1093
1094echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1095
1096if test $ac_cv_prog_gcc = yes; then
1097 GCC=yes
1098 ac_test_CFLAGS="${CFLAGS+set}"
1099 ac_save_CFLAGS="$CFLAGS"
1100 CFLAGS=
1101 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
0d3e84dd 1102echo "configure:1103: checking whether ${CC-cc} accepts -g" >&5
b5db0960
ILT
1103if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1104 echo $ac_n "(cached) $ac_c" 1>&6
1105else
1106 echo 'void f(){}' > conftest.c
1107if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1108 ac_cv_prog_cc_g=yes
1109else
1110 ac_cv_prog_cc_g=no
1111fi
1112rm -f conftest*
1113
1114fi
1115
1116echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1117 if test "$ac_test_CFLAGS" = set; then
1118 CFLAGS="$ac_save_CFLAGS"
1119 elif test $ac_cv_prog_cc_g = yes; then
1120 CFLAGS="-g -O2"
1121 else
1122 CFLAGS="-O2"
1123 fi
1124else
1125 GCC=
1126 test "${CFLAGS+set}" = set || CFLAGS="-g"
1127fi
1128
b5db0960
ILT
1129# Check whether --with-gnu-ld or --without-gnu-ld was given.
1130if test "${with_gnu_ld+set}" = set; then
1131 withval="$with_gnu_ld"
1132 test "$withval" = no || with_gnu_ld=yes
1133else
1134 with_gnu_ld=no
1135fi
1136
12e0afe5
ILT
1137
1138ac_prog=ld
1139if test "$ac_cv_prog_gcc" = yes; then
1140 # Check if gcc -print-prog-name=ld gives a path.
1141 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
0d3e84dd 1142echo "configure:1143: checking for ld used by GCC" >&5
12e0afe5
ILT
1143 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1144 case "$ac_prog" in
1145 # Accept absolute paths.
0d3e84dd 1146 /* | [A-Za-z]:\\*)
12e0afe5
ILT
1147 test -z "$LD" && LD="$ac_prog"
1148 ;;
1149 "")
1150 # If it fails, then pretend we aren't using GCC.
1151 ac_prog=ld
1152 ;;
1153 *)
1154 # If it is relative, then search for the first ld in PATH.
1155 with_gnu_ld=unknown
1156 ;;
1157 esac
1158elif test "$with_gnu_ld" = yes; then
b5db0960 1159 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
0d3e84dd 1160echo "configure:1161: checking for GNU ld" >&5
b5db0960
ILT
1161else
1162 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
0d3e84dd 1163echo "configure:1164: checking for non-GNU ld" >&5
b5db0960
ILT
1164fi
1165if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
12e0afe5 1168 if test -z "$LD"; then
b5db0960
ILT
1169 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1170 for ac_dir in $PATH; do
1171 test -z "$ac_dir" && ac_dir=.
12e0afe5
ILT
1172 if test -f "$ac_dir/$ac_prog"; then
1173 ac_cv_path_LD="$ac_dir/$ac_prog"
b5db0960
ILT
1174 # Check to see if the program is GNU ld. I'd rather use --version,
1175 # but apparently some GNU ld's only accept -v.
1176 # Break only if it was the GNU/non-GNU ld that we prefer.
12e0afe5
ILT
1177 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1178 test "$with_gnu_ld" != no && break
b5db0960
ILT
1179 else
1180 test "$with_gnu_ld" != yes && break
1181 fi
1182 fi
1183 done
1184 IFS="$ac_save_ifs"
12e0afe5 1185else
b5db0960 1186 ac_cv_path_LD="$LD" # Let the user override the test with a path.
12e0afe5 1187fi
b5db0960
ILT
1188fi
1189
1190LD="$ac_cv_path_LD"
1191if test -n "$LD"; then
1192 echo "$ac_t""$LD" 1>&6
1193else
1194 echo "$ac_t""no" 1>&6
1195fi
1196test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1197
12e0afe5 1198echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
0d3e84dd 1199echo "configure:1200: checking if the linker ($LD) is GNU ld" >&5
b5db0960
ILT
1200if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1201 echo $ac_n "(cached) $ac_c" 1>&6
1202else
1203 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12e0afe5 1204if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
b5db0960
ILT
1205 ac_cv_prog_gnu_ld=yes
1206else
1207 ac_cv_prog_gnu_ld=no
1208fi
1209fi
1210
1211echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1212
1213
12e0afe5 1214echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
0d3e84dd 1215echo "configure:1216: checking for BSD-compatible nm" >&5
12e0afe5
ILT
1216if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1217 echo $ac_n "(cached) $ac_c" 1>&6
1218else
1219 case "$NM" in
0d3e84dd 1220/* | [A-Za-z]:\\*)
12e0afe5
ILT
1221 ac_cv_path_NM="$NM" # Let the user override the test with a path.
1222 ;;
1223*)
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
1243 ;;
1244esac
1245fi
1246
1247NM="$ac_cv_path_NM"
1248echo "$ac_t""$NM" 1>&6
1249
1250
b5db0960 1251echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
0d3e84dd 1252echo "configure:1253: checking whether ln -s works" >&5
b5db0960
ILT
1253if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255else
1256 rm -f conftestdata
1257if ln -s X conftestdata 2>/dev/null
1258then
1259 rm -f conftestdata
1260 ac_cv_prog_LN_S="ln -s"
1261else
1262 ac_cv_prog_LN_S=ln
1263fi
1264fi
1265LN_S="$ac_cv_prog_LN_S"
1266if test "$ac_cv_prog_LN_S" = "ln -s"; then
1267 echo "$ac_t""yes" 1>&6
1268else
1269 echo "$ac_t""no" 1>&6
1270fi
1271
b5db0960 1272# Always use our own libtool.
12e0afe5 1273LIBTOOL='$(SHELL) $(top_builddir)/libtool'
b5db0960 1274
0d3e84dd
ILT
1275# Check for any special flags to pass to ltconfig.
1276libtool_flags=
1277test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1278test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
b5db0960
ILT
1279test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1280test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1281test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1282
1283# Some flags need to be propagated to the compiler or linker for good
1284# libtool support.
1285case "$host" in
1286*-*-irix6*)
0d3e84dd
ILT
1287 # Find out which ABI we are using.
1288 echo '#line 1289 "configure"' > conftest.$ac_ext
1289 if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1290 case "`/usr/bin/file conftest.o`" in
1291 *32-bit*)
1292 LD="${LD-ld} -32"
12e0afe5 1293 ;;
0d3e84dd
ILT
1294 *N32*)
1295 LD="${LD-ld} -n32"
1296 ;;
1297 *64-bit*)
1298 LD="${LD-ld} -64"
12e0afe5
ILT
1299 ;;
1300 esac
0d3e84dd
ILT
1301 fi
1302 rm -rf conftest*
b5db0960 1303 ;;
ef346f1a 1304
b5db0960
ILT
1305*-*-sco3.2v5*)
1306 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1307 CFLAGS="$CFLAGS -belf"
1308 ;;
ef346f1a 1309esac
eb02fd64 1310
b5db0960
ILT
1311# Actually configure libtool. ac_aux_dir is where install-sh is found.
1312CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
12e0afe5 1313LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
b5db0960
ILT
1314${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1315$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1316|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
ef346f1a 1317
ef346f1a 1318
b5db0960
ILT
1319# Check whether --enable-targets or --disable-targets was given.
1320if test "${enable_targets+set}" = set; then
1321 enableval="$enable_targets"
1322 case "${enableval}" in
1323 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1324 ;;
1325 no) enable_targets= ;;
1326 *) enable_targets=$enableval ;;
1327esac
1328fi
1329# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1330if test "${enable_64_bit_bfd+set}" = set; then
1331 enableval="$enable_64_bit_bfd"
1332 case "${enableval}" in
1333 yes) want64=true ;;
1334 no) want64=false ;;
1335 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
ef346f1a 1336esac
b5db0960
ILT
1337else
1338 want64=false
1339fi
1340
1341
eb02fd64 1342
ef346f1a 1343
eb02fd64 1344
ef346f1a
ILT
1345if test -z "$target" ; then
1346 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
ec342d7d 1347fi
ef346f1a
ILT
1348if test -z "$host" ; then
1349 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1350fi
ef346f1a
ILT
1351
1352# host-specific stuff:
1353
caf2a913
ILT
1354# Extract the first word of "gcc", so it can be a program name with args.
1355set dummy gcc; ac_word=$2
1356echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 1357echo "configure:1358: checking for $ac_word" >&5
caf2a913
ILT
1358if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1359 echo $ac_n "(cached) $ac_c" 1>&6
1360else
1361 if test -n "$CC"; then
1362 ac_cv_prog_CC="$CC" # Let the user override the test.
1363else
1364 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1365 for ac_dir in $PATH; do
1366 test -z "$ac_dir" && ac_dir=.
1367 if test -f $ac_dir/$ac_word; then
1368 ac_cv_prog_CC="gcc"
1369 break
1370 fi
1371 done
1372 IFS="$ac_save_ifs"
caf2a913
ILT
1373fi
1374fi
1375CC="$ac_cv_prog_CC"
1376if test -n "$CC"; then
1377 echo "$ac_t""$CC" 1>&6
1378else
1379 echo "$ac_t""no" 1>&6
1380fi
1381
b9a5c27f
RS
1382if test -z "$CC"; then
1383 # Extract the first word of "cc", so it can be a program name with args.
1384set dummy cc; ac_word=$2
1385echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 1386echo "configure:1387: checking for $ac_word" >&5
b9a5c27f
RS
1387if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389else
1390 if test -n "$CC"; then
1391 ac_cv_prog_CC="$CC" # Let the user override the test.
1392else
1393 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1394 ac_prog_rejected=no
1395 for ac_dir in $PATH; do
1396 test -z "$ac_dir" && ac_dir=.
1397 if test -f $ac_dir/$ac_word; then
1398 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1399 ac_prog_rejected=yes
1400 continue
1401 fi
1402 ac_cv_prog_CC="cc"
1403 break
1404 fi
1405 done
1406 IFS="$ac_save_ifs"
1407if test $ac_prog_rejected = yes; then
1408 # We found a bogon in the path, so make sure we never use it.
1409 set dummy $ac_cv_prog_CC
1410 shift
1411 if test $# -gt 0; then
1412 # We chose a different compiler from the bogus one.
1413 # However, it has the same basename, so the bogon will be chosen
1414 # first if we set CC to just the basename; use the full file name.
1415 shift
1416 set dummy "$ac_dir/$ac_word" "$@"
1417 shift
1418 ac_cv_prog_CC="$@"
1419 fi
1420fi
1421fi
1422fi
1423CC="$ac_cv_prog_CC"
1424if test -n "$CC"; then
1425 echo "$ac_t""$CC" 1>&6
1426else
1427 echo "$ac_t""no" 1>&6
1428fi
1429
1430 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1431fi
1432
1433echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
0d3e84dd 1434echo "configure:1435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
b9a5c27f
RS
1435
1436ac_ext=c
1437# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1438ac_cpp='$CPP $CPPFLAGS'
1439ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1440ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1441cross_compiling=$ac_cv_prog_cc_cross
1442
1443cat > conftest.$ac_ext <<EOF
0d3e84dd 1444#line 1445 "configure"
b9a5c27f
RS
1445#include "confdefs.h"
1446main(){return(0);}
1447EOF
0d3e84dd 1448if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b9a5c27f
RS
1449 ac_cv_prog_cc_works=yes
1450 # If we can't run a trivial program, we are probably using a cross compiler.
1451 if (./conftest; exit) 2>/dev/null; then
1452 ac_cv_prog_cc_cross=no
1453 else
1454 ac_cv_prog_cc_cross=yes
1455 fi
1456else
1457 echo "configure: failed program was:" >&5
1458 cat conftest.$ac_ext >&5
1459 ac_cv_prog_cc_works=no
1460fi
1461rm -fr conftest*
1462
1463echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1464if test $ac_cv_prog_cc_works = no; then
1465 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1466fi
1467echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
0d3e84dd 1468echo "configure:1469: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
b9a5c27f
RS
1469echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1470cross_compiling=$ac_cv_prog_cc_cross
ef346f1a 1471
caf2a913 1472echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
0d3e84dd 1473echo "configure:1474: checking whether we are using GNU C" >&5
caf2a913
ILT
1474if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476else
1477 cat > conftest.c <<EOF
ef346f1a
ILT
1478#ifdef __GNUC__
1479 yes;
1480#endif
1481EOF
0d3e84dd 1482if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
caf2a913
ILT
1483 ac_cv_prog_gcc=yes
1484else
1485 ac_cv_prog_gcc=no
1486fi
1487fi
1488
1489echo "$ac_t""$ac_cv_prog_gcc" 1>&6
b9a5c27f 1490
caf2a913 1491if test $ac_cv_prog_gcc = yes; then
ef346f1a 1492 GCC=yes
b9a5c27f
RS
1493 ac_test_CFLAGS="${CFLAGS+set}"
1494 ac_save_CFLAGS="$CFLAGS"
1495 CFLAGS=
1496 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
0d3e84dd 1497echo "configure:1498: checking whether ${CC-cc} accepts -g" >&5
b9a5c27f 1498if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
caf2a913
ILT
1499 echo $ac_n "(cached) $ac_c" 1>&6
1500else
1501 echo 'void f(){}' > conftest.c
1502if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
b9a5c27f 1503 ac_cv_prog_cc_g=yes
caf2a913 1504else
b9a5c27f 1505 ac_cv_prog_cc_g=no
caf2a913
ILT
1506fi
1507rm -f conftest*
1508
1509fi
1510
b9a5c27f
RS
1511echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1512 if test "$ac_test_CFLAGS" = set; then
1513 CFLAGS="$ac_save_CFLAGS"
1514 elif test $ac_cv_prog_cc_g = yes; then
1515 CFLAGS="-g -O2"
1516 else
1517 CFLAGS="-O2"
ef346f1a
ILT
1518 fi
1519else
1520 GCC=
1521 test "${CFLAGS+set}" = set || CFLAGS="-g"
1522fi
ef346f1a 1523
b9a5c27f 1524
b5db0960 1525test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
b9a5c27f
RS
1526
1527echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
0d3e84dd 1528echo "configure:1529: checking for Cygwin32 environment" >&5
b9a5c27f
RS
1529if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1530 echo $ac_n "(cached) $ac_c" 1>&6
1531else
1532 cat > conftest.$ac_ext <<EOF
0d3e84dd 1533#line 1534 "configure"
b9a5c27f
RS
1534#include "confdefs.h"
1535
1536int main() {
12e0afe5 1537return __CYGWIN32__;
b9a5c27f
RS
1538; return 0; }
1539EOF
0d3e84dd 1540if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
1541 rm -rf conftest*
1542 am_cv_cygwin32=yes
1543else
1544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 rm -rf conftest*
1547 am_cv_cygwin32=no
1548fi
1549rm -f conftest*
1550rm -f conftest*
1551fi
1552
1553echo "$ac_t""$am_cv_cygwin32" 1>&6
1554CYGWIN32=
1555test "$am_cv_cygwin32" = yes && CYGWIN32=yes
12e0afe5 1556echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
0d3e84dd 1557echo "configure:1558: checking for Mingw32 environment" >&5
12e0afe5
ILT
1558if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
1559 echo $ac_n "(cached) $ac_c" 1>&6
1560else
1561 cat > conftest.$ac_ext <<EOF
0d3e84dd 1562#line 1563 "configure"
12e0afe5
ILT
1563#include "confdefs.h"
1564
1565int main() {
1566return __MINGW32__;
1567; return 0; }
1568EOF
0d3e84dd 1569if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12e0afe5
ILT
1570 rm -rf conftest*
1571 am_cv_mingw32=yes
1572else
1573 echo "configure: failed program was:" >&5
1574 cat conftest.$ac_ext >&5
1575 rm -rf conftest*
1576 am_cv_mingw32=no
1577fi
1578rm -f conftest*
1579rm -f conftest*
1580fi
1581
1582echo "$ac_t""$am_cv_mingw32" 1>&6
1583MINGW32=
1584test "$am_cv_mingw32" = yes && MINGW32=yes
1585
b5db0960 1586
b9a5c27f 1587echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
0d3e84dd 1588echo "configure:1589: checking for executable suffix" >&5
b9a5c27f
RS
1589if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1590 echo $ac_n "(cached) $ac_c" 1>&6
1591else
0d3e84dd 1592 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
b9a5c27f
RS
1593am_cv_exeext=.exe
1594else
1595cat > am_c_test.c << 'EOF'
1596int main() {
1597/* Nothing needed here */
1598}
1599EOF
1600${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
b5db0960 1601am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
b9a5c27f
RS
1602rm -f am_c_test*
1603fi
1604
1605test x"${am_cv_exeext}" = x && am_cv_exeext=no
1606fi
1607EXEEXT=""
1608test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1609echo "$ac_t""${am_cv_exeext}" 1>&6
1610
ec342d7d 1611
b5db0960
ILT
1612for ac_prog in 'bison -y' byacc
1613do
1614# Extract the first word of "$ac_prog", so it can be a program name with args.
1615set dummy $ac_prog; ac_word=$2
1616echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 1617echo "configure:1618: checking for $ac_word" >&5
b5db0960
ILT
1618if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620else
1621 if test -n "$YACC"; then
1622 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1623else
1624 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1625 for ac_dir in $PATH; do
1626 test -z "$ac_dir" && ac_dir=.
1627 if test -f $ac_dir/$ac_word; then
1628 ac_cv_prog_YACC="$ac_prog"
1629 break
1630 fi
1631 done
1632 IFS="$ac_save_ifs"
1633fi
1634fi
1635YACC="$ac_cv_prog_YACC"
1636if test -n "$YACC"; then
1637 echo "$ac_t""$YACC" 1>&6
1638else
1639 echo "$ac_t""no" 1>&6
1640fi
6c18e393 1641
b5db0960
ILT
1642test -n "$YACC" && break
1643done
1644test -n "$YACC" || YACC="yacc"
3d6f0983 1645
b5db0960
ILT
1646# Extract the first word of "flex", so it can be a program name with args.
1647set dummy flex; ac_word=$2
1648echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0d3e84dd 1649echo "configure:1650: checking for $ac_word" >&5
b5db0960
ILT
1650if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1651 echo $ac_n "(cached) $ac_c" 1>&6
1652else
1653 if test -n "$LEX"; then
1654 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1655else
1656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1657 for ac_dir in $PATH; do
1658 test -z "$ac_dir" && ac_dir=.
1659 if test -f $ac_dir/$ac_word; then
1660 ac_cv_prog_LEX="flex"
1661 break
1662 fi
1663 done
1664 IFS="$ac_save_ifs"
1665 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1666fi
1667fi
1668LEX="$ac_cv_prog_LEX"
1669if test -n "$LEX"; then
1670 echo "$ac_t""$LEX" 1>&6
1671else
1672 echo "$ac_t""no" 1>&6
1673fi
ef346f1a 1674
b5db0960
ILT
1675if test -z "$LEXLIB"
1676then
1677 case "$LEX" in
1678 flex*) ac_lib=fl ;;
1679 *) ac_lib=l ;;
1680 esac
1681 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
0d3e84dd 1682echo "configure:1683: checking for yywrap in -l$ac_lib" >&5
b5db0960
ILT
1683ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1685 echo $ac_n "(cached) $ac_c" 1>&6
1686else
1687 ac_save_LIBS="$LIBS"
1688LIBS="-l$ac_lib $LIBS"
1689cat > conftest.$ac_ext <<EOF
0d3e84dd 1690#line 1691 "configure"
b5db0960
ILT
1691#include "confdefs.h"
1692/* Override any gcc2 internal prototype to avoid an error. */
1693/* We use char because int might match the return type of a gcc2
1694 builtin and then its argument prototype would still apply. */
1695char yywrap();
2e598345 1696
b5db0960
ILT
1697int main() {
1698yywrap()
1699; return 0; }
1700EOF
0d3e84dd 1701if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b5db0960
ILT
1702 rm -rf conftest*
1703 eval "ac_cv_lib_$ac_lib_var=yes"
1704else
1705 echo "configure: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1707 rm -rf conftest*
1708 eval "ac_cv_lib_$ac_lib_var=no"
1709fi
1710rm -f conftest*
1711LIBS="$ac_save_LIBS"
ad43e45b 1712
b5db0960
ILT
1713fi
1714if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1715 echo "$ac_t""yes" 1>&6
1716 LEXLIB="-l$ac_lib"
1717else
1718 echo "$ac_t""no" 1>&6
1719fi
2e598345 1720
b5db0960 1721fi
2e598345 1722
ef346f1a 1723echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
0d3e84dd 1724echo "configure:1725: checking how to run the C preprocessor" >&5
ef346f1a
ILT
1725# On Suns, sometimes $CPP names a directory.
1726if test -n "$CPP" && test -d "$CPP"; then
1727 CPP=
1728fi
1729if test -z "$CPP"; then
1730if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
c0b47bae 1732else
ef346f1a
ILT
1733 # This must be in double quotes, not single quotes, because CPP may get
1734 # substituted into the Makefile and "${CC-cc}" will confuse make.
1735 CPP="${CC-cc} -E"
1736 # On the NeXT, cc -E runs the code through the compiler's parser,
1737 # not just through cpp.
1738 cat > conftest.$ac_ext <<EOF
0d3e84dd 1739#line 1740 "configure"
ef346f1a
ILT
1740#include "confdefs.h"
1741#include <assert.h>
1742Syntax Error
1743EOF
b9a5c27f 1744ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0d3e84dd 1745{ (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1746ac_err=`grep -v '^ *+' conftest.out`
1747if test -z "$ac_err"; then
1748 :
1749else
1750 echo "$ac_err" >&5
b9a5c27f
RS
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
ef346f1a
ILT
1753 rm -rf conftest*
1754 CPP="${CC-cc} -E -traditional-cpp"
1755 cat > conftest.$ac_ext <<EOF
0d3e84dd 1756#line 1757 "configure"
ef346f1a
ILT
1757#include "confdefs.h"
1758#include <assert.h>
1759Syntax Error
1760EOF
b9a5c27f 1761ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0d3e84dd 1762{ (eval echo configure:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1763ac_err=`grep -v '^ *+' conftest.out`
1764if test -z "$ac_err"; then
1765 :
1766else
1767 echo "$ac_err" >&5
b9a5c27f
RS
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
ef346f1a
ILT
1770 rm -rf conftest*
1771 CPP=/lib/cpp
1772fi
1773rm -f conftest*
1774fi
1775rm -f conftest*
1776 ac_cv_prog_CPP="$CPP"
c0b47bae 1777fi
ef346f1a
ILT
1778 CPP="$ac_cv_prog_CPP"
1779else
1780 ac_cv_prog_CPP="$CPP"
1781fi
1782echo "$ac_t""$CPP" 1>&6
c0b47bae 1783
b5db0960 1784echo $ac_n "checking lex output file root""... $ac_c" 1>&6
0d3e84dd 1785echo "configure:1786: checking lex output file root" >&5
b5db0960
ILT
1786if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1787 echo $ac_n "(cached) $ac_c" 1>&6
1788else
1789 # The minimal lex program is just a single line: %%. But some broken lexes
1790# (Solaris, I think it was) want two %% lines, so accommodate them.
1791echo '%%
1792%%' | $LEX
1793if test -f lex.yy.c; then
1794 ac_cv_prog_lex_root=lex.yy
1795elif test -f lexyy.c; then
1796 ac_cv_prog_lex_root=lexyy
1797else
1798 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1799fi
1800fi
1801
1802echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1803LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1804
1805echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
0d3e84dd 1806echo "configure:1807: checking whether yytext is a pointer" >&5
b5db0960
ILT
1807if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1809else
1810 # POSIX says lex can declare yytext either as a pointer or an array; the
1811# default is implementation-dependent. Figure out which it is, since
1812# not all implementations provide the %pointer and %array declarations.
1813ac_cv_prog_lex_yytext_pointer=no
1814echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1815ac_save_LIBS="$LIBS"
1816LIBS="$LIBS $LEXLIB"
1817cat > conftest.$ac_ext <<EOF
0d3e84dd 1818#line 1819 "configure"
b5db0960
ILT
1819#include "confdefs.h"
1820`cat $LEX_OUTPUT_ROOT.c`
1821int main() {
1822
1823; return 0; }
1824EOF
0d3e84dd 1825if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b5db0960
ILT
1826 rm -rf conftest*
1827 ac_cv_prog_lex_yytext_pointer=yes
1828else
1829 echo "configure: failed program was:" >&5
1830 cat conftest.$ac_ext >&5
1831fi
1832rm -f conftest*
1833LIBS="$ac_save_LIBS"
1834rm -f "${LEX_OUTPUT_ROOT}.c"
1835
1836fi
1837
1838echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1839if test $ac_cv_prog_lex_yytext_pointer = yes; then
1840 cat >> confdefs.h <<\EOF
1841#define YYTEXT_POINTER 1
1842EOF
1843
1844fi
1845
1846
1847echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
0d3e84dd 1848echo "configure:1849: checking whether to enable maintainer-specific portions of Makefiles" >&5
b5db0960
ILT
1849 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1850if test "${enable_maintainer_mode+set}" = set; then
1851 enableval="$enable_maintainer_mode"
1852 USE_MAINTAINER_MODE=$enableval
1853else
1854 USE_MAINTAINER_MODE=no
1855fi
1856
1857 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1858 if test $USE_MAINTAINER_MODE = yes; then
1859 MAINT=
1860 else
1861 MAINT='#M#'
1862 fi
1863
1864
1865
1866. ${srcdir}/configure.host
1867
1868
1869
1870
1871
1872
ef346f1a
ILT
1873for ac_hdr in string.h strings.h stdlib.h unistd.h
1874do
b9a5c27f 1875ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
ef346f1a 1876echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
0d3e84dd 1877echo "configure:1878: checking for $ac_hdr" >&5
ef346f1a
ILT
1878if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1880else
1881 cat > conftest.$ac_ext <<EOF
0d3e84dd 1882#line 1883 "configure"
ef346f1a
ILT
1883#include "confdefs.h"
1884#include <$ac_hdr>
1885EOF
b9a5c27f 1886ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0d3e84dd 1887{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1888ac_err=`grep -v '^ *+' conftest.out`
1889if test -z "$ac_err"; then
1890 rm -rf conftest*
1891 eval "ac_cv_header_$ac_safe=yes"
1892else
1893 echo "$ac_err" >&5
b9a5c27f
RS
1894 echo "configure: failed program was:" >&5
1895 cat conftest.$ac_ext >&5
ef346f1a
ILT
1896 rm -rf conftest*
1897 eval "ac_cv_header_$ac_safe=no"
1898fi
1899rm -f conftest*
1900fi
1901if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1902 echo "$ac_t""yes" 1>&6
b9a5c27f 1903 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
ef346f1a
ILT
1904 cat >> confdefs.h <<EOF
1905#define $ac_tr_hdr 1
1906EOF
1907
1908else
1909 echo "$ac_t""no" 1>&6
c0b47bae 1910fi
ef346f1a 1911done
8c32cf6e 1912
ef346f1a
ILT
1913for ac_func in sbrk
1914do
1915echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0d3e84dd 1916echo "configure:1917: checking for $ac_func" >&5
ef346f1a
ILT
1917if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1918 echo $ac_n "(cached) $ac_c" 1>&6
1919else
1920 cat > conftest.$ac_ext <<EOF
0d3e84dd 1921#line 1922 "configure"
ef346f1a
ILT
1922#include "confdefs.h"
1923/* System header to define __stub macros and hopefully few prototypes,
1924 which can conflict with char $ac_func(); below. */
1925#include <assert.h>
1926/* Override any gcc2 internal prototype to avoid an error. */
b9a5c27f
RS
1927/* We use char because int might match the return type of a gcc2
1928 builtin and then its argument prototype would still apply. */
caf2a913 1929char $ac_func();
ef346f1a 1930
b9a5c27f 1931int main() {
ef346f1a
ILT
1932
1933/* The GNU C library defines this for functions which it implements
1934 to always fail with ENOSYS. Some functions are actually named
1935 something starting with __ and the normal name is an alias. */
1936#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1937choke me
1938#else
1939$ac_func();
1940#endif
1941
1942; return 0; }
1943EOF
0d3e84dd 1944if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ef346f1a
ILT
1945 rm -rf conftest*
1946 eval "ac_cv_func_$ac_func=yes"
1947else
b9a5c27f
RS
1948 echo "configure: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
ef346f1a
ILT
1950 rm -rf conftest*
1951 eval "ac_cv_func_$ac_func=no"
1952fi
1953rm -f conftest*
ef346f1a 1954fi
b9a5c27f 1955
ef346f1a
ILT
1956if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1957 echo "$ac_t""yes" 1>&6
caf2a913 1958 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ef346f1a
ILT
1959 cat >> confdefs.h <<EOF
1960#define $ac_tr_func 1
1961EOF
1962
1963else
1964 echo "$ac_t""no" 1>&6
1965fi
1966done
c0b47bae 1967
caf2a913
ILT
1968ac_header_dirent=no
1969for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1970do
b9a5c27f 1971ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
caf2a913 1972echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
0d3e84dd 1973echo "configure:1974: checking for $ac_hdr that defines DIR" >&5
caf2a913
ILT
1974if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1975 echo $ac_n "(cached) $ac_c" 1>&6
1976else
1977 cat > conftest.$ac_ext <<EOF
0d3e84dd 1978#line 1979 "configure"
caf2a913
ILT
1979#include "confdefs.h"
1980#include <sys/types.h>
1981#include <$ac_hdr>
b9a5c27f 1982int main() {
caf2a913
ILT
1983DIR *dirp = 0;
1984; return 0; }
1985EOF
0d3e84dd 1986if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
1987 rm -rf conftest*
1988 eval "ac_cv_header_dirent_$ac_safe=yes"
1989else
b9a5c27f
RS
1990 echo "configure: failed program was:" >&5
1991 cat conftest.$ac_ext >&5
caf2a913
ILT
1992 rm -rf conftest*
1993 eval "ac_cv_header_dirent_$ac_safe=no"
1994fi
1995rm -f conftest*
caf2a913
ILT
1996fi
1997if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1998 echo "$ac_t""yes" 1>&6
b9a5c27f 1999 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
caf2a913
ILT
2000 cat >> confdefs.h <<EOF
2001#define $ac_tr_hdr 1
2002EOF
2003 ac_header_dirent=$ac_hdr; break
2004else
2005 echo "$ac_t""no" 1>&6
2006fi
2007done
2008# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2009if test $ac_header_dirent = dirent.h; then
b9a5c27f 2010echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
0d3e84dd 2011echo "configure:2012: checking for opendir in -ldir" >&5
b9a5c27f 2012ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
2013if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015else
2016 ac_save_LIBS="$LIBS"
2017LIBS="-ldir $LIBS"
2018cat > conftest.$ac_ext <<EOF
0d3e84dd 2019#line 2020 "configure"
caf2a913 2020#include "confdefs.h"
b9a5c27f
RS
2021/* Override any gcc2 internal prototype to avoid an error. */
2022/* We use char because int might match the return type of a gcc2
2023 builtin and then its argument prototype would still apply. */
2024char opendir();
caf2a913 2025
b9a5c27f 2026int main() {
caf2a913
ILT
2027opendir()
2028; return 0; }
2029EOF
0d3e84dd 2030if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
2031 rm -rf conftest*
2032 eval "ac_cv_lib_$ac_lib_var=yes"
2033else
b9a5c27f
RS
2034 echo "configure: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
caf2a913
ILT
2036 rm -rf conftest*
2037 eval "ac_cv_lib_$ac_lib_var=no"
2038fi
2039rm -f conftest*
2040LIBS="$ac_save_LIBS"
2041
2042fi
2043if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2044 echo "$ac_t""yes" 1>&6
2045 LIBS="$LIBS -ldir"
2046else
2047 echo "$ac_t""no" 1>&6
2048fi
2049
2050else
b9a5c27f 2051echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
0d3e84dd 2052echo "configure:2053: checking for opendir in -lx" >&5
b9a5c27f 2053ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
2054if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2055 echo $ac_n "(cached) $ac_c" 1>&6
2056else
2057 ac_save_LIBS="$LIBS"
2058LIBS="-lx $LIBS"
2059cat > conftest.$ac_ext <<EOF
0d3e84dd 2060#line 2061 "configure"
caf2a913 2061#include "confdefs.h"
b9a5c27f
RS
2062/* Override any gcc2 internal prototype to avoid an error. */
2063/* We use char because int might match the return type of a gcc2
2064 builtin and then its argument prototype would still apply. */
2065char opendir();
caf2a913 2066
b9a5c27f 2067int main() {
caf2a913
ILT
2068opendir()
2069; return 0; }
2070EOF
0d3e84dd 2071if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
2072 rm -rf conftest*
2073 eval "ac_cv_lib_$ac_lib_var=yes"
2074else
b9a5c27f
RS
2075 echo "configure: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
caf2a913
ILT
2077 rm -rf conftest*
2078 eval "ac_cv_lib_$ac_lib_var=no"
2079fi
2080rm -f conftest*
2081LIBS="$ac_save_LIBS"
2082
2083fi
2084if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2085 echo "$ac_t""yes" 1>&6
2086 LIBS="$LIBS -lx"
2087else
2088 echo "$ac_t""no" 1>&6
2089fi
2090
2091fi
2092
2093
c0b47bae 2094
ef346f1a 2095case "${host}" in
12e0afe5 2096i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
ef346f1a
ILT
2097 cat >> confdefs.h <<\EOF
2098#define USE_BINARY_FOPEN 1
2099EOF
2100 ;;
2101esac
6c18e393 2102
b9a5c27f 2103echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
0d3e84dd 2104echo "configure:2105: checking whether strstr must be declared" >&5
b9a5c27f
RS
2105if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
2106 echo $ac_n "(cached) $ac_c" 1>&6
2107else
2108 cat > conftest.$ac_ext <<EOF
0d3e84dd 2109#line 2110 "configure"
b9a5c27f
RS
2110#include "confdefs.h"
2111
2112#include <stdio.h>
2113#ifdef HAVE_STRING_H
2114#include <string.h>
2115#else
2116#ifdef HAVE_STRINGS_H
2117#include <strings.h>
2118#endif
2119#endif
2120#ifdef HAVE_STDLIB_H
2121#include <stdlib.h>
2122#endif
2123#ifdef HAVE_UNISTD_H
2124#include <unistd.h>
2125#endif
2126int main() {
2127char *(*pfn) = (char *(*)) strstr
2128; return 0; }
2129EOF
0d3e84dd 2130if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2131 rm -rf conftest*
2132 bfd_cv_decl_needed_strstr=no
2133else
2134 echo "configure: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 rm -rf conftest*
2137 bfd_cv_decl_needed_strstr=yes
2138fi
2139rm -f conftest*
2140fi
2141
2142echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
2143if test $bfd_cv_decl_needed_strstr = yes; then
2144 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2145 cat >> confdefs.h <<EOF
2146#define $bfd_tr_decl 1
2147EOF
2148
2149fi
2150
caf2a913 2151echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
0d3e84dd 2152echo "configure:2153: checking whether free must be declared" >&5
caf2a913
ILT
2153if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155else
2156 cat > conftest.$ac_ext <<EOF
0d3e84dd 2157#line 2158 "configure"
caf2a913
ILT
2158#include "confdefs.h"
2159
2160#include <stdio.h>
b9a5c27f
RS
2161#ifdef HAVE_STRING_H
2162#include <string.h>
2163#else
2164#ifdef HAVE_STRINGS_H
2165#include <strings.h>
2166#endif
2167#endif
caf2a913
ILT
2168#ifdef HAVE_STDLIB_H
2169#include <stdlib.h>
2170#endif
2171#ifdef HAVE_UNISTD_H
2172#include <unistd.h>
2173#endif
b9a5c27f 2174int main() {
caf2a913
ILT
2175char *(*pfn) = (char *(*)) free
2176; return 0; }
2177EOF
0d3e84dd 2178if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
2179 rm -rf conftest*
2180 bfd_cv_decl_needed_free=no
2181else
b9a5c27f
RS
2182 echo "configure: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
caf2a913
ILT
2184 rm -rf conftest*
2185 bfd_cv_decl_needed_free=yes
2186fi
2187rm -f conftest*
caf2a913
ILT
2188fi
2189
2190echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2191if test $bfd_cv_decl_needed_free = yes; then
2192 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2193 cat >> confdefs.h <<EOF
2194#define $bfd_tr_decl 1
2195EOF
2196
2197fi
2198
b9a5c27f 2199echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
0d3e84dd 2200echo "configure:2201: checking whether sbrk must be declared" >&5
b9a5c27f
RS
2201if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
2202 echo $ac_n "(cached) $ac_c" 1>&6
2203else
2204 cat > conftest.$ac_ext <<EOF
0d3e84dd 2205#line 2206 "configure"
b9a5c27f
RS
2206#include "confdefs.h"
2207
2208#include <stdio.h>
2209#ifdef HAVE_STRING_H
2210#include <string.h>
2211#else
2212#ifdef HAVE_STRINGS_H
2213#include <strings.h>
2214#endif
2215#endif
2216#ifdef HAVE_STDLIB_H
2217#include <stdlib.h>
2218#endif
2219#ifdef HAVE_UNISTD_H
2220#include <unistd.h>
2221#endif
2222int main() {
2223char *(*pfn) = (char *(*)) sbrk
2224; return 0; }
2225EOF
0d3e84dd 2226if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2227 rm -rf conftest*
2228 bfd_cv_decl_needed_sbrk=no
2229else
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2232 rm -rf conftest*
2233 bfd_cv_decl_needed_sbrk=yes
2234fi
2235rm -f conftest*
2236fi
2237
2238echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
2239if test $bfd_cv_decl_needed_sbrk = yes; then
2240 bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2241 cat >> confdefs.h <<EOF
2242#define $bfd_tr_decl 1
2243EOF
2244
2245fi
2246
2247echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
0d3e84dd 2248echo "configure:2249: checking whether getenv must be declared" >&5
b9a5c27f
RS
2249if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2250 echo $ac_n "(cached) $ac_c" 1>&6
2251else
2252 cat > conftest.$ac_ext <<EOF
0d3e84dd 2253#line 2254 "configure"
b9a5c27f
RS
2254#include "confdefs.h"
2255
2256#include <stdio.h>
2257#ifdef HAVE_STRING_H
2258#include <string.h>
2259#else
2260#ifdef HAVE_STRINGS_H
2261#include <strings.h>
2262#endif
2263#endif
2264#ifdef HAVE_STDLIB_H
2265#include <stdlib.h>
2266#endif
2267#ifdef HAVE_UNISTD_H
2268#include <unistd.h>
2269#endif
2270int main() {
2271char *(*pfn) = (char *(*)) getenv
2272; return 0; }
2273EOF
0d3e84dd 2274if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2275 rm -rf conftest*
2276 bfd_cv_decl_needed_getenv=no
2277else
2278 echo "configure: failed program was:" >&5
2279 cat conftest.$ac_ext >&5
2280 rm -rf conftest*
2281 bfd_cv_decl_needed_getenv=yes
2282fi
2283rm -f conftest*
2284fi
2285
2286echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2287if test $bfd_cv_decl_needed_getenv = yes; then
2288 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2289 cat >> confdefs.h <<EOF
2290#define $bfd_tr_decl 1
2291EOF
2292
2293fi
2294
caf2a913 2295
ef346f1a 2296# target-specific stuff:
3d6f0983 2297
95d31c3c 2298all_targets=
ef346f1a
ILT
2299EMUL=
2300all_emuls=
03abc2bd
ILT
2301
2302rm -f tdirs
ef346f1a 2303
95d31c3c 2304for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
ef346f1a 2305do
95d31c3c
ILT
2306 if test "$targ_alias" = "all"; then
2307 all_targets=true
2308 else
2309 # Canonicalize the secondary target names.
b9a5c27f 2310 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
95d31c3c
ILT
2311 if test -n "$result"; then
2312 targ=$result
ef346f1a 2313 else
95d31c3c 2314 targ=$targ_alias
ef346f1a 2315 fi
2ee11735 2316
95d31c3c 2317 . ${srcdir}/configure.tgt
ef346f1a 2318
95d31c3c
ILT
2319 if test "$targ" = "$target"; then
2320 EMUL=$targ_emul
2321 fi
ef346f1a 2322
95d31c3c
ILT
2323 for i in $targ_emul $targ_extra_emuls; do
2324 case " $all_emuls " in
2325 *" e${i}.o "*) ;;
2326 *)
2327 all_emuls="$all_emuls e${i}.o"
2328 eval result=\$tdir_$i
2329 test -z "$result" && result=$targ_alias
03abc2bd 2330 echo tdir_$i=$result >> tdirs
95d31c3c 2331 ;;
ef346f1a
ILT
2332 esac
2333 done
95d31c3c
ILT
2334 fi
2335done
ef346f1a 2336
ef346f1a 2337
ef346f1a 2338
03abc2bd
ILT
2339TDIRS=tdirs
2340
ef346f1a 2341
95d31c3c 2342if test x${all_targets} = xtrue; then
b9a5c27f
RS
2343 if test x${want64} = xtrue; then
2344 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
2345 else
2346 EMULATION_OFILES='$(ALL_EMULATIONS)'
2347 fi
95d31c3c
ILT
2348else
2349 EMULATION_OFILES=$all_emuls
2350fi
2351
ef346f1a
ILT
2352
2353trap '' 1 2 15
2354cat > confcache <<\EOF
2355# This file is a shell script that caches the results of configure
2356# tests run on this system so they can be shared between configure
2357# scripts and configure runs. It is not useful on other systems.
2358# If it contains results you don't want to keep, you may remove or edit it.
2359#
2360# By default, configure uses ./config.cache as the cache file,
2361# creating it if it does not exist already. You can give configure
2362# the --cache-file=FILE option to use a different cache file; that is
2363# what configure does when it calls configure scripts in
2364# subdirectories, so they share the cache.
2365# Giving --cache-file=/dev/null disables caching, for debugging configure.
2366# config.status only pays attention to the cache file if you give it the
2367# --recheck option to rerun configure.
2368#
2369EOF
b9a5c27f
RS
2370# The following way of writing the cache mishandles newlines in values,
2371# but we know of no workaround that is simple, portable, and efficient.
2372# So, don't put newlines in cache variables' values.
ef346f1a
ILT
2373# Ultrix sh set writes to stderr and can't be redirected directly,
2374# and sets the high bit in the cache file unless we assign to the vars.
2375(set) 2>&1 |
12e0afe5 2376 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
b9a5c27f
RS
2377 *ac_space=\ *)
2378 # `set' does not quote correctly, so add quotes (double-quote substitution
2379 # turns \\\\ into \\, and sed turns \\ into \).
2380 sed -n \
2381 -e "s/'/'\\\\''/g" \
2382 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2383 ;;
2384 *)
2385 # `set' quotes correctly as required by POSIX, so do not add quotes.
2386 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2387 ;;
2388 esac >> confcache
ef346f1a
ILT
2389if cmp -s $cache_file confcache; then
2390 :
2391else
2392 if test -w $cache_file; then
2393 echo "updating cache $cache_file"
2394 cat confcache > $cache_file
2395 else
2396 echo "not updating unwritable cache $cache_file"
2397 fi
2398fi
2399rm -f confcache
2400
2401trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2402
2403test "x$prefix" = xNONE && prefix=$ac_default_prefix
2404# Let make expand exec_prefix.
2405test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2406
2407# Any assignment to VPATH causes Sun make to only execute
2408# the first set of double-colon rules, so remove it if not needed.
2409# If there is a colon in the path, we need to keep it.
2410if test "x$srcdir" = x.; then
2411 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2412fi
2413
2414trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2415
2416DEFS=-DHAVE_CONFIG_H
2417
2418# Without the "./", some shells look in PATH for config.status.
2419: ${CONFIG_STATUS=./config.status}
2420
2421echo creating $CONFIG_STATUS
2422rm -f $CONFIG_STATUS
2423cat > $CONFIG_STATUS <<EOF
2424#! /bin/sh
2425# Generated automatically by configure.
2426# Run this file to recreate the current configuration.
2427# This directory was configured as follows,
2428# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2429#
2430# $0 $ac_configure_args
8c32cf6e 2431#
ef346f1a
ILT
2432# Compiler output produced by configure, useful for debugging
2433# configure, is in ./config.log if it exists.
2434
2435ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2436for ac_option
2437do
2438 case "\$ac_option" in
2439 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2440 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2441 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2442 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b5db0960 2443 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
ef346f1a
ILT
2444 exit 0 ;;
2445 -help | --help | --hel | --he | --h)
2446 echo "\$ac_cs_usage"; exit 0 ;;
2447 *) echo "\$ac_cs_usage"; exit 1 ;;
2448 esac
2449done
2450
2451ac_given_srcdir=$srcdir
b9a5c27f 2452ac_given_INSTALL="$INSTALL"
ef346f1a
ILT
2453
2454trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2e598345
ILT
2455EOF
2456cat >> $CONFIG_STATUS <<EOF
ef346f1a 2457
caf2a913 2458# Protect against being on the right side of a sed subst in config.status.
2e598345
ILT
2459sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2460 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
ef346f1a
ILT
2461$ac_vpsub
2462$extrasub
12e0afe5 2463s%@SHELL@%$SHELL%g
ef346f1a
ILT
2464s%@CFLAGS@%$CFLAGS%g
2465s%@CPPFLAGS@%$CPPFLAGS%g
2466s%@CXXFLAGS@%$CXXFLAGS%g
2467s%@DEFS@%$DEFS%g
2468s%@LDFLAGS@%$LDFLAGS%g
2469s%@LIBS@%$LIBS%g
2470s%@exec_prefix@%$exec_prefix%g
2471s%@prefix@%$prefix%g
2472s%@program_transform_name@%$program_transform_name%g
caf2a913
ILT
2473s%@bindir@%$bindir%g
2474s%@sbindir@%$sbindir%g
2475s%@libexecdir@%$libexecdir%g
2476s%@datadir@%$datadir%g
2477s%@sysconfdir@%$sysconfdir%g
2478s%@sharedstatedir@%$sharedstatedir%g
2479s%@localstatedir@%$localstatedir%g
2480s%@libdir@%$libdir%g
2481s%@includedir@%$includedir%g
2482s%@oldincludedir@%$oldincludedir%g
2483s%@infodir@%$infodir%g
2484s%@mandir@%$mandir%g
ef346f1a
ILT
2485s%@host@%$host%g
2486s%@host_alias@%$host_alias%g
2487s%@host_cpu@%$host_cpu%g
2488s%@host_vendor@%$host_vendor%g
2489s%@host_os@%$host_os%g
2490s%@target@%$target%g
2491s%@target_alias@%$target_alias%g
2492s%@target_cpu@%$target_cpu%g
2493s%@target_vendor@%$target_vendor%g
2494s%@target_os@%$target_os%g
2495s%@build@%$build%g
2496s%@build_alias@%$build_alias%g
2497s%@build_cpu@%$build_cpu%g
2498s%@build_vendor@%$build_vendor%g
2499s%@build_os@%$build_os%g
b9a5c27f
RS
2500s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2501s%@INSTALL_DATA@%$INSTALL_DATA%g
b5db0960
ILT
2502s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2503s%@PACKAGE@%$PACKAGE%g
2504s%@VERSION@%$VERSION%g
2505s%@ACLOCAL@%$ACLOCAL%g
2506s%@AUTOCONF@%$AUTOCONF%g
2507s%@AUTOMAKE@%$AUTOMAKE%g
2508s%@AUTOHEADER@%$AUTOHEADER%g
2509s%@MAKEINFO@%$MAKEINFO%g
2510s%@SET_MAKE@%$SET_MAKE%g
b5db0960 2511s%@RANLIB@%$RANLIB%g
12e0afe5 2512s%@CC@%$CC%g
b5db0960 2513s%@LD@%$LD%g
12e0afe5 2514s%@NM@%$NM%g
b5db0960
ILT
2515s%@LN_S@%$LN_S%g
2516s%@LIBTOOL@%$LIBTOOL%g
b9a5c27f 2517s%@EXEEXT@%$EXEEXT%g
b5db0960
ILT
2518s%@YACC@%$YACC%g
2519s%@LEX@%$LEX%g
2520s%@LEXLIB@%$LEXLIB%g
2521s%@CPP@%$CPP%g
2522s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2523s%@MAINT@%$MAINT%g
ef346f1a
ILT
2524s%@HDEFINES@%$HDEFINES%g
2525s%@HOSTING_CRT0@%$HOSTING_CRT0%g
2526s%@HOSTING_LIBS@%$HOSTING_LIBS%g
2527s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
ef346f1a 2528s%@EMUL@%$EMUL%g
03abc2bd
ILT
2529/@TDIRS@/r $TDIRS
2530s%@TDIRS@%%g
ef346f1a
ILT
2531s%@EMULATION_OFILES@%$EMULATION_OFILES%g
2532
2533CEOF
2534EOF
b9a5c27f
RS
2535
2536cat >> $CONFIG_STATUS <<\EOF
2537
2538# Split the substitutions into bite-sized pieces for seds with
2539# small command number limits, like on Digital OSF/1 and HP-UX.
2540ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2541ac_file=1 # Number of current file.
2542ac_beg=1 # First line for current file.
2543ac_end=$ac_max_sed_cmds # Line after last line for current file.
2544ac_more_lines=:
2545ac_sed_cmds=""
2546while $ac_more_lines; do
2547 if test $ac_beg -gt 1; then
2548 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2549 else
2550 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2551 fi
2552 if test ! -s conftest.s$ac_file; then
2553 ac_more_lines=false
2554 rm -f conftest.s$ac_file
2555 else
2556 if test -z "$ac_sed_cmds"; then
2557 ac_sed_cmds="sed -f conftest.s$ac_file"
2558 else
2559 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2560 fi
2561 ac_file=`expr $ac_file + 1`
2562 ac_beg=$ac_end
2563 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2564 fi
2565done
2566if test -z "$ac_sed_cmds"; then
2567 ac_sed_cmds=cat
2568fi
2569EOF
2570
ef346f1a
ILT
2571cat >> $CONFIG_STATUS <<EOF
2572
2573CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2574EOF
2575cat >> $CONFIG_STATUS <<\EOF
2576for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
b9a5c27f 2577 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 2578 case "$ac_file" in
b9a5c27f 2579 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
2580 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2581 *) ac_file_in="${ac_file}.in" ;;
2582 esac
2583
b9a5c27f 2584 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
ef346f1a
ILT
2585
2586 # Remove last slash and all that follows it. Not all systems have dirname.
2587 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2588 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2589 # The file is in a subdirectory.
2590 test ! -d "$ac_dir" && mkdir "$ac_dir"
2591 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2592 # A "../" for each directory in $ac_dir_suffix.
2593 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2594 else
2595 ac_dir_suffix= ac_dots=
2596 fi
2597
2598 case "$ac_given_srcdir" in
2599 .) srcdir=.
2600 if test -z "$ac_dots"; then top_srcdir=.
2601 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2602 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2603 *) # Relative path.
2604 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2605 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2606 esac
2607
b9a5c27f
RS
2608 case "$ac_given_INSTALL" in
2609 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2610 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2611 esac
2612
ef346f1a
ILT
2613 echo creating "$ac_file"
2614 rm -f "$ac_file"
2615 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2616 case "$ac_file" in
2617 *Makefile*) ac_comsub="1i\\
2618# $configure_input" ;;
2619 *) ac_comsub= ;;
2620 esac
b9a5c27f 2621
b5db0960 2622 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ef346f1a
ILT
2623 sed -e "$ac_comsub
2624s%@configure_input@%$configure_input%g
2625s%@srcdir@%$srcdir%g
2626s%@top_srcdir@%$top_srcdir%g
b9a5c27f
RS
2627s%@INSTALL@%$INSTALL%g
2628" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
ef346f1a 2629fi; done
b9a5c27f 2630rm -f conftest.s*
ef346f1a
ILT
2631
2632# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2633# NAME is the cpp macro being defined and VALUE is the value it is being given.
8c32cf6e 2634#
ef346f1a
ILT
2635# ac_d sets the value in "#define NAME VALUE" lines.
2636ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2637ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2638ac_dC='\3'
2639ac_dD='%g'
2640# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2641ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2642ac_uB='\([ ]\)%\1#\2define\3'
2643ac_uC=' '
2644ac_uD='\4%g'
2645# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2646ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2647ac_eB='$%\1#\2define\3'
2648ac_eC=' '
2649ac_eD='%g'
2650
b9a5c27f
RS
2651if test "${CONFIG_HEADERS+set}" != set; then
2652EOF
2653cat >> $CONFIG_STATUS <<EOF
2654 CONFIG_HEADERS="config.h:config.in"
2655EOF
2656cat >> $CONFIG_STATUS <<\EOF
2657fi
ef346f1a 2658for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
b9a5c27f 2659 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 2660 case "$ac_file" in
b9a5c27f 2661 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
2662 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2663 *) ac_file_in="${ac_file}.in" ;;
2664 esac
2665
2666 echo creating $ac_file
2667
2668 rm -f conftest.frag conftest.in conftest.out
b5db0960 2669 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
b9a5c27f 2670 cat $ac_file_inputs > conftest.in
ef346f1a
ILT
2671
2672EOF
2673
2674# Transform confdefs.h into a sed script conftest.vals that substitutes
2675# the proper values into config.h.in to produce config.h. And first:
caf2a913 2676# Protect against being on the right side of a sed subst in config.status.
ef346f1a
ILT
2677# Protect against being in an unquoted here document in config.status.
2678rm -f conftest.vals
2679cat > conftest.hdr <<\EOF
2680s/[\\&%]/\\&/g
2681s%[\\$`]%\\&%g
b9a5c27f 2682s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
ef346f1a
ILT
2683s%ac_d%ac_u%gp
2684s%ac_u%ac_e%gp
2685EOF
2686sed -n -f conftest.hdr confdefs.h > conftest.vals
2687rm -f conftest.hdr
2688
2689# This sed command replaces #undef with comments. This is necessary, for
2690# example, in the case of _POSIX_SOURCE, which is predefined and required
2691# on some systems where configure will not decide to define it.
2692cat >> conftest.vals <<\EOF
2693s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2694EOF
2695
2696# Break up conftest.vals because some shells have a limit on
2697# the size of here documents, and old seds have small limits too.
ef346f1a
ILT
2698
2699rm -f conftest.tail
2700while :
2701do
2702 ac_lines=`grep -c . conftest.vals`
2703 # grep -c gives empty output for an empty file on some AIX systems.
2704 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2705 # Write a limited-size here document to conftest.frag.
2706 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2707 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2708 echo 'CEOF
2709 sed -f conftest.frag conftest.in > conftest.out
2710 rm -f conftest.in
2711 mv conftest.out conftest.in
2712' >> $CONFIG_STATUS
2713 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2714 rm -f conftest.vals
2715 mv conftest.tail conftest.vals
2716done
2717rm -f conftest.vals
2718
2719cat >> $CONFIG_STATUS <<\EOF
2720 rm -f conftest.frag conftest.h
2721 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2722 cat conftest.in >> conftest.h
2723 rm -f conftest.in
2724 if cmp -s $ac_file conftest.h 2>/dev/null; then
2725 echo "$ac_file is unchanged"
2726 rm -f conftest.h
2727 else
b9a5c27f
RS
2728 # Remove last slash and all that follows it. Not all systems have dirname.
2729 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2730 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2731 # The file is in a subdirectory.
2732 test ! -d "$ac_dir" && mkdir "$ac_dir"
2733 fi
ef346f1a
ILT
2734 rm -f $ac_file
2735 mv conftest.h $ac_file
2736 fi
2737fi; done
2738
b9a5c27f
RS
2739EOF
2740cat >> $CONFIG_STATUS <<EOF
ef346f1a 2741
b5db0960 2742
b9a5c27f
RS
2743EOF
2744cat >> $CONFIG_STATUS <<\EOF
b5db0960
ILT
2745test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2746
ef346f1a
ILT
2747exit 0
2748EOF
2749chmod +x $CONFIG_STATUS
2750rm -fr confdefs* $ac_clean_files
2751test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2ee11735 2752
This page took 0.339163 seconds and 4 git commands to generate.