* os9kread.c (os9k_process_one_symbol): Note nonportable
[deliverable/binutils-gdb.git] / ld / configure
CommitLineData
ef346f1a 1#! /bin/sh
eb02fd64 2
ef346f1a 3# Guess values for system-dependent variables and create Makefiles.
2e598345 4# Generated automatically using autoconf version 2.7
ef346f1a
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"
2e598345
ILT
16ac_help="$ac_help
17 --enable-shared build shared BFD library"
ef346f1a
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
caf2a913
ILT
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'
eb02fd64 52
ef346f1a
ILT
53# Initialize some other variables.
54subdirs=
caf2a913 55MFLAGS= MAKEFLAGS=
eb02fd64 56
ef346f1a
ILT
57ac_prev=
58for ac_option
59do
eb02fd64 60
ef346f1a
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
caf2a913
ILT
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)
ef346f1a 83 ac_prev=build ;;
caf2a913 84 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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]
caf2a913 150 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ef346f1a 151 [same as prefix]
caf2a913
ILT
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]
ef346f1a
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
caf2a913
ILT
169 --program-transform-name=PROGRAM
170 run sed PROGRAM on installed program names
171EOF
172 cat << EOF
ef346f1a
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
ef346f1a 184EOF
caf2a913
ILT
185 if test -n "$ac_help"; then
186 echo "--enable and --with options recognized:$ac_help"
187 fi
ef346f1a
ILT
188 exit 0 ;;
189
190 -host | --host | --hos | --ho)
191 ac_prev=host ;;
192 -host=* | --host=* | --hos=* | --ho=*)
193 host="$ac_optarg" ;;
194
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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)
2e598345 337 echo "configure generated by autoconf version 2.7"
ef346f1a
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
caf2a913 383 *)
ef346f1a
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
2ee11735 395
ef346f1a
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
eb02fd64 399
ef346f1a
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
416
417echo "\
418This file contains any messages produced by compilers while
419running configure, to aid debugging if configure makes a mistake.
420" 1>&5
eb02fd64 421
ef346f1a
ILT
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
eb02fd64 426do
ef346f1a
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
eb02fd64
RP
436done
437
ef346f1a
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=ldmain.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
8c32cf6e 474fi
ef346f1a
ILT
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
484fi
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
8c32cf6e 491
ef346f1a
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
f2e91404 498fi
eb02fd64 499
ef346f1a
ILT
500ac_ext=c
501# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
caf2a913
ILT
502ac_cpp='echo $CPP $CPPFLAGS 1>&5;
503$CPP $CPPFLAGS'
504ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
505${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
506ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
507${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
ef346f1a
ILT
508
509if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
510 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
511 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
512 ac_n= ac_c='
513' ac_t=' '
514 else
515 ac_n=-n ac_c= ac_t=
516 fi
517else
518 ac_n= ac_c='\c' ac_t=
519fi
520
521
8c32cf6e 522
ef346f1a 523# Check whether --enable-targets or --disable-targets was given.
caf2a913
ILT
524if test "${enable_targets+set}" = set; then
525 enableval="$enable_targets"
ef346f1a
ILT
526 case "${enableval}" in
527 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
528 ;;
529 no) enable_targets= ;;
530 *) enable_targets=$enableval ;;
531esac
2ee11735 532fi
2e598345
ILT
533# Check whether --enable-shared or --disable-shared was given.
534if test "${enable_shared+set}" = set; then
535 enableval="$enable_shared"
536 case "${enableval}" in
537 yes) shared=true ;;
538 no) shared=false ;;
539 *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;;
540esac
541fi
eb02fd64 542
eb02fd64 543
eb02fd64 544
ef346f1a
ILT
545ac_aux_dir=
546for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
547 if test -f $ac_dir/install-sh; then
548 ac_aux_dir=$ac_dir
549 ac_install_sh="$ac_aux_dir/install-sh -c"
550 break
551 elif test -f $ac_dir/install.sh; then
552 ac_aux_dir=$ac_dir
553 ac_install_sh="$ac_aux_dir/install.sh -c"
554 break
555 fi
556done
557if test -z "$ac_aux_dir"; then
558 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
559fi
560ac_config_guess=$ac_aux_dir/config.guess
561ac_config_sub=$ac_aux_dir/config.sub
562ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
eb02fd64 563
eb02fd64 564
ef346f1a
ILT
565# Do some error checking and defaulting for the host and target type.
566# The inputs are:
567# configure --host=HOST --target=TARGET --build=BUILD NONOPT
568#
569# The rules are:
570# 1. You are not allowed to specify --host, --target, and nonopt at the
caf2a913 571# same time.
ef346f1a
ILT
572# 2. Host defaults to nonopt.
573# 3. If nonopt is not specified, then host defaults to the current host,
574# as determined by config.guess.
575# 4. Target and build default to nonopt.
576# 5. If nonopt is not specified, then target and build default to host.
577
578# The aliases save the names the user supplied, while $host etc.
579# will get canonicalized.
580case $host---$target---$nonopt in
581NONE---*---* | *---NONE---* | *---*---NONE) ;;
582*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
583esac
eb02fd64 584
c0b47bae 585
ef346f1a
ILT
586# Make sure we can run config.sub.
587if $ac_config_sub sun4 >/dev/null 2>&1; then :
588else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
589fi
c0b47bae 590
ef346f1a
ILT
591echo $ac_n "checking host system type""... $ac_c" 1>&6
592
593host_alias=$host
594case "$host_alias" in
595NONE)
596 case $nonopt in
597 NONE)
598 if host_alias=`$ac_config_guess`; then :
599 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
600 fi ;;
601 *) host_alias=$nonopt ;;
602 esac ;;
603esac
c0b47bae 604
ef346f1a
ILT
605host=`$ac_config_sub $host_alias`
606host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
607host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
608host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
609echo "$ac_t""$host" 1>&6
610
611echo $ac_n "checking target system type""... $ac_c" 1>&6
612
613target_alias=$target
614case "$target_alias" in
615NONE)
616 case $nonopt in
617 NONE) target_alias=$host_alias ;;
618 *) target_alias=$nonopt ;;
619 esac ;;
620esac
eb02fd64 621
ef346f1a
ILT
622target=`$ac_config_sub $target_alias`
623target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
624target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
625target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
626echo "$ac_t""$target" 1>&6
627
628echo $ac_n "checking build system type""... $ac_c" 1>&6
629
630build_alias=$build
631case "$build_alias" in
632NONE)
633 case $nonopt in
634 NONE) build_alias=$host_alias ;;
635 *) build_alias=$nonopt ;;
636 esac ;;
637esac
eb02fd64 638
ef346f1a
ILT
639build=`$ac_config_sub $build_alias`
640build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
641build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
642build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
643echo "$ac_t""$build" 1>&6
644
645test "$host_alias" != "$target_alias" &&
646 test "$program_prefix$program_suffix$program_transform_name" = \
647 NONENONEs,x,x, &&
648 program_prefix=${target_alias}-
eb02fd64 649
ef346f1a
ILT
650if test -z "$target" ; then
651 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
ec342d7d 652fi
ef346f1a
ILT
653if test -z "$host" ; then
654 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
655fi
656if test "$program_transform_name" = s,x,x,; then
657 program_transform_name=
658else
2e598345
ILT
659 # Double any \ or $. echo might interpret backslashes.
660 cat <<\EOF_SED > conftestsed
661s,\\,\\\\,g; s,\$,$$,g
662EOF_SED
ef346f1a
ILT
663 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
664 rm -f conftestsed
665fi
666test "$program_prefix" != NONE &&
667 program_transform_name="s,^,${program_prefix},; $program_transform_name"
668# Use a double $ so make ignores it.
669test "$program_suffix" != NONE &&
670 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
671
672# sed with no file args requires a program.
673test "$program_transform_name" = "" && program_transform_name="s,x,x,"
674
675
676# host-specific stuff:
677
caf2a913
ILT
678# Extract the first word of "gcc", so it can be a program name with args.
679set dummy gcc; ac_word=$2
680echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
681if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
682 echo $ac_n "(cached) $ac_c" 1>&6
683else
684 if test -n "$CC"; then
685 ac_cv_prog_CC="$CC" # Let the user override the test.
686else
687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
688 for ac_dir in $PATH; do
689 test -z "$ac_dir" && ac_dir=.
690 if test -f $ac_dir/$ac_word; then
691 ac_cv_prog_CC="gcc"
692 break
693 fi
694 done
695 IFS="$ac_save_ifs"
696 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
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
705
ef346f1a 706
caf2a913
ILT
707echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
708if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
709 echo $ac_n "(cached) $ac_c" 1>&6
710else
711 cat > conftest.c <<EOF
ef346f1a
ILT
712#ifdef __GNUC__
713 yes;
714#endif
715EOF
716if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
caf2a913
ILT
717 ac_cv_prog_gcc=yes
718else
719 ac_cv_prog_gcc=no
720fi
721fi
722
723echo "$ac_t""$ac_cv_prog_gcc" 1>&6
724if test $ac_cv_prog_gcc = yes; then
ef346f1a
ILT
725 GCC=yes
726 if test "${CFLAGS+set}" != set; then
caf2a913
ILT
727 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
728if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
729 echo $ac_n "(cached) $ac_c" 1>&6
730else
731 echo 'void f(){}' > conftest.c
732if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
733 ac_cv_prog_gcc_g=yes
734else
735 ac_cv_prog_gcc_g=no
736fi
737rm -f conftest*
738
739fi
740
741echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
742 if test $ac_cv_prog_gcc_g = yes; then
ef346f1a
ILT
743 CFLAGS="-g -O"
744 else
745 CFLAGS="-O"
746 fi
747 fi
748else
749 GCC=
750 test "${CFLAGS+set}" = set || CFLAGS="-g"
751fi
ef346f1a 752
ec342d7d 753
7e19f60e
ILT
754. ${srcdir}/configure.host
755
756
eb02fd64 757
5a168a17 758
6c18e393 759
3d6f0983 760
ef346f1a 761
2e598345 762
ad43e45b 763
2e598345
ILT
764# For most hosts we can use a simple definition to pick up the BFD and
765# opcodes libraries. However, if we are building shared libraries, we
766# need to handle some hosts specially.
767BFDLIB='-L../bfd -lbfd'
768if test "${shared}" = "true"; then
769 case "${host}" in
770 *-*-sunos*)
771 # On SunOS, we must link against the name we are going to install,
772 # not -lbfd, since SunOS does not support SONAME.
773 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
774 ;;
775 esac
776fi
777
778
ef346f1a
ILT
779echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
780# On Suns, sometimes $CPP names a directory.
781if test -n "$CPP" && test -d "$CPP"; then
782 CPP=
783fi
784if test -z "$CPP"; then
785if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
786 echo $ac_n "(cached) $ac_c" 1>&6
c0b47bae 787else
ef346f1a
ILT
788 # This must be in double quotes, not single quotes, because CPP may get
789 # substituted into the Makefile and "${CC-cc}" will confuse make.
790 CPP="${CC-cc} -E"
791 # On the NeXT, cc -E runs the code through the compiler's parser,
792 # not just through cpp.
793 cat > conftest.$ac_ext <<EOF
7e19f60e 794#line 795 "configure"
ef346f1a
ILT
795#include "confdefs.h"
796#include <assert.h>
797Syntax Error
798EOF
799eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
800ac_err=`grep -v '^ *+' conftest.out`
801if test -z "$ac_err"; then
802 :
803else
804 echo "$ac_err" >&5
805 rm -rf conftest*
806 CPP="${CC-cc} -E -traditional-cpp"
807 cat > conftest.$ac_ext <<EOF
7e19f60e 808#line 809 "configure"
ef346f1a
ILT
809#include "confdefs.h"
810#include <assert.h>
811Syntax Error
812EOF
813eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
814ac_err=`grep -v '^ *+' conftest.out`
815if test -z "$ac_err"; then
816 :
817else
818 echo "$ac_err" >&5
819 rm -rf conftest*
820 CPP=/lib/cpp
821fi
822rm -f conftest*
823fi
824rm -f conftest*
825 ac_cv_prog_CPP="$CPP"
c0b47bae 826fi
ef346f1a
ILT
827 CPP="$ac_cv_prog_CPP"
828else
829 ac_cv_prog_CPP="$CPP"
830fi
831echo "$ac_t""$CPP" 1>&6
c0b47bae 832
ef346f1a
ILT
833for ac_hdr in string.h strings.h stdlib.h unistd.h
834do
835ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
836echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
837if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
839else
840 cat > conftest.$ac_ext <<EOF
7e19f60e 841#line 842 "configure"
ef346f1a
ILT
842#include "confdefs.h"
843#include <$ac_hdr>
844EOF
845eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
846ac_err=`grep -v '^ *+' conftest.out`
847if test -z "$ac_err"; then
848 rm -rf conftest*
849 eval "ac_cv_header_$ac_safe=yes"
850else
851 echo "$ac_err" >&5
852 rm -rf conftest*
853 eval "ac_cv_header_$ac_safe=no"
854fi
855rm -f conftest*
856fi
857if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
858 echo "$ac_t""yes" 1>&6
caf2a913 859 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
ef346f1a
ILT
860 cat >> confdefs.h <<EOF
861#define $ac_tr_hdr 1
862EOF
863
864else
865 echo "$ac_t""no" 1>&6
c0b47bae 866fi
ef346f1a 867done
8c32cf6e 868
ef346f1a
ILT
869for ac_func in sbrk
870do
871echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
872if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
873 echo $ac_n "(cached) $ac_c" 1>&6
874else
875 cat > conftest.$ac_ext <<EOF
7e19f60e 876#line 877 "configure"
ef346f1a
ILT
877#include "confdefs.h"
878/* System header to define __stub macros and hopefully few prototypes,
879 which can conflict with char $ac_func(); below. */
880#include <assert.h>
881/* Override any gcc2 internal prototype to avoid an error. */
caf2a913 882char $ac_func();
ef346f1a
ILT
883
884int main() { return 0; }
885int t() {
886
887/* The GNU C library defines this for functions which it implements
888 to always fail with ENOSYS. Some functions are actually named
889 something starting with __ and the normal name is an alias. */
890#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
891choke me
892#else
893$ac_func();
894#endif
895
896; return 0; }
897EOF
898if eval $ac_link; then
899 rm -rf conftest*
900 eval "ac_cv_func_$ac_func=yes"
901else
902 rm -rf conftest*
903 eval "ac_cv_func_$ac_func=no"
904fi
905rm -f conftest*
c0b47bae 906
ef346f1a
ILT
907fi
908if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
909 echo "$ac_t""yes" 1>&6
caf2a913 910 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ef346f1a
ILT
911 cat >> confdefs.h <<EOF
912#define $ac_tr_func 1
913EOF
914
915else
916 echo "$ac_t""no" 1>&6
917fi
918done
c0b47bae 919
caf2a913
ILT
920ac_header_dirent=no
921for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
922do
923ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
924echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
925if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
927else
928 cat > conftest.$ac_ext <<EOF
7e19f60e 929#line 930 "configure"
caf2a913
ILT
930#include "confdefs.h"
931#include <sys/types.h>
932#include <$ac_hdr>
933int main() { return 0; }
934int t() {
935DIR *dirp = 0;
936; return 0; }
937EOF
938if eval $ac_compile; then
939 rm -rf conftest*
940 eval "ac_cv_header_dirent_$ac_safe=yes"
941else
942 rm -rf conftest*
943 eval "ac_cv_header_dirent_$ac_safe=no"
944fi
945rm -f conftest*
946
947fi
948if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
949 echo "$ac_t""yes" 1>&6
950 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
951 cat >> confdefs.h <<EOF
952#define $ac_tr_hdr 1
953EOF
954 ac_header_dirent=$ac_hdr; break
955else
956 echo "$ac_t""no" 1>&6
957fi
958done
959# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
960if test $ac_header_dirent = dirent.h; then
961echo $ac_n "checking for -ldir""... $ac_c" 1>&6
2e598345 962ac_lib_var=`echo dir | tr '.-/+' '___p'`
caf2a913
ILT
963if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
965else
966 ac_save_LIBS="$LIBS"
967LIBS="-ldir $LIBS"
968cat > conftest.$ac_ext <<EOF
7e19f60e 969#line 970 "configure"
caf2a913
ILT
970#include "confdefs.h"
971
972int main() { return 0; }
973int t() {
974opendir()
975; return 0; }
976EOF
977if eval $ac_link; then
978 rm -rf conftest*
979 eval "ac_cv_lib_$ac_lib_var=yes"
980else
981 rm -rf conftest*
982 eval "ac_cv_lib_$ac_lib_var=no"
983fi
984rm -f conftest*
985LIBS="$ac_save_LIBS"
986
987fi
988if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
989 echo "$ac_t""yes" 1>&6
990 LIBS="$LIBS -ldir"
991else
992 echo "$ac_t""no" 1>&6
993fi
994
995else
996echo $ac_n "checking for -lx""... $ac_c" 1>&6
2e598345 997ac_lib_var=`echo x | tr '.-/+' '___p'`
caf2a913
ILT
998if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
999 echo $ac_n "(cached) $ac_c" 1>&6
1000else
1001 ac_save_LIBS="$LIBS"
1002LIBS="-lx $LIBS"
1003cat > conftest.$ac_ext <<EOF
7e19f60e 1004#line 1005 "configure"
caf2a913
ILT
1005#include "confdefs.h"
1006
1007int main() { return 0; }
1008int t() {
1009opendir()
1010; return 0; }
1011EOF
1012if eval $ac_link; then
1013 rm -rf conftest*
1014 eval "ac_cv_lib_$ac_lib_var=yes"
1015else
1016 rm -rf conftest*
1017 eval "ac_cv_lib_$ac_lib_var=no"
1018fi
1019rm -f conftest*
1020LIBS="$ac_save_LIBS"
1021
1022fi
1023if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1024 echo "$ac_t""yes" 1>&6
1025 LIBS="$LIBS -lx"
1026else
1027 echo "$ac_t""no" 1>&6
1028fi
1029
1030fi
1031
1032
c0b47bae 1033
ef346f1a 1034case "${host}" in
2e598345 1035i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
ef346f1a
ILT
1036 cat >> confdefs.h <<\EOF
1037#define USE_BINARY_FOPEN 1
1038EOF
1039 ;;
1040esac
6c18e393 1041
caf2a913
ILT
1042echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
1043if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
1045else
1046 cat > conftest.$ac_ext <<EOF
7e19f60e 1047#line 1048 "configure"
caf2a913
ILT
1048#include "confdefs.h"
1049
1050#include <stdio.h>
1051#ifdef HAVE_STDLIB_H
1052#include <stdlib.h>
1053#endif
1054#ifdef HAVE_UNISTD_H
1055#include <unistd.h>
1056#endif
1057int main() { return 0; }
1058int t() {
1059char *(*pfn) = (char *(*)) free
1060; return 0; }
1061EOF
1062if eval $ac_compile; then
1063 rm -rf conftest*
1064 bfd_cv_decl_needed_free=no
1065else
1066 rm -rf conftest*
1067 bfd_cv_decl_needed_free=yes
1068fi
1069rm -f conftest*
1070
1071fi
1072
1073echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
1074if test $bfd_cv_decl_needed_free = yes; then
1075 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1076 cat >> confdefs.h <<EOF
1077#define $bfd_tr_decl 1
1078EOF
1079
1080fi
1081
1082
ef346f1a 1083# target-specific stuff:
3d6f0983 1084
95d31c3c 1085all_targets=
ef346f1a
ILT
1086EMUL=
1087all_emuls=
95d31c3c 1088TDIRS=
ef346f1a 1089
95d31c3c 1090for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
ef346f1a 1091do
95d31c3c
ILT
1092 if test "$targ_alias" = "all"; then
1093 all_targets=true
1094 else
1095 # Canonicalize the secondary target names.
1096 result=`$ac_config_sub $targ_alias 2>/dev/null`
1097 if test -n "$result"; then
1098 targ=$result
ef346f1a 1099 else
95d31c3c 1100 targ=$targ_alias
ef346f1a 1101 fi
2ee11735 1102
95d31c3c 1103 . ${srcdir}/configure.tgt
ef346f1a 1104
95d31c3c
ILT
1105 if test "$targ" = "$target"; then
1106 EMUL=$targ_emul
1107 fi
ef346f1a 1108
95d31c3c
ILT
1109 for i in $targ_emul $targ_extra_emuls; do
1110 case " $all_emuls " in
1111 *" e${i}.o "*) ;;
1112 *)
1113 all_emuls="$all_emuls e${i}.o"
1114 eval result=\$tdir_$i
1115 test -z "$result" && result=$targ_alias
1116 TDIRS="$TDIRS\\
1117tdir_$i=$result"
1118 ;;
ef346f1a
ILT
1119 esac
1120 done
95d31c3c
ILT
1121 fi
1122done
ef346f1a 1123
ef346f1a 1124
ef346f1a
ILT
1125
1126
95d31c3c
ILT
1127if test x${all_targets} = xtrue; then
1128 EMULATION_OFILES='$(ALL_EMULATIONS)'
1129else
1130 EMULATION_OFILES=$all_emuls
1131fi
1132
ef346f1a
ILT
1133
1134trap '' 1 2 15
1135cat > confcache <<\EOF
1136# This file is a shell script that caches the results of configure
1137# tests run on this system so they can be shared between configure
1138# scripts and configure runs. It is not useful on other systems.
1139# If it contains results you don't want to keep, you may remove or edit it.
1140#
1141# By default, configure uses ./config.cache as the cache file,
1142# creating it if it does not exist already. You can give configure
1143# the --cache-file=FILE option to use a different cache file; that is
1144# what configure does when it calls configure scripts in
1145# subdirectories, so they share the cache.
1146# Giving --cache-file=/dev/null disables caching, for debugging configure.
1147# config.status only pays attention to the cache file if you give it the
1148# --recheck option to rerun configure.
1149#
1150EOF
1151# Ultrix sh set writes to stderr and can't be redirected directly,
1152# and sets the high bit in the cache file unless we assign to the vars.
1153(set) 2>&1 |
1154 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1155 >> confcache
1156if cmp -s $cache_file confcache; then
1157 :
1158else
1159 if test -w $cache_file; then
1160 echo "updating cache $cache_file"
1161 cat confcache > $cache_file
1162 else
1163 echo "not updating unwritable cache $cache_file"
1164 fi
1165fi
1166rm -f confcache
1167
1168trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1169
1170test "x$prefix" = xNONE && prefix=$ac_default_prefix
1171# Let make expand exec_prefix.
1172test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1173
1174# Any assignment to VPATH causes Sun make to only execute
1175# the first set of double-colon rules, so remove it if not needed.
1176# If there is a colon in the path, we need to keep it.
1177if test "x$srcdir" = x.; then
1178 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1179fi
1180
1181trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1182
1183DEFS=-DHAVE_CONFIG_H
1184
1185# Without the "./", some shells look in PATH for config.status.
1186: ${CONFIG_STATUS=./config.status}
1187
1188echo creating $CONFIG_STATUS
1189rm -f $CONFIG_STATUS
1190cat > $CONFIG_STATUS <<EOF
1191#! /bin/sh
1192# Generated automatically by configure.
1193# Run this file to recreate the current configuration.
1194# This directory was configured as follows,
1195# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1196#
1197# $0 $ac_configure_args
8c32cf6e 1198#
ef346f1a
ILT
1199# Compiler output produced by configure, useful for debugging
1200# configure, is in ./config.log if it exists.
1201
1202ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1203for ac_option
1204do
1205 case "\$ac_option" in
1206 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1207 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1208 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1209 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2e598345 1210 echo "$CONFIG_STATUS generated by autoconf version 2.7"
ef346f1a
ILT
1211 exit 0 ;;
1212 -help | --help | --hel | --he | --h)
1213 echo "\$ac_cs_usage"; exit 0 ;;
1214 *) echo "\$ac_cs_usage"; exit 1 ;;
1215 esac
1216done
1217
1218ac_given_srcdir=$srcdir
1219
1220trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2e598345
ILT
1221EOF
1222cat >> $CONFIG_STATUS <<EOF
ef346f1a 1223
caf2a913 1224# Protect against being on the right side of a sed subst in config.status.
2e598345
ILT
1225sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1226 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
ef346f1a
ILT
1227$ac_vpsub
1228$extrasub
1229s%@CFLAGS@%$CFLAGS%g
1230s%@CPPFLAGS@%$CPPFLAGS%g
1231s%@CXXFLAGS@%$CXXFLAGS%g
1232s%@DEFS@%$DEFS%g
1233s%@LDFLAGS@%$LDFLAGS%g
1234s%@LIBS@%$LIBS%g
1235s%@exec_prefix@%$exec_prefix%g
1236s%@prefix@%$prefix%g
1237s%@program_transform_name@%$program_transform_name%g
caf2a913
ILT
1238s%@bindir@%$bindir%g
1239s%@sbindir@%$sbindir%g
1240s%@libexecdir@%$libexecdir%g
1241s%@datadir@%$datadir%g
1242s%@sysconfdir@%$sysconfdir%g
1243s%@sharedstatedir@%$sharedstatedir%g
1244s%@localstatedir@%$localstatedir%g
1245s%@libdir@%$libdir%g
1246s%@includedir@%$includedir%g
1247s%@oldincludedir@%$oldincludedir%g
1248s%@infodir@%$infodir%g
1249s%@mandir@%$mandir%g
ef346f1a
ILT
1250s%@host@%$host%g
1251s%@host_alias@%$host_alias%g
1252s%@host_cpu@%$host_cpu%g
1253s%@host_vendor@%$host_vendor%g
1254s%@host_os@%$host_os%g
1255s%@target@%$target%g
1256s%@target_alias@%$target_alias%g
1257s%@target_cpu@%$target_cpu%g
1258s%@target_vendor@%$target_vendor%g
1259s%@target_os@%$target_os%g
1260s%@build@%$build%g
1261s%@build_alias@%$build_alias%g
1262s%@build_cpu@%$build_cpu%g
1263s%@build_vendor@%$build_vendor%g
1264s%@build_os@%$build_os%g
1265s%@CC@%$CC%g
2e598345 1266s%@HLDFLAGS@%$HLDFLAGS%g
ad43e45b 1267s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
ef346f1a
ILT
1268s%@HDEFINES@%$HDEFINES%g
1269s%@HOSTING_CRT0@%$HOSTING_CRT0%g
1270s%@HOSTING_LIBS@%$HOSTING_LIBS%g
1271s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
2e598345 1272s%@BFDLIB@%$BFDLIB%g
ef346f1a
ILT
1273s%@CPP@%$CPP%g
1274s%@EMUL@%$EMUL%g
95d31c3c 1275s%@TDIRS@%$TDIRS%g
ef346f1a
ILT
1276s%@EMULATION_OFILES@%$EMULATION_OFILES%g
1277
1278CEOF
1279EOF
1280cat >> $CONFIG_STATUS <<EOF
1281
1282CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1283EOF
1284cat >> $CONFIG_STATUS <<\EOF
1285for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1286 # Support "outfile[:infile]", defaulting infile="outfile.in".
1287 case "$ac_file" in
1288 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1289 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1290 *) ac_file_in="${ac_file}.in" ;;
1291 esac
1292
1293 # Adjust relative srcdir, etc. for subdirectories.
1294
1295 # Remove last slash and all that follows it. Not all systems have dirname.
1296 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1297 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1298 # The file is in a subdirectory.
1299 test ! -d "$ac_dir" && mkdir "$ac_dir"
1300 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1301 # A "../" for each directory in $ac_dir_suffix.
1302 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1303 else
1304 ac_dir_suffix= ac_dots=
1305 fi
1306
1307 case "$ac_given_srcdir" in
1308 .) srcdir=.
1309 if test -z "$ac_dots"; then top_srcdir=.
1310 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1311 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1312 *) # Relative path.
1313 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1314 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1315 esac
1316
1317 echo creating "$ac_file"
1318 rm -f "$ac_file"
1319 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1320 case "$ac_file" in
1321 *Makefile*) ac_comsub="1i\\
1322# $configure_input" ;;
1323 *) ac_comsub= ;;
1324 esac
1325 sed -e "$ac_comsub
1326s%@configure_input@%$configure_input%g
1327s%@srcdir@%$srcdir%g
1328s%@top_srcdir@%$top_srcdir%g
1329" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1330fi; done
1331rm -f conftest.subs
1332
1333# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1334# NAME is the cpp macro being defined and VALUE is the value it is being given.
8c32cf6e 1335#
ef346f1a
ILT
1336# ac_d sets the value in "#define NAME VALUE" lines.
1337ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1338ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1339ac_dC='\3'
1340ac_dD='%g'
1341# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1342ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1343ac_uB='\([ ]\)%\1#\2define\3'
1344ac_uC=' '
1345ac_uD='\4%g'
1346# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1347ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1348ac_eB='$%\1#\2define\3'
1349ac_eC=' '
1350ac_eD='%g'
1351
1352CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
1353for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1354 # Support "outfile[:infile]", defaulting infile="outfile.in".
1355 case "$ac_file" in
1356 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1357 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1358 *) ac_file_in="${ac_file}.in" ;;
1359 esac
1360
1361 echo creating $ac_file
1362
1363 rm -f conftest.frag conftest.in conftest.out
1364 cp $ac_given_srcdir/$ac_file_in conftest.in
1365
1366EOF
1367
1368# Transform confdefs.h into a sed script conftest.vals that substitutes
1369# the proper values into config.h.in to produce config.h. And first:
caf2a913 1370# Protect against being on the right side of a sed subst in config.status.
ef346f1a
ILT
1371# Protect against being in an unquoted here document in config.status.
1372rm -f conftest.vals
1373cat > conftest.hdr <<\EOF
1374s/[\\&%]/\\&/g
1375s%[\\$`]%\\&%g
1376s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1377s%ac_d%ac_u%gp
1378s%ac_u%ac_e%gp
1379EOF
1380sed -n -f conftest.hdr confdefs.h > conftest.vals
1381rm -f conftest.hdr
1382
1383# This sed command replaces #undef with comments. This is necessary, for
1384# example, in the case of _POSIX_SOURCE, which is predefined and required
1385# on some systems where configure will not decide to define it.
1386cat >> conftest.vals <<\EOF
1387s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1388EOF
1389
1390# Break up conftest.vals because some shells have a limit on
1391# the size of here documents, and old seds have small limits too.
1392# Maximum number of lines to put in a single here document.
1393ac_max_here_lines=12
1394
1395rm -f conftest.tail
1396while :
1397do
1398 ac_lines=`grep -c . conftest.vals`
1399 # grep -c gives empty output for an empty file on some AIX systems.
1400 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1401 # Write a limited-size here document to conftest.frag.
1402 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1403 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1404 echo 'CEOF
1405 sed -f conftest.frag conftest.in > conftest.out
1406 rm -f conftest.in
1407 mv conftest.out conftest.in
1408' >> $CONFIG_STATUS
1409 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1410 rm -f conftest.vals
1411 mv conftest.tail conftest.vals
1412done
1413rm -f conftest.vals
1414
1415cat >> $CONFIG_STATUS <<\EOF
1416 rm -f conftest.frag conftest.h
1417 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1418 cat conftest.in >> conftest.h
1419 rm -f conftest.in
1420 if cmp -s $ac_file conftest.h 2>/dev/null; then
1421 echo "$ac_file is unchanged"
1422 rm -f conftest.h
1423 else
1424 rm -f $ac_file
1425 mv conftest.h $ac_file
1426 fi
1427fi; done
1428
1429
1430case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
1431exit 0
1432EOF
1433chmod +x $CONFIG_STATUS
1434rm -fr confdefs* $ac_clean_files
1435test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2ee11735 1436
This page took 0.235865 seconds and 4 git commands to generate.