b4597dae5d8f3b37febf16559df233383fe95892
[external/binutils.git] / bfd / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.7 
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)"
16 ac_help="$ac_help
17   --enable-targets        alternative target configurations"
18 ac_help="$ac_help
19   --with-mmap             try using mmap for BFD input files if available"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58
59 ac_prev=
60 for ac_option
61 do
62
63   # If the previous option needs an argument, assign it.
64   if test -n "$ac_prev"; then
65     eval "$ac_prev=\$ac_option"
66     ac_prev=
67     continue
68   fi
69
70   case "$ac_option" in
71   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72   *) ac_optarg= ;;
73   esac
74
75   # Accept the important Cygnus configure options, so we can diagnose typos.
76
77   case "$ac_option" in
78
79   -bindir | --bindir | --bindi | --bind | --bin | --bi)
80     ac_prev=bindir ;;
81   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82     bindir="$ac_optarg" ;;
83
84   -build | --build | --buil | --bui | --bu)
85     ac_prev=build ;;
86   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87     build="$ac_optarg" ;;
88
89   -cache-file | --cache-file | --cache-fil | --cache-fi \
90   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91     ac_prev=cache_file ;;
92   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94     cache_file="$ac_optarg" ;;
95
96   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97     ac_prev=datadir ;;
98   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99   | --da=*)
100     datadir="$ac_optarg" ;;
101
102   -disable-* | --disable-*)
103     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104     # Reject names that are not valid shell variable names.
105     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107     fi
108     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109     eval "enable_${ac_feature}=no" ;;
110
111   -enable-* | --enable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     case "$ac_option" in
119       *=*) ;;
120       *) ac_optarg=yes ;;
121     esac
122     eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126   | --exec | --exe | --ex)
127     ac_prev=exec_prefix ;;
128   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130   | --exec=* | --exe=* | --ex=*)
131     exec_prefix="$ac_optarg" ;;
132
133   -gas | --gas | --ga | --g)
134     # Obsolete; use --with-gas.
135     with_gas=yes ;;
136
137   -help | --help | --hel | --he)
138     # Omit some internal or obsolete options to make the list less imposing.
139     # This message is too long to be a string in the A/UX 3.1 sh.
140     cat << EOF
141 Usage: configure [options] [host]
142 Options: [defaults in brackets after descriptions]
143 Configuration:
144   --cache-file=FILE       cache test results in FILE
145   --help                  print this message
146   --no-create             do not create output files
147   --quiet, --silent       do not print \`checking...' messages
148   --version               print the version of autoconf that created configure
149 Directory and file names:
150   --prefix=PREFIX         install architecture-independent files in PREFIX
151                           [$ac_default_prefix]
152   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
153                           [same as prefix]
154   --bindir=DIR            user executables in DIR [EPREFIX/bin]
155   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
156   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
157   --datadir=DIR           read-only architecture-independent data in DIR
158                           [PREFIX/share]
159   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
160   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
161                           [PREFIX/com]
162   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
163   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
164   --includedir=DIR        C header files in DIR [PREFIX/include]
165   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
166   --infodir=DIR           info documentation in DIR [PREFIX/info]
167   --mandir=DIR            man documentation in DIR [PREFIX/man]
168   --srcdir=DIR            find the sources in DIR [configure dir or ..]
169   --program-prefix=PREFIX prepend PREFIX to installed program names
170   --program-suffix=SUFFIX append SUFFIX to installed program names
171   --program-transform-name=PROGRAM
172                           run sed PROGRAM on installed program names
173 EOF
174     cat << EOF
175 Host type:
176   --build=BUILD           configure for building on BUILD [BUILD=HOST]
177   --host=HOST             configure for HOST [guessed]
178   --target=TARGET         configure for TARGET [TARGET=HOST]
179 Features and packages:
180   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
181   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
182   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
183   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
184   --x-includes=DIR        X include files are in DIR
185   --x-libraries=DIR       X library files are in DIR
186 EOF
187     if test -n "$ac_help"; then
188       echo "--enable and --with options recognized:$ac_help"
189     fi
190     exit 0 ;;
191
192   -host | --host | --hos | --ho)
193     ac_prev=host ;;
194   -host=* | --host=* | --hos=* | --ho=*)
195     host="$ac_optarg" ;;
196
197   -includedir | --includedir | --includedi | --included | --include \
198   | --includ | --inclu | --incl | --inc)
199     ac_prev=includedir ;;
200   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201   | --includ=* | --inclu=* | --incl=* | --inc=*)
202     includedir="$ac_optarg" ;;
203
204   -infodir | --infodir | --infodi | --infod | --info | --inf)
205     ac_prev=infodir ;;
206   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207     infodir="$ac_optarg" ;;
208
209   -libdir | --libdir | --libdi | --libd)
210     ac_prev=libdir ;;
211   -libdir=* | --libdir=* | --libdi=* | --libd=*)
212     libdir="$ac_optarg" ;;
213
214   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215   | --libexe | --libex | --libe)
216     ac_prev=libexecdir ;;
217   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218   | --libexe=* | --libex=* | --libe=*)
219     libexecdir="$ac_optarg" ;;
220
221   -localstatedir | --localstatedir | --localstatedi | --localstated \
222   | --localstate | --localstat | --localsta | --localst \
223   | --locals | --local | --loca | --loc | --lo)
224     ac_prev=localstatedir ;;
225   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228     localstatedir="$ac_optarg" ;;
229
230   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231     ac_prev=mandir ;;
232   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233     mandir="$ac_optarg" ;;
234
235   -nfp | --nfp | --nf)
236     # Obsolete; use --without-fp.
237     with_fp=no ;;
238
239   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240   | --no-cr | --no-c)
241     no_create=yes ;;
242
243   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245     no_recursion=yes ;;
246
247   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249   | --oldin | --oldi | --old | --ol | --o)
250     ac_prev=oldincludedir ;;
251   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254     oldincludedir="$ac_optarg" ;;
255
256   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257     ac_prev=prefix ;;
258   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259     prefix="$ac_optarg" ;;
260
261   -program-prefix | --program-prefix | --program-prefi | --program-pref \
262   | --program-pre | --program-pr | --program-p)
263     ac_prev=program_prefix ;;
264   -program-prefix=* | --program-prefix=* | --program-prefi=* \
265   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266     program_prefix="$ac_optarg" ;;
267
268   -program-suffix | --program-suffix | --program-suffi | --program-suff \
269   | --program-suf | --program-su | --program-s)
270     ac_prev=program_suffix ;;
271   -program-suffix=* | --program-suffix=* | --program-suffi=* \
272   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273     program_suffix="$ac_optarg" ;;
274
275   -program-transform-name | --program-transform-name \
276   | --program-transform-nam | --program-transform-na \
277   | --program-transform-n | --program-transform- \
278   | --program-transform | --program-transfor \
279   | --program-transfo | --program-transf \
280   | --program-trans | --program-tran \
281   | --progr-tra | --program-tr | --program-t)
282     ac_prev=program_transform_name ;;
283   -program-transform-name=* | --program-transform-name=* \
284   | --program-transform-nam=* | --program-transform-na=* \
285   | --program-transform-n=* | --program-transform-=* \
286   | --program-transform=* | --program-transfor=* \
287   | --program-transfo=* | --program-transf=* \
288   | --program-trans=* | --program-tran=* \
289   | --progr-tra=* | --program-tr=* | --program-t=*)
290     program_transform_name="$ac_optarg" ;;
291
292   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293   | -silent | --silent | --silen | --sile | --sil)
294     silent=yes ;;
295
296   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297     ac_prev=sbindir ;;
298   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299   | --sbi=* | --sb=*)
300     sbindir="$ac_optarg" ;;
301
302   -sharedstatedir | --sharedstatedir | --sharedstatedi \
303   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304   | --sharedst | --shareds | --shared | --share | --shar \
305   | --sha | --sh)
306     ac_prev=sharedstatedir ;;
307   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310   | --sha=* | --sh=*)
311     sharedstatedir="$ac_optarg" ;;
312
313   -site | --site | --sit)
314     ac_prev=site ;;
315   -site=* | --site=* | --sit=*)
316     site="$ac_optarg" ;;
317
318   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319     ac_prev=srcdir ;;
320   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321     srcdir="$ac_optarg" ;;
322
323   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324   | --syscon | --sysco | --sysc | --sys | --sy)
325     ac_prev=sysconfdir ;;
326   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328     sysconfdir="$ac_optarg" ;;
329
330   -target | --target | --targe | --targ | --tar | --ta | --t)
331     ac_prev=target ;;
332   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333     target="$ac_optarg" ;;
334
335   -v | -verbose | --verbose | --verbos | --verbo | --verb)
336     verbose=yes ;;
337
338   -version | --version | --versio | --versi | --vers)
339     echo "configure generated by autoconf version 2.7"
340     exit 0 ;;
341
342   -with-* | --with-*)
343     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344     # Reject names that are not valid shell variable names.
345     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347     fi
348     ac_package=`echo $ac_package| sed 's/-/_/g'`
349     case "$ac_option" in
350       *=*) ;;
351       *) ac_optarg=yes ;;
352     esac
353     eval "with_${ac_package}='$ac_optarg'" ;;
354
355   -without-* | --without-*)
356     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357     # Reject names that are not valid shell variable names.
358     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360     fi
361     ac_package=`echo $ac_package| sed 's/-/_/g'`
362     eval "with_${ac_package}=no" ;;
363
364   --x)
365     # Obsolete; use --with-x.
366     with_x=yes ;;
367
368   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369   | --x-incl | --x-inc | --x-in | --x-i)
370     ac_prev=x_includes ;;
371   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373     x_includes="$ac_optarg" ;;
374
375   -x-libraries | --x-libraries | --x-librarie | --x-librari \
376   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377     ac_prev=x_libraries ;;
378   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380     x_libraries="$ac_optarg" ;;
381
382   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383     ;;
384
385   *)
386     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387       echo "configure: warning: $ac_option: invalid host type" 1>&2
388     fi
389     if test "x$nonopt" != xNONE; then
390       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391     fi
392     nonopt="$ac_option"
393     ;;
394
395   esac
396 done
397
398 if test -n "$ac_prev"; then
399   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400 fi
401
402 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404 # File descriptor usage:
405 # 0 standard input
406 # 1 file creation
407 # 2 errors and warnings
408 # 3 some systems may open it to /dev/tty
409 # 4 used on the Kubota Titan
410 # 6 checking for... messages and results
411 # 5 compiler messages saved in config.log
412 if test "$silent" = yes; then
413   exec 6>/dev/null
414 else
415   exec 6>&1
416 fi
417 exec 5>./config.log
418
419 echo "\
420 This file contains any messages produced by compilers while
421 running configure, to aid debugging if configure makes a mistake.
422 " 1>&5
423
424 # Strip out --no-create and --no-recursion so they do not pile up.
425 # Also quote any args containing shell metacharacters.
426 ac_configure_args=
427 for ac_arg
428 do
429   case "$ac_arg" in
430   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431   | --no-cr | --no-c) ;;
432   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437   esac
438 done
439
440 # NLS nuisances.
441 # Only set LANG and LC_ALL to C if already set.
442 # These must not be set unconditionally because not all systems understand
443 # e.g. LANG=C (notably SCO).
444 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
446
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
450 echo > confdefs.h
451
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=libbfd.c
455
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458   ac_srcdir_defaulted=yes
459   # Try the directory containing this script, then its parent.
460   ac_prog=$0
461   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463   srcdir=$ac_confdir
464   if test ! -r $srcdir/$ac_unique_file; then
465     srcdir=..
466   fi
467 else
468   ac_srcdir_defaulted=no
469 fi
470 if test ! -r $srcdir/$ac_unique_file; then
471   if test "$ac_srcdir_defaulted" = yes; then
472     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473   else
474     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475   fi
476 fi
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481   if test "x$prefix" != xNONE; then
482     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483   else
484     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485   fi
486 fi
487 for ac_site_file in $CONFIG_SITE; do
488   if test -r "$ac_site_file"; then
489     echo "loading site script $ac_site_file"
490     . "$ac_site_file"
491   fi
492 done
493
494 if test -r "$cache_file"; then
495   echo "loading cache $cache_file"
496   . $cache_file
497 else
498   echo "creating cache $cache_file"
499   > $cache_file
500 fi
501
502 ac_ext=c
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
505 $CPP $CPPFLAGS'
506 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
507 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
508 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
509 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
510
511 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
514     ac_n= ac_c='
515 ' ac_t='        '
516   else
517     ac_n=-n ac_c= ac_t=
518   fi
519 else
520   ac_n= ac_c='\c' ac_t=
521 fi
522
523
524
525 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
526 if test "${enable_64_bit_bfd+set}" = set; then
527   enableval="$enable_64_bit_bfd"
528   case "${enableval}" in
529   yes)  want64=true  ;;
530   no)   want64=false ;;
531   *)    { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
532 esac
533 else
534   want64=false
535 fi
536 # Check whether --enable-targets or --disable-targets was given.
537 if test "${enable_targets+set}" = set; then
538   enableval="$enable_targets"
539   case "${enableval}" in
540   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
541             ;;
542   no)       enable_targets= ;;
543   *)        enable_targets=$enableval ;;
544 esac
545 fi
546 # Check whether --with-mmap or --without-mmap was given.
547 if test "${with_mmap+set}" = set; then
548   withval="$with_mmap"
549   case "${withval}" in
550   yes)  want_mmap=true ;;
551   no)   want_mmap=false ;;
552   *)    { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
553 esac
554 else
555   want_mmap=false
556 fi
557
558
559
560 ac_aux_dir=
561 for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
562   if test -f $ac_dir/install-sh; then
563     ac_aux_dir=$ac_dir
564     ac_install_sh="$ac_aux_dir/install-sh -c"
565     break
566   elif test -f $ac_dir/install.sh; then
567     ac_aux_dir=$ac_dir
568     ac_install_sh="$ac_aux_dir/install.sh -c"
569     break
570   fi
571 done
572 if test -z "$ac_aux_dir"; then
573   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
574 fi
575 ac_config_guess=$ac_aux_dir/config.guess
576 ac_config_sub=$ac_aux_dir/config.sub
577 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
578
579
580 # Do some error checking and defaulting for the host and target type.
581 # The inputs are:
582 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
583 #
584 # The rules are:
585 # 1. You are not allowed to specify --host, --target, and nonopt at the
586 #    same time.
587 # 2. Host defaults to nonopt.
588 # 3. If nonopt is not specified, then host defaults to the current host,
589 #    as determined by config.guess.
590 # 4. Target and build default to nonopt.
591 # 5. If nonopt is not specified, then target and build default to host.
592
593 # The aliases save the names the user supplied, while $host etc.
594 # will get canonicalized.
595 case $host---$target---$nonopt in
596 NONE---*---* | *---NONE---* | *---*---NONE) ;;
597 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
598 esac
599
600
601 # Make sure we can run config.sub.
602 if $ac_config_sub sun4 >/dev/null 2>&1; then :
603 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
604 fi
605
606 echo $ac_n "checking host system type""... $ac_c" 1>&6
607
608 host_alias=$host
609 case "$host_alias" in
610 NONE)
611   case $nonopt in
612   NONE)
613     if host_alias=`$ac_config_guess`; then :
614     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
615     fi ;;
616   *) host_alias=$nonopt ;;
617   esac ;;
618 esac
619
620 host=`$ac_config_sub $host_alias`
621 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
622 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
623 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
624 echo "$ac_t""$host" 1>&6
625
626 echo $ac_n "checking target system type""... $ac_c" 1>&6
627
628 target_alias=$target
629 case "$target_alias" in
630 NONE)
631   case $nonopt in
632   NONE) target_alias=$host_alias ;;
633   *) target_alias=$nonopt ;;
634   esac ;;
635 esac
636
637 target=`$ac_config_sub $target_alias`
638 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
639 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
640 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
641 echo "$ac_t""$target" 1>&6
642
643 echo $ac_n "checking build system type""... $ac_c" 1>&6
644
645 build_alias=$build
646 case "$build_alias" in
647 NONE)
648   case $nonopt in
649   NONE) build_alias=$host_alias ;;
650   *) build_alias=$nonopt ;;
651   esac ;;
652 esac
653
654 build=`$ac_config_sub $build_alias`
655 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
656 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
657 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
658 echo "$ac_t""$build" 1>&6
659
660 test "$host_alias" != "$target_alias" &&
661   test "$program_prefix$program_suffix$program_transform_name" = \
662     NONENONEs,x,x, &&
663   program_prefix=${target_alias}-
664
665 if test -z "$target" ; then
666     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
667 fi
668 if test "$program_transform_name" = s,x,x,; then
669   program_transform_name=
670 else
671   # Double any \ or $.  echo might interpret backslashes.
672   cat <<\EOF_SED > conftestsed
673 s,\\,\\\\,g; s,\$,$$,g
674 EOF_SED
675   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
676   rm -f conftestsed
677 fi
678 test "$program_prefix" != NONE &&
679   program_transform_name="s,^,${program_prefix},; $program_transform_name"
680 # Use a double $ so make ignores it.
681 test "$program_suffix" != NONE &&
682   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
683
684 # sed with no file args requires a program.
685 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
686
687
688 host64=false
689 target64=false
690
691 # host stuff:
692
693 # Permit host specific settings.
694 . ${srcdir}/configure.host
695
696 # Extract the first word of "gcc", so it can be a program name with args.
697 set dummy gcc; ac_word=$2
698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
699 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
700   echo $ac_n "(cached) $ac_c" 1>&6
701 else
702   if test -n "$CC"; then
703   ac_cv_prog_CC="$CC" # Let the user override the test.
704 else
705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
706   for ac_dir in $PATH; do
707     test -z "$ac_dir" && ac_dir=.
708     if test -f $ac_dir/$ac_word; then
709       ac_cv_prog_CC="gcc"
710       break
711     fi
712   done
713   IFS="$ac_save_ifs"
714   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
715 fi
716 fi
717 CC="$ac_cv_prog_CC"
718 if test -n "$CC"; then
719   echo "$ac_t""$CC" 1>&6
720 else
721   echo "$ac_t""no" 1>&6
722 fi
723
724
725 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
726 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
727   echo $ac_n "(cached) $ac_c" 1>&6
728 else
729   cat > conftest.c <<EOF
730 #ifdef __GNUC__
731   yes;
732 #endif
733 EOF
734 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
735   ac_cv_prog_gcc=yes
736 else
737   ac_cv_prog_gcc=no
738 fi
739 fi
740
741 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
742 if test $ac_cv_prog_gcc = yes; then
743   GCC=yes
744   if test "${CFLAGS+set}" != set; then
745     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
746 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   echo 'void f(){}' > conftest.c
750 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
751   ac_cv_prog_gcc_g=yes
752 else
753   ac_cv_prog_gcc_g=no
754 fi
755 rm -f conftest*
756
757 fi
758
759 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
760     if test $ac_cv_prog_gcc_g = yes; then
761       CFLAGS="-g -O"
762     else
763       CFLAGS="-O"
764     fi
765   fi
766 else
767   GCC=
768   test "${CFLAGS+set}" = set || CFLAGS="-g"
769 fi
770
771
772
773 # Extract the first word of "ar", so it can be a program name with args.
774 set dummy ar; ac_word=$2
775 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
776 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
777   echo $ac_n "(cached) $ac_c" 1>&6
778 else
779   if test -n "$AR"; then
780   ac_cv_prog_AR="$AR" # Let the user override the test.
781 else
782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
783   for ac_dir in $PATH; do
784     test -z "$ac_dir" && ac_dir=.
785     if test -f $ac_dir/$ac_word; then
786       ac_cv_prog_AR="ar"
787       break
788     fi
789   done
790   IFS="$ac_save_ifs"
791   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR=":"
792 fi
793 fi
794 AR="$ac_cv_prog_AR"
795 if test -n "$AR"; then
796   echo "$ac_t""$AR" 1>&6
797 else
798   echo "$ac_t""no" 1>&6
799 fi
800
801 # Extract the first word of "ranlib", so it can be a program name with args.
802 set dummy ranlib; ac_word=$2
803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
804 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
805   echo $ac_n "(cached) $ac_c" 1>&6
806 else
807   if test -n "$RANLIB"; then
808   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
809 else
810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
811   for ac_dir in $PATH; do
812     test -z "$ac_dir" && ac_dir=.
813     if test -f $ac_dir/$ac_word; then
814       ac_cv_prog_RANLIB="ranlib"
815       break
816     fi
817   done
818   IFS="$ac_save_ifs"
819   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
820 fi
821 fi
822 RANLIB="$ac_cv_prog_RANLIB"
823 if test -n "$RANLIB"; then
824   echo "$ac_t""$RANLIB" 1>&6
825 else
826   echo "$ac_t""no" 1>&6
827 fi
828
829 # Find a good install program.  We prefer a C program (faster),
830 # so one script is as good as another.  But avoid the broken or
831 # incompatible versions:
832 # SysV /etc/install, /usr/sbin/install
833 # SunOS /usr/etc/install
834 # IRIX /sbin/install
835 # AIX /bin/install
836 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
837 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
838 # ./install, which can be erroneously created by make from ./install.sh.
839 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
840 if test -z "$INSTALL"; then
841 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
845   for ac_dir in $PATH; do
846     # Account for people who put trailing slashes in PATH elements.
847     case "$ac_dir/" in
848     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
849     *)
850       # OSF1 and SCO ODT 3.0 have their own names for install.
851       for ac_prog in ginstall installbsd scoinst install; do
852         if test -f $ac_dir/$ac_prog; then
853           if test $ac_prog = install &&
854             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # AIX install.  It has an incompatible calling convention.
856             # OSF/1 installbsd also uses dspmsg, but is usable.
857             :
858           else
859             ac_cv_path_install="$ac_dir/$ac_prog -c"
860             break 2
861           fi
862         fi
863       done
864       ;;
865     esac
866   done
867   IFS="$ac_save_ifs"
868
869 fi
870   if test "${ac_cv_path_install+set}" = set; then
871     INSTALL="$ac_cv_path_install"
872   else
873     # As a last resort, use the slow shell script.  We don't cache a
874     # path for INSTALL within a source directory, because that will
875     # break other packages using the cache if that directory is
876     # removed, or if the path is relative.
877     INSTALL="$ac_install_sh"
878   fi
879 fi
880 echo "$ac_t""$INSTALL" 1>&6
881
882 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
883 # It thinks the first close brace ends the variable substitution.
884 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
885
886 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
887
888
889 HOST_64BIT_LONG=0
890 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
891   HOST_64BIT_LONG=1
892 fi
893
894
895 # If we cannot run a trivial program, we must be cross compiling.
896 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
897 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
898   echo $ac_n "(cached) $ac_c" 1>&6
899 else
900   if test "$cross_compiling" = yes; then
901   ac_cv_c_cross=yes
902 else
903 cat > conftest.$ac_ext <<EOF
904 #line 905 "configure"
905 #include "confdefs.h"
906 main(){return(0);}
907 EOF
908 eval $ac_link
909 if test -s conftest && (./conftest; exit) 2>/dev/null; then
910   ac_cv_c_cross=no
911 else
912   ac_cv_c_cross=yes
913 fi
914 fi
915 rm -fr conftest*
916 fi
917
918 echo "$ac_t""$ac_cv_c_cross" 1>&6
919 cross_compiling=$ac_cv_c_cross
920
921 # Put a plausible default for CC_FOR_BUILD in Makefile.
922 if test -z "$CC_FOR_BUILD"; then
923   if test "x$cross_compiling" = "xno"; then
924     CC_FOR_BUILD='$(CC)'
925   else
926     CC_FOR_BUILD=gcc
927   fi
928 fi
929
930
931 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
932 # On Suns, sometimes $CPP names a directory.
933 if test -n "$CPP" && test -d "$CPP"; then
934   CPP=
935 fi
936 if test -z "$CPP"; then
937 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
938   echo $ac_n "(cached) $ac_c" 1>&6
939 else
940     # This must be in double quotes, not single quotes, because CPP may get
941   # substituted into the Makefile and "${CC-cc}" will confuse make.
942   CPP="${CC-cc} -E"
943   # On the NeXT, cc -E runs the code through the compiler's parser,
944   # not just through cpp.
945   cat > conftest.$ac_ext <<EOF
946 #line 947 "configure"
947 #include "confdefs.h"
948 #include <assert.h>
949 Syntax Error
950 EOF
951 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
952 ac_err=`grep -v '^ *+' conftest.out`
953 if test -z "$ac_err"; then
954   :
955 else
956   echo "$ac_err" >&5
957   rm -rf conftest*
958   CPP="${CC-cc} -E -traditional-cpp"
959   cat > conftest.$ac_ext <<EOF
960 #line 961 "configure"
961 #include "confdefs.h"
962 #include <assert.h>
963 Syntax Error
964 EOF
965 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
966 ac_err=`grep -v '^ *+' conftest.out`
967 if test -z "$ac_err"; then
968   :
969 else
970   echo "$ac_err" >&5
971   rm -rf conftest*
972   CPP=/lib/cpp
973 fi
974 rm -f conftest*
975 fi
976 rm -f conftest*
977   ac_cv_prog_CPP="$CPP"
978 fi
979   CPP="$ac_cv_prog_CPP"
980 else
981   ac_cv_prog_CPP="$CPP"
982 fi
983 echo "$ac_t""$CPP" 1>&6
984
985 for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
986 do
987 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
989 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   cat > conftest.$ac_ext <<EOF
993 #line 994 "configure"
994 #include "confdefs.h"
995 #include <$ac_hdr>
996 EOF
997 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
998 ac_err=`grep -v '^ *+' conftest.out`
999 if test -z "$ac_err"; then
1000   rm -rf conftest*
1001   eval "ac_cv_header_$ac_safe=yes"
1002 else
1003   echo "$ac_err" >&5
1004   rm -rf conftest*
1005   eval "ac_cv_header_$ac_safe=no"
1006 fi
1007 rm -f conftest*
1008 fi
1009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1012   cat >> confdefs.h <<EOF
1013 #define $ac_tr_hdr 1
1014 EOF
1015  
1016 else
1017   echo "$ac_t""no" 1>&6
1018 fi
1019 done
1020
1021 for ac_hdr in fcntl.h sys/file.h
1022 do
1023 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1025 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1026   echo $ac_n "(cached) $ac_c" 1>&6
1027 else
1028   cat > conftest.$ac_ext <<EOF
1029 #line 1030 "configure"
1030 #include "confdefs.h"
1031 #include <$ac_hdr>
1032 EOF
1033 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1034 ac_err=`grep -v '^ *+' conftest.out`
1035 if test -z "$ac_err"; then
1036   rm -rf conftest*
1037   eval "ac_cv_header_$ac_safe=yes"
1038 else
1039   echo "$ac_err" >&5
1040   rm -rf conftest*
1041   eval "ac_cv_header_$ac_safe=no"
1042 fi
1043 rm -f conftest*
1044 fi
1045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1046   echo "$ac_t""yes" 1>&6
1047     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1048   cat >> confdefs.h <<EOF
1049 #define $ac_tr_hdr 1
1050 EOF
1051  
1052 else
1053   echo "$ac_t""no" 1>&6
1054 fi
1055 done
1056
1057 for ac_func in fcntl getpagesize
1058 do
1059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   cat > conftest.$ac_ext <<EOF
1064 #line 1065 "configure"
1065 #include "confdefs.h"
1066 /* System header to define __stub macros and hopefully few prototypes,
1067     which can conflict with char $ac_func(); below.  */
1068 #include <assert.h>
1069 /* Override any gcc2 internal prototype to avoid an error.  */
1070 char $ac_func();
1071
1072 int main() { return 0; }
1073 int t() {
1074
1075 /* The GNU C library defines this for functions which it implements
1076     to always fail with ENOSYS.  Some functions are actually named
1077     something starting with __ and the normal name is an alias.  */
1078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1079 choke me
1080 #else
1081 $ac_func();
1082 #endif
1083
1084 ; return 0; }
1085 EOF
1086 if eval $ac_link; then
1087   rm -rf conftest*
1088   eval "ac_cv_func_$ac_func=yes"
1089 else
1090   rm -rf conftest*
1091   eval "ac_cv_func_$ac_func=no"
1092 fi
1093 rm -f conftest*
1094
1095 fi
1096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1097   echo "$ac_t""yes" 1>&6
1098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1099   cat >> confdefs.h <<EOF
1100 #define $ac_tr_func 1
1101 EOF
1102  
1103 else
1104   echo "$ac_t""no" 1>&6
1105 fi
1106 done
1107
1108
1109
1110 case "${host}" in
1111 i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32)
1112   cat >> confdefs.h <<\EOF
1113 #define USE_BINARY_FOPEN 1
1114 EOF
1115  ;;
1116 esac
1117
1118 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
1119 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   cat > conftest.$ac_ext <<EOF
1123 #line 1124 "configure"
1124 #include "confdefs.h"
1125
1126 #include <stdio.h>
1127 #ifdef HAVE_STDLIB_H
1128 #include <stdlib.h>
1129 #endif
1130 #ifdef HAVE_UNISTD_H
1131 #include <unistd.h>
1132 #endif
1133 int main() { return 0; }
1134 int t() {
1135 char *(*pfn) = (char *(*)) malloc
1136 ; return 0; }
1137 EOF
1138 if eval $ac_compile; then
1139   rm -rf conftest*
1140   bfd_cv_decl_needed_malloc=no
1141 else
1142   rm -rf conftest*
1143   bfd_cv_decl_needed_malloc=yes
1144 fi
1145 rm -f conftest*
1146
1147 fi
1148
1149 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
1150 if test $bfd_cv_decl_needed_malloc = yes; then
1151   bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1152   cat >> confdefs.h <<EOF
1153 #define $bfd_tr_decl 1
1154 EOF
1155
1156 fi
1157
1158 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
1159 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   cat > conftest.$ac_ext <<EOF
1163 #line 1164 "configure"
1164 #include "confdefs.h"
1165
1166 #include <stdio.h>
1167 #ifdef HAVE_STDLIB_H
1168 #include <stdlib.h>
1169 #endif
1170 #ifdef HAVE_UNISTD_H
1171 #include <unistd.h>
1172 #endif
1173 int main() { return 0; }
1174 int t() {
1175 char *(*pfn) = (char *(*)) free
1176 ; return 0; }
1177 EOF
1178 if eval $ac_compile; then
1179   rm -rf conftest*
1180   bfd_cv_decl_needed_free=no
1181 else
1182   rm -rf conftest*
1183   bfd_cv_decl_needed_free=yes
1184 fi
1185 rm -f conftest*
1186
1187 fi
1188
1189 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
1190 if test $bfd_cv_decl_needed_free = yes; then
1191   bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1192   cat >> confdefs.h <<EOF
1193 #define $bfd_tr_decl 1
1194 EOF
1195
1196 fi
1197
1198
1199 # If we are configured native, pick a core file support file.
1200 COREFILE=
1201 COREFLAG=
1202 if test "${target}" = "${host}"; then
1203   case "${host}" in
1204   alpha*-*-linux*)
1205         COREFILE=trad-core.o
1206         cat >> confdefs.h <<\EOF
1207 #define TRAD_HEADER "hosts/alphalinux.h"
1208 EOF
1209
1210         ;;
1211   alpha*-*-*)           COREFILE=osf-core.o ;;
1212   arm-*-riscix)         COREFILE=trad-core.o ;;
1213   hppa*-*-hpux*)        COREFILE=hpux-core.o ;;
1214   hppa*-*-hiux*)        COREFILE=hpux-core.o ;;
1215   hppa*-*-bsd*)         COREFILE="hpux-core.o hppabsd-core.o"
1216                         COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
1217   i[345]86-sequent-bsd*)
1218         COREFILE=trad-core.o;
1219         cat >> confdefs.h <<\EOF
1220 #define TRAD_HEADER "hosts/symmetry.h"
1221 EOF
1222
1223         ;;
1224   i[345]86-sequent-sysv4*) ;;
1225   i[345]86-sequent-sysv*)
1226         COREFILE=trad-core.o
1227         cat >> confdefs.h <<\EOF
1228 #define TRAD_HEADER "hosts/symmetry.h"
1229 EOF
1230
1231         ;;
1232   i[345]86-*-bsd* | i[345]86-*-freebsd*)
1233         COREFILE=trad-core.o
1234         cat >> confdefs.h <<\EOF
1235 #define TRAD_HEADER "hosts/i386bsd.h"
1236 EOF
1237
1238         ;;
1239   i[345]86-*-netbsd*)
1240         COREFILE=trad-core.o
1241         cat >> confdefs.h <<\EOF
1242 #define TRAD_HEADER "hosts/i386nbsd.h"
1243 EOF
1244
1245         ;;
1246   i[345]86-esix-sysv3*)
1247         COREFILE=trad-core.o
1248         cat >> confdefs.h <<\EOF
1249 #define TRAD_HEADER "hosts/esix.h"
1250 EOF
1251
1252         ;;
1253   i[345]86-*-sco* | i[345]86-*-isc*)
1254         COREFILE=trad-core.o
1255         cat >> confdefs.h <<\EOF
1256 #define TRAD_HEADER "hosts/i386sco.h"
1257 EOF
1258
1259         ;;
1260   i[345]86-*-mach3*)
1261         COREFILE=trad-core.o
1262         cat >> confdefs.h <<\EOF
1263 #define TRAD_HEADER "hosts/i386mach3.h"
1264 EOF
1265
1266         ;;
1267   i[345]86-*-linux*)
1268         COREFILE=trad-core.o
1269         cat >> confdefs.h <<\EOF
1270 #define TRAD_HEADER "hosts/i386linux.h"
1271 EOF
1272
1273         ;;
1274   i[345]86-*-isc*)      COREFILE=trad-core.o ;;
1275   i[345]86-*-aix*)      COREFILE=aix386-core.o ;;
1276   i860-*-mach3* | i860-*-osf1*)
1277         COREFILE=trad-core.o
1278         cat >> confdefs.h <<\EOF
1279 #define TRAD_HEADER "hosts/i860mach3.h"
1280 EOF
1281
1282         ;;
1283   mips-dec-bsd*)
1284         COREFILE=trad-core.o
1285         cat >> confdefs.h <<\EOF
1286 #define TRAD_HEADER "hosts/mipsbsd.h"
1287 EOF
1288
1289         ;;
1290   mips-dec-mach3*)
1291         COREFILE=trad-core.o
1292         cat >> confdefs.h <<\EOF
1293 #define TRAD_HEADER "hosts/mipsmach3.h"
1294 EOF
1295
1296         ;;
1297   mips-*-netbsd*)
1298         COREFILE=trad-core.o
1299         cat >> confdefs.h <<\EOF
1300 #define TRAD_HEADER "hosts/mipsnbsd.h"
1301 EOF
1302
1303         ;;
1304   mips-dec-*)
1305         COREFILE=trad-core.o
1306         cat >> confdefs.h <<\EOF
1307 #define TRAD_HEADER "hosts/decstation.h"
1308 EOF
1309
1310         ;;
1311   mips-sgi-irix4*)      COREFILE=irix-core.o ;;
1312   mips-sgi-irix5*)      COREFILE=irix-core.o ;;
1313   mips-*-mach3*)
1314         COREFILE=trad-core.o
1315         cat >> confdefs.h <<\EOF
1316 #define TRAD_HEADER "hosts/mipsmach3.h"
1317 EOF
1318
1319         ;;
1320   mips-*-sysv4*)        ;;
1321   mips-*-sysv* | mips-*-riscos*)
1322         COREFILE=trad-core.o
1323         cat >> confdefs.h <<\EOF
1324 #define TRAD_HEADER "hosts/riscos.h"
1325 EOF
1326
1327         ;;
1328   mips-sony-bsd*)
1329         COREFILE=trad-core.o
1330         cat >> confdefs.h <<\EOF
1331 #define TRAD_HEADER "hosts/news-mips".h
1332 EOF
1333
1334         ;;
1335   m68*-bull*-sysv*)
1336         COREFILE=trad-core.o
1337         cat >> confdefs.h <<\EOF
1338 #define TRAD_HEADER "hosts/dpx2.h"
1339 EOF
1340
1341         ;;
1342   m68*-hp-hpux*)        COREFILE=hpux-core.o ;;
1343   m68*-hp-bsd*)
1344         COREFILE=trad-core.o
1345         cat >> confdefs.h <<\EOF
1346 #define TRAD_HEADER "hosts/hp300bsd.h"
1347 EOF
1348
1349         ;;
1350   m68*-motorola-sysv*)
1351         COREFILE=trad-core.o
1352         cat >> confdefs.h <<\EOF
1353 #define TRAD_HEADER "hosts/delta68.h"
1354 EOF
1355
1356         ;;
1357   m68*-sony-*)
1358         COREFILE=trad-core.o
1359         cat >> confdefs.h <<\EOF
1360 #define TRAD_HEADER "hosts/news.h"
1361 EOF
1362
1363         ;;
1364   m68*-*-netbsd*)
1365         COREFILE=trad-core.o
1366         cat >> confdefs.h <<\EOF
1367 #define TRAD_HEADER "hosts/m68knbsd.h"
1368 EOF
1369
1370         ;;
1371   m68*-apple-aux*)
1372         COREFILE=trad-core.o
1373         cat >> confdefs.h <<\EOF
1374 #define TRAD_HEADER "hosts/m68kaux.h"
1375 EOF
1376
1377         ;;
1378   m88*-*-sysv4*)        ;;
1379   m88*-motorola-sysv*)  COREFILE=ptrace-core.o ;;
1380   m88*-*-mach3*)
1381         COREFILE=trad-core.o
1382         cat >> confdefs.h <<\EOF
1383 #define TRAD_HEADER "hosts/m88kmach3.h"
1384 EOF
1385
1386         ;;
1387   ns32k-pc532-mach)
1388         COREFILE=trad-core.o
1389         cat >> confdefs.h <<\EOF
1390 #define TRAD_HEADER "hosts/pc532mach.h"
1391 EOF
1392
1393         ;;
1394   ns32k-*-netbsd*)
1395         COREFILE=trad-core.o
1396         cat >> confdefs.h <<\EOF
1397 #define TRAD_HEADER "hosts/ns32knbsd.h"
1398 EOF
1399
1400         ;;
1401   rs6000-*-lynx*)       COREFILE=lynx-core.o ;;
1402   rs6000-*-aix4*)       COREFILE=rs6000-core.o ;;
1403   rs6000-*-*)           COREFILE=rs6000-core.o ;;
1404   powerpc-*-aix4*)      COREFILE=rs6000-core.o ;;
1405   powerpc-*-aix*)       COREFILE=rs6000-core.o ;;
1406   sparc-*-netbsd*)
1407         COREFILE=trad-core.o
1408         cat >> confdefs.h <<\EOF
1409 #define TRAD_HEADER "hosts/sparcnbsd.h"
1410 EOF
1411
1412         ;;
1413   tahoe-*-*)
1414         COREFILE=trad-core.o
1415         cat >> confdefs.h <<\EOF
1416 #define TRAD_HEADER "hosts/tahoe.h"
1417 EOF
1418
1419         ;;
1420   vax-*-ultrix2*)
1421         COREFILE=trad-core.o
1422         cat >> confdefs.h <<\EOF
1423 #define TRAD_HEADER "hosts/vaxult2.h"
1424 EOF
1425
1426         ;;
1427   vax-*-ultrix*)
1428         COREFILE=trad-core.o
1429         cat >> confdefs.h <<\EOF
1430 #define TRAD_HEADER "hosts/vaxult2.h"
1431 EOF
1432
1433         ;;
1434   vax-*-*)
1435         COREFILE=trad-core.o
1436         cat >> confdefs.h <<\EOF
1437 #define TRAD_HEADER "hosts/vaxbsd.h"
1438 EOF
1439
1440         ;;
1441   esac
1442
1443   case "$COREFILE" in
1444   aix386-core.o)        COREFLAG=-DAIX386_CORE ;;
1445   hppabsd-core.o)       COREFLAG=-DHPPABSD_CORE ;;
1446   hpux-core.o)          COREFLAG=-DHPUX_CORE ;;
1447   irix-core.o)          COREFLAG=-DIRIX_CORE ;;
1448   lynx-core.o)          COREFLAG=-DLYNX_CORE ;;
1449   osf-core.o)           COREFLAG=-DOSF_CORE ;;
1450   ptrace-core.o)        COREFLAG=-DPTRACE_CORE ;;
1451   rs6000-core.o)        COREFLAG="$COREFLAG -DAIX_CORE" ;;
1452   trad-core.o)          COREFLAG="$COREFLAG -DTRAD_CORE" ;;
1453   esac
1454
1455   # The ELF code uses the native <sys/procfs.h> to handle core files.
1456   # Define HAVE_SYS_PROCFS_H if the file exists and defines
1457   # prstatus_t.
1458   echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
1459   if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
1460   echo $ac_n "(cached) $ac_c" 1>&6
1461 else
1462   cat > conftest.$ac_ext <<EOF
1463 #line 1464 "configure"
1464 #include "confdefs.h"
1465 #include <sys/procfs.h>
1466 int main() { return 0; }
1467 int t() {
1468 prstatus_t t;
1469 ; return 0; }
1470 EOF
1471 if eval $ac_compile; then
1472   rm -rf conftest*
1473   bfd_cv_header_sys_procfs_h=yes
1474 else
1475   rm -rf conftest*
1476   bfd_cv_header_sys_procfs_h=no
1477 fi
1478 rm -f conftest*
1479
1480 fi
1481
1482   echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
1483   if test $bfd_cv_header_sys_procfs_h = yes; then
1484     cat >> confdefs.h <<\EOF
1485 #define HAVE_SYS_PROCFS_H 1
1486 EOF
1487
1488   fi
1489
1490 fi
1491
1492
1493
1494 # target stuff:
1495
1496 # Canonicalize the secondary target names.
1497 if test -n "$enable_targets" ; then
1498     for targ in `echo $enable_targets | sed 's/,/ /g'`
1499     do
1500         result=`$ac_config_sub $targ 2>/dev/null`
1501         if test -n "$result" ; then
1502             canon_targets="$canon_targets $result"
1503         else
1504             # Allow targets that config.sub doesn't recognize, like "all".
1505             canon_targets="$canon_targets $targ"
1506         fi
1507     done
1508 fi
1509
1510 all_targets=false
1511 defvec=
1512 selvecs=
1513 selarchs=
1514 TDEFINES=
1515 for targ in $target $canon_targets
1516 do
1517     if test "x$targ" = "xall"; then
1518         all_targets=true
1519     else
1520         . $srcdir/config.bfd
1521         if test "x$targ" = "x$target"; then
1522             defvec=$targ_defvec
1523         fi
1524         selvecs="$selvecs $targ_defvec $targ_selvecs"
1525         selarchs="$selarchs $targ_archs"
1526         TDEFINES="$TDEFINES $targ_cflags"
1527     fi
1528 done
1529
1530
1531 # This processing still needs to be done if we're to decide properly whether
1532 # 64-bit support needs to be compiled in.  Currently, it will be included if
1533 # the default or any other explicitly requested target requires it; it
1534 # will not be included on a 32-bit host if no 64-bit target is requested, and
1535 # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
1536 # used.
1537
1538 # uniq the default and selected vectors in all the configured targets.
1539 f=""
1540 for i in $selvecs ; do
1541     case " $f " in
1542     *" $i "*) ;;
1543     *) f="$f $i" ;;
1544     esac
1545 done
1546 selvecs="$f"
1547
1548 # uniq the architectures in all the configured targets.
1549 f=""
1550 for i in $selarchs ; do
1551     case " $f " in
1552     *" $i "*) ;;
1553     *) f="$f $i" ;;
1554     esac
1555 done
1556 selarchs="$f"
1557
1558 # Target backend .o files.
1559 tb=
1560
1561 elf="elf.o elflink.o"
1562
1563 for vec in $selvecs
1564 do
1565     case "$vec" in
1566     # This list is alphabetized to make it easy to compare
1567     # with the two vector lists in targets.c.
1568     a29kcoff_big_vec)           tb="$tb coff-a29k.o cofflink.o" ;;
1569     a_out_adobe_vec)            tb="$tb aout-adobe.o aout32.o stab-syms.o" ;;
1570     armcoff_little_vec)         tb="$tb coff-arm.o cofflink.o " ;;
1571     armcoff_big_vec)            tb="$tb coff-arm.o cofflink.o " ;;
1572     armpe_little_vec)           tb="$tb pe-arm.o cofflink.o " ;;
1573     armpe_big_vec)              tb="$tb pe-arm.o cofflink.o " ;;
1574     armpei_little_vec)          tb="$tb pei-arm.o cofflink.o " ;;
1575     armpei_big_vec)             tb="$tb pei-arm.o cofflink.o " ;;
1576     aout0_big_vec)              tb="$tb aout0.o aout32.o stab-syms.o" ;;
1577     aout_arm_big_vec)           tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
1578     aout_arm_little_vec)        tb="$tb aout-arm.o aout32.o stab-syms.o" ;;
1579     aout_mips_big_vec)          tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
1580     aout_mips_little_vec)       tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
1581     apollocoff_vec)             tb="$tb coff-apollo.o" ;;
1582     b_out_vec_big_host)         tb="$tb bout.o aout32.o stab-syms.o" ;;
1583     b_out_vec_little_host)      tb="$tb bout.o aout32.o stab-syms.o" ;;
1584 # start-sanitize-arc
1585     bfd_elf32_littlearc_vec)    tb="$tb elf32-arc.o elf32.o $elf" ;;
1586     bfd_elf32_bigarc_vec)       tb="$tb elf32-arc.o elf32.o $elf" ;;
1587 # end-sanitize-arc
1588     bfd_elf32_big_generic_vec)  tb="$tb elf32-gen.o elf32.o $elf" ;;
1589     bfd_elf32_bigmips_vec)      tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
1590     bfd_elf32_hppa_vec)         tb="$tb elf32-hppa.o elf32.o $elf" ;;
1591     bfd_elf32_i386_vec)         tb="$tb elf32-i386.o elf32.o $elf" ;;
1592     bfd_elf32_i860_vec)         tb="$tb elf32-i860.o elf32.o $elf" ;;
1593     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
1594     bfd_elf32_littlemips_vec)   tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
1595     bfd_elf32_m68k_vec)         tb="$tb elf32-m68k.o elf32.o $elf" ;;
1596     bfd_elf32_m88k_vec)         tb="$tb elf32-m88k.o elf32.o $elf" ;;
1597     bfd_elf32_powerpc_vec)      tb="$tb elf32-ppc.o elf32.o $elf" ;;
1598     bfd_elf32_powerpcle_vec)    tb="$tb elf32-ppc.o elf32.o $elf" ;;
1599     bfd_elf32_sparc_vec)        tb="$tb elf32-sparc.o elf32.o $elf" ;;
1600     bfd_elf64_big_generic_vec)  tb="$tb elf64-gen.o elf64.o $elf"
1601                                 target64=true ;;
1602     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
1603                                 target64=true ;;
1604     bfd_elf64_sparc_vec)        tb="$tb elf64-sparc.o elf64.o $elf"
1605                                 target64=true ;;
1606     cisco_core_vec)             tb="$tb cisco-core.o" ;;
1607     demo_64_vec)                tb="$tb demo64.o aout64.o stab-syms.o"
1608                                 target64=true ;;
1609     ecoff_big_vec)              tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
1610     ecoff_little_vec)           tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
1611     ecoffalpha_little_vec)      tb="$tb coff-alpha.o ecoff.o ecofflink.o"
1612                                 target64=true ;;
1613     h8300coff_vec)              tb="$tb coff-h8300.o reloc16.o" ;;
1614     h8500coff_vec)              tb="$tb coff-h8500.o reloc16.o" ;;
1615     host_aout_vec)              tb="$tb host-aout.o aout32.o stab-syms.o" ;;
1616     hp300bsd_vec)               tb="$tb hp300bsd.o aout32.o stab-syms.o" ;;
1617     hp300hpux_vec)              tb="$tb hp300hpux.o aout32.o stab-syms.o" ;;
1618     i386aout_vec)               tb="$tb i386aout.o aout32.o stab-syms.o" ;;
1619     i386bsd_vec)                tb="$tb i386bsd.o aout32.o stab-syms.o" ;;
1620     i386coff_vec)               tb="$tb coff-i386.o cofflink.o" ;;
1621     i386dynix_vec)              tb="$tb i386dynix.o aout32.o stab-syms.o" ;;
1622     i386freebsd_vec)            tb="$tb i386freebsd.o aout32.o stab-syms.o" ;;
1623     i386msdos_vec)              tb="$tb i386msdos.o" ;;
1624     i386pe_vec)                 tb="$tb pe-i386.o cofflink.o " ;;
1625     i386pei_vec)                tb="$tb pei-i386.o cofflink.o" ;;
1626     i386linux_vec)              tb="$tb i386linux.o aout32.o stab-syms.o" ;;
1627     i386lynx_aout_vec)          tb="$tb i386lynx.o lynx-core.o aout32.o stab-syms.o" ;;
1628     i386lynx_coff_vec)          tb="$tb cf-i386lynx.o cofflink.o lynx-core.o stab-syms.o" ;;
1629     i386mach3_vec)              tb="$tb i386mach3.o aout32.o stab-syms.o" ;;
1630     i386netbsd_vec)             tb="$tb i386netbsd.o aout32.o stab-syms.o" ;;
1631     i386os9k_vec)               tb="$tb i386os9k.o aout32.o stab-syms.o" ;;
1632     i860coff_vec)               tb="$tb coff-i860.o cofflink.o" ;;
1633     icoff_big_vec)              tb="$tb coff-i960.o cofflink.o" ;;
1634     icoff_little_vec)           tb="$tb coff-i960.o cofflink.o" ;;
1635     ieee_vec)                   tb="$tb ieee.o" ;;
1636     m68kcoff_vec)               tb="$tb coff-m68k.o cofflink.o" ;;
1637     m68kcoffun_vec)             tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
1638     m68klynx_aout_vec)          tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;;
1639     m68klynx_coff_vec)          tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;;
1640     m68knetbsd_vec)             tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;;
1641     m68k4knetbsd_vec)           tb="$tb m68k4knetbsd.o aout32.o stab-syms.o" ;;
1642     m68kaux_coff_vec)           tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
1643     m88kbcs_vec)                tb="$tb coff-m88k.o" ;;
1644     newsos3_vec)                tb="$tb newsos3.o aout32.o stab-syms.o" ;;
1645     nlm32_i386_vec)             tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
1646     nlm32_sparc_vec)            tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
1647     nlm32_alpha_vec)            tb="$tb nlm32-alpha.o nlm32.o nlm.o"
1648                                 target64=true ;;
1649     riscix_vec)                 tb="$tb aout32.o riscix.o stab-syms.o" ;;
1650     nlm32_powerpc_vec)          tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
1651     pc532netbsd_vec)            tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;;
1652     pc532machaout_vec)          tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;;
1653     pmac_xcoff_vec)             tb="$tb coff-pmac.o xcofflink.o" ;;
1654     rs6000coff_vec)             tb="$tb coff-rs6000.o xcofflink.o" ;;
1655     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.o cofflink.o" ;;  
1656     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.o cofflink.o" ;;  
1657     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.o cofflink.o" ;;
1658     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.o cofflink.o" ;;
1659     shcoff_vec)                 tb="$tb coff-sh.o cofflink.o" ;;
1660 # start-sanitize-rce
1661     rce_aout_vec)               tb="$tb aout-rce.o aout32.o stab-syms.o" ;;
1662 # end-sanitize-rce
1663     shlcoff_vec)                tb="$tb coff-sh.o cofflink.o" ;;
1664     som_vec)                    tb="$tb som.o" ;;
1665     sparclynx_aout_vec)         tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;;
1666     sparclynx_coff_vec)         tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;;
1667     sparcnetbsd_vec)            tb="$tb sparcnetbsd.o aout32.o stab-syms.o" ;;
1668     sparccoff_vec)              tb="$tb coff-sparc.o" ;;
1669     srec_vec)                   tb="$tb srec.o" ;;
1670     sunos_big_vec)              tb="$tb sunos.o aout32.o stab-syms.o" ;;
1671     symbolsrec_vec)             tb="$tb srec.o" ;;
1672     tekhex_vec)                 tb="$tb tekhex.o" ;;
1673     we32kcoff_vec)              tb="$tb coff-we32k.o" ;;
1674     z8kcoff_vec)                tb="$tb coff-z8k.o reloc16.o" ;;
1675     w65_vec)                    tb="$tb coff-w65.o reloc16.o" ;;
1676     versados_vec)               tb="$tb versados.o" ;;
1677
1678     "")                 ;;
1679     *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
1680     esac
1681 done
1682
1683 # Target architecture .o files.
1684 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
1685
1686 # Weed out duplicate .o files.
1687 f=""
1688 for i in $tb ; do
1689     case " $f " in
1690     *" $i "*) ;;
1691     *) f="$f $i" ;;
1692     esac
1693 done
1694 tb="$f"
1695
1696 f=""
1697 for i in $ta ; do
1698     case " $f " in
1699     *" $i "*) ;;
1700     *) f="$f $i" ;;
1701     esac
1702 done
1703 ta="$f"
1704
1705 bfd_backends="$tb"
1706 bfd_machines="$ta"
1707
1708 if test x${all_targets} = xtrue ; then
1709   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
1710   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
1711   selvecs=
1712   selarchs=
1713 else    # all_targets is true
1714   # Only set these if they will be nonempty, for the clever echo.
1715   test -n "$selvecs" &&
1716     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
1717   test -n "$selarchs" &&
1718     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
1719 fi      # all_targets is true
1720
1721 case ${host64}-${target64}-${want64} in
1722   *true*)
1723     wordsize=64
1724     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
1725     ;;
1726   false-false-false)
1727     wordsize=32
1728     all_backends='$(BFD32_BACKENDS)'
1729     ;;
1730 esac
1731
1732
1733
1734
1735
1736
1737 tdefaults=""
1738 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
1739 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
1740 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
1741
1742
1743 for ac_func in valloc getpagesize
1744 do
1745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1746 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1747   echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749   cat > conftest.$ac_ext <<EOF
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752 /* System header to define __stub macros and hopefully few prototypes,
1753     which can conflict with char $ac_func(); below.  */
1754 #include <assert.h>
1755 /* Override any gcc2 internal prototype to avoid an error.  */
1756 char $ac_func();
1757
1758 int main() { return 0; }
1759 int t() {
1760
1761 /* The GNU C library defines this for functions which it implements
1762     to always fail with ENOSYS.  Some functions are actually named
1763     something starting with __ and the normal name is an alias.  */
1764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1765 choke me
1766 #else
1767 $ac_func();
1768 #endif
1769
1770 ; return 0; }
1771 EOF
1772 if eval $ac_link; then
1773   rm -rf conftest*
1774   eval "ac_cv_func_$ac_func=yes"
1775 else
1776   rm -rf conftest*
1777   eval "ac_cv_func_$ac_func=no"
1778 fi
1779 rm -f conftest*
1780
1781 fi
1782 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1783   echo "$ac_t""yes" 1>&6
1784     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1785   cat >> confdefs.h <<EOF
1786 #define $ac_tr_func 1
1787 EOF
1788  
1789 else
1790   echo "$ac_t""no" 1>&6
1791 fi
1792 done
1793
1794 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1795 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1796   echo $ac_n "(cached) $ac_c" 1>&6
1797 else
1798   if test "$cross_compiling" = yes; then
1799   ac_cv_func_mmap=no
1800 else
1801 cat > conftest.$ac_ext <<EOF
1802 #line 1803 "configure"
1803 #include "confdefs.h"
1804
1805 /* Thanks to Mike Haertel and Jim Avera for this test. */
1806 #include <sys/types.h>
1807 #include <fcntl.h>
1808 #include <sys/mman.h>
1809
1810 #ifndef HAVE_GETPAGESIZE
1811 # include <sys/param.h>
1812 # ifdef EXEC_PAGESIZE
1813 #  define getpagesize() EXEC_PAGESIZE
1814 # else
1815 #  ifdef NBPG
1816 #   define getpagesize() NBPG * CLSIZE
1817 #   ifndef CLSIZE
1818 #    define CLSIZE 1
1819 #   endif
1820 #  else
1821 #   ifdef NBPC
1822 #    define getpagesize() NBPC
1823 #   else
1824 #    define getpagesize() PAGESIZE /* SVR4 */
1825 #   endif
1826 #  endif
1827 # endif
1828 #endif
1829
1830 #ifndef HAVE_VALLOC
1831 # define valloc malloc
1832 #endif
1833
1834 #ifdef __cplusplus
1835 extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1836 #else
1837 char *valloc(), *malloc();
1838 #endif
1839
1840 int
1841 main()
1842 {
1843   char *buf1, *buf2, *buf3;
1844   int i = getpagesize(), j;
1845   int i2 = i * 2;
1846   int fd;
1847
1848   buf1 = (char *)valloc(i2);
1849   buf2 = (char *)valloc(i);
1850   buf3 = (char *)malloc(i2);
1851   for (j = 0; j < i2; ++j)
1852     *(buf1 + j) = rand();
1853   fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1854   write(fd, buf1, i2);
1855   mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1856   for (j = 0; j < i; ++j)
1857     if (*(buf1 + j) != *(buf2 + j))
1858       exit(1);
1859   lseek(fd, (long)i, 0);
1860   read(fd, buf2, i); /* read into mapped memory -- file should not change */
1861   /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1862   lseek(fd, (long)0, 0);
1863   read(fd, buf3, i2);
1864   for (j = 0; j < i2; ++j)
1865     if (*(buf1 + j) != *(buf3 + j))
1866       exit(1);
1867   exit(0);
1868 }
1869
1870 EOF
1871 eval $ac_link
1872 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1873   ac_cv_func_mmap=yes
1874 else
1875   ac_cv_func_mmap=no
1876 fi
1877 fi
1878 rm -fr conftest*
1879 fi
1880
1881 echo "$ac_t""$ac_cv_func_mmap" 1>&6
1882 if test $ac_cv_func_mmap = yes; then
1883   cat >> confdefs.h <<\EOF
1884 #define HAVE_MMAP 1
1885 EOF
1886
1887 fi
1888
1889 for ac_func in madvise mprotect
1890 do
1891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1892 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1893   echo $ac_n "(cached) $ac_c" 1>&6
1894 else
1895   cat > conftest.$ac_ext <<EOF
1896 #line 1897 "configure"
1897 #include "confdefs.h"
1898 /* System header to define __stub macros and hopefully few prototypes,
1899     which can conflict with char $ac_func(); below.  */
1900 #include <assert.h>
1901 /* Override any gcc2 internal prototype to avoid an error.  */
1902 char $ac_func();
1903
1904 int main() { return 0; }
1905 int t() {
1906
1907 /* The GNU C library defines this for functions which it implements
1908     to always fail with ENOSYS.  Some functions are actually named
1909     something starting with __ and the normal name is an alias.  */
1910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1911 choke me
1912 #else
1913 $ac_func();
1914 #endif
1915
1916 ; return 0; }
1917 EOF
1918 if eval $ac_link; then
1919   rm -rf conftest*
1920   eval "ac_cv_func_$ac_func=yes"
1921 else
1922   rm -rf conftest*
1923   eval "ac_cv_func_$ac_func=no"
1924 fi
1925 rm -f conftest*
1926
1927 fi
1928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1929   echo "$ac_t""yes" 1>&6
1930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1931   cat >> confdefs.h <<EOF
1932 #define $ac_tr_func 1
1933 EOF
1934  
1935 else
1936   echo "$ac_t""no" 1>&6
1937 fi
1938 done
1939
1940 case ${want_mmap}+${ac_cv_func_mmap} in
1941   true+yes )  cat >> confdefs.h <<\EOF
1942 #define USE_MMAP 1
1943 EOF
1944  ;;
1945 esac
1946
1947 rm -f doc/config.status
1948 trap '' 1 2 15
1949 cat > confcache <<\EOF
1950 # This file is a shell script that caches the results of configure
1951 # tests run on this system so they can be shared between configure
1952 # scripts and configure runs.  It is not useful on other systems.
1953 # If it contains results you don't want to keep, you may remove or edit it.
1954 #
1955 # By default, configure uses ./config.cache as the cache file,
1956 # creating it if it does not exist already.  You can give configure
1957 # the --cache-file=FILE option to use a different cache file; that is
1958 # what configure does when it calls configure scripts in
1959 # subdirectories, so they share the cache.
1960 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1961 # config.status only pays attention to the cache file if you give it the
1962 # --recheck option to rerun configure.
1963 #
1964 EOF
1965 # Ultrix sh set writes to stderr and can't be redirected directly,
1966 # and sets the high bit in the cache file unless we assign to the vars.
1967 (set) 2>&1 |
1968   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1969   >> confcache
1970 if cmp -s $cache_file confcache; then
1971   :
1972 else
1973   if test -w $cache_file; then
1974     echo "updating cache $cache_file"
1975     cat confcache > $cache_file
1976   else
1977     echo "not updating unwritable cache $cache_file"
1978   fi
1979 fi
1980 rm -f confcache
1981
1982 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1983
1984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1985 # Let make expand exec_prefix.
1986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1987
1988 # Any assignment to VPATH causes Sun make to only execute
1989 # the first set of double-colon rules, so remove it if not needed.
1990 # If there is a colon in the path, we need to keep it.
1991 if test "x$srcdir" = x.; then
1992   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1993 fi
1994
1995 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1996
1997 DEFS=-DHAVE_CONFIG_H
1998
1999 # Without the "./", some shells look in PATH for config.status.
2000 : ${CONFIG_STATUS=./config.status}
2001
2002 echo creating $CONFIG_STATUS
2003 rm -f $CONFIG_STATUS
2004 cat > $CONFIG_STATUS <<EOF
2005 #! /bin/sh
2006 # Generated automatically by configure.
2007 # Run this file to recreate the current configuration.
2008 # This directory was configured as follows,
2009 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2010 #
2011 # $0 $ac_configure_args
2012 #
2013 # Compiler output produced by configure, useful for debugging
2014 # configure, is in ./config.log if it exists.
2015
2016 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2017 for ac_option
2018 do
2019   case "\$ac_option" in
2020   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2021     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2022     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2023   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2024     echo "$CONFIG_STATUS generated by autoconf version 2.7"
2025     exit 0 ;;
2026   -help | --help | --hel | --he | --h)
2027     echo "\$ac_cs_usage"; exit 0 ;;
2028   *) echo "\$ac_cs_usage"; exit 1 ;;
2029   esac
2030 done
2031
2032 ac_given_srcdir=$srcdir
2033 ac_given_INSTALL="$INSTALL"
2034
2035 trap 'rm -fr `echo "Makefile doc/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2036 EOF
2037 cat >> $CONFIG_STATUS <<EOF
2038
2039 # Protect against being on the right side of a sed subst in config.status.
2040 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2041  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2042 $ac_vpsub
2043 $extrasub
2044 s%@CFLAGS@%$CFLAGS%g
2045 s%@CPPFLAGS@%$CPPFLAGS%g
2046 s%@CXXFLAGS@%$CXXFLAGS%g
2047 s%@DEFS@%$DEFS%g
2048 s%@LDFLAGS@%$LDFLAGS%g
2049 s%@LIBS@%$LIBS%g
2050 s%@exec_prefix@%$exec_prefix%g
2051 s%@prefix@%$prefix%g
2052 s%@program_transform_name@%$program_transform_name%g
2053 s%@bindir@%$bindir%g
2054 s%@sbindir@%$sbindir%g
2055 s%@libexecdir@%$libexecdir%g
2056 s%@datadir@%$datadir%g
2057 s%@sysconfdir@%$sysconfdir%g
2058 s%@sharedstatedir@%$sharedstatedir%g
2059 s%@localstatedir@%$localstatedir%g
2060 s%@libdir@%$libdir%g
2061 s%@includedir@%$includedir%g
2062 s%@oldincludedir@%$oldincludedir%g
2063 s%@infodir@%$infodir%g
2064 s%@mandir@%$mandir%g
2065 s%@host@%$host%g
2066 s%@host_alias@%$host_alias%g
2067 s%@host_cpu@%$host_cpu%g
2068 s%@host_vendor@%$host_vendor%g
2069 s%@host_os@%$host_os%g
2070 s%@target@%$target%g
2071 s%@target_alias@%$target_alias%g
2072 s%@target_cpu@%$target_cpu%g
2073 s%@target_vendor@%$target_vendor%g
2074 s%@target_os@%$target_os%g
2075 s%@build@%$build%g
2076 s%@build_alias@%$build_alias%g
2077 s%@build_cpu@%$build_cpu%g
2078 s%@build_vendor@%$build_vendor%g
2079 s%@build_os@%$build_os%g
2080 s%@CC@%$CC%g
2081 s%@HDEFINES@%$HDEFINES%g
2082 s%@AR@%$AR%g
2083 s%@RANLIB@%$RANLIB%g
2084 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2085 s%@INSTALL_DATA@%$INSTALL_DATA%g
2086 s%@HOST_64BIT_LONG@%$HOST_64BIT_LONG%g
2087 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2088 s%@CPP@%$CPP%g
2089 s%@COREFILE@%$COREFILE%g
2090 s%@COREFLAG@%$COREFLAG%g
2091 s%@TDEFINES@%$TDEFINES%g
2092 s%@wordsize@%$wordsize%g
2093 s%@all_backends@%$all_backends%g
2094 s%@bfd_backends@%$bfd_backends%g
2095 s%@bfd_machines@%$bfd_machines%g
2096 s%@tdefaults@%$tdefaults%g
2097
2098 CEOF
2099 EOF
2100 cat >> $CONFIG_STATUS <<EOF
2101
2102 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
2103 EOF
2104 cat >> $CONFIG_STATUS <<\EOF
2105 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2106   # Support "outfile[:infile]", defaulting infile="outfile.in".
2107   case "$ac_file" in
2108   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2109        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2110   *) ac_file_in="${ac_file}.in" ;;
2111   esac
2112
2113   # Adjust relative srcdir, etc. for subdirectories.
2114
2115   # Remove last slash and all that follows it.  Not all systems have dirname.
2116   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2117   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2118     # The file is in a subdirectory.
2119     test ! -d "$ac_dir" && mkdir "$ac_dir"
2120     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2121     # A "../" for each directory in $ac_dir_suffix.
2122     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2123   else
2124     ac_dir_suffix= ac_dots=
2125   fi
2126
2127   case "$ac_given_srcdir" in
2128   .)  srcdir=.
2129       if test -z "$ac_dots"; then top_srcdir=.
2130       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2131   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2132   *) # Relative path.
2133     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2134     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2135   esac
2136
2137   case "$ac_given_INSTALL" in
2138   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2139   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2140   esac
2141   echo creating "$ac_file"
2142   rm -f "$ac_file"
2143   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2144   case "$ac_file" in
2145   *Makefile*) ac_comsub="1i\\
2146 # $configure_input" ;;
2147   *) ac_comsub= ;;
2148   esac
2149   sed -e "$ac_comsub
2150 s%@configure_input@%$configure_input%g
2151 s%@srcdir@%$srcdir%g
2152 s%@top_srcdir@%$top_srcdir%g
2153 s%@INSTALL@%$INSTALL%g
2154 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2155 fi; done
2156 rm -f conftest.subs
2157
2158 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2159 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2160 #
2161 # ac_d sets the value in "#define NAME VALUE" lines.
2162 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2163 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2164 ac_dC='\3'
2165 ac_dD='%g'
2166 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2167 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2168 ac_uB='\([      ]\)%\1#\2define\3'
2169 ac_uC=' '
2170 ac_uD='\4%g'
2171 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2172 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2173 ac_eB='$%\1#\2define\3'
2174 ac_eC=' '
2175 ac_eD='%g'
2176
2177 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
2178 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2179   # Support "outfile[:infile]", defaulting infile="outfile.in".
2180   case "$ac_file" in
2181   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2182        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2183   *) ac_file_in="${ac_file}.in" ;;
2184   esac
2185
2186   echo creating $ac_file
2187
2188   rm -f conftest.frag conftest.in conftest.out
2189   cp $ac_given_srcdir/$ac_file_in conftest.in
2190
2191 EOF
2192
2193 # Transform confdefs.h into a sed script conftest.vals that substitutes
2194 # the proper values into config.h.in to produce config.h.  And first:
2195 # Protect against being on the right side of a sed subst in config.status.
2196 # Protect against being in an unquoted here document in config.status.
2197 rm -f conftest.vals
2198 cat > conftest.hdr <<\EOF
2199 s/[\\&%]/\\&/g
2200 s%[\\$`]%\\&%g
2201 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2202 s%ac_d%ac_u%gp
2203 s%ac_u%ac_e%gp
2204 EOF
2205 sed -n -f conftest.hdr confdefs.h > conftest.vals
2206 rm -f conftest.hdr
2207
2208 # This sed command replaces #undef with comments.  This is necessary, for
2209 # example, in the case of _POSIX_SOURCE, which is predefined and required
2210 # on some systems where configure will not decide to define it.
2211 cat >> conftest.vals <<\EOF
2212 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2213 EOF
2214
2215 # Break up conftest.vals because some shells have a limit on
2216 # the size of here documents, and old seds have small limits too.
2217 # Maximum number of lines to put in a single here document.
2218 ac_max_here_lines=12
2219
2220 rm -f conftest.tail
2221 while :
2222 do
2223   ac_lines=`grep -c . conftest.vals`
2224   # grep -c gives empty output for an empty file on some AIX systems.
2225   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2226   # Write a limited-size here document to conftest.frag.
2227   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2228   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2229   echo 'CEOF
2230   sed -f conftest.frag conftest.in > conftest.out
2231   rm -f conftest.in
2232   mv conftest.out conftest.in
2233 ' >> $CONFIG_STATUS
2234   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2235   rm -f conftest.vals
2236   mv conftest.tail conftest.vals
2237 done
2238 rm -f conftest.vals
2239
2240 cat >> $CONFIG_STATUS <<\EOF
2241   rm -f conftest.frag conftest.h
2242   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2243   cat conftest.in >> conftest.h
2244   rm -f conftest.in
2245   if cmp -s $ac_file conftest.h 2>/dev/null; then
2246     echo "$ac_file is unchanged"
2247     rm -f conftest.h
2248   else
2249     rm -f $ac_file
2250     mv conftest.h $ac_file
2251   fi
2252 fi; done
2253
2254
2255 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
2256 exit 0
2257 EOF
2258 chmod +x $CONFIG_STATUS
2259 rm -fr confdefs* $ac_clean_files
2260 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2261