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