Support ARM ELF defaulting to big endian
[external/binutils.git] / gas / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 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-shared[=PKGS]  build shared libraries [default=yes]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25   --enable-bfd-assembler  use BFD back end for writing object files"
26 ac_help="$ac_help
27     targets            alternative target configurations besides the primary"
28 ac_help="$ac_help
29   --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
30 ac_help="$ac_help
31   --enable-build-warnings Enable build-time compiler warnings if gcc is used"
32 ac_help="$ac_help
33   --disable-nls           do not use Native Language Support"
34 ac_help="$ac_help
35   --with-included-gettext use the GNU gettext library included here"
36 ac_help="$ac_help
37   --enable-maintainer-mode enable make rules and dependencies not useful
38                           (and sometimes confusing) to the casual installer"
39
40 # Initialize some variables set by options.
41 # The variables have the same names as the options, with
42 # dashes changed to underlines.
43 build=NONE
44 cache_file=./config.cache
45 exec_prefix=NONE
46 host=NONE
47 no_create=
48 nonopt=NONE
49 no_recursion=
50 prefix=NONE
51 program_prefix=NONE
52 program_suffix=NONE
53 program_transform_name=s,x,x,
54 silent=
55 site=
56 sitefile=
57 srcdir=
58 target=NONE
59 verbose=
60 x_includes=NONE
61 x_libraries=NONE
62 bindir='${exec_prefix}/bin'
63 sbindir='${exec_prefix}/sbin'
64 libexecdir='${exec_prefix}/libexec'
65 datadir='${prefix}/share'
66 sysconfdir='${prefix}/etc'
67 sharedstatedir='${prefix}/com'
68 localstatedir='${prefix}/var'
69 libdir='${exec_prefix}/lib'
70 includedir='${prefix}/include'
71 oldincludedir='/usr/include'
72 infodir='${prefix}/info'
73 mandir='${prefix}/man'
74
75 # Initialize some other variables.
76 subdirs=
77 MFLAGS= MAKEFLAGS=
78 SHELL=${CONFIG_SHELL-/bin/sh}
79 # Maximum number of lines to put in a shell here document.
80 ac_max_here_lines=12
81
82 ac_prev=
83 for ac_option
84 do
85
86   # If the previous option needs an argument, assign it.
87   if test -n "$ac_prev"; then
88     eval "$ac_prev=\$ac_option"
89     ac_prev=
90     continue
91   fi
92
93   case "$ac_option" in
94   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95   *) ac_optarg= ;;
96   esac
97
98   # Accept the important Cygnus configure options, so we can diagnose typos.
99
100   case "$ac_option" in
101
102   -bindir | --bindir | --bindi | --bind | --bin | --bi)
103     ac_prev=bindir ;;
104   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105     bindir="$ac_optarg" ;;
106
107   -build | --build | --buil | --bui | --bu)
108     ac_prev=build ;;
109   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110     build="$ac_optarg" ;;
111
112   -cache-file | --cache-file | --cache-fil | --cache-fi \
113   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114     ac_prev=cache_file ;;
115   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117     cache_file="$ac_optarg" ;;
118
119   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
120     ac_prev=datadir ;;
121   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
122   | --da=*)
123     datadir="$ac_optarg" ;;
124
125   -disable-* | --disable-*)
126     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
127     # Reject names that are not valid shell variable names.
128     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
129       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130     fi
131     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132     eval "enable_${ac_feature}=no" ;;
133
134   -enable-* | --enable-*)
135     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
136     # Reject names that are not valid shell variable names.
137     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
138       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
139     fi
140     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
141     case "$ac_option" in
142       *=*) ;;
143       *) ac_optarg=yes ;;
144     esac
145     eval "enable_${ac_feature}='$ac_optarg'" ;;
146
147   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149   | --exec | --exe | --ex)
150     ac_prev=exec_prefix ;;
151   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153   | --exec=* | --exe=* | --ex=*)
154     exec_prefix="$ac_optarg" ;;
155
156   -gas | --gas | --ga | --g)
157     # Obsolete; use --with-gas.
158     with_gas=yes ;;
159
160   -help | --help | --hel | --he)
161     # Omit some internal or obsolete options to make the list less imposing.
162     # This message is too long to be a string in the A/UX 3.1 sh.
163     cat << EOF
164 Usage: configure [options] [host]
165 Options: [defaults in brackets after descriptions]
166 Configuration:
167   --cache-file=FILE       cache test results in FILE
168   --help                  print this message
169   --no-create             do not create output files
170   --quiet, --silent       do not print \`checking...' messages
171   --site-file=FILE        use FILE as the site file
172   --version               print the version of autoconf that created configure
173 Directory and file names:
174   --prefix=PREFIX         install architecture-independent files in PREFIX
175                           [$ac_default_prefix]
176   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
177                           [same as prefix]
178   --bindir=DIR            user executables in DIR [EPREFIX/bin]
179   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
180   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
181   --datadir=DIR           read-only architecture-independent data in DIR
182                           [PREFIX/share]
183   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
184   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
185                           [PREFIX/com]
186   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
187   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
188   --includedir=DIR        C header files in DIR [PREFIX/include]
189   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
190   --infodir=DIR           info documentation in DIR [PREFIX/info]
191   --mandir=DIR            man documentation in DIR [PREFIX/man]
192   --srcdir=DIR            find the sources in DIR [configure dir or ..]
193   --program-prefix=PREFIX prepend PREFIX to installed program names
194   --program-suffix=SUFFIX append SUFFIX to installed program names
195   --program-transform-name=PROGRAM
196                           run sed PROGRAM on installed program names
197 EOF
198     cat << EOF
199 Host type:
200   --build=BUILD           configure for building on BUILD [BUILD=HOST]
201   --host=HOST             configure for HOST [guessed]
202   --target=TARGET         configure for TARGET [TARGET=HOST]
203 Features and packages:
204   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
205   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
206   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
207   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
208   --x-includes=DIR        X include files are in DIR
209   --x-libraries=DIR       X library files are in DIR
210 EOF
211     if test -n "$ac_help"; then
212       echo "--enable and --with options recognized:$ac_help"
213     fi
214     exit 0 ;;
215
216   -host | --host | --hos | --ho)
217     ac_prev=host ;;
218   -host=* | --host=* | --hos=* | --ho=*)
219     host="$ac_optarg" ;;
220
221   -includedir | --includedir | --includedi | --included | --include \
222   | --includ | --inclu | --incl | --inc)
223     ac_prev=includedir ;;
224   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
225   | --includ=* | --inclu=* | --incl=* | --inc=*)
226     includedir="$ac_optarg" ;;
227
228   -infodir | --infodir | --infodi | --infod | --info | --inf)
229     ac_prev=infodir ;;
230   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
231     infodir="$ac_optarg" ;;
232
233   -libdir | --libdir | --libdi | --libd)
234     ac_prev=libdir ;;
235   -libdir=* | --libdir=* | --libdi=* | --libd=*)
236     libdir="$ac_optarg" ;;
237
238   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
239   | --libexe | --libex | --libe)
240     ac_prev=libexecdir ;;
241   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
242   | --libexe=* | --libex=* | --libe=*)
243     libexecdir="$ac_optarg" ;;
244
245   -localstatedir | --localstatedir | --localstatedi | --localstated \
246   | --localstate | --localstat | --localsta | --localst \
247   | --locals | --local | --loca | --loc | --lo)
248     ac_prev=localstatedir ;;
249   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
250   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
251   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
252     localstatedir="$ac_optarg" ;;
253
254   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255     ac_prev=mandir ;;
256   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
257     mandir="$ac_optarg" ;;
258
259   -nfp | --nfp | --nf)
260     # Obsolete; use --without-fp.
261     with_fp=no ;;
262
263   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264   | --no-cr | --no-c)
265     no_create=yes ;;
266
267   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
269     no_recursion=yes ;;
270
271   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
272   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
273   | --oldin | --oldi | --old | --ol | --o)
274     ac_prev=oldincludedir ;;
275   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
276   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
277   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
278     oldincludedir="$ac_optarg" ;;
279
280   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281     ac_prev=prefix ;;
282   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
283     prefix="$ac_optarg" ;;
284
285   -program-prefix | --program-prefix | --program-prefi | --program-pref \
286   | --program-pre | --program-pr | --program-p)
287     ac_prev=program_prefix ;;
288   -program-prefix=* | --program-prefix=* | --program-prefi=* \
289   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
290     program_prefix="$ac_optarg" ;;
291
292   -program-suffix | --program-suffix | --program-suffi | --program-suff \
293   | --program-suf | --program-su | --program-s)
294     ac_prev=program_suffix ;;
295   -program-suffix=* | --program-suffix=* | --program-suffi=* \
296   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
297     program_suffix="$ac_optarg" ;;
298
299   -program-transform-name | --program-transform-name \
300   | --program-transform-nam | --program-transform-na \
301   | --program-transform-n | --program-transform- \
302   | --program-transform | --program-transfor \
303   | --program-transfo | --program-transf \
304   | --program-trans | --program-tran \
305   | --progr-tra | --program-tr | --program-t)
306     ac_prev=program_transform_name ;;
307   -program-transform-name=* | --program-transform-name=* \
308   | --program-transform-nam=* | --program-transform-na=* \
309   | --program-transform-n=* | --program-transform-=* \
310   | --program-transform=* | --program-transfor=* \
311   | --program-transfo=* | --program-transf=* \
312   | --program-trans=* | --program-tran=* \
313   | --progr-tra=* | --program-tr=* | --program-t=*)
314     program_transform_name="$ac_optarg" ;;
315
316   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
317   | -silent | --silent | --silen | --sile | --sil)
318     silent=yes ;;
319
320   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321     ac_prev=sbindir ;;
322   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323   | --sbi=* | --sb=*)
324     sbindir="$ac_optarg" ;;
325
326   -sharedstatedir | --sharedstatedir | --sharedstatedi \
327   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
328   | --sharedst | --shareds | --shared | --share | --shar \
329   | --sha | --sh)
330     ac_prev=sharedstatedir ;;
331   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
332   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
333   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334   | --sha=* | --sh=*)
335     sharedstatedir="$ac_optarg" ;;
336
337   -site | --site | --sit)
338     ac_prev=site ;;
339   -site=* | --site=* | --sit=*)
340     site="$ac_optarg" ;;
341
342   -site-file | --site-file | --site-fil | --site-fi | --site-f)
343     ac_prev=sitefile ;;
344   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
345     sitefile="$ac_optarg" ;;
346
347   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
348     ac_prev=srcdir ;;
349   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
350     srcdir="$ac_optarg" ;;
351
352   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
353   | --syscon | --sysco | --sysc | --sys | --sy)
354     ac_prev=sysconfdir ;;
355   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
356   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
357     sysconfdir="$ac_optarg" ;;
358
359   -target | --target | --targe | --targ | --tar | --ta | --t)
360     ac_prev=target ;;
361   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
362     target="$ac_optarg" ;;
363
364   -v | -verbose | --verbose | --verbos | --verbo | --verb)
365     verbose=yes ;;
366
367   -version | --version | --versio | --versi | --vers)
368     echo "configure generated by autoconf version 2.13"
369     exit 0 ;;
370
371   -with-* | --with-*)
372     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
373     # Reject names that are not valid shell variable names.
374     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
375       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376     fi
377     ac_package=`echo $ac_package| sed 's/-/_/g'`
378     case "$ac_option" in
379       *=*) ;;
380       *) ac_optarg=yes ;;
381     esac
382     eval "with_${ac_package}='$ac_optarg'" ;;
383
384   -without-* | --without-*)
385     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
386     # Reject names that are not valid shell variable names.
387     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
388       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389     fi
390     ac_package=`echo $ac_package| sed 's/-/_/g'`
391     eval "with_${ac_package}=no" ;;
392
393   --x)
394     # Obsolete; use --with-x.
395     with_x=yes ;;
396
397   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
398   | --x-incl | --x-inc | --x-in | --x-i)
399     ac_prev=x_includes ;;
400   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
401   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
402     x_includes="$ac_optarg" ;;
403
404   -x-libraries | --x-libraries | --x-librarie | --x-librari \
405   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
406     ac_prev=x_libraries ;;
407   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
408   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
409     x_libraries="$ac_optarg" ;;
410
411   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
412     ;;
413
414   *)
415     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
416       echo "configure: warning: $ac_option: invalid host type" 1>&2
417     fi
418     if test "x$nonopt" != xNONE; then
419       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420     fi
421     nonopt="$ac_option"
422     ;;
423
424   esac
425 done
426
427 if test -n "$ac_prev"; then
428   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
429 fi
430
431 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432
433 # File descriptor usage:
434 # 0 standard input
435 # 1 file creation
436 # 2 errors and warnings
437 # 3 some systems may open it to /dev/tty
438 # 4 used on the Kubota Titan
439 # 6 checking for... messages and results
440 # 5 compiler messages saved in config.log
441 if test "$silent" = yes; then
442   exec 6>/dev/null
443 else
444   exec 6>&1
445 fi
446 exec 5>./config.log
447
448 echo "\
449 This file contains any messages produced by compilers while
450 running configure, to aid debugging if configure makes a mistake.
451 " 1>&5
452
453 # Strip out --no-create and --no-recursion so they do not pile up.
454 # Also quote any args containing shell metacharacters.
455 ac_configure_args=
456 for ac_arg
457 do
458   case "$ac_arg" in
459   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
460   | --no-cr | --no-c) ;;
461   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
462   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
463   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
464   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
465   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
466   esac
467 done
468
469 # NLS nuisances.
470 # Only set these to C if already set.  These must not be set unconditionally
471 # because not all systems understand e.g. LANG=C (notably SCO).
472 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
473 # Non-C LC_CTYPE values break the ctype check.
474 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
475 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
476 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
477 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
478
479 # confdefs.h avoids OS command line length limits that DEFS can exceed.
480 rm -rf conftest* confdefs.h
481 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
482 echo > confdefs.h
483
484 # A filename unique to this package, relative to the directory that
485 # configure is in, which we can look for to find out if srcdir is correct.
486 ac_unique_file=as.h
487
488 # Find the source files, if location was not specified.
489 if test -z "$srcdir"; then
490   ac_srcdir_defaulted=yes
491   # Try the directory containing this script, then its parent.
492   ac_prog=$0
493   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
494   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
495   srcdir=$ac_confdir
496   if test ! -r $srcdir/$ac_unique_file; then
497     srcdir=..
498   fi
499 else
500   ac_srcdir_defaulted=no
501 fi
502 if test ! -r $srcdir/$ac_unique_file; then
503   if test "$ac_srcdir_defaulted" = yes; then
504     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
505   else
506     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
507   fi
508 fi
509 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510
511 # Prefer explicitly selected file to automatically selected ones.
512 if test -z "$sitefile"; then
513   if test -z "$CONFIG_SITE"; then
514     if test "x$prefix" != xNONE; then
515       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
516     else
517       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518     fi
519   fi
520 else
521   CONFIG_SITE="$sitefile"
522 fi
523 for ac_site_file in $CONFIG_SITE; do
524   if test -r "$ac_site_file"; then
525     echo "loading site script $ac_site_file"
526     . "$ac_site_file"
527   fi
528 done
529
530 if test -r "$cache_file"; then
531   echo "loading cache $cache_file"
532   . $cache_file
533 else
534   echo "creating cache $cache_file"
535   > $cache_file
536 fi
537
538 ac_ext=c
539 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540 ac_cpp='$CPP $CPPFLAGS'
541 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543 cross_compiling=$ac_cv_prog_cc_cross
544
545 ac_exeext=
546 ac_objext=o
547 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
548   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
549   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
550     ac_n= ac_c='
551 ' ac_t='        '
552   else
553     ac_n=-n ac_c= ac_t=
554   fi
555 else
556   ac_n= ac_c='\c' ac_t=
557 fi
558
559
560
561 ac_aux_dir=
562 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
563   if test -f $ac_dir/install-sh; then
564     ac_aux_dir=$ac_dir
565     ac_install_sh="$ac_aux_dir/install-sh -c"
566     break
567   elif test -f $ac_dir/install.sh; then
568     ac_aux_dir=$ac_dir
569     ac_install_sh="$ac_aux_dir/install.sh -c"
570     break
571   fi
572 done
573 if test -z "$ac_aux_dir"; then
574   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
575 fi
576 ac_config_guess=$ac_aux_dir/config.guess
577 ac_config_sub=$ac_aux_dir/config.sub
578 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
579
580
581 # Do some error checking and defaulting for the host and target type.
582 # The inputs are:
583 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
584 #
585 # The rules are:
586 # 1. You are not allowed to specify --host, --target, and nonopt at the
587 #    same time.
588 # 2. Host defaults to nonopt.
589 # 3. If nonopt is not specified, then host defaults to the current host,
590 #    as determined by config.guess.
591 # 4. Target and build default to nonopt.
592 # 5. If nonopt is not specified, then target and build default to host.
593
594 # The aliases save the names the user supplied, while $host etc.
595 # will get canonicalized.
596 case $host---$target---$nonopt in
597 NONE---*---* | *---NONE---* | *---*---NONE) ;;
598 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
599 esac
600
601
602 # Make sure we can run config.sub.
603 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
604 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
605 fi
606
607 echo $ac_n "checking host system type""... $ac_c" 1>&6
608 echo "configure:609: checking host system type" >&5
609
610 host_alias=$host
611 case "$host_alias" in
612 NONE)
613   case $nonopt in
614   NONE)
615     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
616     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
617     fi ;;
618   *) host_alias=$nonopt ;;
619   esac ;;
620 esac
621
622 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
623 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
624 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
625 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
626 echo "$ac_t""$host" 1>&6
627
628 echo $ac_n "checking target system type""... $ac_c" 1>&6
629 echo "configure:630: checking target system type" >&5
630
631 target_alias=$target
632 case "$target_alias" in
633 NONE)
634   case $nonopt in
635   NONE) target_alias=$host_alias ;;
636   *) target_alias=$nonopt ;;
637   esac ;;
638 esac
639
640 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
641 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
642 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
643 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
644 echo "$ac_t""$target" 1>&6
645
646 echo $ac_n "checking build system type""... $ac_c" 1>&6
647 echo "configure:648: checking build system type" >&5
648
649 build_alias=$build
650 case "$build_alias" in
651 NONE)
652   case $nonopt in
653   NONE) build_alias=$host_alias ;;
654   *) build_alias=$nonopt ;;
655   esac ;;
656 esac
657
658 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
659 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
660 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
661 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
662 echo "$ac_t""$build" 1>&6
663
664 test "$host_alias" != "$target_alias" &&
665   test "$program_prefix$program_suffix$program_transform_name" = \
666     NONENONEs,x,x, &&
667   program_prefix=${target_alias}-
668
669
670 # Find a good install program.  We prefer a C program (faster),
671 # so one script is as good as another.  But avoid the broken or
672 # incompatible versions:
673 # SysV /etc/install, /usr/sbin/install
674 # SunOS /usr/etc/install
675 # IRIX /sbin/install
676 # AIX /bin/install
677 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
678 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
679 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
680 # ./install, which can be erroneously created by make from ./install.sh.
681 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
682 echo "configure:683: checking for a BSD compatible install" >&5
683 if test -z "$INSTALL"; then
684 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
685   echo $ac_n "(cached) $ac_c" 1>&6
686 else
687     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
688   for ac_dir in $PATH; do
689     # Account for people who put trailing slashes in PATH elements.
690     case "$ac_dir/" in
691     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
692     *)
693       # OSF1 and SCO ODT 3.0 have their own names for install.
694       # Don't use installbsd from OSF since it installs stuff as root
695       # by default.
696       for ac_prog in ginstall scoinst install; do
697         if test -f $ac_dir/$ac_prog; then
698           if test $ac_prog = install &&
699             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
700             # AIX install.  It has an incompatible calling convention.
701             :
702           else
703             ac_cv_path_install="$ac_dir/$ac_prog -c"
704             break 2
705           fi
706         fi
707       done
708       ;;
709     esac
710   done
711   IFS="$ac_save_IFS"
712
713 fi
714   if test "${ac_cv_path_install+set}" = set; then
715     INSTALL="$ac_cv_path_install"
716   else
717     # As a last resort, use the slow shell script.  We don't cache a
718     # path for INSTALL within a source directory, because that will
719     # break other packages using the cache if that directory is
720     # removed, or if the path is relative.
721     INSTALL="$ac_install_sh"
722   fi
723 fi
724 echo "$ac_t""$INSTALL" 1>&6
725
726 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
727 # It thinks the first close brace ends the variable substitution.
728 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
729
730 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
731
732 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
733
734 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
735 echo "configure:736: checking whether build environment is sane" >&5
736 # Just in case
737 sleep 1
738 echo timestamp > conftestfile
739 # Do `set' in a subshell so we don't clobber the current shell's
740 # arguments.  Must try -L first in case configure is actually a
741 # symlink; some systems play weird games with the mod time of symlinks
742 # (eg FreeBSD returns the mod time of the symlink's containing
743 # directory).
744 if (
745    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
746    if test "$*" = "X"; then
747       # -L didn't work.
748       set X `ls -t $srcdir/configure conftestfile`
749    fi
750    if test "$*" != "X $srcdir/configure conftestfile" \
751       && test "$*" != "X conftestfile $srcdir/configure"; then
752
753       # If neither matched, then we have a broken ls.  This can happen
754       # if, for instance, CONFIG_SHELL is bash and it inherits a
755       # broken ls alias from the environment.  This has actually
756       # happened.  Such a system could not be considered "sane".
757       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
758 alias in your environment" 1>&2; exit 1; }
759    fi
760
761    test "$2" = conftestfile
762    )
763 then
764    # Ok.
765    :
766 else
767    { echo "configure: error: newly created file is older than distributed files!
768 Check your system clock" 1>&2; exit 1; }
769 fi
770 rm -f conftest*
771 echo "$ac_t""yes" 1>&6
772 if test "$program_transform_name" = s,x,x,; then
773   program_transform_name=
774 else
775   # Double any \ or $.  echo might interpret backslashes.
776   cat <<\EOF_SED > conftestsed
777 s,\\,\\\\,g; s,\$,$$,g
778 EOF_SED
779   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
780   rm -f conftestsed
781 fi
782 test "$program_prefix" != NONE &&
783   program_transform_name="s,^,${program_prefix},; $program_transform_name"
784 # Use a double $ so make ignores it.
785 test "$program_suffix" != NONE &&
786   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
787
788 # sed with no file args requires a program.
789 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
790
791 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
792 echo "configure:793: checking whether ${MAKE-make} sets \${MAKE}" >&5
793 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
794 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
795   echo $ac_n "(cached) $ac_c" 1>&6
796 else
797   cat > conftestmake <<\EOF
798 all:
799         @echo 'ac_maketemp="${MAKE}"'
800 EOF
801 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
802 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
803 if test -n "$ac_maketemp"; then
804   eval ac_cv_prog_make_${ac_make}_set=yes
805 else
806   eval ac_cv_prog_make_${ac_make}_set=no
807 fi
808 rm -f conftestmake
809 fi
810 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
811   echo "$ac_t""yes" 1>&6
812   SET_MAKE=
813 else
814   echo "$ac_t""no" 1>&6
815   SET_MAKE="MAKE=${MAKE-make}"
816 fi
817
818
819 PACKAGE=gas
820
821 VERSION=2.9.5
822
823 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
824   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
825 fi
826 cat >> confdefs.h <<EOF
827 #define PACKAGE "$PACKAGE"
828 EOF
829
830 cat >> confdefs.h <<EOF
831 #define VERSION "$VERSION"
832 EOF
833
834
835
836 missing_dir=`cd $ac_aux_dir && pwd`
837 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
838 echo "configure:839: checking for working aclocal" >&5
839 # Run test in a subshell; some versions of sh will print an error if
840 # an executable is not found, even if stderr is redirected.
841 # Redirect stdin to placate older versions of autoconf.  Sigh.
842 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
843    ACLOCAL=aclocal
844    echo "$ac_t""found" 1>&6
845 else
846    ACLOCAL="$missing_dir/missing aclocal"
847    echo "$ac_t""missing" 1>&6
848 fi
849
850 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
851 echo "configure:852: checking for working autoconf" >&5
852 # Run test in a subshell; some versions of sh will print an error if
853 # an executable is not found, even if stderr is redirected.
854 # Redirect stdin to placate older versions of autoconf.  Sigh.
855 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
856    AUTOCONF=autoconf
857    echo "$ac_t""found" 1>&6
858 else
859    AUTOCONF="$missing_dir/missing autoconf"
860    echo "$ac_t""missing" 1>&6
861 fi
862
863 echo $ac_n "checking for working automake""... $ac_c" 1>&6
864 echo "configure:865: checking for working automake" >&5
865 # Run test in a subshell; some versions of sh will print an error if
866 # an executable is not found, even if stderr is redirected.
867 # Redirect stdin to placate older versions of autoconf.  Sigh.
868 if (automake --version) < /dev/null > /dev/null 2>&1; then
869    AUTOMAKE=automake
870    echo "$ac_t""found" 1>&6
871 else
872    AUTOMAKE="$missing_dir/missing automake"
873    echo "$ac_t""missing" 1>&6
874 fi
875
876 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
877 echo "configure:878: checking for working autoheader" >&5
878 # Run test in a subshell; some versions of sh will print an error if
879 # an executable is not found, even if stderr is redirected.
880 # Redirect stdin to placate older versions of autoconf.  Sigh.
881 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
882    AUTOHEADER=autoheader
883    echo "$ac_t""found" 1>&6
884 else
885    AUTOHEADER="$missing_dir/missing autoheader"
886    echo "$ac_t""missing" 1>&6
887 fi
888
889 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
890 echo "configure:891: checking for working makeinfo" >&5
891 # Run test in a subshell; some versions of sh will print an error if
892 # an executable is not found, even if stderr is redirected.
893 # Redirect stdin to placate older versions of autoconf.  Sigh.
894 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
895    MAKEINFO=makeinfo
896    echo "$ac_t""found" 1>&6
897 else
898    MAKEINFO="$missing_dir/missing makeinfo"
899    echo "$ac_t""missing" 1>&6
900 fi
901
902
903
904 # Check whether --enable-shared or --disable-shared was given.
905 if test "${enable_shared+set}" = set; then
906   enableval="$enable_shared"
907   p=${PACKAGE-default}
908 case "$enableval" in
909 yes) enable_shared=yes ;;
910 no) enable_shared=no ;;
911 *)
912   enable_shared=no
913   # Look at the argument we got.  We use all the common list separators.
914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
915   for pkg in $enableval; do
916     if test "X$pkg" = "X$p"; then
917       enable_shared=yes
918     fi
919   done
920   IFS="$ac_save_ifs"
921   ;;
922 esac
923 else
924   enable_shared=yes
925 fi
926
927 # Check whether --enable-static or --disable-static was given.
928 if test "${enable_static+set}" = set; then
929   enableval="$enable_static"
930   p=${PACKAGE-default}
931 case "$enableval" in
932 yes) enable_static=yes ;;
933 no) enable_static=no ;;
934 *)
935   enable_static=no
936   # Look at the argument we got.  We use all the common list separators.
937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
938   for pkg in $enableval; do
939     if test "X$pkg" = "X$p"; then
940       enable_static=yes
941     fi
942   done
943   IFS="$ac_save_ifs"
944   ;;
945 esac
946 else
947   enable_static=yes
948 fi
949
950 # Check whether --enable-fast-install or --disable-fast-install was given.
951 if test "${enable_fast_install+set}" = set; then
952   enableval="$enable_fast_install"
953   p=${PACKAGE-default}
954 case "$enableval" in
955 yes) enable_fast_install=yes ;;
956 no) enable_fast_install=no ;;
957 *)
958   enable_fast_install=no
959   # Look at the argument we got.  We use all the common list separators.
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
961   for pkg in $enableval; do
962     if test "X$pkg" = "X$p"; then
963       enable_fast_install=yes
964     fi
965   done
966   IFS="$ac_save_ifs"
967   ;;
968 esac
969 else
970   enable_fast_install=yes
971 fi
972
973 # Extract the first word of "ranlib", so it can be a program name with args.
974 set dummy ranlib; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   if test -n "$RANLIB"; then
981   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
982 else
983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
984   ac_dummy="$PATH"
985   for ac_dir in $ac_dummy; do
986     test -z "$ac_dir" && ac_dir=.
987     if test -f $ac_dir/$ac_word; then
988       ac_cv_prog_RANLIB="ranlib"
989       break
990     fi
991   done
992   IFS="$ac_save_ifs"
993   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
994 fi
995 fi
996 RANLIB="$ac_cv_prog_RANLIB"
997 if test -n "$RANLIB"; then
998   echo "$ac_t""$RANLIB" 1>&6
999 else
1000   echo "$ac_t""no" 1>&6
1001 fi
1002
1003 # Extract the first word of "gcc", so it can be a program name with args.
1004 set dummy gcc; ac_word=$2
1005 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1006 echo "configure:1007: checking for $ac_word" >&5
1007 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1008   echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010   if test -n "$CC"; then
1011   ac_cv_prog_CC="$CC" # Let the user override the test.
1012 else
1013   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1014   ac_dummy="$PATH"
1015   for ac_dir in $ac_dummy; do
1016     test -z "$ac_dir" && ac_dir=.
1017     if test -f $ac_dir/$ac_word; then
1018       ac_cv_prog_CC="gcc"
1019       break
1020     fi
1021   done
1022   IFS="$ac_save_ifs"
1023 fi
1024 fi
1025 CC="$ac_cv_prog_CC"
1026 if test -n "$CC"; then
1027   echo "$ac_t""$CC" 1>&6
1028 else
1029   echo "$ac_t""no" 1>&6
1030 fi
1031
1032 if test -z "$CC"; then
1033   # Extract the first word of "cc", so it can be a program name with args.
1034 set dummy cc; ac_word=$2
1035 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1036 echo "configure:1037: checking for $ac_word" >&5
1037 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040   if test -n "$CC"; then
1041   ac_cv_prog_CC="$CC" # Let the user override the test.
1042 else
1043   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1044   ac_prog_rejected=no
1045   ac_dummy="$PATH"
1046   for ac_dir in $ac_dummy; do
1047     test -z "$ac_dir" && ac_dir=.
1048     if test -f $ac_dir/$ac_word; then
1049       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1050         ac_prog_rejected=yes
1051         continue
1052       fi
1053       ac_cv_prog_CC="cc"
1054       break
1055     fi
1056   done
1057   IFS="$ac_save_ifs"
1058 if test $ac_prog_rejected = yes; then
1059   # We found a bogon in the path, so make sure we never use it.
1060   set dummy $ac_cv_prog_CC
1061   shift
1062   if test $# -gt 0; then
1063     # We chose a different compiler from the bogus one.
1064     # However, it has the same basename, so the bogon will be chosen
1065     # first if we set CC to just the basename; use the full file name.
1066     shift
1067     set dummy "$ac_dir/$ac_word" "$@"
1068     shift
1069     ac_cv_prog_CC="$@"
1070   fi
1071 fi
1072 fi
1073 fi
1074 CC="$ac_cv_prog_CC"
1075 if test -n "$CC"; then
1076   echo "$ac_t""$CC" 1>&6
1077 else
1078   echo "$ac_t""no" 1>&6
1079 fi
1080
1081   if test -z "$CC"; then
1082     case "`uname -s`" in
1083     *win32* | *WIN32*)
1084       # Extract the first word of "cl", so it can be a program name with args.
1085 set dummy cl; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$CC"; then
1092   ac_cv_prog_CC="$CC" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095   ac_dummy="$PATH"
1096   for ac_dir in $ac_dummy; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_CC="cl"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104 fi
1105 fi
1106 CC="$ac_cv_prog_CC"
1107 if test -n "$CC"; then
1108   echo "$ac_t""$CC" 1>&6
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112  ;;
1113     esac
1114   fi
1115   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1116 fi
1117
1118 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1119 echo "configure:1120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1120
1121 ac_ext=c
1122 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1123 ac_cpp='$CPP $CPPFLAGS'
1124 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1125 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1126 cross_compiling=$ac_cv_prog_cc_cross
1127
1128 cat > conftest.$ac_ext << EOF
1129
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1132
1133 main(){return(0);}
1134 EOF
1135 if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1136   ac_cv_prog_cc_works=yes
1137   # If we can't run a trivial program, we are probably using a cross compiler.
1138   if (./conftest; exit) 2>/dev/null; then
1139     ac_cv_prog_cc_cross=no
1140   else
1141     ac_cv_prog_cc_cross=yes
1142   fi
1143 else
1144   echo "configure: failed program was:" >&5
1145   cat conftest.$ac_ext >&5
1146   ac_cv_prog_cc_works=no
1147 fi
1148 rm -fr conftest*
1149 ac_ext=c
1150 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1151 ac_cpp='$CPP $CPPFLAGS'
1152 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1153 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1154 cross_compiling=$ac_cv_prog_cc_cross
1155
1156 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1157 if test $ac_cv_prog_cc_works = no; then
1158   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1159 fi
1160 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1161 echo "configure:1162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1162 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1163 cross_compiling=$ac_cv_prog_cc_cross
1164
1165 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1166 echo "configure:1167: checking whether we are using GNU C" >&5
1167 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1168   echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170   cat > conftest.c <<EOF
1171 #ifdef __GNUC__
1172   yes;
1173 #endif
1174 EOF
1175 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1176   ac_cv_prog_gcc=yes
1177 else
1178   ac_cv_prog_gcc=no
1179 fi
1180 fi
1181
1182 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1183
1184 if test $ac_cv_prog_gcc = yes; then
1185   GCC=yes
1186 else
1187   GCC=
1188 fi
1189
1190 ac_test_CFLAGS="${CFLAGS+set}"
1191 ac_save_CFLAGS="$CFLAGS"
1192 CFLAGS=
1193 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether ${CC-cc} accepts -g" >&5
1195 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   echo 'void f(){}' > conftest.c
1199 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1200   ac_cv_prog_cc_g=yes
1201 else
1202   ac_cv_prog_cc_g=no
1203 fi
1204 rm -f conftest*
1205
1206 fi
1207
1208 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1209 if test "$ac_test_CFLAGS" = set; then
1210   CFLAGS="$ac_save_CFLAGS"
1211 elif test $ac_cv_prog_cc_g = yes; then
1212   if test "$GCC" = yes; then
1213     CFLAGS="-g -O2"
1214   else
1215     CFLAGS="-g"
1216   fi
1217 else
1218   if test "$GCC" = yes; then
1219     CFLAGS="-O2"
1220   else
1221     CFLAGS=
1222   fi
1223 fi
1224
1225 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1226 if test "${with_gnu_ld+set}" = set; then
1227   withval="$with_gnu_ld"
1228   test "$withval" = no || with_gnu_ld=yes
1229 else
1230   with_gnu_ld=no
1231 fi
1232
1233 ac_prog=ld
1234 if test "$ac_cv_prog_gcc" = yes; then
1235   # Check if gcc -print-prog-name=ld gives a path.
1236   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1237 echo "configure:1238: checking for ld used by GCC" >&5
1238   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1239   case "$ac_prog" in
1240     # Accept absolute paths.
1241     [\\/]* | [A-Za-z]:[\\/]*)
1242       re_direlt='/[^/][^/]*/\.\./'
1243       # Canonicalize the path of ld
1244       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1245       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1246         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1247       done
1248       test -z "$LD" && LD="$ac_prog"
1249       ;;
1250   "")
1251     # If it fails, then pretend we aren't using GCC.
1252     ac_prog=ld
1253     ;;
1254   *)
1255     # If it is relative, then search for the first ld in PATH.
1256     with_gnu_ld=unknown
1257     ;;
1258   esac
1259 elif test "$with_gnu_ld" = yes; then
1260   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1261 echo "configure:1262: checking for GNU ld" >&5
1262 else
1263   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1264 echo "configure:1265: checking for non-GNU ld" >&5
1265 fi
1266 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1267   echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269   if test -z "$LD"; then
1270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1271   for ac_dir in $PATH; do
1272     test -z "$ac_dir" && ac_dir=.
1273     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1274       ac_cv_path_LD="$ac_dir/$ac_prog"
1275       # Check to see if the program is GNU ld.  I'd rather use --version,
1276       # but apparently some GNU ld's only accept -v.
1277       # Break only if it was the GNU/non-GNU ld that we prefer.
1278       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1279         test "$with_gnu_ld" != no && break
1280       else
1281         test "$with_gnu_ld" != yes && break
1282       fi
1283     fi
1284   done
1285   IFS="$ac_save_ifs"
1286 else
1287   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1288 fi
1289 fi
1290
1291 LD="$ac_cv_path_LD"
1292 if test -n "$LD"; then
1293   echo "$ac_t""$LD" 1>&6
1294 else
1295   echo "$ac_t""no" 1>&6
1296 fi
1297 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1298 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1299 echo "configure:1300: checking if the linker ($LD) is GNU ld" >&5
1300 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1301   echo $ac_n "(cached) $ac_c" 1>&6
1302 else
1303   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1304 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1305   ac_cv_prog_gnu_ld=yes
1306 else
1307   ac_cv_prog_gnu_ld=no
1308 fi
1309 fi
1310
1311 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1312
1313
1314 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1315 echo "configure:1316: checking for BSD-compatible nm" >&5
1316 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1317   echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319   if test -n "$NM"; then
1320   # Let the user override the test.
1321   ac_cv_path_NM="$NM"
1322 else
1323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1324   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1325     test -z "$ac_dir" && ac_dir=.
1326     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1327       # Check to see if the nm accepts a BSD-compat flag.
1328       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1329       #   nm: unknown option "B" ignored
1330       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1331         ac_cv_path_NM="$ac_dir/nm -B"
1332         break
1333       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1334         ac_cv_path_NM="$ac_dir/nm -p"
1335         break
1336       else
1337         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1338         continue # so that we can try to find one that supports BSD flags
1339       fi
1340     fi
1341   done
1342   IFS="$ac_save_ifs"
1343   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1344 fi
1345 fi
1346
1347 NM="$ac_cv_path_NM"
1348 echo "$ac_t""$NM" 1>&6
1349
1350 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1351 echo "configure:1352: checking whether ln -s works" >&5
1352 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1353   echo $ac_n "(cached) $ac_c" 1>&6
1354 else
1355   rm -f conftestdata
1356 if ln -s X conftestdata 2>/dev/null
1357 then
1358   rm -f conftestdata
1359   ac_cv_prog_LN_S="ln -s"
1360 else
1361   ac_cv_prog_LN_S=ln
1362 fi
1363 fi
1364 LN_S="$ac_cv_prog_LN_S"
1365 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1366   echo "$ac_t""yes" 1>&6
1367 else
1368   echo "$ac_t""no" 1>&6
1369 fi
1370
1371
1372 case "$target" in
1373 NONE) lt_target="$host" ;;
1374 *) lt_target="$target" ;;
1375 esac
1376
1377 # Check for any special flags to pass to ltconfig.
1378 libtool_flags="--cache-file=$cache_file"
1379 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1380 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1381 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1382 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1383 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1384
1385
1386 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1387 if test "${enable_libtool_lock+set}" = set; then
1388   enableval="$enable_libtool_lock"
1389   :
1390 fi
1391
1392 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1393 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1394
1395 # Some flags need to be propagated to the compiler or linker for good
1396 # libtool support.
1397 case "$lt_target" in
1398 *-*-irix6*)
1399   # Find out which ABI we are using.
1400   echo '#line 1401 "configure"' > conftest.$ac_ext
1401   if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1402     case "`/usr/bin/file conftest.o`" in
1403     *32-bit*)
1404       LD="${LD-ld} -32"
1405       ;;
1406     *N32*)
1407       LD="${LD-ld} -n32"
1408       ;;
1409     *64-bit*)
1410       LD="${LD-ld} -64"
1411       ;;
1412     esac
1413   fi
1414   rm -rf conftest*
1415   ;;
1416
1417 *-*-sco3.2v5*)
1418   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1419   SAVE_CFLAGS="$CFLAGS"
1420   CFLAGS="$CFLAGS -belf"
1421   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1422 echo "configure:1423: checking whether the C compiler needs -belf" >&5
1423 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   cat > conftest.$ac_ext <<EOF
1427 #line 1428 "configure"
1428 #include "confdefs.h"
1429
1430 int main() {
1431
1432 ; return 0; }
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1435   rm -rf conftest*
1436   lt_cv_cc_needs_belf=yes
1437 else
1438   echo "configure: failed program was:" >&5
1439   cat conftest.$ac_ext >&5
1440   rm -rf conftest*
1441   lt_cv_cc_needs_belf=no
1442 fi
1443 rm -f conftest*
1444 fi
1445
1446 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1447   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1448     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1449     CFLAGS="$SAVE_CFLAGS"
1450   fi
1451   ;;
1452
1453
1454 esac
1455
1456
1457 # Save cache, so that ltconfig can load it
1458 cat > confcache <<\EOF
1459 # This file is a shell script that caches the results of configure
1460 # tests run on this system so they can be shared between configure
1461 # scripts and configure runs.  It is not useful on other systems.
1462 # If it contains results you don't want to keep, you may remove or edit it.
1463 #
1464 # By default, configure uses ./config.cache as the cache file,
1465 # creating it if it does not exist already.  You can give configure
1466 # the --cache-file=FILE option to use a different cache file; that is
1467 # what configure does when it calls configure scripts in
1468 # subdirectories, so they share the cache.
1469 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1470 # config.status only pays attention to the cache file if you give it the
1471 # --recheck option to rerun configure.
1472 #
1473 EOF
1474 # The following way of writing the cache mishandles newlines in values,
1475 # but we know of no workaround that is simple, portable, and efficient.
1476 # So, don't put newlines in cache variables' values.
1477 # Ultrix sh set writes to stderr and can't be redirected directly,
1478 # and sets the high bit in the cache file unless we assign to the vars.
1479 (set) 2>&1 |
1480   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1481   *ac_space=\ *)
1482     # `set' does not quote correctly, so add quotes (double-quote substitution
1483     # turns \\\\ into \\, and sed turns \\ into \).
1484     sed -n \
1485       -e "s/'/'\\\\''/g" \
1486       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1487     ;;
1488   *)
1489     # `set' quotes correctly as required by POSIX, so do not add quotes.
1490     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1491     ;;
1492   esac >> confcache
1493 if cmp -s $cache_file confcache; then
1494   :
1495 else
1496   if test -w $cache_file; then
1497     echo "updating cache $cache_file"
1498     cat confcache > $cache_file
1499   else
1500     echo "not updating unwritable cache $cache_file"
1501   fi
1502 fi
1503 rm -f confcache
1504
1505
1506 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1507 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1508 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1509 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1510 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1511 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1512 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1513 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1514
1515 # Reload cache, that may have been modified by ltconfig
1516 if test -r "$cache_file"; then
1517   echo "loading cache $cache_file"
1518   . $cache_file
1519 else
1520   echo "creating cache $cache_file"
1521   > $cache_file
1522 fi
1523
1524
1525 # This can be used to rebuild libtool when needed
1526 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1527
1528 # Always use our own libtool.
1529 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1530
1531 # Redirect the config.log output again, so that the ltconfig log is not
1532 # clobbered by the next message.
1533 exec 5>>./config.log
1534
1535
1536 user_bfd_gas=
1537 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1538 if test "${enable_bfd_assembler+set}" = set; then
1539   enableval="$enable_bfd_assembler"
1540   case "${enableval}" in
1541   yes) need_bfd=yes user_bfd_gas=yes ;;
1542   no)  user_bfd_gas=no ;;
1543   *)   { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1544 esac
1545 fi
1546 # Check whether --enable-targets or --disable-targets was given.
1547 if test "${enable_targets+set}" = set; then
1548   enableval="$enable_targets"
1549   case "${enableval}" in
1550   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1551             ;;
1552   no)       enable_targets= ;;
1553   *)        enable_targets=$enableval ;;
1554 esac
1555 fi
1556 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1557 if test "${enable_commonbfdlib+set}" = set; then
1558   enableval="$enable_commonbfdlib"
1559   case "${enableval}" in
1560   yes) commonbfdlib=true ;;
1561   no)  commonbfdlib=false ;;
1562   *)   { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1563 esac
1564 fi
1565
1566 using_cgen=no
1567
1568 build_warnings="-W -Wall"
1569 # Check whether --enable-build-warnings or --disable-build-warnings was given.
1570 if test "${enable_build_warnings+set}" = set; then
1571   enableval="$enable_build_warnings"
1572   case "${enableval}" in
1573   yes)  ;;
1574   no)   build_warnings="-w";;
1575   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
1576         build_warnings="${build_warnings} ${t}";;
1577   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
1578         build_warnings="${t} ${build_warnings}";;
1579   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1580 esac
1581 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
1582   echo "Setting warning flags = $build_warnings" 6>&1
1583 fi
1584 fi
1585 WARN_CFLAGS=""
1586 if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
1587     WARN_CFLAGS="${build_warnings}"
1588 fi
1589
1590
1591 # Generate a header file
1592
1593
1594
1595
1596 # If we are on a DOS filesystem, we must use gdb.ini rather than
1597 # .gdbinit.
1598 GDBINIT=".gdbinit"
1599 case "${host}" in
1600   *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
1601     GDBINIT="gdb.ini"
1602     ;;
1603 esac
1604
1605
1606 te_file=generic
1607
1608 # Makefile target for installing gas in $(tooldir)/bin.
1609 install_tooldir=install-exec-tooldir
1610
1611 canon_targets=""
1612 all_targets=no
1613 if test -n "$enable_targets" ; then
1614   for t in `echo $enable_targets | sed 's/,/ /g'`; do
1615     if test $t = "all"; then
1616       all_targets=yes
1617       continue
1618     fi
1619     result=`$ac_config_sub $t 2>/dev/null`
1620     if test -n "$result" ; then
1621       canon_targets="$canon_targets $result"
1622 #    else
1623 #      # Permit "all", etc.  We don't support it yet though.
1624 #      canon_targets="$canon_targets $t"
1625     fi
1626   done
1627   _gas_uniq_list="$canon_targets"
1628 _gas_uniq_newlist=""
1629 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1630   case $_gas_uniq_i in
1631   _gas_uniq_dummy) ;;
1632   *) case " $_gas_uniq_newlist " in
1633        *" $_gas_uniq_i "*) ;;
1634        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1635      esac ;;
1636   esac
1637 done
1638 canon_targets=$_gas_uniq_newlist
1639
1640 fi
1641
1642 emulations=""
1643
1644 for this_target in $target $canon_targets ; do
1645
1646     eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
1647
1648     # check for architecture variants
1649     arch=
1650     endian=
1651     case ${cpu} in
1652       alpha*)           cpu_type=alpha ;;
1653       armeb)            cpu_type=arm endian=big ;;
1654       arm*)             cpu_type=arm endian=little ;;
1655       armb*)            cpu_type=arm endian=little ;;
1656       armv*l)           cpu_type=arm endian=little ;;
1657       armv*b)           cpu_type=arm endian=big ;;
1658       strongarm*)       cpu_type=arm endian=little ;;
1659       thumb*)           cpu_type=arm endian=little ;;
1660       hppa*)            cpu_type=hppa ;;
1661       i[456]86)         cpu_type=i386 ;;
1662       ia64)             cpu_type=ia64 ;;
1663       m680[012346]0)    cpu_type=m68k ;;
1664       m68008)           cpu_type=m68k ;;
1665       m683??)           cpu_type=m68k ;;
1666       m5200)            cpu_type=m68k ;;
1667       m8*)              cpu_type=m88k ;;
1668       mips*el)          cpu_type=mips endian=little ;;
1669       mips*)            cpu_type=mips endian=big ;;
1670       pjl*)             cpu_type=pj endian=little ;;
1671       pj*)              cpu_type=pj endian=big ;;
1672       powerpcle*)       cpu_type=ppc endian=little ;;
1673       powerpc*)         cpu_type=ppc endian=big ;;
1674       rs6000*)          cpu_type=ppc ;;
1675       sparclite*)       cpu_type=sparc arch=sparclite ;;
1676       sparclet*)        cpu_type=sparc arch=sparclet ;;
1677       sparc64*)         cpu_type=sparc arch=v9-64 ;;
1678       sparc86x*)        cpu_type=sparc arch=sparc86x  ;;
1679       sparc*)           cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
1680       v850*)            cpu_type=v850 ;;
1681       *)                cpu_type=${cpu} ;;
1682     esac
1683
1684     if test ${this_target} = $target ; then
1685       target_cpu_type=${cpu_type}
1686     elif test ${target_cpu_type} != ${cpu_type} ; then
1687       continue
1688     fi
1689
1690     generic_target=${cpu_type}-$vendor-$os
1691     dev=no
1692     bfd_gas=no
1693     em=generic
1694
1695     # assign object format
1696     case ${generic_target} in
1697       a29k-*-coff)          fmt=coff ;;
1698       a29k-amd-udi)         fmt=coff ;;
1699       a29k-amd-ebmon)       fmt=coff ;;
1700       a29k-nyu-sym1)        fmt=coff ;;
1701       a29k-*-vxworks*)      fmt=coff ;;
1702
1703       alpha*-*-*vms*)       fmt=evax ;;
1704       alpha*-*-netware*)    fmt=ecoff ;;
1705       alpha*-*-openbsd*)    fmt=ecoff ;;
1706       alpha*-*-osf*)        fmt=ecoff ;;
1707       alpha*-*-linuxecoff*) fmt=ecoff ;;
1708       alpha*-*-linux-gnu*)  fmt=elf em=linux ;;
1709       alpha*-*-netbsd*)     fmt=elf em=nbsd ;;
1710
1711       arc-*-elf*)           fmt=elf bfd_gas=yes ;;
1712
1713       arm-*-aout)                       fmt=aout ;;
1714       arm-*-coff | thumb-*-coff)        fmt=coff ;;
1715       arm-*-elf | thumb-*-elf)          fmt=elf ;;
1716       arm*-*-conix*)                    fmt=elf ;;
1717       arm-*-linux*aout*)                fmt=aout em=linux ;;
1718       arm*-*-linux-gnu*)                fmt=elf  em=linux ;;
1719       arm-*-netbsd*)                    fmt=aout em=nbsd ;;
1720       arm-*-oabi | thumb-*-oabi)        fmt=elf ;;
1721       arm-epoc-pe | thumb-epoc-pe)      fmt=coff em=epoc-pe ;;
1722       arm-*-wince)                      fmt=coff em=wince-pe ;;
1723       arm-*-pe | thumb-*-pe)            fmt=coff em=pe ;;
1724       arm-*-riscix*)                    fmt=aout em=riscix ;;
1725
1726       avr-*-*)              fmt=elf bfd_gas=yes ;;
1727
1728       d10v-*-*)             fmt=elf bfd_gas=yes ;;
1729       d30v-*-*)             fmt=elf bfd_gas=yes ;;
1730
1731
1732       fr30-*-*)             fmt=elf bfd_gas=yes ;;
1733
1734       hppa-*-linux-gnu*)    fmt=elf em=linux ;;
1735       hppa-*-*elf*)         fmt=elf em=hppa ;;
1736       hppa-*-lites*)        fmt=elf em=hppa ;;
1737       hppa-*-osf*)          fmt=som em=hppa ;;
1738       hppa-*-rtems*)        fmt=elf em=hppa ;;
1739 # Disabled until configury issues are sorted out across the various
1740 # projects
1741 #      hppa-*-hpux11*)      em=hppa
1742 #                           case ${cpu} in
1743 #                               hppa*w)
1744 #                                       fmt=elf;;
1745 #                               hppa*)
1746 #                                       fmt=som;;
1747 #                           esac
1748 #                           ;;
1749       hppa-*-hpux*)         fmt=som em=hppa ;;
1750       hppa-*-mpeix*)        fmt=som em=hppa ;;
1751       hppa-*-bsd*)          fmt=som em=hppa ;;
1752       hppa-*-hiux*)         fmt=som em=hppa ;;
1753
1754       h8300-*-coff)         fmt=coff ;;
1755
1756       i370-*-elf* | i370-*-linux*) fmt=elf ;;
1757       i386-ibm-aix*)        fmt=coff em=i386aix ;;
1758       i386-sequent-bsd*)    fmt=aout em=dynix bfd_gas=yes ;;
1759       i386-*-beospe*)       fmt=coff em=pe bfd_gas=yes ;;
1760       i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
1761       i386-*-bsd*)          fmt=aout em=386bsd ;;
1762       i386-*-netbsd0.8)     fmt=aout em=386bsd ;;
1763       i386-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes;;
1764       i386-*-openbsd*)      fmt=aout em=nbsd bfd_gas=yes;;
1765       i386-*-linux*aout* | i386-*-linuxoldld)   fmt=aout em=linux ;;
1766       i386-*-linux*coff*)   fmt=coff em=linux ;;
1767       i386-*-linux-gnu*)    fmt=elf em=linux bfd_gas=yes ;;
1768       i386-*-lynxos*)       fmt=coff em=lynx ;;
1769       i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1770                             fmt=elf bfd_gas=yes ;;
1771       i386-*-freebsdaout* | i386-*-freebsd12.* | i386-*-freebsd12)
1772                             fmt=aout em=386bsd ;;
1773       i386-*-freebsd*)      fmt=elf bfd_gas=yes ;;
1774       i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1775                           fmt=coff ;;
1776       i386-*-sco3.2v5*)      fmt=elf
1777                             if test ${this_target} = $target; then
1778                                 cat >> confdefs.h <<\EOF
1779 #define SCO_ELF 1
1780 EOF
1781
1782                             fi
1783                             ;;
1784       i386-*-sco3.2*)       fmt=coff ;;
1785       i386-*-vsta)          fmt=aout ;;
1786       i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1787                             fmt=coff em=go32;;
1788       i386-*-rtemself*)     fmt=elf ;;
1789       i386-*-rtems*)        fmt=coff ;;
1790       i386-*-gnu*)          fmt=elf ;;
1791       i386-*-mach*)
1792                             fmt=aout em=mach bfd_gas=yes ;;
1793       i386-*-msdos*)        fmt=aout ;;
1794       i386-*-moss*)         fmt=elf ;;
1795       i386-*-pe)            fmt=coff em=pe bfd_gas=yes ;;
1796       i386-*-cygwin*)       fmt=coff em=pe bfd_gas=yes ;;
1797       i386-*-interix*)      fmt=coff em=interix bfd_gas=yes ;;
1798       i386-*-mingw32*)      fmt=coff em=pe bfd_gas=yes ;;
1799       i386-*-*nt*)          fmt=coff em=pe bfd_gas=yes ;;
1800       i386-*-vxworks*)      fmt=aout ;;
1801       i960-*-bout)          fmt=bout ;;
1802       i960-*-coff)          fmt=coff em=ic960 ;;
1803       i960-*-rtems*)        fmt=coff em=ic960 ;;
1804       i960-*-nindy*)        fmt=bout ;;
1805       i960-*-vxworks4*)     fmt=bout ;;
1806       i960-*-vxworks5.0)    fmt=bout ;;
1807       i960-*-vxworks5.*)    fmt=coff em=ic960 ;;
1808       i960-*-vxworks*)      fmt=bout ;;
1809       i960-*-elf*)          fmt=elf ;;
1810
1811       ia64-*-elf*)          fmt=elf ;;
1812       ia64-*-linux-gnu*)    fmt=elf em=linux ;;
1813
1814       m32r-*-*)             fmt=elf bfd_gas=yes ;;
1815
1816       m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1817                             fmt=aout em=sun3 ;;
1818       m68k-motorola-sysv*)  fmt=coff em=delta ;;
1819       m68k-bull-sysv3*)     fmt=coff em=dpx2 ;;
1820       m68k-apollo-*)        fmt=coff em=apollo ;;
1821       m68k-*-sysv4*) # must be before -sysv*
1822                             fmt=elf em=svr4 ;;
1823       m68k-*-elf*)          fmt=elf ;;
1824       m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1825                             fmt=coff ;;
1826       m68k-*-hpux*)         fmt=hp300 em=hp300 ;;
1827       m68k-*-linux*aout*)   fmt=aout em=linux ;;
1828       m68k-*-linux-gnu*)    fmt=elf em=linux ;;
1829       m68k-*-gnu*)          fmt=elf ;;
1830       m68k-*-lynxos*)       fmt=coff em=lynx ;;
1831       m68k-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes ;;
1832       m68k-*-openbsd*)      fmt=aout em=nbsd bfd_gas=yes ;;
1833       m68k-apple-aux*)      fmt=coff em=aux ;;
1834       m68k-*-psos*)         fmt=elf em=psos;;
1835
1836       m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1837       m88k-*-coff*)         fmt=coff ;;
1838
1839       mcore-*-elf)          fmt=elf bfd_gas=yes ;;
1840       mcore-*-pe)           fmt=coff em=pe bfd_gas=yes ;;
1841
1842       # don't change em like *-*-bsd does
1843       mips-dec-netbsd*)     fmt=elf endian=little ;;
1844       mips-dec-openbsd*)    fmt=elf endian=little ;;
1845       mips-dec-bsd*)        fmt=aout endian=little ;;
1846       mips-sony-bsd*)       fmt=ecoff ;;
1847       mips-*-bsd*)          { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1848       mips-*-ultrix*)       fmt=ecoff endian=little ;;
1849       mips-*-osf*)          fmt=ecoff endian=little ;;
1850       mips-*-ecoff*)        fmt=ecoff ;;
1851       mips-*-ecoff*)        fmt=ecoff ;;
1852       mips-*-pe*)           fmt=coff endian=little em=pe ;;
1853       mips-*-irix6*)        fmt=elf ;;
1854       mips-*-irix5*)        fmt=elf ;;
1855       mips-*-irix*)         fmt=ecoff ;;
1856       mips-*-lnews*)        fmt=ecoff em=lnews ;;
1857       mips-*-riscos*)       fmt=ecoff ;;
1858       mips-*-sysv*)         fmt=ecoff ;;
1859       mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
1860                             fmt=elf ;;
1861       mips-*-vxworks*)      fmt=elf
1862                             cat >> confdefs.h <<\EOF
1863 #define MIPS_STABS_ELF 1
1864 EOF
1865
1866                             ;;
1867       mn10200-*-*)          fmt=elf bfd_gas=yes ;;
1868       mn10300-*-*)          fmt=elf bfd_gas=yes ;;
1869       pj*)                  fmt=elf ;;
1870       ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
1871                             fmt=coff em=pe ;;
1872       ppc-*-aix*)           fmt=coff ;;
1873       ppc-*-beos*)          fmt=coff ;;
1874       ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1875                             fmt=elf ;;
1876       ppc-*-linux-gnu*)     fmt=elf
1877                             case "$endian" in
1878                             big)  ;;
1879                             *)    { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
1880                             esac
1881                             ;;
1882       ppc-*-solaris*)       fmt=elf
1883                             if test ${this_target} = $target; then
1884                                 cat >> confdefs.h <<\EOF
1885 #define TARGET_SOLARIS_COMMENT 1
1886 EOF
1887
1888                             fi
1889                             if test x${endian} = xbig; then
1890                                 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1891                             fi
1892                             ;;
1893       ppc-*-rtems*)         fmt=elf ;;
1894       ppc-*-macos* | ppc-*-mpw*)
1895                             fmt=coff em=macos ;;
1896       ppc-*-netware*)       fmt=elf em=ppcnw ;;
1897       ppc-*-vxworks*)       fmt=elf ;;
1898
1899       sh-*-elf*)            fmt=elf ;;
1900       sh-*-coff*)           fmt=coff ;;
1901       sh-*-pe*)             fmt=coff em=pe bfd_gas=yes;;
1902       sh-*-rtemself*)       fmt=elf ;;
1903       sh-*-rtems*)          fmt=coff ;;
1904
1905       ns32k-pc532-mach* | ns32k-pc532-ux*)    fmt=aout em=pc532mach ;;
1906       ns32k-pc532-netbsd* | ns32k-pc532-lites*)  fmt=aout em=nbsd532 ;;
1907       ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1908
1909       sparc-*-rtems*)       fmt=aout ;;
1910       sparc-*-sunos4*)      fmt=aout em=sun3 ;;
1911       sparc-*-aout | sparc*-*-vxworks*)
1912                             fmt=aout em=sparcaout ;;
1913       sparc-*-coff)         fmt=coff ;;
1914       sparc-*-linux*aout*)  fmt=aout em=linux ;;
1915       sparc-*-linux-gnu*)   fmt=elf em=linux ;;
1916       sparc-*-lynxos*)      fmt=coff em=lynx ;;
1917       sparc-fujitsu-none)   fmt=aout ;;
1918       sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1919                             fmt=elf ;;
1920       sparc-*-netbsd*)      em=nbsd bfd_gas=yes
1921                             case ${cpu} in
1922                                 sparc) case ${os} in
1923                                            *elf*) fmt=elf ;;
1924                                            *)     fmt=aout ;;
1925                                        esac ;;
1926                                 sparc64) fmt=elf ;;
1927                             esac
1928                             ;;
1929       sparc-*-openbsd*)     fmt=aout em=nbsd ;;
1930
1931       strongarm-*-coff)     fmt=coff ;;
1932       strongarm-*-elf)      fmt=elf ;;
1933
1934       tic30-*-*aout*)       fmt=aout bfd_gas=yes ;;
1935       tic30-*-*coff*)       fmt=coff bfd_gas=yes ;;
1936       tic80-*-*)            fmt=coff ;;
1937
1938       v850-*-*)             fmt=elf bfd_gas=yes ;;
1939       v850e-*-*)            fmt=elf bfd_gas=yes ;;
1940       v850ea-*-*)           fmt=elf bfd_gas=yes ;;
1941
1942       vax-*-bsd* | vax-*-ultrix*)
1943                             fmt=aout ;;
1944       vax-*-vms)            fmt=vms ;;
1945
1946
1947       z8k-*-coff | z8k-*-sim)
1948                             fmt=coff ;;
1949
1950       w65-*-*)              fmt=coff ;;
1951
1952       *-*-aout | *-*-scout)
1953                             fmt=aout ;;
1954       *-*-nindy*)
1955                             fmt=bout ;;
1956       *-*-bsd*)
1957                             fmt=aout em=sun3 ;;
1958       *-*-generic)          fmt=generic ;;
1959       *-*-xray | *-*-hms)   fmt=coff ;;
1960       *-*-sim)              fmt=coff ;;
1961       *-*-elf | *-*-sysv4* | *-*-solaris*)
1962                             echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1963                             fmt=elf dev=yes ;;
1964       *-*-vxworks)          fmt=aout ;;
1965       *-*-netware)          fmt=elf ;;
1966     esac
1967
1968     if test ${this_target} = $target ; then
1969       endian_def=
1970       if test x${endian} = xbig; then
1971         endian_def=1
1972       elif test x${endian} = xlittle; then
1973         endian_def=0
1974       fi
1975       if test x${endian_def} != x; then
1976         cat >> confdefs.h <<EOF
1977 #define TARGET_BYTES_BIG_ENDIAN $endian_def
1978 EOF
1979
1980       fi
1981     fi
1982
1983     case ${cpu_type}-${fmt} in
1984       alpha*-*) bfd_gas=yes ;;
1985       arm-*)    bfd_gas=yes ;;
1986     # not yet
1987     # i386-aout)        bfd_gas=preferred ;;
1988       ia64*-*)  bfd_gas=yes ;;
1989       mips-*)   bfd_gas=yes ;;
1990       ns32k-*)  bfd_gas=yes ;;
1991       ppc-*)    bfd_gas=yes ;;
1992       sparc-*)  bfd_gas=yes ;;
1993       strongarm-*)      bfd_gas=yes ;;
1994       *-elf)    bfd_gas=yes ;;
1995       *-ecoff)  bfd_gas=yes ;;
1996       *-som)    bfd_gas=yes ;;
1997     #enable bfd for coff and aout to allow testing if a bfd target is
1998     #the primary target, but not for coff or aout as the primary target
1999       i386-coff)        if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2000       i386-aout)        if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2001       *)                ;;
2002     esac
2003
2004 # Other random stuff.
2005
2006     # Do we need the opcodes library?
2007     case ${cpu_type} in
2008       vax | i386 | tic30)
2009         ;;
2010
2011       *)
2012         need_opcodes=yes
2013
2014         case "${enable_shared}" in
2015         yes) shared_opcodes=true ;;
2016         *opcodes*) shared_opcodes=true ;;
2017         *) shared_opcodes=false ;;
2018         esac
2019         if test "${shared_opcodes}" = "true"; then
2020           # A shared libopcodes must be linked against libbfd.
2021           need_bfd=yes
2022         fi
2023         ;;
2024     esac
2025
2026     # Any other special object files needed ?
2027     case ${cpu_type} in
2028       fr30 | m32r)
2029         using_cgen=yes
2030         ;;
2031
2032       m68k)
2033         case ${extra_objects} in
2034         *m68k-parse.o*) ;;
2035         *) extra_objects="$extra_objects m68k-parse.o" ;;
2036         esac
2037         ;;
2038
2039       mips)
2040         echo ${extra_objects} | grep -s "itbl-parse.o" 
2041         if test $? -ne 0 ; then
2042           extra_objects="$extra_objects itbl-parse.o"
2043         fi
2044
2045         echo ${extra_objects} | grep -s "itbl-lex.o" 
2046         if test $? -ne 0 ; then
2047           extra_objects="$extra_objects itbl-lex.o"
2048         fi
2049
2050         echo ${extra_objects} | grep -s "itbl-ops.o" 
2051         if test $? -ne 0 ; then
2052           extra_objects="$extra_objects itbl-ops.o"
2053         fi
2054         ;;
2055
2056       sparc)
2057         if test $this_target = $target ; then
2058           cat >> confdefs.h <<EOF
2059 #define DEFAULT_ARCH "${arch}"
2060 EOF
2061
2062         fi
2063         ;;
2064       *)
2065         ;;
2066     esac
2067
2068     if test $using_cgen = yes ; then
2069         case "x${extra_objects}" in
2070         *cgen.o*) ;;
2071         *) extra_objects="$extra_objects cgen.o" ;;
2072         esac
2073     fi
2074
2075 # See if we really can support this configuration with the emulation code.
2076
2077     if test $this_target = $target ; then
2078       primary_bfd_gas=$bfd_gas
2079       obj_format=$fmt
2080       te_file=$em
2081
2082       if test $bfd_gas = no ; then
2083         # Can't support other configurations this way.
2084         break
2085       fi
2086     elif test $bfd_gas = no ; then
2087       # Can't support this configuration.
2088       break
2089     fi
2090
2091 # From target name and format, produce a list of supported emulations.
2092
2093     case ${generic_target}-${fmt} in
2094       mips-*-irix5*-*)  emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2095       mips-*-linux-gnu*-*) case "$endian" in
2096                         big)    emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2097                         *)      emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2098                         esac ;;
2099       mips-*-lnews*-ecoff) ;;
2100       mips-*-*-ecoff)   case "$endian" in
2101                         big)    emulation="mipsbecoff mipslecoff mipsecoff" ;;
2102                         *)      emulation="mipslecoff mipsbecoff mipsecoff" ;;
2103                         esac ;;
2104       mips-*-*-elf)     case "$endian" in
2105                         big)    emulation="mipsbelf mipslelf mipself" ;;
2106                         *)      emulation="mipslelf mipsbelf mipself" ;;
2107                         esac ;;
2108       # Uncommenting the next line will turn on support for i386 AOUT
2109       # for the default linux configuration
2110       # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
2111       #
2112       i386-*-aout)      emulation="i386aout" ;;
2113       i386-*-coff)      emulation="i386coff" ;;
2114       i386-*-elf)       emulation="i386elf" ;;
2115     esac
2116
2117     emulations="$emulations $emulation"
2118
2119 done
2120
2121 # Turn on all targets if possible
2122 if test ${all_targets} = "yes"; then
2123   case ${target_cpu_type} in
2124   i386)
2125     case ${obj_format} in
2126     aout)
2127       emulations="$emulations i386coff i386elf"
2128       ;;
2129     coff)
2130       emulations="$emulations i386aout i386elf"
2131     ;;
2132     elf)
2133       emulations="$emulations i386aout i386coff"
2134       ;;
2135     esac
2136   ;;
2137   esac
2138 fi
2139
2140 # Assign floating point type.  Most processors with FP support
2141 # IEEE FP.  On those that don't support FP at all, usually IEEE
2142 # is emulated.
2143 case ${target_cpu} in
2144   vax | tahoe ) atof=${target_cpu} ;;
2145   *)            atof=ieee ;;
2146 esac
2147
2148 case "${obj_format}" in
2149   "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2150 esac
2151
2152 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2153 cgen_cpu_prefix=""
2154 if test $using_cgen = yes ; then
2155   case ${target_cpu} in
2156     *) cgen_cpu_prefix=${target_cpu} ;;
2157   esac
2158   
2159   cat >> confdefs.h <<\EOF
2160 #define USING_CGEN 1
2161 EOF
2162
2163 fi
2164
2165
2166 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2167   { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2168 fi
2169
2170 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2171   { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2172 fi
2173
2174 case ${user_bfd_gas}-${primary_bfd_gas} in
2175   yes-yes | no-no)
2176     # We didn't override user's choice.
2177     ;;
2178   no-yes)
2179     echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2180     ;;
2181   no-preferred)
2182     primary_bfd_gas=no
2183     ;;
2184   *-preferred)
2185     primary_bfd_gas=yes
2186     ;;
2187   yes-*)
2188     primary_bfd_gas=yes
2189     ;;
2190   -*)
2191     # User specified nothing.
2192     ;;
2193 esac
2194
2195 # Some COFF configurations want these random other flags set.
2196 case ${obj_format} in
2197   coff)
2198     case ${target_cpu_type} in
2199       i386) cat >> confdefs.h <<\EOF
2200 #define I386COFF 1
2201 EOF
2202  ;;
2203       m68k) cat >> confdefs.h <<\EOF
2204 #define M68KCOFF 1
2205 EOF
2206  ;;
2207       m88k) cat >> confdefs.h <<\EOF
2208 #define M88KCOFF 1
2209 EOF
2210  ;;
2211     esac
2212     ;;
2213 esac
2214
2215 # Getting this done right is going to be a bitch.  Each configuration specified
2216 # with --enable-targets=... should be checked for environment, format, cpu, and
2217 # bfd_gas setting.
2218 #
2219 # For each configuration, the necessary object file support code must be linked
2220 # in.  This might be only one, it might be up to four.  The necessary emulation
2221 # code needs to be provided, too.
2222 #
2223 # And then there's "--enable-targets=all"....
2224 #
2225 # For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
2226
2227 formats="${obj_format}"
2228 emfiles=""
2229 EMULATIONS=""
2230 _gas_uniq_list="$emulations"
2231 _gas_uniq_newlist=""
2232 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2233   case $_gas_uniq_i in
2234   _gas_uniq_dummy) ;;
2235   *) case " $_gas_uniq_newlist " in
2236        *" $_gas_uniq_i "*) ;;
2237        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2238      esac ;;
2239   esac
2240 done
2241 emulations=$_gas_uniq_newlist
2242
2243 for em in . $emulations ; do
2244   case $em in
2245     .)  continue ;;
2246     mipsbelf | mipslelf)
2247         fmt=elf   file=mipself ;;
2248     mipsbecoff | mipslecoff)
2249         fmt=ecoff file=mipsecoff ;;
2250     i386aout)
2251         fmt=aout  file=i386aout ;;
2252     i386coff)
2253         fmt=coff  file=i386coff ;;
2254     i386elf)
2255         fmt=elf   file=i386elf ;;
2256   esac
2257   formats="$formats $fmt"
2258   emfiles="$emfiles e-$file.o"
2259   EMULATIONS="$EMULATIONS &$em,"
2260 done
2261 _gas_uniq_list="$formats"
2262 _gas_uniq_newlist=""
2263 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2264   case $_gas_uniq_i in
2265   _gas_uniq_dummy) ;;
2266   *) case " $_gas_uniq_newlist " in
2267        *" $_gas_uniq_i "*) ;;
2268        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2269      esac ;;
2270   esac
2271 done
2272 formats=$_gas_uniq_newlist
2273
2274 _gas_uniq_list="$emfiles"
2275 _gas_uniq_newlist=""
2276 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2277   case $_gas_uniq_i in
2278   _gas_uniq_dummy) ;;
2279   *) case " $_gas_uniq_newlist " in
2280        *" $_gas_uniq_i "*) ;;
2281        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2282      esac ;;
2283   esac
2284 done
2285 emfiles=$_gas_uniq_newlist
2286
2287 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2288   for fmt in $formats ; do
2289     case $fmt in
2290       aout)     cat >> confdefs.h <<\EOF
2291 #define OBJ_MAYBE_AOUT 1
2292 EOF
2293    ;;
2294       bout)     cat >> confdefs.h <<\EOF
2295 #define OBJ_MAYBE_BOUT 1
2296 EOF
2297    ;;
2298       coff)     cat >> confdefs.h <<\EOF
2299 #define OBJ_MAYBE_COFF 1
2300 EOF
2301     ;;
2302       ecoff)    cat >> confdefs.h <<\EOF
2303 #define OBJ_MAYBE_ECOFF 1
2304 EOF
2305    ;;
2306       elf)      cat >> confdefs.h <<\EOF
2307 #define OBJ_MAYBE_ELF 1
2308 EOF
2309      ;;
2310       generic)  cat >> confdefs.h <<\EOF
2311 #define OBJ_MAYBE_GENERIC 1
2312 EOF
2313  ;;
2314       hp300)    cat >> confdefs.h <<\EOF
2315 #define OBJ_MAYBE_HP300 1
2316 EOF
2317    ;;
2318       ieee)     cat >> confdefs.h <<\EOF
2319 #define OBJ_MAYBE_IEEE 1
2320 EOF
2321     ;;
2322       som)      cat >> confdefs.h <<\EOF
2323 #define OBJ_MAYBE_SOM 1
2324 EOF
2325      ;;
2326       vms)      cat >> confdefs.h <<\EOF
2327 #define OBJ_MAYBE_VMS 1
2328 EOF
2329      ;;
2330     esac
2331     extra_objects="$extra_objects obj-$fmt.o"
2332   done
2333   obj_format=multi
2334 fi
2335 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2336   DEFAULT_EMULATION=`set . $emulations ; echo $2`
2337   # e-mips* has more than one emulation per file, e-i386* has just one at the
2338   # moment.  If only one emulation is specified, then don't define
2339   # USE_EMULATIONS or include any of the e-files as they will only be bloat.
2340   case "${obj_format}${emfiles}" in
2341     multi* | *mips*)
2342       extra_objects="$extra_objects $emfiles"
2343       cat >> confdefs.h <<\EOF
2344 #define USE_EMULATIONS 1
2345 EOF
2346  ;;
2347   esac
2348 fi
2349
2350 cat >> confdefs.h <<EOF
2351 #define EMULATIONS $EMULATIONS
2352 EOF
2353
2354 cat >> confdefs.h <<EOF
2355 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2356 EOF
2357
2358
2359 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2360   yes-*-coff)   need_bfd=yes ;;
2361   no-*-coff)    need_bfd=yes
2362                 cat >> confdefs.h <<\EOF
2363 #define MANY_SEGMENTS 1
2364 EOF
2365  ;;
2366 esac
2367
2368 reject_dev_configs=yes
2369
2370 case ${reject_dev_configs}-${dev} in
2371   yes-yes) # Oops.
2372     { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2373     ;;
2374 esac
2375
2376
2377
2378
2379
2380
2381
2382 case "${primary_bfd_gas}" in
2383   yes)  cat >> confdefs.h <<\EOF
2384 #define BFD_ASSEMBLER 1
2385 EOF
2386
2387         need_bfd=yes ;;
2388 esac
2389
2390 # do we need the opcodes library?
2391 case "${need_opcodes}" in
2392 yes)
2393   OPCODES_LIB=../opcodes/libopcodes.la
2394   ;;
2395 esac
2396
2397 case "${need_bfd}" in
2398 yes)
2399   BFDLIB=../bfd/libbfd.la
2400   ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2401   ;;
2402 esac
2403
2404
2405
2406
2407
2408
2409 cat >> confdefs.h <<EOF
2410 #define TARGET_ALIAS "${target_alias}"
2411 EOF
2412
2413 cat >> confdefs.h <<EOF
2414 #define TARGET_CANONICAL "${target}"
2415 EOF
2416
2417 cat >> confdefs.h <<EOF
2418 #define TARGET_CPU "${target_cpu}"
2419 EOF
2420
2421 cat >> confdefs.h <<EOF
2422 #define TARGET_VENDOR "${target_vendor}"
2423 EOF
2424
2425 cat >> confdefs.h <<EOF
2426 #define TARGET_OS "${target_os}"
2427 EOF
2428
2429
2430 # Extract the first word of "gcc", so it can be a program name with args.
2431 set dummy gcc; ac_word=$2
2432 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2433 echo "configure:2434: checking for $ac_word" >&5
2434 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2435   echo $ac_n "(cached) $ac_c" 1>&6
2436 else
2437   if test -n "$CC"; then
2438   ac_cv_prog_CC="$CC" # Let the user override the test.
2439 else
2440   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2441   ac_dummy="$PATH"
2442   for ac_dir in $ac_dummy; do
2443     test -z "$ac_dir" && ac_dir=.
2444     if test -f $ac_dir/$ac_word; then
2445       ac_cv_prog_CC="gcc"
2446       break
2447     fi
2448   done
2449   IFS="$ac_save_ifs"
2450 fi
2451 fi
2452 CC="$ac_cv_prog_CC"
2453 if test -n "$CC"; then
2454   echo "$ac_t""$CC" 1>&6
2455 else
2456   echo "$ac_t""no" 1>&6
2457 fi
2458
2459 if test -z "$CC"; then
2460   # Extract the first word of "cc", so it can be a program name with args.
2461 set dummy cc; ac_word=$2
2462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2463 echo "configure:2464: checking for $ac_word" >&5
2464 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2465   echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467   if test -n "$CC"; then
2468   ac_cv_prog_CC="$CC" # Let the user override the test.
2469 else
2470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2471   ac_prog_rejected=no
2472   ac_dummy="$PATH"
2473   for ac_dir in $ac_dummy; do
2474     test -z "$ac_dir" && ac_dir=.
2475     if test -f $ac_dir/$ac_word; then
2476       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2477         ac_prog_rejected=yes
2478         continue
2479       fi
2480       ac_cv_prog_CC="cc"
2481       break
2482     fi
2483   done
2484   IFS="$ac_save_ifs"
2485 if test $ac_prog_rejected = yes; then
2486   # We found a bogon in the path, so make sure we never use it.
2487   set dummy $ac_cv_prog_CC
2488   shift
2489   if test $# -gt 0; then
2490     # We chose a different compiler from the bogus one.
2491     # However, it has the same basename, so the bogon will be chosen
2492     # first if we set CC to just the basename; use the full file name.
2493     shift
2494     set dummy "$ac_dir/$ac_word" "$@"
2495     shift
2496     ac_cv_prog_CC="$@"
2497   fi
2498 fi
2499 fi
2500 fi
2501 CC="$ac_cv_prog_CC"
2502 if test -n "$CC"; then
2503   echo "$ac_t""$CC" 1>&6
2504 else
2505   echo "$ac_t""no" 1>&6
2506 fi
2507
2508   if test -z "$CC"; then
2509     case "`uname -s`" in
2510     *win32* | *WIN32*)
2511       # Extract the first word of "cl", so it can be a program name with args.
2512 set dummy cl; ac_word=$2
2513 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2514 echo "configure:2515: checking for $ac_word" >&5
2515 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2516   echo $ac_n "(cached) $ac_c" 1>&6
2517 else
2518   if test -n "$CC"; then
2519   ac_cv_prog_CC="$CC" # Let the user override the test.
2520 else
2521   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2522   ac_dummy="$PATH"
2523   for ac_dir in $ac_dummy; do
2524     test -z "$ac_dir" && ac_dir=.
2525     if test -f $ac_dir/$ac_word; then
2526       ac_cv_prog_CC="cl"
2527       break
2528     fi
2529   done
2530   IFS="$ac_save_ifs"
2531 fi
2532 fi
2533 CC="$ac_cv_prog_CC"
2534 if test -n "$CC"; then
2535   echo "$ac_t""$CC" 1>&6
2536 else
2537   echo "$ac_t""no" 1>&6
2538 fi
2539  ;;
2540     esac
2541   fi
2542   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2543 fi
2544
2545 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2546 echo "configure:2547: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2547
2548 ac_ext=c
2549 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2550 ac_cpp='$CPP $CPPFLAGS'
2551 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2552 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2553 cross_compiling=$ac_cv_prog_cc_cross
2554
2555 cat > conftest.$ac_ext << EOF
2556
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559
2560 main(){return(0);}
2561 EOF
2562 if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2563   ac_cv_prog_cc_works=yes
2564   # If we can't run a trivial program, we are probably using a cross compiler.
2565   if (./conftest; exit) 2>/dev/null; then
2566     ac_cv_prog_cc_cross=no
2567   else
2568     ac_cv_prog_cc_cross=yes
2569   fi
2570 else
2571   echo "configure: failed program was:" >&5
2572   cat conftest.$ac_ext >&5
2573   ac_cv_prog_cc_works=no
2574 fi
2575 rm -fr conftest*
2576 ac_ext=c
2577 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2578 ac_cpp='$CPP $CPPFLAGS'
2579 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2580 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2581 cross_compiling=$ac_cv_prog_cc_cross
2582
2583 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2584 if test $ac_cv_prog_cc_works = no; then
2585   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2586 fi
2587 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2588 echo "configure:2589: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2589 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2590 cross_compiling=$ac_cv_prog_cc_cross
2591
2592 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2593 echo "configure:2594: checking whether we are using GNU C" >&5
2594 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2595   echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597   cat > conftest.c <<EOF
2598 #ifdef __GNUC__
2599   yes;
2600 #endif
2601 EOF
2602 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2603   ac_cv_prog_gcc=yes
2604 else
2605   ac_cv_prog_gcc=no
2606 fi
2607 fi
2608
2609 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2610
2611 if test $ac_cv_prog_gcc = yes; then
2612   GCC=yes
2613 else
2614   GCC=
2615 fi
2616
2617 ac_test_CFLAGS="${CFLAGS+set}"
2618 ac_save_CFLAGS="$CFLAGS"
2619 CFLAGS=
2620 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2621 echo "configure:2622: checking whether ${CC-cc} accepts -g" >&5
2622 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   echo 'void f(){}' > conftest.c
2626 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2627   ac_cv_prog_cc_g=yes
2628 else
2629   ac_cv_prog_cc_g=no
2630 fi
2631 rm -f conftest*
2632
2633 fi
2634
2635 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2636 if test "$ac_test_CFLAGS" = set; then
2637   CFLAGS="$ac_save_CFLAGS"
2638 elif test $ac_cv_prog_cc_g = yes; then
2639   if test "$GCC" = yes; then
2640     CFLAGS="-g -O2"
2641   else
2642     CFLAGS="-g"
2643   fi
2644 else
2645   if test "$GCC" = yes; then
2646     CFLAGS="-O2"
2647   else
2648     CFLAGS=
2649   fi
2650 fi
2651
2652
2653 for ac_prog in 'bison -y' byacc
2654 do
2655 # Extract the first word of "$ac_prog", so it can be a program name with args.
2656 set dummy $ac_prog; ac_word=$2
2657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2658 echo "configure:2659: checking for $ac_word" >&5
2659 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   if test -n "$YACC"; then
2663   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2664 else
2665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2666   ac_dummy="$PATH"
2667   for ac_dir in $ac_dummy; do
2668     test -z "$ac_dir" && ac_dir=.
2669     if test -f $ac_dir/$ac_word; then
2670       ac_cv_prog_YACC="$ac_prog"
2671       break
2672     fi
2673   done
2674   IFS="$ac_save_ifs"
2675 fi
2676 fi
2677 YACC="$ac_cv_prog_YACC"
2678 if test -n "$YACC"; then
2679   echo "$ac_t""$YACC" 1>&6
2680 else
2681   echo "$ac_t""no" 1>&6
2682 fi
2683
2684 test -n "$YACC" && break
2685 done
2686 test -n "$YACC" || YACC="yacc"
2687
2688 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2689 echo "configure:2690: checking how to run the C preprocessor" >&5
2690 # On Suns, sometimes $CPP names a directory.
2691 if test -n "$CPP" && test -d "$CPP"; then
2692   CPP=
2693 fi
2694 if test -z "$CPP"; then
2695 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2696   echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698     # This must be in double quotes, not single quotes, because CPP may get
2699   # substituted into the Makefile and "${CC-cc}" will confuse make.
2700   CPP="${CC-cc} -E"
2701   # On the NeXT, cc -E runs the code through the compiler's parser,
2702   # not just through cpp.
2703   cat > conftest.$ac_ext <<EOF
2704 #line 2705 "configure"
2705 #include "confdefs.h"
2706 #include <assert.h>
2707 Syntax Error
2708 EOF
2709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2710 { (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2712 if test -z "$ac_err"; then
2713   :
2714 else
2715   echo "$ac_err" >&5
2716   echo "configure: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   rm -rf conftest*
2719   CPP="${CC-cc} -E -traditional-cpp"
2720   cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723 #include <assert.h>
2724 Syntax Error
2725 EOF
2726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2727 { (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2729 if test -z "$ac_err"; then
2730   :
2731 else
2732   echo "$ac_err" >&5
2733   echo "configure: failed program was:" >&5
2734   cat conftest.$ac_ext >&5
2735   rm -rf conftest*
2736   CPP="${CC-cc} -nologo -E"
2737   cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740 #include <assert.h>
2741 Syntax Error
2742 EOF
2743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2744 { (eval echo configure:2745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2746 if test -z "$ac_err"; then
2747   :
2748 else
2749   echo "$ac_err" >&5
2750   echo "configure: failed program was:" >&5
2751   cat conftest.$ac_ext >&5
2752   rm -rf conftest*
2753   CPP=/lib/cpp
2754 fi
2755 rm -f conftest*
2756 fi
2757 rm -f conftest*
2758 fi
2759 rm -f conftest*
2760   ac_cv_prog_CPP="$CPP"
2761 fi
2762   CPP="$ac_cv_prog_CPP"
2763 else
2764   ac_cv_prog_CPP="$CPP"
2765 fi
2766 echo "$ac_t""$CPP" 1>&6
2767
2768 missing_dir=`cd $ac_aux_dir && pwd`
2769 for ac_prog in flex lex
2770 do
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2774 echo "configure:2775: checking for $ac_word" >&5
2775 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2776   echo $ac_n "(cached) $ac_c" 1>&6
2777 else
2778   if test -n "$LEX"; then
2779   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2780 else
2781   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2782   ac_dummy="$PATH"
2783   for ac_dir in $ac_dummy; do
2784     test -z "$ac_dir" && ac_dir=.
2785     if test -f $ac_dir/$ac_word; then
2786       ac_cv_prog_LEX="$ac_prog"
2787       break
2788     fi
2789   done
2790   IFS="$ac_save_ifs"
2791 fi
2792 fi
2793 LEX="$ac_cv_prog_LEX"
2794 if test -n "$LEX"; then
2795   echo "$ac_t""$LEX" 1>&6
2796 else
2797   echo "$ac_t""no" 1>&6
2798 fi
2799
2800 test -n "$LEX" && break
2801 done
2802 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2803
2804 # Extract the first word of "flex", so it can be a program name with args.
2805 set dummy flex; ac_word=$2
2806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2807 echo "configure:2808: checking for $ac_word" >&5
2808 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2809   echo $ac_n "(cached) $ac_c" 1>&6
2810 else
2811   if test -n "$LEX"; then
2812   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2813 else
2814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2815   ac_dummy="$PATH"
2816   for ac_dir in $ac_dummy; do
2817     test -z "$ac_dir" && ac_dir=.
2818     if test -f $ac_dir/$ac_word; then
2819       ac_cv_prog_LEX="flex"
2820       break
2821     fi
2822   done
2823   IFS="$ac_save_ifs"
2824   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2825 fi
2826 fi
2827 LEX="$ac_cv_prog_LEX"
2828 if test -n "$LEX"; then
2829   echo "$ac_t""$LEX" 1>&6
2830 else
2831   echo "$ac_t""no" 1>&6
2832 fi
2833
2834 if test -z "$LEXLIB"
2835 then
2836   case "$LEX" in
2837   flex*) ac_lib=fl ;;
2838   *) ac_lib=l ;;
2839   esac
2840   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2841 echo "configure:2842: checking for yywrap in -l$ac_lib" >&5
2842 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   ac_save_LIBS="$LIBS"
2847 LIBS="-l$ac_lib  $LIBS"
2848 cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 /* Override any gcc2 internal prototype to avoid an error.  */
2852 /* We use char because int might match the return type of a gcc2
2853     builtin and then its argument prototype would still apply.  */
2854 char yywrap();
2855
2856 int main() {
2857 yywrap()
2858 ; return 0; }
2859 EOF
2860 if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2861   rm -rf conftest*
2862   eval "ac_cv_lib_$ac_lib_var=yes"
2863 else
2864   echo "configure: failed program was:" >&5
2865   cat conftest.$ac_ext >&5
2866   rm -rf conftest*
2867   eval "ac_cv_lib_$ac_lib_var=no"
2868 fi
2869 rm -f conftest*
2870 LIBS="$ac_save_LIBS"
2871
2872 fi
2873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2874   echo "$ac_t""yes" 1>&6
2875   LEXLIB="-l$ac_lib"
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879
2880 fi
2881
2882 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2883 echo "configure:2884: checking lex output file root" >&5
2884 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2885   echo $ac_n "(cached) $ac_c" 1>&6
2886 else
2887   # The minimal lex program is just a single line: %%.  But some broken lexes
2888 # (Solaris, I think it was) want two %% lines, so accommodate them.
2889 echo '%%
2890 %%' | $LEX
2891 if test -f lex.yy.c; then
2892   ac_cv_prog_lex_root=lex.yy
2893 elif test -f lexyy.c; then
2894   ac_cv_prog_lex_root=lexyy
2895 else
2896   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2897 fi
2898 fi
2899
2900 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2901 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2902
2903 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2904 echo "configure:2905: checking whether yytext is a pointer" >&5
2905 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   # POSIX says lex can declare yytext either as a pointer or an array; the
2909 # default is implementation-dependent. Figure out which it is, since
2910 # not all implementations provide the %pointer and %array declarations.
2911 ac_cv_prog_lex_yytext_pointer=no
2912 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2913 ac_save_LIBS="$LIBS"
2914 LIBS="$LIBS $LEXLIB"
2915 cat > conftest.$ac_ext <<EOF
2916 #line 2917 "configure"
2917 #include "confdefs.h"
2918 `cat $LEX_OUTPUT_ROOT.c`
2919 int main() {
2920
2921 ; return 0; }
2922 EOF
2923 if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2924   rm -rf conftest*
2925   ac_cv_prog_lex_yytext_pointer=yes
2926 else
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929 fi
2930 rm -f conftest*
2931 LIBS="$ac_save_LIBS"
2932 rm -f "${LEX_OUTPUT_ROOT}.c"
2933
2934 fi
2935
2936 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2937 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2938   cat >> confdefs.h <<\EOF
2939 #define YYTEXT_POINTER 1
2940 EOF
2941
2942 fi
2943
2944
2945 ALL_LINGUAS=
2946 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2947 echo "configure:2948: checking for POSIXized ISC" >&5
2948 if test -d /etc/conf/kconfig.d &&
2949   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2950 then
2951   echo "$ac_t""yes" 1>&6
2952   ISC=yes # If later tests want to check for ISC.
2953   cat >> confdefs.h <<\EOF
2954 #define _POSIX_SOURCE 1
2955 EOF
2956
2957   if test "$GCC" = yes; then
2958     CC="$CC -posix"
2959   else
2960     CC="$CC -Xp"
2961   fi
2962 else
2963   echo "$ac_t""no" 1>&6
2964   ISC=
2965 fi
2966
2967 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2968 echo "configure:2969: checking for ANSI C header files" >&5
2969 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2970   echo $ac_n "(cached) $ac_c" 1>&6
2971 else
2972   cat > conftest.$ac_ext <<EOF
2973 #line 2974 "configure"
2974 #include "confdefs.h"
2975 #include <stdlib.h>
2976 #include <stdarg.h>
2977 #include <string.h>
2978 #include <float.h>
2979 EOF
2980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2981 { (eval echo configure:2982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2983 if test -z "$ac_err"; then
2984   rm -rf conftest*
2985   ac_cv_header_stdc=yes
2986 else
2987   echo "$ac_err" >&5
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   rm -rf conftest*
2991   ac_cv_header_stdc=no
2992 fi
2993 rm -f conftest*
2994
2995 if test $ac_cv_header_stdc = yes; then
2996   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2997 cat > conftest.$ac_ext <<EOF
2998 #line 2999 "configure"
2999 #include "confdefs.h"
3000 #include <string.h>
3001 EOF
3002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3003   egrep "memchr" >/dev/null 2>&1; then
3004   :
3005 else
3006   rm -rf conftest*
3007   ac_cv_header_stdc=no
3008 fi
3009 rm -f conftest*
3010
3011 fi
3012
3013 if test $ac_cv_header_stdc = yes; then
3014   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3015 cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 #include <stdlib.h>
3019 EOF
3020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3021   egrep "free" >/dev/null 2>&1; then
3022   :
3023 else
3024   rm -rf conftest*
3025   ac_cv_header_stdc=no
3026 fi
3027 rm -f conftest*
3028
3029 fi
3030
3031 if test $ac_cv_header_stdc = yes; then
3032   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3033 if test "$cross_compiling" = yes; then
3034   :
3035 else
3036   cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3039 #include <ctype.h>
3040 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3041 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3042 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3043 int main () { int i; for (i = 0; i < 256; i++)
3044 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3045 exit (0); }
3046
3047 EOF
3048 if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3049 then
3050   :
3051 else
3052   echo "configure: failed program was:" >&5
3053   cat conftest.$ac_ext >&5
3054   rm -fr conftest*
3055   ac_cv_header_stdc=no
3056 fi
3057 rm -fr conftest*
3058 fi
3059
3060 fi
3061 fi
3062
3063 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3064 if test $ac_cv_header_stdc = yes; then
3065   cat >> confdefs.h <<\EOF
3066 #define STDC_HEADERS 1
3067 EOF
3068
3069 fi
3070
3071 echo $ac_n "checking for working const""... $ac_c" 1>&6
3072 echo "configure:3073: checking for working const" >&5
3073 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079
3080 int main() {
3081
3082 /* Ultrix mips cc rejects this.  */
3083 typedef int charset[2]; const charset x;
3084 /* SunOS 4.1.1 cc rejects this.  */
3085 char const *const *ccp;
3086 char **p;
3087 /* NEC SVR4.0.2 mips cc rejects this.  */
3088 struct point {int x, y;};
3089 static struct point const zero = {0,0};
3090 /* AIX XL C 1.02.0.0 rejects this.
3091    It does not let you subtract one const X* pointer from another in an arm
3092    of an if-expression whose if-part is not a constant expression */
3093 const char *g = "string";
3094 ccp = &g + (g ? g-g : 0);
3095 /* HPUX 7.0 cc rejects these. */
3096 ++ccp;
3097 p = (char**) ccp;
3098 ccp = (char const *const *) p;
3099 { /* SCO 3.2v4 cc rejects this.  */
3100   char *t;
3101   char const *s = 0 ? (char *) 0 : (char const *) 0;
3102
3103   *t++ = 0;
3104 }
3105 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3106   int x[] = {25, 17};
3107   const int *foo = &x[0];
3108   ++foo;
3109 }
3110 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3111   typedef const int *iptr;
3112   iptr p = 0;
3113   ++p;
3114 }
3115 { /* AIX XL C 1.02.0.0 rejects this saying
3116      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3117   struct s { int j; const int *ap[3]; };
3118   struct s *b; b->j = 5;
3119 }
3120 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3121   const int foo = 10;
3122 }
3123
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127   rm -rf conftest*
3128   ac_cv_c_const=yes
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   ac_cv_c_const=no
3134 fi
3135 rm -f conftest*
3136 fi
3137
3138 echo "$ac_t""$ac_cv_c_const" 1>&6
3139 if test $ac_cv_c_const = no; then
3140   cat >> confdefs.h <<\EOF
3141 #define const 
3142 EOF
3143
3144 fi
3145
3146 echo $ac_n "checking for inline""... $ac_c" 1>&6
3147 echo "configure:3148: checking for inline" >&5
3148 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   ac_cv_c_inline=no
3152 for ac_kw in inline __inline__ __inline; do
3153   cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156
3157 int main() {
3158 } $ac_kw foo() {
3159 ; return 0; }
3160 EOF
3161 if { (eval echo configure:3162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3162   rm -rf conftest*
3163   ac_cv_c_inline=$ac_kw; break
3164 else
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167 fi
3168 rm -f conftest*
3169 done
3170
3171 fi
3172
3173 echo "$ac_t""$ac_cv_c_inline" 1>&6
3174 case "$ac_cv_c_inline" in
3175   inline | yes) ;;
3176   no) cat >> confdefs.h <<\EOF
3177 #define inline 
3178 EOF
3179  ;;
3180   *)  cat >> confdefs.h <<EOF
3181 #define inline $ac_cv_c_inline
3182 EOF
3183  ;;
3184 esac
3185
3186 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3187 echo "configure:3188: checking for off_t" >&5
3188 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3189   echo $ac_n "(cached) $ac_c" 1>&6
3190 else
3191   cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3194 #include <sys/types.h>
3195 #if STDC_HEADERS
3196 #include <stdlib.h>
3197 #include <stddef.h>
3198 #endif
3199 EOF
3200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3201   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3202   rm -rf conftest*
3203   ac_cv_type_off_t=yes
3204 else
3205   rm -rf conftest*
3206   ac_cv_type_off_t=no
3207 fi
3208 rm -f conftest*
3209
3210 fi
3211 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3212 if test $ac_cv_type_off_t = no; then
3213   cat >> confdefs.h <<\EOF
3214 #define off_t long
3215 EOF
3216
3217 fi
3218
3219 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3220 echo "configure:3221: checking for size_t" >&5
3221 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <sys/types.h>
3228 #if STDC_HEADERS
3229 #include <stdlib.h>
3230 #include <stddef.h>
3231 #endif
3232 EOF
3233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3234   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3235   rm -rf conftest*
3236   ac_cv_type_size_t=yes
3237 else
3238   rm -rf conftest*
3239   ac_cv_type_size_t=no
3240 fi
3241 rm -f conftest*
3242
3243 fi
3244 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3245 if test $ac_cv_type_size_t = no; then
3246   cat >> confdefs.h <<\EOF
3247 #define size_t unsigned
3248 EOF
3249
3250 fi
3251
3252 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3253 # for constant arguments.  Useless!
3254 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3255 echo "configure:3256: checking for working alloca.h" >&5
3256 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <alloca.h>
3263 int main() {
3264 char *p = alloca(2 * sizeof(int));
3265 ; return 0; }
3266 EOF
3267 if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3268   rm -rf conftest*
3269   ac_cv_header_alloca_h=yes
3270 else
3271   echo "configure: failed program was:" >&5
3272   cat conftest.$ac_ext >&5
3273   rm -rf conftest*
3274   ac_cv_header_alloca_h=no
3275 fi
3276 rm -f conftest*
3277 fi
3278
3279 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3280 if test $ac_cv_header_alloca_h = yes; then
3281   cat >> confdefs.h <<\EOF
3282 #define HAVE_ALLOCA_H 1
3283 EOF
3284
3285 fi
3286
3287 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3288 echo "configure:3289: checking for alloca" >&5
3289 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3290   echo $ac_n "(cached) $ac_c" 1>&6
3291 else
3292   cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295
3296 #ifdef __GNUC__
3297 # define alloca __builtin_alloca
3298 #else
3299 # ifdef _MSC_VER
3300 #  include <malloc.h>
3301 #  define alloca _alloca
3302 # else
3303 #  if HAVE_ALLOCA_H
3304 #   include <alloca.h>
3305 #  else
3306 #   ifdef _AIX
3307  #pragma alloca
3308 #   else
3309 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3310 char *alloca ();
3311 #    endif
3312 #   endif
3313 #  endif
3314 # endif
3315 #endif
3316
3317 int main() {
3318 char *p = (char *) alloca(1);
3319 ; return 0; }
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3322   rm -rf conftest*
3323   ac_cv_func_alloca_works=yes
3324 else
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   ac_cv_func_alloca_works=no
3329 fi
3330 rm -f conftest*
3331 fi
3332
3333 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3334 if test $ac_cv_func_alloca_works = yes; then
3335   cat >> confdefs.h <<\EOF
3336 #define HAVE_ALLOCA 1
3337 EOF
3338
3339 fi
3340
3341 if test $ac_cv_func_alloca_works = no; then
3342   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3343   # that cause trouble.  Some versions do not even contain alloca or
3344   # contain a buggy version.  If you still want to use their alloca,
3345   # use ar to extract alloca.o from them instead of compiling alloca.c.
3346   ALLOCA=alloca.${ac_objext}
3347   cat >> confdefs.h <<\EOF
3348 #define C_ALLOCA 1
3349 EOF
3350
3351
3352 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3353 echo "configure:3354: checking whether alloca needs Cray hooks" >&5
3354 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   cat > conftest.$ac_ext <<EOF
3358 #line 3359 "configure"
3359 #include "confdefs.h"
3360 #if defined(CRAY) && ! defined(CRAY2)
3361 webecray
3362 #else
3363 wenotbecray
3364 #endif
3365
3366 EOF
3367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3368   egrep "webecray" >/dev/null 2>&1; then
3369   rm -rf conftest*
3370   ac_cv_os_cray=yes
3371 else
3372   rm -rf conftest*
3373   ac_cv_os_cray=no
3374 fi
3375 rm -f conftest*
3376
3377 fi
3378
3379 echo "$ac_t""$ac_cv_os_cray" 1>&6
3380 if test $ac_cv_os_cray = yes; then
3381 for ac_func in _getb67 GETB67 getb67; do
3382   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3383 echo "configure:3384: checking for $ac_func" >&5
3384 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3385   echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387   cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 /* System header to define __stub macros and hopefully few prototypes,
3391     which can conflict with char $ac_func(); below.  */
3392 #include <assert.h>
3393 /* Override any gcc2 internal prototype to avoid an error.  */
3394 /* We use char because int might match the return type of a gcc2
3395     builtin and then its argument prototype would still apply.  */
3396 char $ac_func();
3397
3398 int main() {
3399
3400 /* The GNU C library defines this for functions which it implements
3401     to always fail with ENOSYS.  Some functions are actually named
3402     something starting with __ and the normal name is an alias.  */
3403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3404 choke me
3405 #else
3406 $ac_func();
3407 #endif
3408
3409 ; return 0; }
3410 EOF
3411 if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3412   rm -rf conftest*
3413   eval "ac_cv_func_$ac_func=yes"
3414 else
3415   echo "configure: failed program was:" >&5
3416   cat conftest.$ac_ext >&5
3417   rm -rf conftest*
3418   eval "ac_cv_func_$ac_func=no"
3419 fi
3420 rm -f conftest*
3421 fi
3422
3423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3424   echo "$ac_t""yes" 1>&6
3425   cat >> confdefs.h <<EOF
3426 #define CRAY_STACKSEG_END $ac_func
3427 EOF
3428
3429   break
3430 else
3431   echo "$ac_t""no" 1>&6
3432 fi
3433
3434 done
3435 fi
3436
3437 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3438 echo "configure:3439: checking stack direction for C alloca" >&5
3439 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   if test "$cross_compiling" = yes; then
3443   ac_cv_c_stack_direction=0
3444 else
3445   cat > conftest.$ac_ext <<EOF
3446 #line 3447 "configure"
3447 #include "confdefs.h"
3448 find_stack_direction ()
3449 {
3450   static char *addr = 0;
3451   auto char dummy;
3452   if (addr == 0)
3453     {
3454       addr = &dummy;
3455       return find_stack_direction ();
3456     }
3457   else
3458     return (&dummy > addr) ? 1 : -1;
3459 }
3460 main ()
3461 {
3462   exit (find_stack_direction() < 0);
3463 }
3464 EOF
3465 if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3466 then
3467   ac_cv_c_stack_direction=1
3468 else
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -fr conftest*
3472   ac_cv_c_stack_direction=-1
3473 fi
3474 rm -fr conftest*
3475 fi
3476
3477 fi
3478
3479 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3480 cat >> confdefs.h <<EOF
3481 #define STACK_DIRECTION $ac_cv_c_stack_direction
3482 EOF
3483
3484 fi
3485
3486 for ac_hdr in unistd.h
3487 do
3488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3490 echo "configure:3491: checking for $ac_hdr" >&5
3491 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3492   echo $ac_n "(cached) $ac_c" 1>&6
3493 else
3494   cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <$ac_hdr>
3498 EOF
3499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3500 { (eval echo configure:3501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3502 if test -z "$ac_err"; then
3503   rm -rf conftest*
3504   eval "ac_cv_header_$ac_safe=yes"
3505 else
3506   echo "$ac_err" >&5
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   rm -rf conftest*
3510   eval "ac_cv_header_$ac_safe=no"
3511 fi
3512 rm -f conftest*
3513 fi
3514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3515   echo "$ac_t""yes" 1>&6
3516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3517   cat >> confdefs.h <<EOF
3518 #define $ac_tr_hdr 1
3519 EOF
3520  
3521 else
3522   echo "$ac_t""no" 1>&6
3523 fi
3524 done
3525
3526 for ac_func in getpagesize
3527 do
3528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3529 echo "configure:3530: checking for $ac_func" >&5
3530 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 /* System header to define __stub macros and hopefully few prototypes,
3537     which can conflict with char $ac_func(); below.  */
3538 #include <assert.h>
3539 /* Override any gcc2 internal prototype to avoid an error.  */
3540 /* We use char because int might match the return type of a gcc2
3541     builtin and then its argument prototype would still apply.  */
3542 char $ac_func();
3543
3544 int main() {
3545
3546 /* The GNU C library defines this for functions which it implements
3547     to always fail with ENOSYS.  Some functions are actually named
3548     something starting with __ and the normal name is an alias.  */
3549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3550 choke me
3551 #else
3552 $ac_func();
3553 #endif
3554
3555 ; return 0; }
3556 EOF
3557 if { (eval echo configure:3558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3558   rm -rf conftest*
3559   eval "ac_cv_func_$ac_func=yes"
3560 else
3561   echo "configure: failed program was:" >&5
3562   cat conftest.$ac_ext >&5
3563   rm -rf conftest*
3564   eval "ac_cv_func_$ac_func=no"
3565 fi
3566 rm -f conftest*
3567 fi
3568
3569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3570   echo "$ac_t""yes" 1>&6
3571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3572   cat >> confdefs.h <<EOF
3573 #define $ac_tr_func 1
3574 EOF
3575  
3576 else
3577   echo "$ac_t""no" 1>&6
3578 fi
3579 done
3580
3581 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3582 echo "configure:3583: checking for working mmap" >&5
3583 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   if test "$cross_compiling" = yes; then
3587   ac_cv_func_mmap_fixed_mapped=no
3588 else
3589   cat > conftest.$ac_ext <<EOF
3590 #line 3591 "configure"
3591 #include "confdefs.h"
3592
3593 /* Thanks to Mike Haertel and Jim Avera for this test.
3594    Here is a matrix of mmap possibilities:
3595         mmap private not fixed
3596         mmap private fixed at somewhere currently unmapped
3597         mmap private fixed at somewhere already mapped
3598         mmap shared not fixed
3599         mmap shared fixed at somewhere currently unmapped
3600         mmap shared fixed at somewhere already mapped
3601    For private mappings, we should verify that changes cannot be read()
3602    back from the file, nor mmap's back from the file at a different
3603    address.  (There have been systems where private was not correctly
3604    implemented like the infamous i386 svr4.0, and systems where the
3605    VM page cache was not coherent with the filesystem buffer cache
3606    like early versions of FreeBSD and possibly contemporary NetBSD.)
3607    For shared mappings, we should conversely verify that changes get
3608    propogated back to all the places they're supposed to be.
3609
3610    Grep wants private fixed already mapped.
3611    The main things grep needs to know about mmap are:
3612    * does it exist and is it safe to write into the mmap'd area
3613    * how to use it (BSD variants)  */
3614 #include <sys/types.h>
3615 #include <fcntl.h>
3616 #include <sys/mman.h>
3617
3618 /* This mess was copied from the GNU getpagesize.h.  */
3619 #ifndef HAVE_GETPAGESIZE
3620 # ifdef HAVE_UNISTD_H
3621 #  include <unistd.h>
3622 # endif
3623
3624 /* Assume that all systems that can run configure have sys/param.h.  */
3625 # ifndef HAVE_SYS_PARAM_H
3626 #  define HAVE_SYS_PARAM_H 1
3627 # endif
3628
3629 # ifdef _SC_PAGESIZE
3630 #  define getpagesize() sysconf(_SC_PAGESIZE)
3631 # else /* no _SC_PAGESIZE */
3632 #  ifdef HAVE_SYS_PARAM_H
3633 #   include <sys/param.h>
3634 #   ifdef EXEC_PAGESIZE
3635 #    define getpagesize() EXEC_PAGESIZE
3636 #   else /* no EXEC_PAGESIZE */
3637 #    ifdef NBPG
3638 #     define getpagesize() NBPG * CLSIZE
3639 #     ifndef CLSIZE
3640 #      define CLSIZE 1
3641 #     endif /* no CLSIZE */
3642 #    else /* no NBPG */
3643 #     ifdef NBPC
3644 #      define getpagesize() NBPC
3645 #     else /* no NBPC */
3646 #      ifdef PAGESIZE
3647 #       define getpagesize() PAGESIZE
3648 #      endif /* PAGESIZE */
3649 #     endif /* no NBPC */
3650 #    endif /* no NBPG */
3651 #   endif /* no EXEC_PAGESIZE */
3652 #  else /* no HAVE_SYS_PARAM_H */
3653 #   define getpagesize() 8192   /* punt totally */
3654 #  endif /* no HAVE_SYS_PARAM_H */
3655 # endif /* no _SC_PAGESIZE */
3656
3657 #endif /* no HAVE_GETPAGESIZE */
3658
3659 #ifdef __cplusplus
3660 extern "C" { void *malloc(unsigned); }
3661 #else
3662 char *malloc();
3663 #endif
3664
3665 int
3666 main()
3667 {
3668         char *data, *data2, *data3;
3669         int i, pagesize;
3670         int fd;
3671
3672         pagesize = getpagesize();
3673
3674         /*
3675          * First, make a file with some known garbage in it.
3676          */
3677         data = malloc(pagesize);
3678         if (!data)
3679                 exit(1);
3680         for (i = 0; i < pagesize; ++i)
3681                 *(data + i) = rand();
3682         umask(0);
3683         fd = creat("conftestmmap", 0600);
3684         if (fd < 0)
3685                 exit(1);
3686         if (write(fd, data, pagesize) != pagesize)
3687                 exit(1);
3688         close(fd);
3689
3690         /*
3691          * Next, try to mmap the file at a fixed address which
3692          * already has something else allocated at it.  If we can,
3693          * also make sure that we see the same garbage.
3694          */
3695         fd = open("conftestmmap", O_RDWR);
3696         if (fd < 0)
3697                 exit(1);
3698         data2 = malloc(2 * pagesize);
3699         if (!data2)
3700                 exit(1);
3701         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3702         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3703             MAP_PRIVATE | MAP_FIXED, fd, 0L))
3704                 exit(1);
3705         for (i = 0; i < pagesize; ++i)
3706                 if (*(data + i) != *(data2 + i))
3707                         exit(1);
3708
3709         /*
3710          * Finally, make sure that changes to the mapped area
3711          * do not percolate back to the file as seen by read().
3712          * (This is a bug on some variants of i386 svr4.0.)
3713          */
3714         for (i = 0; i < pagesize; ++i)
3715                 *(data2 + i) = *(data2 + i) + 1;
3716         data3 = malloc(pagesize);
3717         if (!data3)
3718                 exit(1);
3719         if (read(fd, data3, pagesize) != pagesize)
3720                 exit(1);
3721         for (i = 0; i < pagesize; ++i)
3722                 if (*(data + i) != *(data3 + i))
3723                         exit(1);
3724         close(fd);
3725         unlink("conftestmmap");
3726         exit(0);
3727 }
3728
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3731 then
3732   ac_cv_func_mmap_fixed_mapped=yes
3733 else
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -fr conftest*
3737   ac_cv_func_mmap_fixed_mapped=no
3738 fi
3739 rm -fr conftest*
3740 fi
3741
3742 fi
3743
3744 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3745 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3746   cat >> confdefs.h <<\EOF
3747 #define HAVE_MMAP 1
3748 EOF
3749
3750 fi
3751
3752                               
3753    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3754 unistd.h values.h sys/param.h
3755 do
3756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3758 echo "configure:3759: checking for $ac_hdr" >&5
3759 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <$ac_hdr>
3766 EOF
3767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3768 { (eval echo configure:3769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3770 if test -z "$ac_err"; then
3771   rm -rf conftest*
3772   eval "ac_cv_header_$ac_safe=yes"
3773 else
3774   echo "$ac_err" >&5
3775   echo "configure: failed program was:" >&5
3776   cat conftest.$ac_ext >&5
3777   rm -rf conftest*
3778   eval "ac_cv_header_$ac_safe=no"
3779 fi
3780 rm -f conftest*
3781 fi
3782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3783   echo "$ac_t""yes" 1>&6
3784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3785   cat >> confdefs.h <<EOF
3786 #define $ac_tr_hdr 1
3787 EOF
3788  
3789 else
3790   echo "$ac_t""no" 1>&6
3791 fi
3792 done
3793
3794    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3795 __argz_count __argz_stringify __argz_next
3796 do
3797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3798 echo "configure:3799: checking for $ac_func" >&5
3799 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 /* System header to define __stub macros and hopefully few prototypes,
3806     which can conflict with char $ac_func(); below.  */
3807 #include <assert.h>
3808 /* Override any gcc2 internal prototype to avoid an error.  */
3809 /* We use char because int might match the return type of a gcc2
3810     builtin and then its argument prototype would still apply.  */
3811 char $ac_func();
3812
3813 int main() {
3814
3815 /* The GNU C library defines this for functions which it implements
3816     to always fail with ENOSYS.  Some functions are actually named
3817     something starting with __ and the normal name is an alias.  */
3818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3819 choke me
3820 #else
3821 $ac_func();
3822 #endif
3823
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827   rm -rf conftest*
3828   eval "ac_cv_func_$ac_func=yes"
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   eval "ac_cv_func_$ac_func=no"
3834 fi
3835 rm -f conftest*
3836 fi
3837
3838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3839   echo "$ac_t""yes" 1>&6
3840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3841   cat >> confdefs.h <<EOF
3842 #define $ac_tr_func 1
3843 EOF
3844  
3845 else
3846   echo "$ac_t""no" 1>&6
3847 fi
3848 done
3849
3850
3851    if test "${ac_cv_func_stpcpy+set}" != "set"; then
3852      for ac_func in stpcpy
3853 do
3854 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3855 echo "configure:3856: checking for $ac_func" >&5
3856 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* System header to define __stub macros and hopefully few prototypes,
3863     which can conflict with char $ac_func(); below.  */
3864 #include <assert.h>
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char $ac_func();
3869
3870 int main() {
3871
3872 /* The GNU C library defines this for functions which it implements
3873     to always fail with ENOSYS.  Some functions are actually named
3874     something starting with __ and the normal name is an alias.  */
3875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3876 choke me
3877 #else
3878 $ac_func();
3879 #endif
3880
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884   rm -rf conftest*
3885   eval "ac_cv_func_$ac_func=yes"
3886 else
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -rf conftest*
3890   eval "ac_cv_func_$ac_func=no"
3891 fi
3892 rm -f conftest*
3893 fi
3894
3895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3896   echo "$ac_t""yes" 1>&6
3897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3898   cat >> confdefs.h <<EOF
3899 #define $ac_tr_func 1
3900 EOF
3901  
3902 else
3903   echo "$ac_t""no" 1>&6
3904 fi
3905 done
3906
3907    fi
3908    if test "${ac_cv_func_stpcpy}" = "yes"; then
3909      cat >> confdefs.h <<\EOF
3910 #define HAVE_STPCPY 1
3911 EOF
3912
3913    fi
3914
3915    if test $ac_cv_header_locale_h = yes; then
3916     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3917 echo "configure:3918: checking for LC_MESSAGES" >&5
3918 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3919   echo $ac_n "(cached) $ac_c" 1>&6
3920 else
3921   cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <locale.h>
3925 int main() {
3926 return LC_MESSAGES
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930   rm -rf conftest*
3931   am_cv_val_LC_MESSAGES=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   am_cv_val_LC_MESSAGES=no
3937 fi
3938 rm -f conftest*
3939 fi
3940
3941 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3942     if test $am_cv_val_LC_MESSAGES = yes; then
3943       cat >> confdefs.h <<\EOF
3944 #define HAVE_LC_MESSAGES 1
3945 EOF
3946
3947     fi
3948   fi
3949    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3950 echo "configure:3951: checking whether NLS is requested" >&5
3951         # Check whether --enable-nls or --disable-nls was given.
3952 if test "${enable_nls+set}" = set; then
3953   enableval="$enable_nls"
3954   USE_NLS=$enableval
3955 else
3956   USE_NLS=yes
3957 fi
3958
3959     echo "$ac_t""$USE_NLS" 1>&6
3960     
3961
3962     USE_INCLUDED_LIBINTL=no
3963
3964         if test "$USE_NLS" = "yes"; then
3965       cat >> confdefs.h <<\EOF
3966 #define ENABLE_NLS 1
3967 EOF
3968
3969       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3970 echo "configure:3971: checking whether included gettext is requested" >&5
3971       # Check whether --with-included-gettext or --without-included-gettext was given.
3972 if test "${with_included_gettext+set}" = set; then
3973   withval="$with_included_gettext"
3974   nls_cv_force_use_gnu_gettext=$withval
3975 else
3976   nls_cv_force_use_gnu_gettext=no
3977 fi
3978
3979       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3980
3981       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3982       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3983                                         nls_cv_header_intl=
3984         nls_cv_header_libgt=
3985         CATOBJEXT=NONE
3986
3987         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3988 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3989 echo "configure:3990: checking for libintl.h" >&5
3990 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   cat > conftest.$ac_ext <<EOF
3994 #line 3995 "configure"
3995 #include "confdefs.h"
3996 #include <libintl.h>
3997 EOF
3998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3999 { (eval echo configure:4000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4001 if test -z "$ac_err"; then
4002   rm -rf conftest*
4003   eval "ac_cv_header_$ac_safe=yes"
4004 else
4005   echo "$ac_err" >&5
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_header_$ac_safe=no"
4010 fi
4011 rm -f conftest*
4012 fi
4013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4016 echo "configure:4017: checking for gettext in libc" >&5
4017 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4018   echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020   cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 #include <libintl.h>
4024 int main() {
4025 return (int) gettext ("")
4026 ; return 0; }
4027 EOF
4028 if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4029   rm -rf conftest*
4030   gt_cv_func_gettext_libc=yes
4031 else
4032   echo "configure: failed program was:" >&5
4033   cat conftest.$ac_ext >&5
4034   rm -rf conftest*
4035   gt_cv_func_gettext_libc=no
4036 fi
4037 rm -f conftest*
4038 fi
4039
4040 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4041
4042            if test "$gt_cv_func_gettext_libc" != "yes"; then
4043              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4044 echo "configure:4045: checking for bindtextdomain in -lintl" >&5
4045 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   ac_save_LIBS="$LIBS"
4050 LIBS="-lintl  $LIBS"
4051 cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* Override any gcc2 internal prototype to avoid an error.  */
4055 /* We use char because int might match the return type of a gcc2
4056     builtin and then its argument prototype would still apply.  */
4057 char bindtextdomain();
4058
4059 int main() {
4060 bindtextdomain()
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4064   rm -rf conftest*
4065   eval "ac_cv_lib_$ac_lib_var=yes"
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   eval "ac_cv_lib_$ac_lib_var=no"
4071 fi
4072 rm -f conftest*
4073 LIBS="$ac_save_LIBS"
4074
4075 fi
4076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4077   echo "$ac_t""yes" 1>&6
4078   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4079 echo "configure:4080: checking for gettext in libintl" >&5
4080 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4081   echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083   cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086
4087 int main() {
4088 return (int) gettext ("")
4089 ; return 0; }
4090 EOF
4091 if { (eval echo configure:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4092   rm -rf conftest*
4093   gt_cv_func_gettext_libintl=yes
4094 else
4095   echo "configure: failed program was:" >&5
4096   cat conftest.$ac_ext >&5
4097   rm -rf conftest*
4098   gt_cv_func_gettext_libintl=no
4099 fi
4100 rm -f conftest*
4101 fi
4102
4103 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4104 else
4105   echo "$ac_t""no" 1>&6
4106 fi
4107
4108            fi
4109
4110            if test "$gt_cv_func_gettext_libc" = "yes" \
4111               || test "$gt_cv_func_gettext_libintl" = "yes"; then
4112               cat >> confdefs.h <<\EOF
4113 #define HAVE_GETTEXT 1
4114 EOF
4115
4116               # Extract the first word of "msgfmt", so it can be a program name with args.
4117 set dummy msgfmt; ac_word=$2
4118 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4119 echo "configure:4120: checking for $ac_word" >&5
4120 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4121   echo $ac_n "(cached) $ac_c" 1>&6
4122 else
4123   case "$MSGFMT" in
4124   /*)
4125   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4126   ;;
4127   *)
4128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4129   for ac_dir in $PATH; do
4130     test -z "$ac_dir" && ac_dir=.
4131     if test -f $ac_dir/$ac_word; then
4132       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4133         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4134         break
4135       fi
4136     fi
4137   done
4138   IFS="$ac_save_ifs"
4139   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4140   ;;
4141 esac
4142 fi
4143 MSGFMT="$ac_cv_path_MSGFMT"
4144 if test -n "$MSGFMT"; then
4145   echo "$ac_t""$MSGFMT" 1>&6
4146 else
4147   echo "$ac_t""no" 1>&6
4148 fi
4149               if test "$MSGFMT" != "no"; then
4150                 for ac_func in dcgettext
4151 do
4152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4153 echo "configure:4154: checking for $ac_func" >&5
4154 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 /* System header to define __stub macros and hopefully few prototypes,
4161     which can conflict with char $ac_func(); below.  */
4162 #include <assert.h>
4163 /* Override any gcc2 internal prototype to avoid an error.  */
4164 /* We use char because int might match the return type of a gcc2
4165     builtin and then its argument prototype would still apply.  */
4166 char $ac_func();
4167
4168 int main() {
4169
4170 /* The GNU C library defines this for functions which it implements
4171     to always fail with ENOSYS.  Some functions are actually named
4172     something starting with __ and the normal name is an alias.  */
4173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4174 choke me
4175 #else
4176 $ac_func();
4177 #endif
4178
4179 ; return 0; }
4180 EOF
4181 if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4182   rm -rf conftest*
4183   eval "ac_cv_func_$ac_func=yes"
4184 else
4185   echo "configure: failed program was:" >&5
4186   cat conftest.$ac_ext >&5
4187   rm -rf conftest*
4188   eval "ac_cv_func_$ac_func=no"
4189 fi
4190 rm -f conftest*
4191 fi
4192
4193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4194   echo "$ac_t""yes" 1>&6
4195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4196   cat >> confdefs.h <<EOF
4197 #define $ac_tr_func 1
4198 EOF
4199  
4200 else
4201   echo "$ac_t""no" 1>&6
4202 fi
4203 done
4204
4205                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4206 set dummy gmsgfmt; ac_word=$2
4207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4208 echo "configure:4209: checking for $ac_word" >&5
4209 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4210   echo $ac_n "(cached) $ac_c" 1>&6
4211 else
4212   case "$GMSGFMT" in
4213   /*)
4214   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4215   ;;
4216   ?:/*)                  
4217   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4218   ;;
4219   *)
4220   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4221   ac_dummy="$PATH"
4222   for ac_dir in $ac_dummy; do 
4223     test -z "$ac_dir" && ac_dir=.
4224     if test -f $ac_dir/$ac_word; then
4225       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4226       break
4227     fi
4228   done
4229   IFS="$ac_save_ifs"
4230   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4231   ;;
4232 esac
4233 fi
4234 GMSGFMT="$ac_cv_path_GMSGFMT"
4235 if test -n "$GMSGFMT"; then
4236   echo "$ac_t""$GMSGFMT" 1>&6
4237 else
4238   echo "$ac_t""no" 1>&6
4239 fi
4240
4241                 # Extract the first word of "xgettext", so it can be a program name with args.
4242 set dummy xgettext; ac_word=$2
4243 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4244 echo "configure:4245: checking for $ac_word" >&5
4245 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4246   echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248   case "$XGETTEXT" in
4249   /*)
4250   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4251   ;;
4252   *)
4253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4254   for ac_dir in $PATH; do
4255     test -z "$ac_dir" && ac_dir=.
4256     if test -f $ac_dir/$ac_word; then
4257       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4258         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4259         break
4260       fi
4261     fi
4262   done
4263   IFS="$ac_save_ifs"
4264   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4265   ;;
4266 esac
4267 fi
4268 XGETTEXT="$ac_cv_path_XGETTEXT"
4269 if test -n "$XGETTEXT"; then
4270   echo "$ac_t""$XGETTEXT" 1>&6
4271 else
4272   echo "$ac_t""no" 1>&6
4273 fi
4274
4275                 cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4278
4279 int main() {
4280 extern int _nl_msg_cat_cntr;
4281                                return _nl_msg_cat_cntr
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4285   rm -rf conftest*
4286   CATOBJEXT=.gmo
4287                    DATADIRNAME=share
4288 else
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -rf conftest*
4292   CATOBJEXT=.mo
4293                    DATADIRNAME=lib
4294 fi
4295 rm -f conftest*
4296                 INSTOBJEXT=.mo
4297               fi
4298             fi
4299         
4300 else
4301   echo "$ac_t""no" 1>&6
4302 fi
4303
4304
4305                 
4306         if test "$CATOBJEXT" = "NONE"; then
4307                           nls_cv_use_gnu_gettext=yes
4308         fi
4309       fi
4310
4311       if test "$nls_cv_use_gnu_gettext" = "yes"; then
4312                 INTLOBJS="\$(GETTOBJS)"
4313         # Extract the first word of "msgfmt", so it can be a program name with args.
4314 set dummy msgfmt; ac_word=$2
4315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4316 echo "configure:4317: checking for $ac_word" >&5
4317 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   case "$MSGFMT" in
4321   /*)
4322   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4323   ;;
4324   *)
4325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4326   for ac_dir in $PATH; do
4327     test -z "$ac_dir" && ac_dir=.
4328     if test -f $ac_dir/$ac_word; then
4329       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4330         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4331         break
4332       fi
4333     fi
4334   done
4335   IFS="$ac_save_ifs"
4336   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4337   ;;
4338 esac
4339 fi
4340 MSGFMT="$ac_cv_path_MSGFMT"
4341 if test -n "$MSGFMT"; then
4342   echo "$ac_t""$MSGFMT" 1>&6
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346
4347         # Extract the first word of "gmsgfmt", so it can be a program name with args.
4348 set dummy gmsgfmt; ac_word=$2
4349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4350 echo "configure:4351: checking for $ac_word" >&5
4351 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4352   echo $ac_n "(cached) $ac_c" 1>&6
4353 else
4354   case "$GMSGFMT" in
4355   /*)
4356   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4357   ;;
4358   ?:/*)                  
4359   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4360   ;;
4361   *)
4362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4363   ac_dummy="$PATH"
4364   for ac_dir in $ac_dummy; do 
4365     test -z "$ac_dir" && ac_dir=.
4366     if test -f $ac_dir/$ac_word; then
4367       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4368       break
4369     fi
4370   done
4371   IFS="$ac_save_ifs"
4372   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4373   ;;
4374 esac
4375 fi
4376 GMSGFMT="$ac_cv_path_GMSGFMT"
4377 if test -n "$GMSGFMT"; then
4378   echo "$ac_t""$GMSGFMT" 1>&6
4379 else
4380   echo "$ac_t""no" 1>&6
4381 fi
4382
4383         # Extract the first word of "xgettext", so it can be a program name with args.
4384 set dummy xgettext; ac_word=$2
4385 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4386 echo "configure:4387: checking for $ac_word" >&5
4387 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4388   echo $ac_n "(cached) $ac_c" 1>&6
4389 else
4390   case "$XGETTEXT" in
4391   /*)
4392   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4393   ;;
4394   *)
4395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4396   for ac_dir in $PATH; do
4397     test -z "$ac_dir" && ac_dir=.
4398     if test -f $ac_dir/$ac_word; then
4399       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4400         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4401         break
4402       fi
4403     fi
4404   done
4405   IFS="$ac_save_ifs"
4406   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4407   ;;
4408 esac
4409 fi
4410 XGETTEXT="$ac_cv_path_XGETTEXT"
4411 if test -n "$XGETTEXT"; then
4412   echo "$ac_t""$XGETTEXT" 1>&6
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416
4417         
4418         USE_INCLUDED_LIBINTL=yes
4419         CATOBJEXT=.gmo
4420         INSTOBJEXT=.mo
4421         DATADIRNAME=share
4422         INTLDEPS='$(top_builddir)/../intl/libintl.a'
4423         INTLLIBS=$INTLDEPS
4424         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4425         nls_cv_header_intl=libintl.h
4426         nls_cv_header_libgt=libgettext.h
4427       fi
4428
4429             if test "$XGETTEXT" != ":"; then
4430                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4431           : ;
4432         else
4433           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4434           XGETTEXT=":"
4435         fi
4436       fi
4437
4438       # We need to process the po/ directory.
4439       POSUB=po
4440     else
4441       DATADIRNAME=share
4442       nls_cv_header_intl=libintl.h
4443       nls_cv_header_libgt=libgettext.h
4444     fi
4445
4446     # If this is used in GNU gettext we have to set USE_NLS to `yes'
4447     # because some of the sources are only built for this goal.
4448     if test "$PACKAGE" = gettext; then
4449       USE_NLS=yes
4450       USE_INCLUDED_LIBINTL=yes
4451     fi
4452
4453                 for lang in $ALL_LINGUAS; do
4454       GMOFILES="$GMOFILES $lang.gmo"
4455       POFILES="$POFILES $lang.po"
4456     done
4457
4458         
4459     
4460     
4461     
4462     
4463     
4464     
4465     
4466     
4467     
4468     
4469   
4470
4471    if test "x$CATOBJEXT" != "x"; then
4472      if test "x$ALL_LINGUAS" = "x"; then
4473        LINGUAS=
4474      else
4475        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4476 echo "configure:4477: checking for catalogs to be installed" >&5
4477        NEW_LINGUAS=
4478        for lang in ${LINGUAS=$ALL_LINGUAS}; do
4479          case "$ALL_LINGUAS" in
4480           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4481          esac
4482        done
4483        LINGUAS=$NEW_LINGUAS
4484        echo "$ac_t""$LINGUAS" 1>&6
4485      fi
4486
4487           if test -n "$LINGUAS"; then
4488        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4489      fi
4490    fi
4491
4492             if test $ac_cv_header_locale_h = yes; then
4493      INCLUDE_LOCALE_H="#include <locale.h>"
4494    else
4495      INCLUDE_LOCALE_H="\
4496 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
4497    fi
4498    
4499
4500             if test -f $srcdir/po2tbl.sed.in; then
4501       if test "$CATOBJEXT" = ".cat"; then
4502          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4503 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4504 echo "configure:4505: checking for linux/version.h" >&5
4505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <linux/version.h>
4512 EOF
4513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4514 { (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4516 if test -z "$ac_err"; then
4517   rm -rf conftest*
4518   eval "ac_cv_header_$ac_safe=yes"
4519 else
4520   echo "$ac_err" >&5
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   eval "ac_cv_header_$ac_safe=no"
4525 fi
4526 rm -f conftest*
4527 fi
4528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4529   echo "$ac_t""yes" 1>&6
4530   msgformat=linux
4531 else
4532   echo "$ac_t""no" 1>&6
4533 msgformat=xopen
4534 fi
4535
4536
4537                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4538       fi
4539             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4540          $srcdir/po2tbl.sed.in > po2tbl.sed
4541    fi
4542
4543             if test "$PACKAGE" = "gettext"; then
4544      GT_NO="#NO#"
4545      GT_YES=
4546    else
4547      GT_NO=
4548      GT_YES="#YES#"
4549    fi
4550    
4551    
4552
4553    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4554    
4555
4556       l=
4557    
4558
4559             if test -d $srcdir/po; then
4560       test -d po || mkdir po
4561       if test "x$srcdir" != "x."; then
4562          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4563             posrcprefix="$srcdir/"
4564          else
4565             posrcprefix="../$srcdir/"
4566          fi
4567       else
4568          posrcprefix="../"
4569       fi
4570       rm -f po/POTFILES
4571       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4572          < $srcdir/po/POTFILES.in > po/POTFILES
4573    fi
4574   
4575
4576 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4577 echo "configure:4578: checking whether to enable maintainer-specific portions of Makefiles" >&5
4578     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4579 if test "${enable_maintainer_mode+set}" = set; then
4580   enableval="$enable_maintainer_mode"
4581   USE_MAINTAINER_MODE=$enableval
4582 else
4583   USE_MAINTAINER_MODE=no
4584 fi
4585
4586   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4587   
4588
4589 if test $USE_MAINTAINER_MODE = yes; then
4590   MAINTAINER_MODE_TRUE=
4591   MAINTAINER_MODE_FALSE='#'
4592 else
4593   MAINTAINER_MODE_TRUE='#'
4594   MAINTAINER_MODE_FALSE=
4595 fi
4596   MAINT=$MAINTAINER_MODE_TRUE
4597   
4598
4599 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4600 echo "configure:4601: checking for Cygwin environment" >&5
4601 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604   cat > conftest.$ac_ext <<EOF
4605 #line 4606 "configure"
4606 #include "confdefs.h"
4607
4608 int main() {
4609
4610 #ifndef __CYGWIN__
4611 #define __CYGWIN__ __CYGWIN32__
4612 #endif
4613 return __CYGWIN__;
4614 ; return 0; }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4617   rm -rf conftest*
4618   ac_cv_cygwin=yes
4619 else
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   ac_cv_cygwin=no
4624 fi
4625 rm -f conftest*
4626 rm -f conftest*
4627 fi
4628
4629 echo "$ac_t""$ac_cv_cygwin" 1>&6
4630 CYGWIN=
4631 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4632 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4633 echo "configure:4634: checking for mingw32 environment" >&5
4634 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 int main() {
4642 return __MINGW32__;
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4646   rm -rf conftest*
4647   ac_cv_mingw32=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   ac_cv_mingw32=no
4653 fi
4654 rm -f conftest*
4655 rm -f conftest*
4656 fi
4657
4658 echo "$ac_t""$ac_cv_mingw32" 1>&6
4659 MINGW32=
4660 test "$ac_cv_mingw32" = yes && MINGW32=yes
4661
4662
4663 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4664 echo "configure:4665: checking for executable suffix" >&5
4665 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4669   ac_cv_exeext=.exe
4670 else
4671   rm -f conftest*
4672   echo 'int main () { return 0; }' > conftest.$ac_ext
4673   ac_cv_exeext=
4674   if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4675     for file in conftest.*; do
4676       case $file in
4677       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4678       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4679       esac
4680     done
4681   else
4682     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4683   fi
4684   rm -f conftest*
4685   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4686 fi
4687 fi
4688
4689 EXEEXT=""
4690 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4691 echo "$ac_t""${ac_cv_exeext}" 1>&6
4692 ac_exeext=$EXEEXT
4693
4694
4695 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4696 do
4697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4699 echo "configure:4700: checking for $ac_hdr" >&5
4700 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4701   echo $ac_n "(cached) $ac_c" 1>&6
4702 else
4703   cat > conftest.$ac_ext <<EOF
4704 #line 4705 "configure"
4705 #include "confdefs.h"
4706 #include <$ac_hdr>
4707 EOF
4708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4709 { (eval echo configure:4710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4711 if test -z "$ac_err"; then
4712   rm -rf conftest*
4713   eval "ac_cv_header_$ac_safe=yes"
4714 else
4715   echo "$ac_err" >&5
4716   echo "configure: failed program was:" >&5
4717   cat conftest.$ac_ext >&5
4718   rm -rf conftest*
4719   eval "ac_cv_header_$ac_safe=no"
4720 fi
4721 rm -f conftest*
4722 fi
4723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4724   echo "$ac_t""yes" 1>&6
4725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4726   cat >> confdefs.h <<EOF
4727 #define $ac_tr_hdr 1
4728 EOF
4729  
4730 else
4731   echo "$ac_t""no" 1>&6
4732 fi
4733 done
4734
4735
4736 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
4737 # people who are not cross-compiling but are compiling cross-assemblers.
4738 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
4739 echo "configure:4740: checking whether compiling a cross-assembler" >&5
4740 if test "${host}" = "${target}"; then
4741   cross_gas=no
4742 else
4743   cross_gas=yes
4744   cat >> confdefs.h <<\EOF
4745 #define CROSS_COMPILE 1
4746 EOF
4747
4748 fi
4749 echo "$ac_t""$cross_gas" 1>&6
4750
4751 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4752 # for constant arguments.  Useless!
4753 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4754 echo "configure:4755: checking for working alloca.h" >&5
4755 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 #include <alloca.h>
4762 int main() {
4763 char *p = alloca(2 * sizeof(int));
4764 ; return 0; }
4765 EOF
4766 if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4767   rm -rf conftest*
4768   ac_cv_header_alloca_h=yes
4769 else
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   ac_cv_header_alloca_h=no
4774 fi
4775 rm -f conftest*
4776 fi
4777
4778 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4779 if test $ac_cv_header_alloca_h = yes; then
4780   cat >> confdefs.h <<\EOF
4781 #define HAVE_ALLOCA_H 1
4782 EOF
4783
4784 fi
4785
4786 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4787 echo "configure:4788: checking for alloca" >&5
4788 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4789   echo $ac_n "(cached) $ac_c" 1>&6
4790 else
4791   cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794
4795 #ifdef __GNUC__
4796 # define alloca __builtin_alloca
4797 #else
4798 # ifdef _MSC_VER
4799 #  include <malloc.h>
4800 #  define alloca _alloca
4801 # else
4802 #  if HAVE_ALLOCA_H
4803 #   include <alloca.h>
4804 #  else
4805 #   ifdef _AIX
4806  #pragma alloca
4807 #   else
4808 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4809 char *alloca ();
4810 #    endif
4811 #   endif
4812 #  endif
4813 # endif
4814 #endif
4815
4816 int main() {
4817 char *p = (char *) alloca(1);
4818 ; return 0; }
4819 EOF
4820 if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4821   rm -rf conftest*
4822   ac_cv_func_alloca_works=yes
4823 else
4824   echo "configure: failed program was:" >&5
4825   cat conftest.$ac_ext >&5
4826   rm -rf conftest*
4827   ac_cv_func_alloca_works=no
4828 fi
4829 rm -f conftest*
4830 fi
4831
4832 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4833 if test $ac_cv_func_alloca_works = yes; then
4834   cat >> confdefs.h <<\EOF
4835 #define HAVE_ALLOCA 1
4836 EOF
4837
4838 fi
4839
4840 if test $ac_cv_func_alloca_works = no; then
4841   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4842   # that cause trouble.  Some versions do not even contain alloca or
4843   # contain a buggy version.  If you still want to use their alloca,
4844   # use ar to extract alloca.o from them instead of compiling alloca.c.
4845   ALLOCA=alloca.${ac_objext}
4846   cat >> confdefs.h <<\EOF
4847 #define C_ALLOCA 1
4848 EOF
4849
4850
4851 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4852 echo "configure:4853: checking whether alloca needs Cray hooks" >&5
4853 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 #if defined(CRAY) && ! defined(CRAY2)
4860 webecray
4861 #else
4862 wenotbecray
4863 #endif
4864
4865 EOF
4866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4867   egrep "webecray" >/dev/null 2>&1; then
4868   rm -rf conftest*
4869   ac_cv_os_cray=yes
4870 else
4871   rm -rf conftest*
4872   ac_cv_os_cray=no
4873 fi
4874 rm -f conftest*
4875
4876 fi
4877
4878 echo "$ac_t""$ac_cv_os_cray" 1>&6
4879 if test $ac_cv_os_cray = yes; then
4880 for ac_func in _getb67 GETB67 getb67; do
4881   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4882 echo "configure:4883: checking for $ac_func" >&5
4883 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4884   echo $ac_n "(cached) $ac_c" 1>&6
4885 else
4886   cat > conftest.$ac_ext <<EOF
4887 #line 4888 "configure"
4888 #include "confdefs.h"
4889 /* System header to define __stub macros and hopefully few prototypes,
4890     which can conflict with char $ac_func(); below.  */
4891 #include <assert.h>
4892 /* Override any gcc2 internal prototype to avoid an error.  */
4893 /* We use char because int might match the return type of a gcc2
4894     builtin and then its argument prototype would still apply.  */
4895 char $ac_func();
4896
4897 int main() {
4898
4899 /* The GNU C library defines this for functions which it implements
4900     to always fail with ENOSYS.  Some functions are actually named
4901     something starting with __ and the normal name is an alias.  */
4902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4903 choke me
4904 #else
4905 $ac_func();
4906 #endif
4907
4908 ; return 0; }
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4911   rm -rf conftest*
4912   eval "ac_cv_func_$ac_func=yes"
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -rf conftest*
4917   eval "ac_cv_func_$ac_func=no"
4918 fi
4919 rm -f conftest*
4920 fi
4921
4922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4923   echo "$ac_t""yes" 1>&6
4924   cat >> confdefs.h <<EOF
4925 #define CRAY_STACKSEG_END $ac_func
4926 EOF
4927
4928   break
4929 else
4930   echo "$ac_t""no" 1>&6
4931 fi
4932
4933 done
4934 fi
4935
4936 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4937 echo "configure:4938: checking stack direction for C alloca" >&5
4938 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   if test "$cross_compiling" = yes; then
4942   ac_cv_c_stack_direction=0
4943 else
4944   cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 find_stack_direction ()
4948 {
4949   static char *addr = 0;
4950   auto char dummy;
4951   if (addr == 0)
4952     {
4953       addr = &dummy;
4954       return find_stack_direction ();
4955     }
4956   else
4957     return (&dummy > addr) ? 1 : -1;
4958 }
4959 main ()
4960 {
4961   exit (find_stack_direction() < 0);
4962 }
4963 EOF
4964 if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4965 then
4966   ac_cv_c_stack_direction=1
4967 else
4968   echo "configure: failed program was:" >&5
4969   cat conftest.$ac_ext >&5
4970   rm -fr conftest*
4971   ac_cv_c_stack_direction=-1
4972 fi
4973 rm -fr conftest*
4974 fi
4975
4976 fi
4977
4978 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4979 cat >> confdefs.h <<EOF
4980 #define STACK_DIRECTION $ac_cv_c_stack_direction
4981 EOF
4982
4983 fi
4984
4985 echo $ac_n "checking for inline""... $ac_c" 1>&6
4986 echo "configure:4987: checking for inline" >&5
4987 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   ac_cv_c_inline=no
4991 for ac_kw in inline __inline__ __inline; do
4992   cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995
4996 int main() {
4997 } $ac_kw foo() {
4998 ; return 0; }
4999 EOF
5000 if { (eval echo configure:5001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5001   rm -rf conftest*
5002   ac_cv_c_inline=$ac_kw; break
5003 else
5004   echo "configure: failed program was:" >&5
5005   cat conftest.$ac_ext >&5
5006 fi
5007 rm -f conftest*
5008 done
5009
5010 fi
5011
5012 echo "$ac_t""$ac_cv_c_inline" 1>&6
5013 case "$ac_cv_c_inline" in
5014   inline | yes) ;;
5015   no) cat >> confdefs.h <<\EOF
5016 #define inline 
5017 EOF
5018  ;;
5019   *)  cat >> confdefs.h <<EOF
5020 #define inline $ac_cv_c_inline
5021 EOF
5022  ;;
5023 esac
5024
5025
5026 # VMS doesn't have unlink.
5027 for ac_func in unlink remove
5028 do
5029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5030 echo "configure:5031: checking for $ac_func" >&5
5031 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5032   echo $ac_n "(cached) $ac_c" 1>&6
5033 else
5034   cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037 /* System header to define __stub macros and hopefully few prototypes,
5038     which can conflict with char $ac_func(); below.  */
5039 #include <assert.h>
5040 /* Override any gcc2 internal prototype to avoid an error.  */
5041 /* We use char because int might match the return type of a gcc2
5042     builtin and then its argument prototype would still apply.  */
5043 char $ac_func();
5044
5045 int main() {
5046
5047 /* The GNU C library defines this for functions which it implements
5048     to always fail with ENOSYS.  Some functions are actually named
5049     something starting with __ and the normal name is an alias.  */
5050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5051 choke me
5052 #else
5053 $ac_func();
5054 #endif
5055
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_func_$ac_func=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_func_$ac_func=no"
5066 fi
5067 rm -f conftest*
5068 fi
5069
5070 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5073   cat >> confdefs.h <<EOF
5074 #define $ac_tr_func 1
5075 EOF
5076  break
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080 done
5081
5082
5083 # Some systems don't have sbrk().
5084 for ac_func in sbrk
5085 do
5086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5087 echo "configure:5088: checking for $ac_func" >&5
5088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5089   echo $ac_n "(cached) $ac_c" 1>&6
5090 else
5091   cat > conftest.$ac_ext <<EOF
5092 #line 5093 "configure"
5093 #include "confdefs.h"
5094 /* System header to define __stub macros and hopefully few prototypes,
5095     which can conflict with char $ac_func(); below.  */
5096 #include <assert.h>
5097 /* Override any gcc2 internal prototype to avoid an error.  */
5098 /* We use char because int might match the return type of a gcc2
5099     builtin and then its argument prototype would still apply.  */
5100 char $ac_func();
5101
5102 int main() {
5103
5104 /* The GNU C library defines this for functions which it implements
5105     to always fail with ENOSYS.  Some functions are actually named
5106     something starting with __ and the normal name is an alias.  */
5107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5108 choke me
5109 #else
5110 $ac_func();
5111 #endif
5112
5113 ; return 0; }
5114 EOF
5115 if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5116   rm -rf conftest*
5117   eval "ac_cv_func_$ac_func=yes"
5118 else
5119   echo "configure: failed program was:" >&5
5120   cat conftest.$ac_ext >&5
5121   rm -rf conftest*
5122   eval "ac_cv_func_$ac_func=no"
5123 fi
5124 rm -f conftest*
5125 fi
5126
5127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5128   echo "$ac_t""yes" 1>&6
5129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5130   cat >> confdefs.h <<EOF
5131 #define $ac_tr_func 1
5132 EOF
5133  
5134 else
5135   echo "$ac_t""no" 1>&6
5136 fi
5137 done
5138
5139
5140 # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
5141 # enough, but on some of those systems, the assert macro relies on requoting
5142 # working properly!
5143 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5144 echo "configure:5145: checking for working assert macro" >&5
5145 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5146   echo $ac_n "(cached) $ac_c" 1>&6
5147 else
5148   cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151 #include <assert.h>
5152 #include <stdio.h>
5153 int main() {
5154
5155 /* check for requoting problems */
5156 static int a, b, c, d;
5157 static char *s;
5158 assert (!strcmp(s, "foo bar baz quux"));
5159 /* check for newline handling */
5160 assert (a == b
5161         || c == d);
5162
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   gas_cv_assert_ok=yes
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   gas_cv_assert_ok=no
5173 fi
5174 rm -f conftest*
5175 fi
5176 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5177 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5178 #define BROKEN_ASSERT 1
5179 EOF
5180
5181
5182
5183 # On some systems, the system header files may not declare malloc, realloc,
5184 # and free.  There are places where gas needs these functions to have been
5185 # declared -- such as when taking their addresses.
5186 gas_test_headers="
5187 #ifdef HAVE_MEMORY_H
5188 #include <memory.h>
5189 #endif
5190 #ifdef HAVE_STRING_H
5191 #include <string.h>
5192 #else
5193 #ifdef HAVE_STRINGS_H
5194 #include <strings.h>
5195 #endif
5196 #endif
5197 #ifdef HAVE_STDLIB_H
5198 #include <stdlib.h>
5199 #endif
5200 #ifdef HAVE_UNISTD_H
5201 #include <unistd.h>
5202 #endif
5203 "
5204
5205 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5206 echo "configure:5207: checking whether declaration is required for strstr" >&5
5207 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5208   echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210   cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 $gas_test_headers
5214 int main() {
5215
5216 typedef char *(*f)();
5217 f x;
5218 x = (f) strstr;
5219
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   gas_cv_decl_needed_strstr=no
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   gas_cv_decl_needed_strstr=yes
5230 fi
5231 rm -f conftest*
5232 fi
5233 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5234 if test $gas_cv_decl_needed_strstr = yes; then
5235  cat >> confdefs.h <<\EOF
5236 #define NEED_DECLARATION_STRSTR 1
5237 EOF
5238
5239 fi
5240
5241
5242 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5243 echo "configure:5244: checking whether declaration is required for malloc" >&5
5244 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 $gas_test_headers
5251 int main() {
5252
5253 typedef char *(*f)();
5254 f x;
5255 x = (f) malloc;
5256
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   gas_cv_decl_needed_malloc=no
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   gas_cv_decl_needed_malloc=yes
5267 fi
5268 rm -f conftest*
5269 fi
5270 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5271 if test $gas_cv_decl_needed_malloc = yes; then
5272  cat >> confdefs.h <<\EOF
5273 #define NEED_DECLARATION_MALLOC 1
5274 EOF
5275
5276 fi
5277
5278
5279 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5280 echo "configure:5281: checking whether declaration is required for free" >&5
5281 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284   cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287 $gas_test_headers
5288 int main() {
5289
5290 typedef void (*f)();
5291 f x;
5292 x = (f) free;
5293
5294 ; return 0; }
5295 EOF
5296 if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5297   rm -rf conftest*
5298   gas_cv_decl_needed_free=no
5299 else
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   gas_cv_decl_needed_free=yes
5304 fi
5305 rm -f conftest*
5306 fi
5307 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5308 if test $gas_cv_decl_needed_free = yes; then
5309  cat >> confdefs.h <<\EOF
5310 #define NEED_DECLARATION_FREE 1
5311 EOF
5312
5313 fi
5314
5315
5316 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5317 echo "configure:5318: checking whether declaration is required for sbrk" >&5
5318 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5319   echo $ac_n "(cached) $ac_c" 1>&6
5320 else
5321   cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324 $gas_test_headers
5325 int main() {
5326
5327 typedef char *(*f)();
5328 f x;
5329 x = (f) sbrk;
5330
5331 ; return 0; }
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5334   rm -rf conftest*
5335   gas_cv_decl_needed_sbrk=no
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -rf conftest*
5340   gas_cv_decl_needed_sbrk=yes
5341 fi
5342 rm -f conftest*
5343 fi
5344 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5345 if test $gas_cv_decl_needed_sbrk = yes; then
5346  cat >> confdefs.h <<\EOF
5347 #define NEED_DECLARATION_SBRK 1
5348 EOF
5349
5350 fi
5351
5352
5353 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
5354 echo "configure:5355: checking whether declaration is required for environ" >&5
5355 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5356   echo $ac_n "(cached) $ac_c" 1>&6
5357 else
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361 $gas_test_headers
5362 int main() {
5363
5364 typedef char **f;
5365 f x;
5366 x = (f) environ;
5367
5368 ; return 0; }
5369 EOF
5370 if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5371   rm -rf conftest*
5372   gas_cv_decl_needed_environ=no
5373 else
5374   echo "configure: failed program was:" >&5
5375   cat conftest.$ac_ext >&5
5376   rm -rf conftest*
5377   gas_cv_decl_needed_environ=yes
5378 fi
5379 rm -f conftest*
5380 fi
5381 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5382 if test $gas_cv_decl_needed_environ = yes; then
5383  cat >> confdefs.h <<\EOF
5384 #define NEED_DECLARATION_ENVIRON 1
5385 EOF
5386
5387 fi
5388
5389
5390 # Does errno.h declare errno, or do we have to add a separate declaration
5391 # for it?
5392
5393 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
5394 echo "configure:5395: checking whether declaration is required for errno" >&5
5395 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5396   echo $ac_n "(cached) $ac_c" 1>&6
5397 else
5398   cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401
5402 #ifdef HAVE_ERRNO_H
5403 #include <errno.h>
5404 #endif
5405
5406 int main() {
5407
5408 typedef int f;
5409 f x;
5410 x = (f) errno;
5411
5412 ; return 0; }
5413 EOF
5414 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5415   rm -rf conftest*
5416   gas_cv_decl_needed_errno=no
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420   rm -rf conftest*
5421   gas_cv_decl_needed_errno=yes
5422 fi
5423 rm -f conftest*
5424 fi
5425 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5426 if test $gas_cv_decl_needed_errno = yes; then
5427  cat >> confdefs.h <<\EOF
5428 #define NEED_DECLARATION_ERRNO 1
5429 EOF
5430
5431 fi
5432
5433
5434
5435
5436 trap '' 1 2 15
5437 cat > confcache <<\EOF
5438 # This file is a shell script that caches the results of configure
5439 # tests run on this system so they can be shared between configure
5440 # scripts and configure runs.  It is not useful on other systems.
5441 # If it contains results you don't want to keep, you may remove or edit it.
5442 #
5443 # By default, configure uses ./config.cache as the cache file,
5444 # creating it if it does not exist already.  You can give configure
5445 # the --cache-file=FILE option to use a different cache file; that is
5446 # what configure does when it calls configure scripts in
5447 # subdirectories, so they share the cache.
5448 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5449 # config.status only pays attention to the cache file if you give it the
5450 # --recheck option to rerun configure.
5451 #
5452 EOF
5453 # The following way of writing the cache mishandles newlines in values,
5454 # but we know of no workaround that is simple, portable, and efficient.
5455 # So, don't put newlines in cache variables' values.
5456 # Ultrix sh set writes to stderr and can't be redirected directly,
5457 # and sets the high bit in the cache file unless we assign to the vars.
5458 (set) 2>&1 |
5459   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5460   *ac_space=\ *)
5461     # `set' does not quote correctly, so add quotes (double-quote substitution
5462     # turns \\\\ into \\, and sed turns \\ into \).
5463     sed -n \
5464       -e "s/'/'\\\\''/g" \
5465       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5466     ;;
5467   *)
5468     # `set' quotes correctly as required by POSIX, so do not add quotes.
5469     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5470     ;;
5471   esac >> confcache
5472 if cmp -s $cache_file confcache; then
5473   :
5474 else
5475   if test -w $cache_file; then
5476     echo "updating cache $cache_file"
5477     cat confcache > $cache_file
5478   else
5479     echo "not updating unwritable cache $cache_file"
5480   fi
5481 fi
5482 rm -f confcache
5483
5484 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5485
5486 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5487 # Let make expand exec_prefix.
5488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5489
5490 # Any assignment to VPATH causes Sun make to only execute
5491 # the first set of double-colon rules, so remove it if not needed.
5492 # If there is a colon in the path, we need to keep it.
5493 if test "x$srcdir" = x.; then
5494   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5495 fi
5496
5497 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5498
5499 DEFS=-DHAVE_CONFIG_H
5500
5501 # Without the "./", some shells look in PATH for config.status.
5502 : ${CONFIG_STATUS=./config.status}
5503
5504 echo creating $CONFIG_STATUS
5505 rm -f $CONFIG_STATUS
5506 cat > $CONFIG_STATUS <<EOF
5507 #! /bin/sh
5508 # Generated automatically by configure.
5509 # Run this file to recreate the current configuration.
5510 # This directory was configured as follows,
5511 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5512 #
5513 # $0 $ac_configure_args
5514 #
5515 # Compiler output produced by configure, useful for debugging
5516 # configure, is in ./config.log if it exists.
5517
5518 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5519 for ac_option
5520 do
5521   case "\$ac_option" in
5522   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5523     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5524     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5525   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5526     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5527     exit 0 ;;
5528   -help | --help | --hel | --he | --h)
5529     echo "\$ac_cs_usage"; exit 0 ;;
5530   *) echo "\$ac_cs_usage"; exit 1 ;;
5531   esac
5532 done
5533
5534 ac_given_srcdir=$srcdir
5535 ac_given_INSTALL="$INSTALL"
5536
5537 trap 'rm -fr `echo "Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5538 EOF
5539 cat >> $CONFIG_STATUS <<EOF
5540
5541 # Protect against being on the right side of a sed subst in config.status.
5542 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5543  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5544 $ac_vpsub
5545 $extrasub
5546 s%@SHELL@%$SHELL%g
5547 s%@CFLAGS@%$CFLAGS%g
5548 s%@CPPFLAGS@%$CPPFLAGS%g
5549 s%@CXXFLAGS@%$CXXFLAGS%g
5550 s%@FFLAGS@%$FFLAGS%g
5551 s%@DEFS@%$DEFS%g
5552 s%@LDFLAGS@%$LDFLAGS%g
5553 s%@LIBS@%$LIBS%g
5554 s%@exec_prefix@%$exec_prefix%g
5555 s%@prefix@%$prefix%g
5556 s%@program_transform_name@%$program_transform_name%g
5557 s%@bindir@%$bindir%g
5558 s%@sbindir@%$sbindir%g
5559 s%@libexecdir@%$libexecdir%g
5560 s%@datadir@%$datadir%g
5561 s%@sysconfdir@%$sysconfdir%g
5562 s%@sharedstatedir@%$sharedstatedir%g
5563 s%@localstatedir@%$localstatedir%g
5564 s%@libdir@%$libdir%g
5565 s%@includedir@%$includedir%g
5566 s%@oldincludedir@%$oldincludedir%g
5567 s%@infodir@%$infodir%g
5568 s%@mandir@%$mandir%g
5569 s%@host@%$host%g
5570 s%@host_alias@%$host_alias%g
5571 s%@host_cpu@%$host_cpu%g
5572 s%@host_vendor@%$host_vendor%g
5573 s%@host_os@%$host_os%g
5574 s%@target@%$target%g
5575 s%@target_alias@%$target_alias%g
5576 s%@target_cpu@%$target_cpu%g
5577 s%@target_vendor@%$target_vendor%g
5578 s%@target_os@%$target_os%g
5579 s%@build@%$build%g
5580 s%@build_alias@%$build_alias%g
5581 s%@build_cpu@%$build_cpu%g
5582 s%@build_vendor@%$build_vendor%g
5583 s%@build_os@%$build_os%g
5584 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5585 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5586 s%@INSTALL_DATA@%$INSTALL_DATA%g
5587 s%@PACKAGE@%$PACKAGE%g
5588 s%@VERSION@%$VERSION%g
5589 s%@ACLOCAL@%$ACLOCAL%g
5590 s%@AUTOCONF@%$AUTOCONF%g
5591 s%@AUTOMAKE@%$AUTOMAKE%g
5592 s%@AUTOHEADER@%$AUTOHEADER%g
5593 s%@MAKEINFO@%$MAKEINFO%g
5594 s%@SET_MAKE@%$SET_MAKE%g
5595 s%@RANLIB@%$RANLIB%g
5596 s%@CC@%$CC%g
5597 s%@LN_S@%$LN_S%g
5598 s%@LIBTOOL@%$LIBTOOL%g
5599 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5600 s%@GDBINIT@%$GDBINIT%g
5601 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5602 s%@extra_objects@%$extra_objects%g
5603 s%@target_cpu_type@%$target_cpu_type%g
5604 s%@obj_format@%$obj_format%g
5605 s%@te_file@%$te_file%g
5606 s%@install_tooldir@%$install_tooldir%g
5607 s%@atof@%$atof%g
5608 s%@BFDLIB@%$BFDLIB%g
5609 s%@OPCODES_LIB@%$OPCODES_LIB%g
5610 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5611 s%@YACC@%$YACC%g
5612 s%@LEX@%$LEX%g
5613 s%@LEXLIB@%$LEXLIB%g
5614 s%@CPP@%$CPP%g
5615 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5616 s%@ALLOCA@%$ALLOCA%g
5617 s%@USE_NLS@%$USE_NLS%g
5618 s%@MSGFMT@%$MSGFMT%g
5619 s%@GMSGFMT@%$GMSGFMT%g
5620 s%@XGETTEXT@%$XGETTEXT%g
5621 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5622 s%@CATALOGS@%$CATALOGS%g
5623 s%@CATOBJEXT@%$CATOBJEXT%g
5624 s%@DATADIRNAME@%$DATADIRNAME%g
5625 s%@GMOFILES@%$GMOFILES%g
5626 s%@INSTOBJEXT@%$INSTOBJEXT%g
5627 s%@INTLDEPS@%$INTLDEPS%g
5628 s%@INTLLIBS@%$INTLLIBS%g
5629 s%@INTLOBJS@%$INTLOBJS%g
5630 s%@POFILES@%$POFILES%g
5631 s%@POSUB@%$POSUB%g
5632 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5633 s%@GT_NO@%$GT_NO%g
5634 s%@GT_YES@%$GT_YES%g
5635 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5636 s%@l@%$l%g
5637 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5638 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5639 s%@MAINT@%$MAINT%g
5640 s%@EXEEXT@%$EXEEXT%g
5641
5642 CEOF
5643 EOF
5644
5645 cat >> $CONFIG_STATUS <<\EOF
5646
5647 # Split the substitutions into bite-sized pieces for seds with
5648 # small command number limits, like on Digital OSF/1 and HP-UX.
5649 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5650 ac_file=1 # Number of current file.
5651 ac_beg=1 # First line for current file.
5652 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5653 ac_more_lines=:
5654 ac_sed_cmds=""
5655 while $ac_more_lines; do
5656   if test $ac_beg -gt 1; then
5657     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5658   else
5659     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5660   fi
5661   if test ! -s conftest.s$ac_file; then
5662     ac_more_lines=false
5663     rm -f conftest.s$ac_file
5664   else
5665     if test -z "$ac_sed_cmds"; then
5666       ac_sed_cmds="sed -f conftest.s$ac_file"
5667     else
5668       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5669     fi
5670     ac_file=`expr $ac_file + 1`
5671     ac_beg=$ac_end
5672     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5673   fi
5674 done
5675 if test -z "$ac_sed_cmds"; then
5676   ac_sed_cmds=cat
5677 fi
5678 EOF
5679
5680 cat >> $CONFIG_STATUS <<EOF
5681
5682 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
5683 EOF
5684 cat >> $CONFIG_STATUS <<\EOF
5685 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5686   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5687   case "$ac_file" in
5688   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5689        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5690   *) ac_file_in="${ac_file}.in" ;;
5691   esac
5692
5693   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5694
5695   # Remove last slash and all that follows it.  Not all systems have dirname.
5696   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5697   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5698     # The file is in a subdirectory.
5699     test ! -d "$ac_dir" && mkdir "$ac_dir"
5700     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5701     # A "../" for each directory in $ac_dir_suffix.
5702     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5703   else
5704     ac_dir_suffix= ac_dots=
5705   fi
5706
5707   case "$ac_given_srcdir" in
5708   .)  srcdir=.
5709       if test -z "$ac_dots"; then top_srcdir=.
5710       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5711   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5712   *) # Relative path.
5713     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5714     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5715   esac
5716
5717   case "$ac_given_INSTALL" in
5718   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5719   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5720   esac
5721
5722   echo creating "$ac_file"
5723   rm -f "$ac_file"
5724   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5725   case "$ac_file" in
5726   *Makefile*) ac_comsub="1i\\
5727 # $configure_input" ;;
5728   *) ac_comsub= ;;
5729   esac
5730
5731   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5732   sed -e "$ac_comsub
5733 s%@configure_input@%$configure_input%g
5734 s%@srcdir@%$srcdir%g
5735 s%@top_srcdir@%$top_srcdir%g
5736 s%@INSTALL@%$INSTALL%g
5737 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5738 fi; done
5739 rm -f conftest.s*
5740
5741 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5742 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5743 #
5744 # ac_d sets the value in "#define NAME VALUE" lines.
5745 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5746 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5747 ac_dC='\3'
5748 ac_dD='%g'
5749 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5750 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5751 ac_uB='\([      ]\)%\1#\2define\3'
5752 ac_uC=' '
5753 ac_uD='\4%g'
5754 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5755 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5756 ac_eB='$%\1#\2define\3'
5757 ac_eC=' '
5758 ac_eD='%g'
5759
5760 if test "${CONFIG_HEADERS+set}" != set; then
5761 EOF
5762 cat >> $CONFIG_STATUS <<EOF
5763   CONFIG_HEADERS="config.h:config.in"
5764 EOF
5765 cat >> $CONFIG_STATUS <<\EOF
5766 fi
5767 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5768   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5769   case "$ac_file" in
5770   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5771        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5772   *) ac_file_in="${ac_file}.in" ;;
5773   esac
5774
5775   echo creating $ac_file
5776
5777   rm -f conftest.frag conftest.in conftest.out
5778   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5779   cat $ac_file_inputs > conftest.in
5780
5781 EOF
5782
5783 # Transform confdefs.h into a sed script conftest.vals that substitutes
5784 # the proper values into config.h.in to produce config.h.  And first:
5785 # Protect against being on the right side of a sed subst in config.status.
5786 # Protect against being in an unquoted here document in config.status.
5787 rm -f conftest.vals
5788 cat > conftest.hdr <<\EOF
5789 s/[\\&%]/\\&/g
5790 s%[\\$`]%\\&%g
5791 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5792 s%ac_d%ac_u%gp
5793 s%ac_u%ac_e%gp
5794 EOF
5795 sed -n -f conftest.hdr confdefs.h > conftest.vals
5796 rm -f conftest.hdr
5797
5798 # This sed command replaces #undef with comments.  This is necessary, for
5799 # example, in the case of _POSIX_SOURCE, which is predefined and required
5800 # on some systems where configure will not decide to define it.
5801 cat >> conftest.vals <<\EOF
5802 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5803 EOF
5804
5805 # Break up conftest.vals because some shells have a limit on
5806 # the size of here documents, and old seds have small limits too.
5807
5808 rm -f conftest.tail
5809 while :
5810 do
5811   ac_lines=`grep -c . conftest.vals`
5812   # grep -c gives empty output for an empty file on some AIX systems.
5813   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5814   # Write a limited-size here document to conftest.frag.
5815   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5816   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5817   echo 'CEOF
5818   sed -f conftest.frag conftest.in > conftest.out
5819   rm -f conftest.in
5820   mv conftest.out conftest.in
5821 ' >> $CONFIG_STATUS
5822   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5823   rm -f conftest.vals
5824   mv conftest.tail conftest.vals
5825 done
5826 rm -f conftest.vals
5827
5828 cat >> $CONFIG_STATUS <<\EOF
5829   rm -f conftest.frag conftest.h
5830   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5831   cat conftest.in >> conftest.h
5832   rm -f conftest.in
5833   if cmp -s $ac_file conftest.h 2>/dev/null; then
5834     echo "$ac_file is unchanged"
5835     rm -f conftest.h
5836   else
5837     # Remove last slash and all that follows it.  Not all systems have dirname.
5838       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5839       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5840       # The file is in a subdirectory.
5841       test ! -d "$ac_dir" && mkdir "$ac_dir"
5842     fi
5843     rm -f $ac_file
5844     mv conftest.h $ac_file
5845   fi
5846 fi; done
5847
5848 EOF
5849 cat >> $CONFIG_STATUS <<EOF
5850
5851 target_cpu_type=${target_cpu_type}
5852  cgen_cpu_prefix=${cgen_cpu_prefix}
5853  obj_format=${obj_format}
5854  te_file=${te_file}
5855 EOF
5856 cat >> $CONFIG_STATUS <<\EOF
5857 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5858 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5859  echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5860  echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5861  echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5862  echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
5863  if test "x$cgen_cpu_prefix" != x ; then
5864    echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
5865  fi
5866
5867  sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5868 exit 0
5869 EOF
5870 chmod +x $CONFIG_STATUS
5871 rm -fr confdefs* $ac_clean_files
5872 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5873