* elflink.h (elf_buckets): Add some more values for larger
[deliverable/binutils-gdb.git] / binutils / configure
CommitLineData
5ab6ca68 1#! /bin/sh
99a42820 2
5ab6ca68 3# Guess values for system-dependent variables and create Makefiles.
ea2488ad 4# Generated automatically using autoconf version 2.8
5ab6ca68
ILT
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-targets alternative target configurations"
36fb98be
ILT
16ac_help="$ac_help
17 --enable-shared build shared BFD library"
5ab6ca68
ILT
18
19# Initialize some variables set by options.
20# The variables have the same names as the options, with
21# dashes changed to underlines.
22build=NONE
23cache_file=./config.cache
24exec_prefix=NONE
25host=NONE
26no_create=
27nonopt=NONE
28no_recursion=
29prefix=NONE
30program_prefix=NONE
31program_suffix=NONE
32program_transform_name=s,x,x,
33silent=
34site=
35srcdir=
36target=NONE
37verbose=
38x_includes=NONE
39x_libraries=NONE
626a6542
SC
40bindir='${exec_prefix}/bin'
41sbindir='${exec_prefix}/sbin'
42libexecdir='${exec_prefix}/libexec'
43datadir='${prefix}/share'
44sysconfdir='${prefix}/etc'
45sharedstatedir='${prefix}/com'
46localstatedir='${prefix}/var'
47libdir='${exec_prefix}/lib'
48includedir='${prefix}/include'
49oldincludedir='/usr/include'
50infodir='${prefix}/info'
51mandir='${prefix}/man'
99a42820 52
5ab6ca68
ILT
53# Initialize some other variables.
54subdirs=
626a6542 55MFLAGS= MAKEFLAGS=
99a42820 56
5ab6ca68
ILT
57ac_prev=
58for ac_option
59do
99a42820 60
5ab6ca68
ILT
61 # If the previous option needs an argument, assign it.
62 if test -n "$ac_prev"; then
63 eval "$ac_prev=\$ac_option"
64 ac_prev=
65 continue
66 fi
67
68 case "$ac_option" in
69 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
70 *) ac_optarg= ;;
71 esac
72
73 # Accept the important Cygnus configure options, so we can diagnose typos.
74
75 case "$ac_option" in
76
626a6542
SC
77 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 ac_prev=bindir ;;
79 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80 bindir="$ac_optarg" ;;
81
82 -build | --build | --buil | --bui | --bu)
5ab6ca68 83 ac_prev=build ;;
626a6542 84 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5ab6ca68
ILT
85 build="$ac_optarg" ;;
86
87 -cache-file | --cache-file | --cache-fil | --cache-fi \
88 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 ac_prev=cache_file ;;
90 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92 cache_file="$ac_optarg" ;;
93
626a6542
SC
94 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 ac_prev=datadir ;;
96 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 | --da=*)
98 datadir="$ac_optarg" ;;
99
5ab6ca68
ILT
100 -disable-* | --disable-*)
101 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
102 # Reject names that are not valid shell variable names.
103 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
104 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 fi
106 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107 eval "enable_${ac_feature}=no" ;;
108
109 -enable-* | --enable-*)
110 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
111 # Reject names that are not valid shell variable names.
112 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
113 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 fi
115 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116 case "$ac_option" in
117 *=*) ;;
118 *) ac_optarg=yes ;;
119 esac
120 eval "enable_${ac_feature}='$ac_optarg'" ;;
121
122 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124 | --exec | --exe | --ex)
125 ac_prev=exec_prefix ;;
126 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128 | --exec=* | --exe=* | --ex=*)
129 exec_prefix="$ac_optarg" ;;
130
131 -gas | --gas | --ga | --g)
132 # Obsolete; use --with-gas.
133 with_gas=yes ;;
134
135 -help | --help | --hel | --he)
136 # Omit some internal or obsolete options to make the list less imposing.
137 # This message is too long to be a string in the A/UX 3.1 sh.
138 cat << EOF
139Usage: configure [options] [host]
140Options: [defaults in brackets after descriptions]
141Configuration:
142 --cache-file=FILE cache test results in FILE
143 --help print this message
144 --no-create do not create output files
145 --quiet, --silent do not print \`checking...' messages
146 --version print the version of autoconf that created configure
147Directory and file names:
148 --prefix=PREFIX install architecture-independent files in PREFIX
149 [$ac_default_prefix]
626a6542 150 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5ab6ca68 151 [same as prefix]
626a6542
SC
152 --bindir=DIR user executables in DIR [EPREFIX/bin]
153 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
154 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
155 --datadir=DIR read-only architecture-independent data in DIR
156 [PREFIX/share]
157 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
158 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 [PREFIX/com]
160 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
161 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
162 --includedir=DIR C header files in DIR [PREFIX/include]
163 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
164 --infodir=DIR info documentation in DIR [PREFIX/info]
165 --mandir=DIR man documentation in DIR [PREFIX/man]
5ab6ca68
ILT
166 --srcdir=DIR find the sources in DIR [configure dir or ..]
167 --program-prefix=PREFIX prepend PREFIX to installed program names
168 --program-suffix=SUFFIX append SUFFIX to installed program names
626a6542
SC
169 --program-transform-name=PROGRAM
170 run sed PROGRAM on installed program names
171EOF
172 cat << EOF
5ab6ca68
ILT
173Host type:
174 --build=BUILD configure for building on BUILD [BUILD=HOST]
175 --host=HOST configure for HOST [guessed]
176 --target=TARGET configure for TARGET [TARGET=HOST]
177Features and packages:
178 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
179 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
180 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
181 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
182 --x-includes=DIR X include files are in DIR
183 --x-libraries=DIR X library files are in DIR
5ab6ca68 184EOF
626a6542
SC
185 if test -n "$ac_help"; then
186 echo "--enable and --with options recognized:$ac_help"
187 fi
5ab6ca68
ILT
188 exit 0 ;;
189
190 -host | --host | --hos | --ho)
191 ac_prev=host ;;
192 -host=* | --host=* | --hos=* | --ho=*)
193 host="$ac_optarg" ;;
194
626a6542
SC
195 -includedir | --includedir | --includedi | --included | --include \
196 | --includ | --inclu | --incl | --inc)
197 ac_prev=includedir ;;
198 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
199 | --includ=* | --inclu=* | --incl=* | --inc=*)
200 includedir="$ac_optarg" ;;
201
202 -infodir | --infodir | --infodi | --infod | --info | --inf)
203 ac_prev=infodir ;;
204 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
205 infodir="$ac_optarg" ;;
206
207 -libdir | --libdir | --libdi | --libd)
208 ac_prev=libdir ;;
209 -libdir=* | --libdir=* | --libdi=* | --libd=*)
210 libdir="$ac_optarg" ;;
211
212 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
213 | --libexe | --libex | --libe)
214 ac_prev=libexecdir ;;
215 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
216 | --libexe=* | --libex=* | --libe=*)
217 libexecdir="$ac_optarg" ;;
218
219 -localstatedir | --localstatedir | --localstatedi | --localstated \
220 | --localstate | --localstat | --localsta | --localst \
221 | --locals | --local | --loca | --loc | --lo)
222 ac_prev=localstatedir ;;
223 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
224 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
225 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
226 localstatedir="$ac_optarg" ;;
227
228 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
229 ac_prev=mandir ;;
230 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
231 mandir="$ac_optarg" ;;
232
5ab6ca68
ILT
233 -nfp | --nfp | --nf)
234 # Obsolete; use --without-fp.
235 with_fp=no ;;
236
237 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
238 | --no-cr | --no-c)
239 no_create=yes ;;
240
241 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
242 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
243 no_recursion=yes ;;
244
626a6542
SC
245 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
246 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
247 | --oldin | --oldi | --old | --ol | --o)
248 ac_prev=oldincludedir ;;
249 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
250 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
251 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
252 oldincludedir="$ac_optarg" ;;
253
5ab6ca68
ILT
254 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
255 ac_prev=prefix ;;
256 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
257 prefix="$ac_optarg" ;;
258
259 -program-prefix | --program-prefix | --program-prefi | --program-pref \
260 | --program-pre | --program-pr | --program-p)
261 ac_prev=program_prefix ;;
262 -program-prefix=* | --program-prefix=* | --program-prefi=* \
263 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
264 program_prefix="$ac_optarg" ;;
265
266 -program-suffix | --program-suffix | --program-suffi | --program-suff \
267 | --program-suf | --program-su | --program-s)
268 ac_prev=program_suffix ;;
269 -program-suffix=* | --program-suffix=* | --program-suffi=* \
270 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
271 program_suffix="$ac_optarg" ;;
272
273 -program-transform-name | --program-transform-name \
274 | --program-transform-nam | --program-transform-na \
275 | --program-transform-n | --program-transform- \
276 | --program-transform | --program-transfor \
277 | --program-transfo | --program-transf \
278 | --program-trans | --program-tran \
279 | --progr-tra | --program-tr | --program-t)
280 ac_prev=program_transform_name ;;
281 -program-transform-name=* | --program-transform-name=* \
282 | --program-transform-nam=* | --program-transform-na=* \
283 | --program-transform-n=* | --program-transform-=* \
284 | --program-transform=* | --program-transfor=* \
285 | --program-transfo=* | --program-transf=* \
286 | --program-trans=* | --program-tran=* \
287 | --progr-tra=* | --program-tr=* | --program-t=*)
288 program_transform_name="$ac_optarg" ;;
289
290 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
291 | -silent | --silent | --silen | --sile | --sil)
292 silent=yes ;;
293
626a6542
SC
294 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
295 ac_prev=sbindir ;;
296 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
297 | --sbi=* | --sb=*)
298 sbindir="$ac_optarg" ;;
299
300 -sharedstatedir | --sharedstatedir | --sharedstatedi \
301 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
302 | --sharedst | --shareds | --shared | --share | --shar \
303 | --sha | --sh)
304 ac_prev=sharedstatedir ;;
305 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
306 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
307 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
308 | --sha=* | --sh=*)
309 sharedstatedir="$ac_optarg" ;;
310
5ab6ca68
ILT
311 -site | --site | --sit)
312 ac_prev=site ;;
313 -site=* | --site=* | --sit=*)
314 site="$ac_optarg" ;;
315
316 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
317 ac_prev=srcdir ;;
318 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
319 srcdir="$ac_optarg" ;;
320
626a6542
SC
321 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
322 | --syscon | --sysco | --sysc | --sys | --sy)
323 ac_prev=sysconfdir ;;
324 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
325 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
326 sysconfdir="$ac_optarg" ;;
327
5ab6ca68
ILT
328 -target | --target | --targe | --targ | --tar | --ta | --t)
329 ac_prev=target ;;
330 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
331 target="$ac_optarg" ;;
332
333 -v | -verbose | --verbose | --verbos | --verbo | --verb)
334 verbose=yes ;;
335
336 -version | --version | --versio | --versi | --vers)
ea2488ad 337 echo "configure generated by autoconf version 2.8"
5ab6ca68
ILT
338 exit 0 ;;
339
340 -with-* | --with-*)
341 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
342 # Reject names that are not valid shell variable names.
343 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
344 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345 fi
346 ac_package=`echo $ac_package| sed 's/-/_/g'`
347 case "$ac_option" in
348 *=*) ;;
349 *) ac_optarg=yes ;;
350 esac
351 eval "with_${ac_package}='$ac_optarg'" ;;
352
353 -without-* | --without-*)
354 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
355 # Reject names that are not valid shell variable names.
356 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
357 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 fi
359 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 eval "with_${ac_package}=no" ;;
361
362 --x)
363 # Obsolete; use --with-x.
364 with_x=yes ;;
365
366 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
367 | --x-incl | --x-inc | --x-in | --x-i)
368 ac_prev=x_includes ;;
369 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
370 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
371 x_includes="$ac_optarg" ;;
372
373 -x-libraries | --x-libraries | --x-librarie | --x-librari \
374 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
375 ac_prev=x_libraries ;;
376 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
377 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
378 x_libraries="$ac_optarg" ;;
379
380 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
381 ;;
382
626a6542 383 *)
5ab6ca68
ILT
384 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
385 echo "configure: warning: $ac_option: invalid host type" 1>&2
386 fi
387 if test "x$nonopt" != xNONE; then
388 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
389 fi
390 nonopt="$ac_option"
391 ;;
392
393 esac
394done
a10d26a1 395
5ab6ca68
ILT
396if test -n "$ac_prev"; then
397 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
398fi
99a42820 399
5ab6ca68
ILT
400trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401
402# File descriptor usage:
403# 0 standard input
404# 1 file creation
405# 2 errors and warnings
406# 3 some systems may open it to /dev/tty
407# 4 used on the Kubota Titan
408# 6 checking for... messages and results
409# 5 compiler messages saved in config.log
410if test "$silent" = yes; then
411 exec 6>/dev/null
412else
413 exec 6>&1
414fi
415exec 5>./config.log
99a42820 416
5ab6ca68
ILT
417echo "\
418This file contains any messages produced by compilers while
419running configure, to aid debugging if configure makes a mistake.
420" 1>&5
421
422# Strip out --no-create and --no-recursion so they do not pile up.
423# Also quote any args containing shell metacharacters.
424ac_configure_args=
425for ac_arg
99a42820 426do
5ab6ca68
ILT
427 case "$ac_arg" in
428 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
429 | --no-cr | --no-c) ;;
430 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
431 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
432 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
433 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
434 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
435 esac
99a42820
RP
436done
437
5ab6ca68
ILT
438# NLS nuisances.
439# Only set LANG and LC_ALL to C if already set.
440# These must not be set unconditionally because not all systems understand
441# e.g. LANG=C (notably SCO).
442if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
443if test "${LANG+set}" = set; then LANG=C; export LANG; fi
444
445# confdefs.h avoids OS command line length limits that DEFS can exceed.
446rm -rf conftest* confdefs.h
447# AIX cpp loses on an empty file, so make sure it contains at least a newline.
448echo > confdefs.h
449
450# A filename unique to this package, relative to the directory that
451# configure is in, which we can look for to find out if srcdir is correct.
452ac_unique_file=ar.c
453
454# Find the source files, if location was not specified.
455if test -z "$srcdir"; then
456 ac_srcdir_defaulted=yes
457 # Try the directory containing this script, then its parent.
458 ac_prog=$0
459 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
460 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
461 srcdir=$ac_confdir
462 if test ! -r $srcdir/$ac_unique_file; then
463 srcdir=..
464 fi
465else
466 ac_srcdir_defaulted=no
467fi
468if test ! -r $srcdir/$ac_unique_file; then
469 if test "$ac_srcdir_defaulted" = yes; then
470 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
471 else
472 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
473 fi
474fi
475srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
476
477# Prefer explicitly selected file to automatically selected ones.
478if test -z "$CONFIG_SITE"; then
479 if test "x$prefix" != xNONE; then
480 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
481 else
482 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
483 fi
b5132a6b 484fi
5ab6ca68
ILT
485for ac_site_file in $CONFIG_SITE; do
486 if test -r "$ac_site_file"; then
487 echo "loading site script $ac_site_file"
488 . "$ac_site_file"
489 fi
490done
b5132a6b 491
5ab6ca68
ILT
492if test -r "$cache_file"; then
493 echo "loading cache $cache_file"
494 . $cache_file
495else
496 echo "creating cache $cache_file"
497 > $cache_file
498fi
499
500ac_ext=c
501# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ea2488ad
ILT
502ac_cpp='$CPP $CPPFLAGS'
503ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
504ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5ab6ca68
ILT
505
506if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
507 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
508 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
509 ac_n= ac_c='
510' ac_t=' '
511 else
512 ac_n=-n ac_c= ac_t=
513 fi
514else
515 ac_n= ac_c='\c' ac_t=
f2e91404 516fi
99a42820 517
b5132a6b 518
5ab6ca68
ILT
519
520# Check whether --enable-targets or --disable-targets was given.
626a6542
SC
521if test "${enable_targets+set}" = set; then
522 enableval="$enable_targets"
5ab6ca68
ILT
523 case "${enableval}" in
524 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
525 ;;
526 no) enable_targets= ;;
527 *) enable_targets=$enableval ;;
528esac
a10d26a1 529fi
36fb98be
ILT
530# Check whether --enable-shared or --disable-shared was given.
531if test "${enable_shared+set}" = set; then
532 enableval="$enable_shared"
533 case "${enableval}" in
534 yes) shared=true ;;
535 no) shared=false ;;
536 *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;;
537esac
538fi
99a42820 539
99a42820 540
b5132a6b 541
5ab6ca68
ILT
542ac_aux_dir=
543for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
544 if test -f $ac_dir/install-sh; then
545 ac_aux_dir=$ac_dir
546 ac_install_sh="$ac_aux_dir/install-sh -c"
547 break
548 elif test -f $ac_dir/install.sh; then
549 ac_aux_dir=$ac_dir
550 ac_install_sh="$ac_aux_dir/install.sh -c"
551 break
552 fi
553done
554if test -z "$ac_aux_dir"; then
555 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
556fi
557ac_config_guess=$ac_aux_dir/config.guess
558ac_config_sub=$ac_aux_dir/config.sub
559ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
99a42820 560
99a42820 561
5ab6ca68
ILT
562# Do some error checking and defaulting for the host and target type.
563# The inputs are:
564# configure --host=HOST --target=TARGET --build=BUILD NONOPT
565#
566# The rules are:
567# 1. You are not allowed to specify --host, --target, and nonopt at the
626a6542 568# same time.
5ab6ca68
ILT
569# 2. Host defaults to nonopt.
570# 3. If nonopt is not specified, then host defaults to the current host,
571# as determined by config.guess.
572# 4. Target and build default to nonopt.
573# 5. If nonopt is not specified, then target and build default to host.
574
575# The aliases save the names the user supplied, while $host etc.
576# will get canonicalized.
577case $host---$target---$nonopt in
578NONE---*---* | *---NONE---* | *---*---NONE) ;;
579*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
580esac
581
582
583# Make sure we can run config.sub.
584if $ac_config_sub sun4 >/dev/null 2>&1; then :
585else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
586fi
99a42820 587
5ab6ca68
ILT
588echo $ac_n "checking host system type""... $ac_c" 1>&6
589
590host_alias=$host
591case "$host_alias" in
592NONE)
593 case $nonopt in
594 NONE)
595 if host_alias=`$ac_config_guess`; then :
596 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
597 fi ;;
598 *) host_alias=$nonopt ;;
599 esac ;;
600esac
601
602host=`$ac_config_sub $host_alias`
603host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
604host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
605host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
606echo "$ac_t""$host" 1>&6
607
608echo $ac_n "checking target system type""... $ac_c" 1>&6
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=`$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
626
627build_alias=$build
628case "$build_alias" in
629NONE)
630 case $nonopt in
631 NONE) build_alias=$host_alias ;;
632 *) build_alias=$nonopt ;;
633 esac ;;
634esac
635
636build=`$ac_config_sub $build_alias`
637build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
638build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
639build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
640echo "$ac_t""$build" 1>&6
641
642test "$host_alias" != "$target_alias" &&
643 test "$program_prefix$program_suffix$program_transform_name" = \
644 NONENONEs,x,x, &&
645 program_prefix=${target_alias}-
646
647if test -z "$target" ; then
648 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
649fi
650if test -z "$host" ; then
651 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
652fi
653if test "$program_transform_name" = s,x,x,; then
654 program_transform_name=
655else
626a6542
SC
656 # Double any \ or $. echo might interpret backslashes.
657 cat <<\EOF_SED > conftestsed
658s,\\,\\\\,g; s,\$,$$,g
659EOF_SED
5ab6ca68
ILT
660 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
661 rm -f conftestsed
662fi
663test "$program_prefix" != NONE &&
664 program_transform_name="s,^,${program_prefix},; $program_transform_name"
665# Use a double $ so make ignores it.
666test "$program_suffix" != NONE &&
667 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
668
669# sed with no file args requires a program.
670test "$program_transform_name" = "" && program_transform_name="s,x,x,"
671
672
673# host-specific stuff:
674
675HDEFINES=
36fb98be 676HLDFLAGS=
efa86453 677RPATH_ENVVAR=LD_LIBRARY_PATH
5ab6ca68 678
53fb794b
ILT
679# Extract the first word of "gcc", so it can be a program name with args.
680set dummy gcc; ac_word=$2
681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
682if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
683 echo $ac_n "(cached) $ac_c" 1>&6
684else
685 if test -n "$CC"; then
686 ac_cv_prog_CC="$CC" # Let the user override the test.
687else
688 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
689 for ac_dir in $PATH; do
690 test -z "$ac_dir" && ac_dir=.
691 if test -f $ac_dir/$ac_word; then
692 ac_cv_prog_CC="gcc"
693 break
694 fi
695 done
696 IFS="$ac_save_ifs"
53fb794b
ILT
697fi
698fi
699CC="$ac_cv_prog_CC"
700if test -n "$CC"; then
701 echo "$ac_t""$CC" 1>&6
702else
703 echo "$ac_t""no" 1>&6
704fi
5ab6ca68 705
ea2488ad
ILT
706if test -z "$CC"; then
707 # Extract the first word of "cc", so it can be a program name with args.
708set dummy cc; ac_word=$2
709echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
710if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
711 echo $ac_n "(cached) $ac_c" 1>&6
712else
713 if test -n "$CC"; then
714 ac_cv_prog_CC="$CC" # Let the user override the test.
715else
716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
717 ac_prog_rejected=no
718 for ac_dir in $PATH; do
719 test -z "$ac_dir" && ac_dir=.
720 if test -f $ac_dir/$ac_word; then
721 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
722 ac_prog_rejected=yes
723 continue
724 fi
725 ac_cv_prog_CC="cc"
726 break
727 fi
728 done
729 IFS="$ac_save_ifs"
730if test $ac_prog_rejected = yes; then
731 # We found a bogon in the path, so make sure we never use it.
732 set dummy $ac_cv_prog_CC
733 shift
734 if test $# -gt 0; then
735 # We chose a different compiler from the bogus one.
736 # However, it has the same basename, so the bogon will be chosen
737 # first if we set CC to just the basename; use the full file name.
738 shift
739 set dummy "$ac_dir/$ac_word" "$@"
740 shift
741 ac_cv_prog_CC="$@"
742 fi
743fi
744fi
745fi
746CC="$ac_cv_prog_CC"
747if test -n "$CC"; then
748 echo "$ac_t""$CC" 1>&6
749else
750 echo "$ac_t""no" 1>&6
751fi
752
753 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
754fi
53fb794b
ILT
755
756echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
757if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
758 echo $ac_n "(cached) $ac_c" 1>&6
759else
760 cat > conftest.c <<EOF
5ab6ca68
ILT
761#ifdef __GNUC__
762 yes;
763#endif
764EOF
ea2488ad 765if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
53fb794b
ILT
766 ac_cv_prog_gcc=yes
767else
768 ac_cv_prog_gcc=no
769fi
770fi
626a6542 771
53fb794b
ILT
772echo "$ac_t""$ac_cv_prog_gcc" 1>&6
773if test $ac_cv_prog_gcc = yes; then
5ab6ca68
ILT
774 GCC=yes
775 if test "${CFLAGS+set}" != set; then
53fb794b
ILT
776 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
777if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
779else
780 echo 'void f(){}' > conftest.c
781if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
782 ac_cv_prog_gcc_g=yes
783else
784 ac_cv_prog_gcc_g=no
785fi
786rm -f conftest*
787
788fi
626a6542
SC
789
790echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
53fb794b 791 if test $ac_cv_prog_gcc_g = yes; then
5ab6ca68
ILT
792 CFLAGS="-g -O"
793 else
794 CFLAGS="-O"
795 fi
796 fi
797else
798 GCC=
799 test "${CFLAGS+set}" = set || CFLAGS="-g"
800fi
99a42820 801
5a168a17 802
ea2488ad 803. ${srcdir}/../bfd/configure.host
5a168a17 804
5a168a17 805
36fb98be 806
efa86453 807
5ab6ca68
ILT
808AR=${AR-ar}
809
810# Extract the first word of "ranlib", so it can be a program name with args.
811set dummy ranlib; ac_word=$2
812echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
813if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
815else
816 if test -n "$RANLIB"; then
817 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
818else
819 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
820 for ac_dir in $PATH; do
821 test -z "$ac_dir" && ac_dir=.
822 if test -f $ac_dir/$ac_word; then
823 ac_cv_prog_RANLIB="ranlib"
824 break
825 fi
826 done
827 IFS="$ac_save_ifs"
828 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
829fi
830fi
831RANLIB="$ac_cv_prog_RANLIB"
832if test -n "$RANLIB"; then
833 echo "$ac_t""$RANLIB" 1>&6
834else
835 echo "$ac_t""no" 1>&6
836fi
837
838# Find a good install program. We prefer a C program (faster),
839# so one script is as good as another. But avoid the broken or
840# incompatible versions:
841# SysV /etc/install, /usr/sbin/install
842# SunOS /usr/etc/install
843# IRIX /sbin/install
844# AIX /bin/install
845# AFS /usr/afsws/bin/install, which mishandles nonexistent args
846# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
847# ./install, which can be erroneously created by make from ./install.sh.
848echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
849if test -z "$INSTALL"; then
850if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
851 echo $ac_n "(cached) $ac_c" 1>&6
852else
853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
854 for ac_dir in $PATH; do
855 # Account for people who put trailing slashes in PATH elements.
856 case "$ac_dir/" in
857 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
858 *)
859 # OSF1 and SCO ODT 3.0 have their own names for install.
860 for ac_prog in ginstall installbsd scoinst install; do
861 if test -f $ac_dir/$ac_prog; then
862 if test $ac_prog = install &&
863 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
864 # AIX install. It has an incompatible calling convention.
865 # OSF/1 installbsd also uses dspmsg, but is usable.
866 :
867 else
868 ac_cv_path_install="$ac_dir/$ac_prog -c"
869 break 2
870 fi
99a42820 871 fi
5ab6ca68
ILT
872 done
873 ;;
874 esac
875 done
876 IFS="$ac_save_ifs"
626a6542 877
5ab6ca68 878fi
626a6542
SC
879 if test "${ac_cv_path_install+set}" = set; then
880 INSTALL="$ac_cv_path_install"
881 else
882 # As a last resort, use the slow shell script. We don't cache a
883 # path for INSTALL within a source directory, because that will
884 # break other packages using the cache if that directory is
885 # removed, or if the path is relative.
886 INSTALL="$ac_install_sh"
887 fi
5ab6ca68
ILT
888fi
889echo "$ac_t""$INSTALL" 1>&6
890
891# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892# It thinks the first close brace ends the variable substitution.
893test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
99a42820 896
5ab6ca68 897
36fb98be
ILT
898# For most hosts we can use a simple definition to pick up the BFD and
899# opcodes libraries. However, if we are building shared libraries, we
900# need to handle some hosts specially.
901BFDLIB='-L../bfd -lbfd'
902OPCODES='-L../opcodes -lopcodes'
903if test "${shared}" = "true"; then
904 case "${host}" in
905 *-*-sunos*)
906 # On SunOS, we must link against the name we are going to install,
907 # not -lbfd, since SunOS does not support SONAME.
908 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
909 OPCODES='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
910 ;;
911 esac
912fi
913
914
915
320d4f29
ILT
916# If we cannot run a trivial program, we must be cross compiling.
917echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
918if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
919 echo $ac_n "(cached) $ac_c" 1>&6
920else
921 if test "$cross_compiling" = yes; then
922 ac_cv_c_cross=yes
923else
924cat > conftest.$ac_ext <<EOF
ea2488ad 925#line 926 "configure"
320d4f29
ILT
926#include "confdefs.h"
927main(){return(0);}
928EOF
ea2488ad 929{ (eval echo configure:930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
320d4f29
ILT
930if test -s conftest && (./conftest; exit) 2>/dev/null; then
931 ac_cv_c_cross=no
932else
933 ac_cv_c_cross=yes
934fi
935fi
936rm -fr conftest*
937fi
626a6542 938
7920c1d1 939echo "$ac_t""$ac_cv_c_cross" 1>&6
626a6542 940cross_compiling=$ac_cv_c_cross
320d4f29
ILT
941
942# Put a plausible default for CC_FOR_BUILD in Makefile.
ae0daa11
ILT
943if test -z "$CC_FOR_BUILD"; then
944 if test "x$cross_compiling" = "xno"; then
945 CC_FOR_BUILD='$(CC)'
946 else
947 CC_FOR_BUILD=gcc
948 fi
320d4f29
ILT
949fi
950
951
5ab6ca68
ILT
952echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
953# On Suns, sometimes $CPP names a directory.
954if test -n "$CPP" && test -d "$CPP"; then
955 CPP=
956fi
957if test -z "$CPP"; then
958if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
959 echo $ac_n "(cached) $ac_c" 1>&6
960else
961 # This must be in double quotes, not single quotes, because CPP may get
962 # substituted into the Makefile and "${CC-cc}" will confuse make.
963 CPP="${CC-cc} -E"
964 # On the NeXT, cc -E runs the code through the compiler's parser,
965 # not just through cpp.
966 cat > conftest.$ac_ext <<EOF
ea2488ad 967#line 968 "configure"
5ab6ca68
ILT
968#include "confdefs.h"
969#include <assert.h>
970Syntax Error
971EOF
ea2488ad
ILT
972ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
973{ (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
974ac_err=`grep -v '^ *+' conftest.out`
975if test -z "$ac_err"; then
976 :
977else
978 echo "$ac_err" >&5
979 rm -rf conftest*
980 CPP="${CC-cc} -E -traditional-cpp"
981 cat > conftest.$ac_ext <<EOF
ea2488ad 982#line 983 "configure"
5ab6ca68
ILT
983#include "confdefs.h"
984#include <assert.h>
985Syntax Error
986EOF
ea2488ad
ILT
987ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
988{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
989ac_err=`grep -v '^ *+' conftest.out`
990if test -z "$ac_err"; then
991 :
992else
993 echo "$ac_err" >&5
994 rm -rf conftest*
995 CPP=/lib/cpp
996fi
997rm -f conftest*
998fi
999rm -f conftest*
1000 ac_cv_prog_CPP="$CPP"
1001fi
1002 CPP="$ac_cv_prog_CPP"
1003else
1004 ac_cv_prog_CPP="$CPP"
99a42820 1005fi
5ab6ca68 1006echo "$ac_t""$CPP" 1>&6
99a42820 1007
5ab6ca68
ILT
1008for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
1009do
1010ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1011echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1012if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
1014else
1015 cat > conftest.$ac_ext <<EOF
ea2488ad 1016#line 1017 "configure"
5ab6ca68
ILT
1017#include "confdefs.h"
1018#include <$ac_hdr>
1019EOF
ea2488ad
ILT
1020ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1021{ (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1022ac_err=`grep -v '^ *+' conftest.out`
1023if test -z "$ac_err"; then
1024 rm -rf conftest*
1025 eval "ac_cv_header_$ac_safe=yes"
1026else
1027 echo "$ac_err" >&5
1028 rm -rf conftest*
1029 eval "ac_cv_header_$ac_safe=no"
ec342d7d 1030fi
5ab6ca68
ILT
1031rm -f conftest*
1032fi
1033if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1034 echo "$ac_t""yes" 1>&6
626a6542 1035 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
5ab6ca68
ILT
1036 cat >> confdefs.h <<EOF
1037#define $ac_tr_hdr 1
1038EOF
1039
1040else
1041 echo "$ac_t""no" 1>&6
1042fi
1043done
ec342d7d 1044
27fca56f
ILT
1045echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1046if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1047 echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049 cat > conftest.$ac_ext <<EOF
ea2488ad 1050#line 1051 "configure"
27fca56f
ILT
1051#include "confdefs.h"
1052#include <sys/types.h>
1053#include <sys/wait.h>
1054#ifndef WEXITSTATUS
1055#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1056#endif
1057#ifndef WIFEXITED
1058#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1059#endif
1060int main() { return 0; }
1061int t() {
1062int s;
1063wait (&s);
1064s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1065; return 0; }
1066EOF
ea2488ad 1067if { (eval echo configure:1068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27fca56f
ILT
1068 rm -rf conftest*
1069 ac_cv_header_sys_wait_h=yes
1070else
1071 rm -rf conftest*
1072 ac_cv_header_sys_wait_h=no
1073fi
1074rm -f conftest*
1075
1076fi
626a6542 1077
27fca56f
ILT
1078echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1079if test $ac_cv_header_sys_wait_h = yes; then
1080 cat >> confdefs.h <<\EOF
1081#define HAVE_SYS_WAIT_H 1
1082EOF
1083
1084fi
1085
5ab6ca68
ILT
1086for ac_func in sbrk utimes
1087do
1088echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1089if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1090 echo $ac_n "(cached) $ac_c" 1>&6
1091else
1092 cat > conftest.$ac_ext <<EOF
ea2488ad 1093#line 1094 "configure"
5ab6ca68
ILT
1094#include "confdefs.h"
1095/* System header to define __stub macros and hopefully few prototypes,
1096 which can conflict with char $ac_func(); below. */
1097#include <assert.h>
1098/* Override any gcc2 internal prototype to avoid an error. */
626a6542 1099char $ac_func();
5ab6ca68
ILT
1100
1101int main() { return 0; }
1102int t() {
1103
1104/* The GNU C library defines this for functions which it implements
1105 to always fail with ENOSYS. Some functions are actually named
1106 something starting with __ and the normal name is an alias. */
1107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1108choke me
1109#else
1110$ac_func();
1111#endif
1112
1113; return 0; }
1114EOF
ea2488ad 1115if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5ab6ca68
ILT
1116 rm -rf conftest*
1117 eval "ac_cv_func_$ac_func=yes"
1118else
1119 rm -rf conftest*
1120 eval "ac_cv_func_$ac_func=no"
1121fi
1122rm -f conftest*
99a42820 1123
5ab6ca68
ILT
1124fi
1125if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1126 echo "$ac_t""yes" 1>&6
626a6542 1127 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5ab6ca68
ILT
1128 cat >> confdefs.h <<EOF
1129#define $ac_tr_func 1
1130EOF
1131
1132else
1133 echo "$ac_t""no" 1>&6
1134fi
1135done
1136
1137
1138echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
1139if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
1140 echo $ac_n "(cached) $ac_c" 1>&6
1141else
1142 cat > conftest.$ac_ext <<EOF
ea2488ad 1143#line 1144 "configure"
5ab6ca68
ILT
1144#include "confdefs.h"
1145#include <time.h>
1146int main() { return 0; }
1147int t() {
1148time_t i;
1149; return 0; }
1150EOF
ea2488ad 1151if { (eval echo configure:1152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1152 rm -rf conftest*
1153 bu_cv_decl_time_t_time_h=yes
1154else
1155 rm -rf conftest*
1156 bu_cv_decl_time_t_time_h=no
1157fi
1158rm -f conftest*
5a168a17 1159
5ab6ca68 1160fi
6c18e393 1161
5ab6ca68
ILT
1162echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
1163if test $bu_cv_decl_time_t_time_h = yes; then
1164 cat >> confdefs.h <<\EOF
1165#define HAVE_TIME_T_IN_TIME_H 1
1166EOF
1167
1168fi
99a42820 1169
5ab6ca68
ILT
1170echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
1171if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
1172 echo $ac_n "(cached) $ac_c" 1>&6
5a168a17 1173else
5ab6ca68 1174 cat > conftest.$ac_ext <<EOF
ea2488ad 1175#line 1176 "configure"
5ab6ca68
ILT
1176#include "confdefs.h"
1177#include <sys/types.h>
1178int main() { return 0; }
1179int t() {
1180time_t i;
1181; return 0; }
1182EOF
ea2488ad 1183if { (eval echo configure:1184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1184 rm -rf conftest*
1185 bu_cv_decl_time_t_types_h=yes
1186else
1187 rm -rf conftest*
1188 bu_cv_decl_time_t_types_h=no
1189fi
1190rm -f conftest*
1191
1192fi
1193
1194echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
1195if test $bu_cv_decl_time_t_types_h = yes; then
1196 cat >> confdefs.h <<\EOF
1197#define HAVE_TIME_T_IN_TYPES_H 1
1198EOF
1199
1200fi
1201
1202# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
1203# by default.
1204echo $ac_n "checking for utime.h""... $ac_c" 1>&6
1205if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
1207else
1208 cat > conftest.$ac_ext <<EOF
ea2488ad 1209#line 1210 "configure"
5ab6ca68
ILT
1210#include "confdefs.h"
1211#include <sys/types.h>
1212#ifdef HAVE_TIME_H
1213#include <time.h>
1214#endif
1215#include <utime.h>
1216int main() { return 0; }
1217int t() {
1218struct utimbuf s;
1219; return 0; }
1220EOF
ea2488ad 1221if { (eval echo configure:1222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1222 rm -rf conftest*
1223 bu_cv_header_utime_h=yes
1224else
1225 rm -rf conftest*
1226 bu_cv_header_utime_h=no
1227fi
1228rm -f conftest*
1229
1230fi
1231
1232echo "$ac_t""$bu_cv_header_utime_h" 1>&6
1233if test $bu_cv_header_utime_h = yes; then
1234 cat >> confdefs.h <<\EOF
1235#define HAVE_GOOD_UTIME_H 1
1236EOF
1237
5a168a17
RP
1238fi
1239
5ab6ca68 1240echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
53fb794b 1241if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
5ab6ca68
ILT
1242 echo $ac_n "(cached) $ac_c" 1>&6
1243else
1244 cat > conftest.$ac_ext <<EOF
ea2488ad 1245#line 1246 "configure"
5ab6ca68 1246#include "confdefs.h"
53fb794b 1247
5ab6ca68 1248#include <stdio.h>
53fb794b
ILT
1249#ifdef HAVE_STDLIB_H
1250#include <stdlib.h>
1251#endif
1252#ifdef HAVE_UNISTD_H
1253#include <unistd.h>
1254#endif
5ab6ca68
ILT
1255int main() { return 0; }
1256int t() {
53fb794b 1257char *(*pfn) = (char *(*)) fprintf
5ab6ca68
ILT
1258; return 0; }
1259EOF
ea2488ad 1260if { (eval echo configure:1261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68 1261 rm -rf conftest*
53fb794b 1262 bfd_cv_decl_needed_fprintf=no
5ab6ca68
ILT
1263else
1264 rm -rf conftest*
53fb794b 1265 bfd_cv_decl_needed_fprintf=yes
5ab6ca68
ILT
1266fi
1267rm -f conftest*
1268
1269fi
1270
53fb794b
ILT
1271echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
1272if test $bfd_cv_decl_needed_fprintf = yes; then
1273 bfd_tr_decl=NEED_DECLARATION_`echo fprintf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1274 cat >> confdefs.h <<EOF
1275#define $bfd_tr_decl 1
5ab6ca68
ILT
1276EOF
1277
1278fi
1279
53fb794b
ILT
1280
1281
5ab6ca68 1282case "${host}" in
36fb98be 1283i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
5ab6ca68
ILT
1284 cat >> confdefs.h <<\EOF
1285#define USE_BINARY_FOPEN 1
1286EOF
1287 ;;
1288esac
1289
1290# target-specific stuff:
1291
1292# Canonicalize the secondary target names.
5ab6ca68
ILT
1293if test -n "$enable_targets"; then
1294 for targ in `echo $enable_targets | sed 's/,/ /g'`
1295 do
1296 result=`$ac_config_sub $targ 2>/dev/null`
1297 if test -n "$result"; then
1298 canon_targets="$canon_targets $result"
1299 else
1300 # Allow targets that config.sub doesn't recognize, like "all".
1301 canon_targets="$canon_targets $targ"
4101d868 1302 fi
5ab6ca68 1303 done
5ab6ca68 1304fi
99a42820 1305
5ab6ca68
ILT
1306all_targets=false
1307BUILD_NLMCONV=
1308NLMCONV_DEFS=
1309BUILD_SRCONV=
1310BUILD_DLLTOOL=
1311DLLTOOL_DEFS=
1312
1313for targ in $target $canon_targets
1314do
1315 if test "x$targ" = "xall"; then
1316 all_targets=true
1317 BUILD_NLMCONV='$(NLMCONV_PROG)'
1318 BUILD_SRCONV='$(SRCONV_PROG)'
1319 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
1320 else
1321 case $targ in
1322 i[345]86*-*-netware*)
1323 BUILD_NLMCONV='$(NLMCONV_PROG)'
1324 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
1325 ;;
1326 alpha*-*-netware*)
1327 BUILD_NLMCONV='$(NLMCONV_PROG)'
1328 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
1329 ;;
1330 powerpc*-*-netware*)
1331 BUILD_NLMCONV='$(NLMCONV_PROG)'
1332 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
1333 ;;
1334 sparc*-*-netware*)
1335 BUILD_NLMCONV='$(NLMCONV_PROG)'
1336 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
1337 ;;
1338 esac
1339 case $targ in
1340 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
1341 esac
1342 case $targ in
1343 arm-*pe*)
1344 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
1345 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
1346 ;;
904fe36b 1347 i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
5ab6ca68
ILT
1348 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
1349 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
1350 ;;
904fe36b 1351 powerpc*-*-*pe* | powerpc*-*-cygwin32)
53fb794b
ILT
1352 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
1353 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
1354 ;;
5ab6ca68
ILT
1355 esac
1356 fi
1357done
1358
1359
1360
1361
1362
1363
1364
1365targ=$target
1366. $srcdir/../bfd/config.bfd
1367if test "x$targ_underscore" = "xyes"; then
1368 UNDERSCORE=1
1369else
1370 UNDERSCORE=0
1371fi
1372
1373
1374trap '' 1 2 15
1375cat > confcache <<\EOF
1376# This file is a shell script that caches the results of configure
1377# tests run on this system so they can be shared between configure
1378# scripts and configure runs. It is not useful on other systems.
1379# If it contains results you don't want to keep, you may remove or edit it.
1380#
1381# By default, configure uses ./config.cache as the cache file,
1382# creating it if it does not exist already. You can give configure
1383# the --cache-file=FILE option to use a different cache file; that is
1384# what configure does when it calls configure scripts in
1385# subdirectories, so they share the cache.
1386# Giving --cache-file=/dev/null disables caching, for debugging configure.
1387# config.status only pays attention to the cache file if you give it the
1388# --recheck option to rerun configure.
1389#
1390EOF
1391# Ultrix sh set writes to stderr and can't be redirected directly,
1392# and sets the high bit in the cache file unless we assign to the vars.
1393(set) 2>&1 |
1394 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1395 >> confcache
1396if cmp -s $cache_file confcache; then
1397 :
1398else
1399 if test -w $cache_file; then
1400 echo "updating cache $cache_file"
1401 cat confcache > $cache_file
1402 else
1403 echo "not updating unwritable cache $cache_file"
1404 fi
1405fi
1406rm -f confcache
1407
1408trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1409
1410test "x$prefix" = xNONE && prefix=$ac_default_prefix
1411# Let make expand exec_prefix.
1412test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1413
1414# Any assignment to VPATH causes Sun make to only execute
1415# the first set of double-colon rules, so remove it if not needed.
1416# If there is a colon in the path, we need to keep it.
1417if test "x$srcdir" = x.; then
1418 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1419fi
1420
1421trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1422
1423DEFS=-DHAVE_CONFIG_H
1424
1425# Without the "./", some shells look in PATH for config.status.
1426: ${CONFIG_STATUS=./config.status}
1427
1428echo creating $CONFIG_STATUS
1429rm -f $CONFIG_STATUS
1430cat > $CONFIG_STATUS <<EOF
1431#! /bin/sh
1432# Generated automatically by configure.
1433# Run this file to recreate the current configuration.
1434# This directory was configured as follows,
1435# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
b5132a6b 1436#
5ab6ca68 1437# $0 $ac_configure_args
b5132a6b 1438#
5ab6ca68
ILT
1439# Compiler output produced by configure, useful for debugging
1440# configure, is in ./config.log if it exists.
1441
1442ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1443for ac_option
1444do
1445 case "\$ac_option" in
1446 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1447 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1448 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1449 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
ea2488ad 1450 echo "$CONFIG_STATUS generated by autoconf version 2.8"
5ab6ca68
ILT
1451 exit 0 ;;
1452 -help | --help | --hel | --he | --h)
1453 echo "\$ac_cs_usage"; exit 0 ;;
1454 *) echo "\$ac_cs_usage"; exit 1 ;;
1455 esac
1456done
1457
1458ac_given_srcdir=$srcdir
1459ac_given_INSTALL="$INSTALL"
1460
320d4f29 1461trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
626a6542
SC
1462EOF
1463cat >> $CONFIG_STATUS <<EOF
5ab6ca68 1464
626a6542
SC
1465# Protect against being on the right side of a sed subst in config.status.
1466sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1467 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5ab6ca68
ILT
1468$ac_vpsub
1469$extrasub
1470s%@CFLAGS@%$CFLAGS%g
1471s%@CPPFLAGS@%$CPPFLAGS%g
1472s%@CXXFLAGS@%$CXXFLAGS%g
1473s%@DEFS@%$DEFS%g
1474s%@LDFLAGS@%$LDFLAGS%g
1475s%@LIBS@%$LIBS%g
1476s%@exec_prefix@%$exec_prefix%g
1477s%@prefix@%$prefix%g
1478s%@program_transform_name@%$program_transform_name%g
626a6542
SC
1479s%@bindir@%$bindir%g
1480s%@sbindir@%$sbindir%g
1481s%@libexecdir@%$libexecdir%g
1482s%@datadir@%$datadir%g
1483s%@sysconfdir@%$sysconfdir%g
1484s%@sharedstatedir@%$sharedstatedir%g
1485s%@localstatedir@%$localstatedir%g
1486s%@libdir@%$libdir%g
1487s%@includedir@%$includedir%g
1488s%@oldincludedir@%$oldincludedir%g
1489s%@infodir@%$infodir%g
1490s%@mandir@%$mandir%g
5ab6ca68
ILT
1491s%@host@%$host%g
1492s%@host_alias@%$host_alias%g
1493s%@host_cpu@%$host_cpu%g
1494s%@host_vendor@%$host_vendor%g
1495s%@host_os@%$host_os%g
1496s%@target@%$target%g
1497s%@target_alias@%$target_alias%g
1498s%@target_cpu@%$target_cpu%g
1499s%@target_vendor@%$target_vendor%g
1500s%@target_os@%$target_os%g
1501s%@build@%$build%g
1502s%@build_alias@%$build_alias%g
1503s%@build_cpu@%$build_cpu%g
1504s%@build_vendor@%$build_vendor%g
1505s%@build_os@%$build_os%g
1506s%@CC@%$CC%g
1507s%@HDEFINES@%$HDEFINES%g
36fb98be 1508s%@HLDFLAGS@%$HLDFLAGS%g
efa86453 1509s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
5ab6ca68
ILT
1510s%@AR@%$AR%g
1511s%@RANLIB@%$RANLIB%g
1512s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1513s%@INSTALL_DATA@%$INSTALL_DATA%g
36fb98be
ILT
1514s%@BFDLIB@%$BFDLIB%g
1515s%@OPCODES@%$OPCODES%g
320d4f29 1516s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5ab6ca68 1517s%@CPP@%$CPP%g
5ab6ca68
ILT
1518s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
1519s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
1520s%@BUILD_SRCONV@%$BUILD_SRCONV%g
1521s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
1522s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
1523s%@UNDERSCORE@%$UNDERSCORE%g
1524
1525CEOF
1526EOF
1527cat >> $CONFIG_STATUS <<EOF
1528
1529CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1530EOF
1531cat >> $CONFIG_STATUS <<\EOF
1532for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1533 # Support "outfile[:infile]", defaulting infile="outfile.in".
1534 case "$ac_file" in
1535 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1536 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1537 *) ac_file_in="${ac_file}.in" ;;
1538 esac
1539
1540 # Adjust relative srcdir, etc. for subdirectories.
1541
1542 # Remove last slash and all that follows it. Not all systems have dirname.
1543 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1544 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1545 # The file is in a subdirectory.
1546 test ! -d "$ac_dir" && mkdir "$ac_dir"
1547 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1548 # A "../" for each directory in $ac_dir_suffix.
1549 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1550 else
1551 ac_dir_suffix= ac_dots=
1552 fi
1553
1554 case "$ac_given_srcdir" in
1555 .) srcdir=.
1556 if test -z "$ac_dots"; then top_srcdir=.
1557 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1558 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1559 *) # Relative path.
1560 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1561 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1562 esac
1563
1564 case "$ac_given_INSTALL" in
1565 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1566 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1567 esac
1568 echo creating "$ac_file"
1569 rm -f "$ac_file"
1570 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1571 case "$ac_file" in
1572 *Makefile*) ac_comsub="1i\\
1573# $configure_input" ;;
1574 *) ac_comsub= ;;
1575 esac
1576 sed -e "$ac_comsub
1577s%@configure_input@%$configure_input%g
1578s%@srcdir@%$srcdir%g
1579s%@top_srcdir@%$top_srcdir%g
1580s%@INSTALL@%$INSTALL%g
1581" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1582fi; done
1583rm -f conftest.subs
1584
1585# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1586# NAME is the cpp macro being defined and VALUE is the value it is being given.
1587#
1588# ac_d sets the value in "#define NAME VALUE" lines.
1589ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1590ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1591ac_dC='\3'
1592ac_dD='%g'
1593# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1594ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1595ac_uB='\([ ]\)%\1#\2define\3'
1596ac_uC=' '
1597ac_uD='\4%g'
1598# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1599ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1600ac_eB='$%\1#\2define\3'
1601ac_eC=' '
1602ac_eD='%g'
1603
320d4f29 1604CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
5ab6ca68
ILT
1605for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1606 # Support "outfile[:infile]", defaulting infile="outfile.in".
1607 case "$ac_file" in
1608 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1609 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1610 *) ac_file_in="${ac_file}.in" ;;
1611 esac
1612
1613 echo creating $ac_file
1614
1615 rm -f conftest.frag conftest.in conftest.out
1616 cp $ac_given_srcdir/$ac_file_in conftest.in
1617
1618EOF
1619
1620# Transform confdefs.h into a sed script conftest.vals that substitutes
1621# the proper values into config.h.in to produce config.h. And first:
626a6542 1622# Protect against being on the right side of a sed subst in config.status.
5ab6ca68
ILT
1623# Protect against being in an unquoted here document in config.status.
1624rm -f conftest.vals
1625cat > conftest.hdr <<\EOF
1626s/[\\&%]/\\&/g
1627s%[\\$`]%\\&%g
1628s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1629s%ac_d%ac_u%gp
1630s%ac_u%ac_e%gp
1631EOF
1632sed -n -f conftest.hdr confdefs.h > conftest.vals
1633rm -f conftest.hdr
1634
1635# This sed command replaces #undef with comments. This is necessary, for
1636# example, in the case of _POSIX_SOURCE, which is predefined and required
1637# on some systems where configure will not decide to define it.
1638cat >> conftest.vals <<\EOF
1639s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1640EOF
1641
1642# Break up conftest.vals because some shells have a limit on
1643# the size of here documents, and old seds have small limits too.
1644# Maximum number of lines to put in a single here document.
1645ac_max_here_lines=12
1646
1647rm -f conftest.tail
1648while :
1649do
1650 ac_lines=`grep -c . conftest.vals`
1651 # grep -c gives empty output for an empty file on some AIX systems.
1652 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1653 # Write a limited-size here document to conftest.frag.
1654 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1655 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1656 echo 'CEOF
1657 sed -f conftest.frag conftest.in > conftest.out
1658 rm -f conftest.in
1659 mv conftest.out conftest.in
1660' >> $CONFIG_STATUS
1661 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1662 rm -f conftest.vals
1663 mv conftest.tail conftest.vals
1664done
1665rm -f conftest.vals
1666
1667cat >> $CONFIG_STATUS <<\EOF
1668 rm -f conftest.frag conftest.h
1669 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1670 cat conftest.in >> conftest.h
1671 rm -f conftest.in
1672 if cmp -s $ac_file conftest.h 2>/dev/null; then
1673 echo "$ac_file is unchanged"
1674 rm -f conftest.h
1675 else
1676 rm -f $ac_file
1677 mv conftest.h $ac_file
1678 fi
1679fi; done
1680
1681
320d4f29 1682case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
5ab6ca68
ILT
1683exit 0
1684EOF
1685chmod +x $CONFIG_STATUS
1686rm -fr confdefs* $ac_clean_files
1687test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
a10d26a1 1688
This page took 0.241709 seconds and 4 git commands to generate.