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