Fix some mips configure problems.
[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*)    case ${cpu} in
1731                                 hppa*64*)
1732                                         fmt=elf em=hppalinux64;;
1733                                 hppa*)
1734                                         fmt=elf em=linux;;
1735                             esac ;;
1736       hppa-*-*elf*)         fmt=elf em=hppa ;;
1737       hppa-*-lites*)        fmt=elf em=hppa ;;
1738       hppa-*-osf*)          fmt=som em=hppa ;;
1739       hppa-*-rtems*)        fmt=elf em=hppa ;;
1740       hppa-*-hpux11*)       case ${cpu} in
1741                                 hppa*64*)
1742                                         fmt=elf em=hppa64 ;;
1743                                 hppa*)
1744                                         fmt=som em=hppa ;;
1745                             esac ;;
1746       hppa-*-hpux*)         fmt=som em=hppa ;;
1747       hppa-*-mpeix*)        fmt=som em=hppa ;;
1748       hppa-*-bsd*)          fmt=som em=hppa ;;
1749       hppa-*-hiux*)         fmt=som em=hppa ;;
1750
1751       h8300-*-coff)         fmt=coff ;;
1752
1753       i370-*-elf* | i370-*-linux*) fmt=elf ;;
1754       i386-ibm-aix*)        fmt=coff em=i386aix ;;
1755       i386-sequent-bsd*)    fmt=aout em=dynix bfd_gas=yes ;;
1756       i386-*-beospe*)       fmt=coff em=pe bfd_gas=yes ;;
1757       i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
1758       i386-*-bsd*)          fmt=aout em=386bsd ;;
1759       i386-*-netbsd0.8)     fmt=aout em=386bsd ;;
1760       i386-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes;;
1761       i386-*-openbsd*)      fmt=aout em=nbsd bfd_gas=yes;;
1762       i386-*-linux*aout* | i386-*-linuxoldld)   fmt=aout em=linux ;;
1763       i386-*-linux*coff*)   fmt=coff em=linux ;;
1764       i386-*-linux-gnu*)    fmt=elf em=linux bfd_gas=yes ;;
1765       i386-*-lynxos*)       fmt=coff em=lynx ;;
1766       i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1767                             fmt=elf bfd_gas=yes ;;
1768       i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
1769                             fmt=aout em=386bsd ;;
1770       i386-*-freebsd*)      fmt=elf bfd_gas=yes ;;
1771       i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1772                           fmt=coff ;;
1773       i386-*-sco3.2v5*)      fmt=elf
1774                             if test ${this_target} = $target; then
1775                                 cat >> confdefs.h <<\EOF
1776 #define SCO_ELF 1
1777 EOF
1778
1779                             fi
1780                             ;;
1781       i386-*-sco3.2*)       fmt=coff ;;
1782       i386-*-vsta)          fmt=aout ;;
1783       i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1784                             fmt=coff em=go32;;
1785       i386-*-rtemself*)     fmt=elf ;;
1786       i386-*-rtems*)        fmt=coff ;;
1787       i386-*-gnu*)          fmt=elf ;;
1788       i386-*-mach*)
1789                             fmt=aout em=mach bfd_gas=yes ;;
1790       i386-*-msdos*)        fmt=aout ;;
1791       i386-*-moss*)         fmt=elf ;;
1792       i386-*-pe)            fmt=coff em=pe bfd_gas=yes ;;
1793       i386-*-cygwin*)       fmt=coff em=pe bfd_gas=yes ;;
1794       i386-*-interix*)      fmt=coff em=interix bfd_gas=yes ;;
1795       i386-*-mingw32*)      fmt=coff em=pe bfd_gas=yes ;;
1796       i386-*-*nt*)          fmt=coff em=pe bfd_gas=yes ;;
1797       i386-*-vxworks*)      fmt=aout ;;
1798       i960-*-bout)          fmt=bout ;;
1799       i960-*-coff)          fmt=coff em=ic960 ;;
1800       i960-*-rtems*)        fmt=coff em=ic960 ;;
1801       i960-*-nindy*)        fmt=bout ;;
1802       i960-*-vxworks4*)     fmt=bout ;;
1803       i960-*-vxworks5.0)    fmt=bout ;;
1804       i960-*-vxworks5.*)    fmt=coff em=ic960 ;;
1805       i960-*-vxworks*)      fmt=bout ;;
1806       i960-*-elf*)          fmt=elf ;;
1807
1808       ia64-*-elf*)          fmt=elf ;;
1809       ia64-*-linux-gnu*)    fmt=elf em=linux ;;
1810
1811       m32r-*-*)             fmt=elf bfd_gas=yes ;;
1812
1813       m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;;
1814
1815       m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1816                             fmt=aout em=sun3 ;;
1817       m68k-motorola-sysv*)  fmt=coff em=delta ;;
1818       m68k-bull-sysv3*)     fmt=coff em=dpx2 ;;
1819       m68k-apollo-*)        fmt=coff em=apollo ;;
1820       m68k-*-sysv4*) # must be before -sysv*
1821                             fmt=elf em=svr4 ;;
1822       m68k-*-elf*)          fmt=elf ;;
1823       m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1824                             fmt=coff ;;
1825       m68k-*-hpux*)         fmt=hp300 em=hp300 ;;
1826       m68k-*-linux*aout*)   fmt=aout em=linux ;;
1827       m68k-*-linux-gnu*)    fmt=elf em=linux ;;
1828       m68k-*-gnu*)          fmt=elf ;;
1829       m68k-*-lynxos*)       fmt=coff em=lynx ;;
1830       m68k-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes ;;
1831       m68k-*-openbsd*)      fmt=aout em=nbsd bfd_gas=yes ;;
1832       m68k-apple-aux*)      fmt=coff em=aux ;;
1833       m68k-*-psos*)         fmt=elf em=psos;;
1834
1835       m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1836       m88k-*-coff*)         fmt=coff ;;
1837
1838       mcore-*-elf)          fmt=elf bfd_gas=yes ;;
1839       mcore-*-pe)           fmt=coff em=pe bfd_gas=yes ;;
1840
1841       # don't change em like *-*-bsd does
1842       mips-dec-netbsd*)     fmt=elf endian=little ;;
1843       mips-dec-openbsd*)    fmt=elf endian=little ;;
1844       mips-dec-bsd*)        fmt=aout endian=little ;;
1845       mips-sony-bsd*)       fmt=ecoff ;;
1846       mips-*-bsd*)          { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1847       mips-*-ultrix*)       fmt=ecoff endian=little ;;
1848       mips-*-osf*)          fmt=ecoff endian=little ;;
1849       mips-*-ecoff*)        fmt=ecoff ;;
1850       mips-*-ecoff*)        fmt=ecoff ;;
1851       mips-*-pe*)           fmt=coff endian=little em=pe ;;
1852       mips-*-irix6*)        fmt=elf ;;
1853       mips-*-irix5*)        fmt=elf ;;
1854       mips-*-irix*)         fmt=ecoff ;;
1855       mips-*-lnews*)        fmt=ecoff em=lnews ;;
1856       mips-*-riscos*)       fmt=ecoff ;;
1857       mips-*-sysv4*MP*)     fmt=elf em=tmips ;;
1858       mips-*-sysv*)         fmt=ecoff ;;
1859       mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
1860                             fmt=elf ;;
1861       mips-*-vxworks*)      fmt=elf
1862                             cat >> confdefs.h <<\EOF
1863 #define MIPS_STABS_ELF 1
1864 EOF
1865
1866                             ;;
1867       mn10200-*-*)          fmt=elf bfd_gas=yes ;;
1868       mn10300-*-*)          fmt=elf bfd_gas=yes ;;
1869       pj*)                  fmt=elf ;;
1870       ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
1871                             fmt=coff em=pe ;;
1872       ppc-*-aix*)           fmt=coff ;;
1873       ppc-*-beos*)          fmt=coff ;;
1874       ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1875                             fmt=elf ;;
1876       ppc-*-linux-gnu*)     fmt=elf
1877                             case "$endian" in
1878                             big)  ;;
1879                             *)    { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
1880                             esac
1881                             ;;
1882       ppc-*-solaris*)       fmt=elf
1883                             if test ${this_target} = $target; then
1884                                 cat >> confdefs.h <<\EOF
1885 #define TARGET_SOLARIS_COMMENT 1
1886 EOF
1887
1888                             fi
1889                             if test x${endian} = xbig; then
1890                                 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1891                             fi
1892                             ;;
1893       ppc-*-rtems*)         fmt=elf ;;
1894       ppc-*-macos* | ppc-*-mpw*)
1895                             fmt=coff em=macos ;;
1896       ppc-*-netware*)       fmt=elf em=ppcnw ;;
1897       ppc-*-vxworks*)       fmt=elf ;;
1898
1899       sh-*-elf*)            fmt=elf ;;
1900       sh-*-coff*)           fmt=coff ;;
1901       sh-*-pe*)             fmt=coff em=pe bfd_gas=yes;;
1902       sh-*-rtemself*)       fmt=elf ;;
1903       sh-*-rtems*)          fmt=coff ;;
1904
1905       ns32k-pc532-mach* | ns32k-pc532-ux*)    fmt=aout em=pc532mach ;;
1906       ns32k-pc532-netbsd* | ns32k-pc532-lites*)  fmt=aout em=nbsd532 ;;
1907       ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1908
1909       sparc-*-rtems*)       fmt=aout ;;
1910       sparc-*-sunos4*)      fmt=aout em=sun3 ;;
1911       sparc-*-aout | sparc*-*-vxworks*)
1912                             fmt=aout em=sparcaout ;;
1913       sparc-*-coff)         fmt=coff ;;
1914       sparc-*-linux*aout*)  fmt=aout em=linux ;;
1915       sparc-*-linux-gnu*)   fmt=elf em=linux ;;
1916       sparc-*-lynxos*)      fmt=coff em=lynx ;;
1917       sparc-fujitsu-none)   fmt=aout ;;
1918       sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1919                             fmt=elf ;;
1920       sparc-*-netbsd*)      em=nbsd bfd_gas=yes
1921                             case ${cpu} in
1922                                 sparc) case ${os} in
1923                                            *elf*) fmt=elf ;;
1924                                            *)     fmt=aout ;;
1925                                        esac ;;
1926                                 sparc64) fmt=elf ;;
1927                             esac
1928                             ;;
1929       sparc-*-openbsd*)     fmt=aout em=nbsd ;;
1930
1931       strongarm-*-coff)     fmt=coff ;;
1932       strongarm-*-elf)      fmt=elf ;;
1933
1934       tic30-*-*aout*)       fmt=aout bfd_gas=yes ;;
1935       tic30-*-*coff*)       fmt=coff bfd_gas=yes ;;
1936       tic54x-*-* | c54x*-*-*)
1937                             fmt=coff bfd_gas=yes need_libm=yes;;
1938       tic80-*-*)            fmt=coff ;;
1939
1940       v850-*-*)             fmt=elf bfd_gas=yes ;;
1941       v850e-*-*)            fmt=elf bfd_gas=yes ;;
1942       v850ea-*-*)           fmt=elf bfd_gas=yes ;;
1943
1944       vax-*-bsd* | vax-*-ultrix*)
1945                             fmt=aout ;;
1946       vax-*-vms)            fmt=vms ;;
1947
1948
1949       z8k-*-coff | z8k-*-sim)
1950                             fmt=coff ;;
1951
1952       w65-*-*)              fmt=coff ;;
1953
1954       *-*-aout | *-*-scout)
1955                             fmt=aout ;;
1956       *-*-nindy*)
1957                             fmt=bout ;;
1958       *-*-bsd*)
1959                             fmt=aout em=sun3 ;;
1960       *-*-generic)          fmt=generic ;;
1961       *-*-xray | *-*-hms)   fmt=coff ;;
1962       *-*-sim)              fmt=coff ;;
1963       *-*-elf | *-*-sysv4* | *-*-solaris*)
1964                             echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1965                             fmt=elf dev=yes ;;
1966       *-*-vxworks)          fmt=aout ;;
1967       *-*-netware)          fmt=elf ;;
1968     esac
1969
1970     if test ${this_target} = $target ; then
1971       endian_def=
1972       if test x${endian} = xbig; then
1973         endian_def=1
1974       elif test x${endian} = xlittle; then
1975         endian_def=0
1976       fi
1977       if test x${endian_def} != x; then
1978         cat >> confdefs.h <<EOF
1979 #define TARGET_BYTES_BIG_ENDIAN $endian_def
1980 EOF
1981
1982       fi
1983     fi
1984
1985     case ${cpu_type}-${fmt} in
1986       alpha*-*) bfd_gas=yes ;;
1987       arm-*)    bfd_gas=yes ;;
1988     # not yet
1989     # i386-aout)        bfd_gas=preferred ;;
1990       ia64*-*)  bfd_gas=yes ;;
1991       mips-*)   bfd_gas=yes ;;
1992       ns32k-*)  bfd_gas=yes ;;
1993       ppc-*)    bfd_gas=yes ;;
1994       sparc-*)  bfd_gas=yes ;;
1995       strongarm-*)      bfd_gas=yes ;;
1996       *-elf)    bfd_gas=yes ;;
1997       *-ecoff)  bfd_gas=yes ;;
1998       *-som)    bfd_gas=yes ;;
1999     #enable bfd for coff and aout to allow testing if a bfd target is
2000     #the primary target, but not for coff or aout as the primary target
2001       i386-coff)        if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2002       i386-aout)        if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2003       *)                ;;
2004     esac
2005
2006 # Other random stuff.
2007
2008     # Do we need the opcodes library?
2009     case ${cpu_type} in
2010       vax | i386 | tic30)
2011         ;;
2012
2013       *)
2014         need_opcodes=yes
2015
2016         case "${enable_shared}" in
2017         yes) shared_opcodes=true ;;
2018         *opcodes*) shared_opcodes=true ;;
2019         *) shared_opcodes=false ;;
2020         esac
2021         if test "${shared_opcodes}" = "true"; then
2022           # A shared libopcodes must be linked against libbfd.
2023           need_bfd=yes
2024         fi
2025         ;;
2026     esac
2027
2028     # Any other special object files needed ?
2029     case ${cpu_type} in
2030       fr30 | m32r)
2031         using_cgen=yes
2032         ;;
2033
2034       m68k)
2035         case ${extra_objects} in
2036         *m68k-parse.o*) ;;
2037         *) extra_objects="$extra_objects m68k-parse.o" ;;
2038         esac
2039         ;;
2040
2041       mips)
2042         echo ${extra_objects} | grep -s "itbl-parse.o" 
2043         if test $? -ne 0 ; then
2044           extra_objects="$extra_objects itbl-parse.o"
2045         fi
2046
2047         echo ${extra_objects} | grep -s "itbl-lex.o" 
2048         if test $? -ne 0 ; then
2049           extra_objects="$extra_objects itbl-lex.o"
2050         fi
2051
2052         echo ${extra_objects} | grep -s "itbl-ops.o" 
2053         if test $? -ne 0 ; then
2054           extra_objects="$extra_objects itbl-ops.o"
2055         fi
2056         ;;
2057
2058       sparc)
2059         if test $this_target = $target ; then
2060           cat >> confdefs.h <<EOF
2061 #define DEFAULT_ARCH "${arch}"
2062 EOF
2063
2064         fi
2065         ;;
2066       *)
2067         ;;
2068     esac
2069
2070     if test $using_cgen = yes ; then
2071         case "x${extra_objects}" in
2072         *cgen.o*) ;;
2073         *) extra_objects="$extra_objects cgen.o" ;;
2074         esac
2075     fi
2076
2077 # See if we really can support this configuration with the emulation code.
2078
2079     if test $this_target = $target ; then
2080       primary_bfd_gas=$bfd_gas
2081       obj_format=$fmt
2082       te_file=$em
2083
2084       if test $bfd_gas = no ; then
2085         # Can't support other configurations this way.
2086         break
2087       fi
2088     elif test $bfd_gas = no ; then
2089       # Can't support this configuration.
2090       break
2091     fi
2092
2093 # From target name and format, produce a list of supported emulations.
2094
2095     case ${generic_target}-${fmt} in
2096       mips-*-irix5*-*)  emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2097       mips-*-linux-gnu*-*) case "$endian" in
2098                         big)    emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2099                         *)      emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2100                         esac ;;
2101       mips-*-lnews*-ecoff) ;;
2102       mips-*-*-ecoff)   case "$endian" in
2103                         big)    emulation="mipsbecoff mipslecoff mipsecoff" ;;
2104                         *)      emulation="mipslecoff mipsbecoff mipsecoff" ;;
2105                         esac ;;
2106       mips-*-*-elf)     case "$endian" in
2107                         big)    emulation="mipsbelf mipslelf mipself" ;;
2108                         *)      emulation="mipslelf mipsbelf mipself" ;;
2109                         esac ;;
2110       mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2111       # i386-pc-pe-coff != i386-pc-coff.
2112       i386-*-pe-coff)   ;;
2113       # Uncommenting the next line will turn on support for i386 AOUT
2114       # for the default linux configuration
2115       # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
2116       #
2117       i386-*-aout)      emulation="i386aout" ;;
2118       i386-*-coff)      emulation="i386coff" ;;
2119       i386-*-elf)       emulation="i386elf" ;;
2120     esac
2121
2122     emulations="$emulations $emulation"
2123
2124 done
2125
2126 # Turn on all targets if possible
2127 if test ${all_targets} = "yes"; then
2128   case ${target_cpu_type} in
2129   i386)
2130     case ${obj_format} in
2131     aout)
2132       emulations="$emulations i386coff i386elf"
2133       ;;
2134     coff)
2135       emulations="$emulations i386aout i386elf"
2136     ;;
2137     elf)
2138       emulations="$emulations i386aout i386coff"
2139       ;;
2140     esac
2141   ;;
2142   esac
2143 fi
2144
2145 # Assign floating point type.  Most processors with FP support
2146 # IEEE FP.  On those that don't support FP at all, usually IEEE
2147 # is emulated.
2148 case ${target_cpu} in
2149   vax | tahoe ) atof=${target_cpu} ;;
2150   *)            atof=ieee ;;
2151 esac
2152
2153 case "${obj_format}" in
2154   "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2155 esac
2156
2157 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2158 cgen_cpu_prefix=""
2159 if test $using_cgen = yes ; then
2160   case ${target_cpu} in
2161     *) cgen_cpu_prefix=${target_cpu} ;;
2162   esac
2163   
2164   cat >> confdefs.h <<\EOF
2165 #define USING_CGEN 1
2166 EOF
2167
2168 fi
2169
2170
2171 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2172   { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2173 fi
2174
2175 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2176   { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2177 fi
2178
2179 case ${user_bfd_gas}-${primary_bfd_gas} in
2180   yes-yes | no-no)
2181     # We didn't override user's choice.
2182     ;;
2183   no-yes)
2184     echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2185     ;;
2186   no-preferred)
2187     primary_bfd_gas=no
2188     ;;
2189   *-preferred)
2190     primary_bfd_gas=yes
2191     ;;
2192   yes-*)
2193     primary_bfd_gas=yes
2194     ;;
2195   -*)
2196     # User specified nothing.
2197     ;;
2198 esac
2199
2200 # Some COFF configurations want these random other flags set.
2201 case ${obj_format} in
2202   coff)
2203     case ${target_cpu_type} in
2204       i386) cat >> confdefs.h <<\EOF
2205 #define I386COFF 1
2206 EOF
2207  ;;
2208       m68k) cat >> confdefs.h <<\EOF
2209 #define M68KCOFF 1
2210 EOF
2211  ;;
2212       m88k) cat >> confdefs.h <<\EOF
2213 #define M88KCOFF 1
2214 EOF
2215  ;;
2216     esac
2217     ;;
2218 esac
2219
2220 # Getting this done right is going to be a bitch.  Each configuration specified
2221 # with --enable-targets=... should be checked for environment, format, cpu, and
2222 # bfd_gas setting.
2223 #
2224 # For each configuration, the necessary object file support code must be linked
2225 # in.  This might be only one, it might be up to four.  The necessary emulation
2226 # code needs to be provided, too.
2227 #
2228 # And then there's "--enable-targets=all"....
2229 #
2230 # For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
2231
2232 formats="${obj_format}"
2233 emfiles=""
2234 EMULATIONS=""
2235 _gas_uniq_list="$emulations"
2236 _gas_uniq_newlist=""
2237 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2238   case $_gas_uniq_i in
2239   _gas_uniq_dummy) ;;
2240   *) case " $_gas_uniq_newlist " in
2241        *" $_gas_uniq_i "*) ;;
2242        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2243      esac ;;
2244   esac
2245 done
2246 emulations=$_gas_uniq_newlist
2247
2248 for em in . $emulations ; do
2249   case $em in
2250     .)  continue ;;
2251     mipsbelf | mipslelf)
2252         fmt=elf   file=mipself ;;
2253     mipsbecoff | mipslecoff)
2254         fmt=ecoff file=mipsecoff ;;
2255     *coff)
2256         fmt=coff  file=$em ;;
2257     *aout)
2258         fmt=aout file=$em ;;
2259     *elf)
2260         fmt=elf file=$em ;;
2261   esac
2262   formats="$formats $fmt"
2263   emfiles="$emfiles e-$file.o"
2264   EMULATIONS="$EMULATIONS &$em,"
2265 done
2266 _gas_uniq_list="$formats"
2267 _gas_uniq_newlist=""
2268 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2269   case $_gas_uniq_i in
2270   _gas_uniq_dummy) ;;
2271   *) case " $_gas_uniq_newlist " in
2272        *" $_gas_uniq_i "*) ;;
2273        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2274      esac ;;
2275   esac
2276 done
2277 formats=$_gas_uniq_newlist
2278
2279 _gas_uniq_list="$emfiles"
2280 _gas_uniq_newlist=""
2281 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2282   case $_gas_uniq_i in
2283   _gas_uniq_dummy) ;;
2284   *) case " $_gas_uniq_newlist " in
2285        *" $_gas_uniq_i "*) ;;
2286        *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2287      esac ;;
2288   esac
2289 done
2290 emfiles=$_gas_uniq_newlist
2291
2292 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2293   for fmt in $formats ; do
2294     case $fmt in
2295       aout)     cat >> confdefs.h <<\EOF
2296 #define OBJ_MAYBE_AOUT 1
2297 EOF
2298    ;;
2299       bout)     cat >> confdefs.h <<\EOF
2300 #define OBJ_MAYBE_BOUT 1
2301 EOF
2302    ;;
2303       coff)     cat >> confdefs.h <<\EOF
2304 #define OBJ_MAYBE_COFF 1
2305 EOF
2306     ;;
2307       ecoff)    cat >> confdefs.h <<\EOF
2308 #define OBJ_MAYBE_ECOFF 1
2309 EOF
2310    ;;
2311       elf)      cat >> confdefs.h <<\EOF
2312 #define OBJ_MAYBE_ELF 1
2313 EOF
2314      ;;
2315       generic)  cat >> confdefs.h <<\EOF
2316 #define OBJ_MAYBE_GENERIC 1
2317 EOF
2318  ;;
2319       hp300)    cat >> confdefs.h <<\EOF
2320 #define OBJ_MAYBE_HP300 1
2321 EOF
2322    ;;
2323       ieee)     cat >> confdefs.h <<\EOF
2324 #define OBJ_MAYBE_IEEE 1
2325 EOF
2326     ;;
2327       som)      cat >> confdefs.h <<\EOF
2328 #define OBJ_MAYBE_SOM 1
2329 EOF
2330      ;;
2331       vms)      cat >> confdefs.h <<\EOF
2332 #define OBJ_MAYBE_VMS 1
2333 EOF
2334      ;;
2335     esac
2336     extra_objects="$extra_objects obj-$fmt.o"
2337   done
2338   obj_format=multi
2339 fi
2340 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2341   DEFAULT_EMULATION=`set . $emulations ; echo $2`
2342   # e-mips* has more than one emulation per file, e-i386* has just one at the
2343   # moment.  If only one emulation is specified, then don't define
2344   # USE_EMULATIONS or include any of the e-files as they will only be bloat.
2345   case "${obj_format}${emfiles}" in
2346     multi* | *mips*)
2347       extra_objects="$extra_objects $emfiles"
2348       cat >> confdefs.h <<\EOF
2349 #define USE_EMULATIONS 1
2350 EOF
2351  ;;
2352   esac
2353 fi
2354
2355 cat >> confdefs.h <<EOF
2356 #define EMULATIONS $EMULATIONS
2357 EOF
2358
2359 cat >> confdefs.h <<EOF
2360 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2361 EOF
2362
2363
2364 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2365   yes-*-coff)   need_bfd=yes ;;
2366   no-*-coff)    need_bfd=yes
2367                 cat >> confdefs.h <<\EOF
2368 #define MANY_SEGMENTS 1
2369 EOF
2370  ;;
2371 esac
2372
2373 reject_dev_configs=yes
2374
2375 case ${reject_dev_configs}-${dev} in
2376   yes-yes) # Oops.
2377     { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2378     ;;
2379 esac
2380
2381
2382
2383
2384
2385
2386
2387 case "${primary_bfd_gas}" in
2388   yes)  cat >> confdefs.h <<\EOF
2389 #define BFD_ASSEMBLER 1
2390 EOF
2391
2392         need_bfd=yes ;;
2393 esac
2394
2395 # do we need the opcodes library?
2396 case "${need_opcodes}" in
2397 yes)
2398   OPCODES_LIB=../opcodes/libopcodes.la
2399   ;;
2400 esac
2401
2402 case "${need_bfd}" in
2403 yes)
2404   BFDLIB=../bfd/libbfd.la
2405   ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2406   ;;
2407 esac
2408
2409
2410
2411
2412
2413
2414 cat >> confdefs.h <<EOF
2415 #define TARGET_ALIAS "${target_alias}"
2416 EOF
2417
2418 cat >> confdefs.h <<EOF
2419 #define TARGET_CANONICAL "${target}"
2420 EOF
2421
2422 cat >> confdefs.h <<EOF
2423 #define TARGET_CPU "${target_cpu}"
2424 EOF
2425
2426 cat >> confdefs.h <<EOF
2427 #define TARGET_VENDOR "${target_vendor}"
2428 EOF
2429
2430 cat >> confdefs.h <<EOF
2431 #define TARGET_OS "${target_os}"
2432 EOF
2433
2434
2435 # Extract the first word of "gcc", so it can be a program name with args.
2436 set dummy gcc; ac_word=$2
2437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_word" >&5
2439 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   if test -n "$CC"; then
2443   ac_cv_prog_CC="$CC" # Let the user override the test.
2444 else
2445   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2446   ac_dummy="$PATH"
2447   for ac_dir in $ac_dummy; do
2448     test -z "$ac_dir" && ac_dir=.
2449     if test -f $ac_dir/$ac_word; then
2450       ac_cv_prog_CC="gcc"
2451       break
2452     fi
2453   done
2454   IFS="$ac_save_ifs"
2455 fi
2456 fi
2457 CC="$ac_cv_prog_CC"
2458 if test -n "$CC"; then
2459   echo "$ac_t""$CC" 1>&6
2460 else
2461   echo "$ac_t""no" 1>&6
2462 fi
2463
2464 if test -z "$CC"; then
2465   # Extract the first word of "cc", so it can be a program name with args.
2466 set dummy cc; ac_word=$2
2467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_word" >&5
2469 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   if test -n "$CC"; then
2473   ac_cv_prog_CC="$CC" # Let the user override the test.
2474 else
2475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2476   ac_prog_rejected=no
2477   ac_dummy="$PATH"
2478   for ac_dir in $ac_dummy; do
2479     test -z "$ac_dir" && ac_dir=.
2480     if test -f $ac_dir/$ac_word; then
2481       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2482         ac_prog_rejected=yes
2483         continue
2484       fi
2485       ac_cv_prog_CC="cc"
2486       break
2487     fi
2488   done
2489   IFS="$ac_save_ifs"
2490 if test $ac_prog_rejected = yes; then
2491   # We found a bogon in the path, so make sure we never use it.
2492   set dummy $ac_cv_prog_CC
2493   shift
2494   if test $# -gt 0; then
2495     # We chose a different compiler from the bogus one.
2496     # However, it has the same basename, so the bogon will be chosen
2497     # first if we set CC to just the basename; use the full file name.
2498     shift
2499     set dummy "$ac_dir/$ac_word" "$@"
2500     shift
2501     ac_cv_prog_CC="$@"
2502   fi
2503 fi
2504 fi
2505 fi
2506 CC="$ac_cv_prog_CC"
2507 if test -n "$CC"; then
2508   echo "$ac_t""$CC" 1>&6
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512
2513   if test -z "$CC"; then
2514     case "`uname -s`" in
2515     *win32* | *WIN32*)
2516       # Extract the first word of "cl", so it can be a program name with args.
2517 set dummy cl; ac_word=$2
2518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2519 echo "configure:2520: checking for $ac_word" >&5
2520 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   if test -n "$CC"; then
2524   ac_cv_prog_CC="$CC" # Let the user override the test.
2525 else
2526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2527   ac_dummy="$PATH"
2528   for ac_dir in $ac_dummy; do
2529     test -z "$ac_dir" && ac_dir=.
2530     if test -f $ac_dir/$ac_word; then
2531       ac_cv_prog_CC="cl"
2532       break
2533     fi
2534   done
2535   IFS="$ac_save_ifs"
2536 fi
2537 fi
2538 CC="$ac_cv_prog_CC"
2539 if test -n "$CC"; then
2540   echo "$ac_t""$CC" 1>&6
2541 else
2542   echo "$ac_t""no" 1>&6
2543 fi
2544  ;;
2545     esac
2546   fi
2547   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2548 fi
2549
2550 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2551 echo "configure:2552: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2552
2553 ac_ext=c
2554 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2555 ac_cpp='$CPP $CPPFLAGS'
2556 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2557 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2558 cross_compiling=$ac_cv_prog_cc_cross
2559
2560 cat > conftest.$ac_ext << EOF
2561
2562 #line 2563 "configure"
2563 #include "confdefs.h"
2564
2565 main(){return(0);}
2566 EOF
2567 if { (eval echo configure:2568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2568   ac_cv_prog_cc_works=yes
2569   # If we can't run a trivial program, we are probably using a cross compiler.
2570   if (./conftest; exit) 2>/dev/null; then
2571     ac_cv_prog_cc_cross=no
2572   else
2573     ac_cv_prog_cc_cross=yes
2574   fi
2575 else
2576   echo "configure: failed program was:" >&5
2577   cat conftest.$ac_ext >&5
2578   ac_cv_prog_cc_works=no
2579 fi
2580 rm -fr conftest*
2581 ac_ext=c
2582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2583 ac_cpp='$CPP $CPPFLAGS'
2584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2586 cross_compiling=$ac_cv_prog_cc_cross
2587
2588 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2589 if test $ac_cv_prog_cc_works = no; then
2590   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2591 fi
2592 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2593 echo "configure:2594: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2594 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2595 cross_compiling=$ac_cv_prog_cc_cross
2596
2597 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2598 echo "configure:2599: checking whether we are using GNU C" >&5
2599 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2600   echo $ac_n "(cached) $ac_c" 1>&6
2601 else
2602   cat > conftest.c <<EOF
2603 #ifdef __GNUC__
2604   yes;
2605 #endif
2606 EOF
2607 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2608   ac_cv_prog_gcc=yes
2609 else
2610   ac_cv_prog_gcc=no
2611 fi
2612 fi
2613
2614 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2615
2616 if test $ac_cv_prog_gcc = yes; then
2617   GCC=yes
2618 else
2619   GCC=
2620 fi
2621
2622 ac_test_CFLAGS="${CFLAGS+set}"
2623 ac_save_CFLAGS="$CFLAGS"
2624 CFLAGS=
2625 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2626 echo "configure:2627: checking whether ${CC-cc} accepts -g" >&5
2627 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2628   echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630   echo 'void f(){}' > conftest.c
2631 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2632   ac_cv_prog_cc_g=yes
2633 else
2634   ac_cv_prog_cc_g=no
2635 fi
2636 rm -f conftest*
2637
2638 fi
2639
2640 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2641 if test "$ac_test_CFLAGS" = set; then
2642   CFLAGS="$ac_save_CFLAGS"
2643 elif test $ac_cv_prog_cc_g = yes; then
2644   if test "$GCC" = yes; then
2645     CFLAGS="-g -O2"
2646   else
2647     CFLAGS="-g"
2648   fi
2649 else
2650   if test "$GCC" = yes; then
2651     CFLAGS="-O2"
2652   else
2653     CFLAGS=
2654   fi
2655 fi
2656
2657
2658 for ac_prog in 'bison -y' byacc
2659 do
2660 # Extract the first word of "$ac_prog", so it can be a program name with args.
2661 set dummy $ac_prog; ac_word=$2
2662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2663 echo "configure:2664: checking for $ac_word" >&5
2664 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   if test -n "$YACC"; then
2668   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2669 else
2670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2671   ac_dummy="$PATH"
2672   for ac_dir in $ac_dummy; do
2673     test -z "$ac_dir" && ac_dir=.
2674     if test -f $ac_dir/$ac_word; then
2675       ac_cv_prog_YACC="$ac_prog"
2676       break
2677     fi
2678   done
2679   IFS="$ac_save_ifs"
2680 fi
2681 fi
2682 YACC="$ac_cv_prog_YACC"
2683 if test -n "$YACC"; then
2684   echo "$ac_t""$YACC" 1>&6
2685 else
2686   echo "$ac_t""no" 1>&6
2687 fi
2688
2689 test -n "$YACC" && break
2690 done
2691 test -n "$YACC" || YACC="yacc"
2692
2693 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2694 echo "configure:2695: checking how to run the C preprocessor" >&5
2695 # On Suns, sometimes $CPP names a directory.
2696 if test -n "$CPP" && test -d "$CPP"; then
2697   CPP=
2698 fi
2699 if test -z "$CPP"; then
2700 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2701   echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703     # This must be in double quotes, not single quotes, because CPP may get
2704   # substituted into the Makefile and "${CC-cc}" will confuse make.
2705   CPP="${CC-cc} -E"
2706   # On the NeXT, cc -E runs the code through the compiler's parser,
2707   # not just through cpp.
2708   cat > conftest.$ac_ext <<EOF
2709 #line 2710 "configure"
2710 #include "confdefs.h"
2711 #include <assert.h>
2712 Syntax Error
2713 EOF
2714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2715 { (eval echo configure:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2717 if test -z "$ac_err"; then
2718   :
2719 else
2720   echo "$ac_err" >&5
2721   echo "configure: failed program was:" >&5
2722   cat conftest.$ac_ext >&5
2723   rm -rf conftest*
2724   CPP="${CC-cc} -E -traditional-cpp"
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728 #include <assert.h>
2729 Syntax Error
2730 EOF
2731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2732 { (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2734 if test -z "$ac_err"; then
2735   :
2736 else
2737   echo "$ac_err" >&5
2738   echo "configure: failed program was:" >&5
2739   cat conftest.$ac_ext >&5
2740   rm -rf conftest*
2741   CPP="${CC-cc} -nologo -E"
2742   cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745 #include <assert.h>
2746 Syntax Error
2747 EOF
2748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2749 { (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2751 if test -z "$ac_err"; then
2752   :
2753 else
2754   echo "$ac_err" >&5
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757   rm -rf conftest*
2758   CPP=/lib/cpp
2759 fi
2760 rm -f conftest*
2761 fi
2762 rm -f conftest*
2763 fi
2764 rm -f conftest*
2765   ac_cv_prog_CPP="$CPP"
2766 fi
2767   CPP="$ac_cv_prog_CPP"
2768 else
2769   ac_cv_prog_CPP="$CPP"
2770 fi
2771 echo "$ac_t""$CPP" 1>&6
2772
2773 missing_dir=`cd $ac_aux_dir && pwd`
2774 for ac_prog in flex lex
2775 do
2776 # Extract the first word of "$ac_prog", so it can be a program name with args.
2777 set dummy $ac_prog; ac_word=$2
2778 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_word" >&5
2780 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   if test -n "$LEX"; then
2784   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2785 else
2786   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2787   ac_dummy="$PATH"
2788   for ac_dir in $ac_dummy; do
2789     test -z "$ac_dir" && ac_dir=.
2790     if test -f $ac_dir/$ac_word; then
2791       ac_cv_prog_LEX="$ac_prog"
2792       break
2793     fi
2794   done
2795   IFS="$ac_save_ifs"
2796 fi
2797 fi
2798 LEX="$ac_cv_prog_LEX"
2799 if test -n "$LEX"; then
2800   echo "$ac_t""$LEX" 1>&6
2801 else
2802   echo "$ac_t""no" 1>&6
2803 fi
2804
2805 test -n "$LEX" && break
2806 done
2807 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2808
2809 # Extract the first word of "flex", so it can be a program name with args.
2810 set dummy flex; ac_word=$2
2811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2812 echo "configure:2813: checking for $ac_word" >&5
2813 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   if test -n "$LEX"; then
2817   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2818 else
2819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2820   ac_dummy="$PATH"
2821   for ac_dir in $ac_dummy; do
2822     test -z "$ac_dir" && ac_dir=.
2823     if test -f $ac_dir/$ac_word; then
2824       ac_cv_prog_LEX="flex"
2825       break
2826     fi
2827   done
2828   IFS="$ac_save_ifs"
2829   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2830 fi
2831 fi
2832 LEX="$ac_cv_prog_LEX"
2833 if test -n "$LEX"; then
2834   echo "$ac_t""$LEX" 1>&6
2835 else
2836   echo "$ac_t""no" 1>&6
2837 fi
2838
2839 if test -z "$LEXLIB"
2840 then
2841   case "$LEX" in
2842   flex*) ac_lib=fl ;;
2843   *) ac_lib=l ;;
2844   esac
2845   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2846 echo "configure:2847: checking for yywrap in -l$ac_lib" >&5
2847 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2848 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   ac_save_LIBS="$LIBS"
2852 LIBS="-l$ac_lib  $LIBS"
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856 /* Override any gcc2 internal prototype to avoid an error.  */
2857 /* We use char because int might match the return type of a gcc2
2858     builtin and then its argument prototype would still apply.  */
2859 char yywrap();
2860
2861 int main() {
2862 yywrap()
2863 ; return 0; }
2864 EOF
2865 if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2866   rm -rf conftest*
2867   eval "ac_cv_lib_$ac_lib_var=yes"
2868 else
2869   echo "configure: failed program was:" >&5
2870   cat conftest.$ac_ext >&5
2871   rm -rf conftest*
2872   eval "ac_cv_lib_$ac_lib_var=no"
2873 fi
2874 rm -f conftest*
2875 LIBS="$ac_save_LIBS"
2876
2877 fi
2878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2879   echo "$ac_t""yes" 1>&6
2880   LEXLIB="-l$ac_lib"
2881 else
2882   echo "$ac_t""no" 1>&6
2883 fi
2884
2885 fi
2886
2887 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2888 echo "configure:2889: checking lex output file root" >&5
2889 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   # The minimal lex program is just a single line: %%.  But some broken lexes
2893 # (Solaris, I think it was) want two %% lines, so accommodate them.
2894 echo '%%
2895 %%' | $LEX
2896 if test -f lex.yy.c; then
2897   ac_cv_prog_lex_root=lex.yy
2898 elif test -f lexyy.c; then
2899   ac_cv_prog_lex_root=lexyy
2900 else
2901   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2902 fi
2903 fi
2904
2905 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2906 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2907
2908 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2909 echo "configure:2910: checking whether yytext is a pointer" >&5
2910 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   # POSIX says lex can declare yytext either as a pointer or an array; the
2914 # default is implementation-dependent. Figure out which it is, since
2915 # not all implementations provide the %pointer and %array declarations.
2916 ac_cv_prog_lex_yytext_pointer=no
2917 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2918 ac_save_LIBS="$LIBS"
2919 LIBS="$LIBS $LEXLIB"
2920 cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923 `cat $LEX_OUTPUT_ROOT.c`
2924 int main() {
2925
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2929   rm -rf conftest*
2930   ac_cv_prog_lex_yytext_pointer=yes
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934 fi
2935 rm -f conftest*
2936 LIBS="$ac_save_LIBS"
2937 rm -f "${LEX_OUTPUT_ROOT}.c"
2938
2939 fi
2940
2941 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2942 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2943   cat >> confdefs.h <<\EOF
2944 #define YYTEXT_POINTER 1
2945 EOF
2946
2947 fi
2948
2949
2950 ALL_LINGUAS=
2951 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2952 echo "configure:2953: checking for POSIXized ISC" >&5
2953 if test -d /etc/conf/kconfig.d &&
2954   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2955 then
2956   echo "$ac_t""yes" 1>&6
2957   ISC=yes # If later tests want to check for ISC.
2958   cat >> confdefs.h <<\EOF
2959 #define _POSIX_SOURCE 1
2960 EOF
2961
2962   if test "$GCC" = yes; then
2963     CC="$CC -posix"
2964   else
2965     CC="$CC -Xp"
2966   fi
2967 else
2968   echo "$ac_t""no" 1>&6
2969   ISC=
2970 fi
2971
2972 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2973 echo "configure:2974: checking for ANSI C header files" >&5
2974 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <stdlib.h>
2981 #include <stdarg.h>
2982 #include <string.h>
2983 #include <float.h>
2984 EOF
2985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2986 { (eval echo configure:2987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2988 if test -z "$ac_err"; then
2989   rm -rf conftest*
2990   ac_cv_header_stdc=yes
2991 else
2992   echo "$ac_err" >&5
2993   echo "configure: failed program was:" >&5
2994   cat conftest.$ac_ext >&5
2995   rm -rf conftest*
2996   ac_cv_header_stdc=no
2997 fi
2998 rm -f conftest*
2999
3000 if test $ac_cv_header_stdc = yes; then
3001   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3005 #include <string.h>
3006 EOF
3007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3008   egrep "memchr" >/dev/null 2>&1; then
3009   :
3010 else
3011   rm -rf conftest*
3012   ac_cv_header_stdc=no
3013 fi
3014 rm -f conftest*
3015
3016 fi
3017
3018 if test $ac_cv_header_stdc = yes; then
3019   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <stdlib.h>
3024 EOF
3025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3026   egrep "free" >/dev/null 2>&1; then
3027   :
3028 else
3029   rm -rf conftest*
3030   ac_cv_header_stdc=no
3031 fi
3032 rm -f conftest*
3033
3034 fi
3035
3036 if test $ac_cv_header_stdc = yes; then
3037   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3038 if test "$cross_compiling" = yes; then
3039   :
3040 else
3041   cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 #include <ctype.h>
3045 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3046 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3047 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3048 int main () { int i; for (i = 0; i < 256; i++)
3049 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3050 exit (0); }
3051
3052 EOF
3053 if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3054 then
3055   :
3056 else
3057   echo "configure: failed program was:" >&5
3058   cat conftest.$ac_ext >&5
3059   rm -fr conftest*
3060   ac_cv_header_stdc=no
3061 fi
3062 rm -fr conftest*
3063 fi
3064
3065 fi
3066 fi
3067
3068 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3069 if test $ac_cv_header_stdc = yes; then
3070   cat >> confdefs.h <<\EOF
3071 #define STDC_HEADERS 1
3072 EOF
3073
3074 fi
3075
3076 echo $ac_n "checking for working const""... $ac_c" 1>&6
3077 echo "configure:3078: checking for working const" >&5
3078 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084
3085 int main() {
3086
3087 /* Ultrix mips cc rejects this.  */
3088 typedef int charset[2]; const charset x;
3089 /* SunOS 4.1.1 cc rejects this.  */
3090 char const *const *ccp;
3091 char **p;
3092 /* NEC SVR4.0.2 mips cc rejects this.  */
3093 struct point {int x, y;};
3094 static struct point const zero = {0,0};
3095 /* AIX XL C 1.02.0.0 rejects this.
3096    It does not let you subtract one const X* pointer from another in an arm
3097    of an if-expression whose if-part is not a constant expression */
3098 const char *g = "string";
3099 ccp = &g + (g ? g-g : 0);
3100 /* HPUX 7.0 cc rejects these. */
3101 ++ccp;
3102 p = (char**) ccp;
3103 ccp = (char const *const *) p;
3104 { /* SCO 3.2v4 cc rejects this.  */
3105   char *t;
3106   char const *s = 0 ? (char *) 0 : (char const *) 0;
3107
3108   *t++ = 0;
3109 }
3110 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3111   int x[] = {25, 17};
3112   const int *foo = &x[0];
3113   ++foo;
3114 }
3115 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3116   typedef const int *iptr;
3117   iptr p = 0;
3118   ++p;
3119 }
3120 { /* AIX XL C 1.02.0.0 rejects this saying
3121      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3122   struct s { int j; const int *ap[3]; };
3123   struct s *b; b->j = 5;
3124 }
3125 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3126   const int foo = 10;
3127 }
3128
3129 ; return 0; }
3130 EOF
3131 if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3132   rm -rf conftest*
3133   ac_cv_c_const=yes
3134 else
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   ac_cv_c_const=no
3139 fi
3140 rm -f conftest*
3141 fi
3142
3143 echo "$ac_t""$ac_cv_c_const" 1>&6
3144 if test $ac_cv_c_const = no; then
3145   cat >> confdefs.h <<\EOF
3146 #define const 
3147 EOF
3148
3149 fi
3150
3151 echo $ac_n "checking for inline""... $ac_c" 1>&6
3152 echo "configure:3153: checking for inline" >&5
3153 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   ac_cv_c_inline=no
3157 for ac_kw in inline __inline__ __inline; do
3158   cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161
3162 int main() {
3163 } $ac_kw foo() {
3164 ; return 0; }
3165 EOF
3166 if { (eval echo configure:3167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3167   rm -rf conftest*
3168   ac_cv_c_inline=$ac_kw; break
3169 else
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172 fi
3173 rm -f conftest*
3174 done
3175
3176 fi
3177
3178 echo "$ac_t""$ac_cv_c_inline" 1>&6
3179 case "$ac_cv_c_inline" in
3180   inline | yes) ;;
3181   no) cat >> confdefs.h <<\EOF
3182 #define inline 
3183 EOF
3184  ;;
3185   *)  cat >> confdefs.h <<EOF
3186 #define inline $ac_cv_c_inline
3187 EOF
3188  ;;
3189 esac
3190
3191 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3192 echo "configure:3193: checking for off_t" >&5
3193 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 #include <sys/types.h>
3200 #if STDC_HEADERS
3201 #include <stdlib.h>
3202 #include <stddef.h>
3203 #endif
3204 EOF
3205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3206   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3207   rm -rf conftest*
3208   ac_cv_type_off_t=yes
3209 else
3210   rm -rf conftest*
3211   ac_cv_type_off_t=no
3212 fi
3213 rm -f conftest*
3214
3215 fi
3216 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3217 if test $ac_cv_type_off_t = no; then
3218   cat >> confdefs.h <<\EOF
3219 #define off_t long
3220 EOF
3221
3222 fi
3223
3224 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3225 echo "configure:3226: checking for size_t" >&5
3226 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 #include <sys/types.h>
3233 #if STDC_HEADERS
3234 #include <stdlib.h>
3235 #include <stddef.h>
3236 #endif
3237 EOF
3238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3239   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3240   rm -rf conftest*
3241   ac_cv_type_size_t=yes
3242 else
3243   rm -rf conftest*
3244   ac_cv_type_size_t=no
3245 fi
3246 rm -f conftest*
3247
3248 fi
3249 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3250 if test $ac_cv_type_size_t = no; then
3251   cat >> confdefs.h <<\EOF
3252 #define size_t unsigned
3253 EOF
3254
3255 fi
3256
3257 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3258 # for constant arguments.  Useless!
3259 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3260 echo "configure:3261: checking for working alloca.h" >&5
3261 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 #include <alloca.h>
3268 int main() {
3269 char *p = alloca(2 * sizeof(int));
3270 ; return 0; }
3271 EOF
3272 if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3273   rm -rf conftest*
3274   ac_cv_header_alloca_h=yes
3275 else
3276   echo "configure: failed program was:" >&5
3277   cat conftest.$ac_ext >&5
3278   rm -rf conftest*
3279   ac_cv_header_alloca_h=no
3280 fi
3281 rm -f conftest*
3282 fi
3283
3284 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3285 if test $ac_cv_header_alloca_h = yes; then
3286   cat >> confdefs.h <<\EOF
3287 #define HAVE_ALLOCA_H 1
3288 EOF
3289
3290 fi
3291
3292 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3293 echo "configure:3294: checking for alloca" >&5
3294 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300
3301 #ifdef __GNUC__
3302 # define alloca __builtin_alloca
3303 #else
3304 # ifdef _MSC_VER
3305 #  include <malloc.h>
3306 #  define alloca _alloca
3307 # else
3308 #  if HAVE_ALLOCA_H
3309 #   include <alloca.h>
3310 #  else
3311 #   ifdef _AIX
3312  #pragma alloca
3313 #   else
3314 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3315 char *alloca ();
3316 #    endif
3317 #   endif
3318 #  endif
3319 # endif
3320 #endif
3321
3322 int main() {
3323 char *p = (char *) alloca(1);
3324 ; return 0; }
3325 EOF
3326 if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3327   rm -rf conftest*
3328   ac_cv_func_alloca_works=yes
3329 else
3330   echo "configure: failed program was:" >&5
3331   cat conftest.$ac_ext >&5
3332   rm -rf conftest*
3333   ac_cv_func_alloca_works=no
3334 fi
3335 rm -f conftest*
3336 fi
3337
3338 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3339 if test $ac_cv_func_alloca_works = yes; then
3340   cat >> confdefs.h <<\EOF
3341 #define HAVE_ALLOCA 1
3342 EOF
3343
3344 fi
3345
3346 if test $ac_cv_func_alloca_works = no; then
3347   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3348   # that cause trouble.  Some versions do not even contain alloca or
3349   # contain a buggy version.  If you still want to use their alloca,
3350   # use ar to extract alloca.o from them instead of compiling alloca.c.
3351   ALLOCA=alloca.${ac_objext}
3352   cat >> confdefs.h <<\EOF
3353 #define C_ALLOCA 1
3354 EOF
3355
3356
3357 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3358 echo "configure:3359: checking whether alloca needs Cray hooks" >&5
3359 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   cat > conftest.$ac_ext <<EOF
3363 #line 3364 "configure"
3364 #include "confdefs.h"
3365 #if defined(CRAY) && ! defined(CRAY2)
3366 webecray
3367 #else
3368 wenotbecray
3369 #endif
3370
3371 EOF
3372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3373   egrep "webecray" >/dev/null 2>&1; then
3374   rm -rf conftest*
3375   ac_cv_os_cray=yes
3376 else
3377   rm -rf conftest*
3378   ac_cv_os_cray=no
3379 fi
3380 rm -f conftest*
3381
3382 fi
3383
3384 echo "$ac_t""$ac_cv_os_cray" 1>&6
3385 if test $ac_cv_os_cray = yes; then
3386 for ac_func in _getb67 GETB67 getb67; do
3387   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3388 echo "configure:3389: checking for $ac_func" >&5
3389 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   cat > conftest.$ac_ext <<EOF
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395 /* System header to define __stub macros and hopefully few prototypes,
3396     which can conflict with char $ac_func(); below.  */
3397 #include <assert.h>
3398 /* Override any gcc2 internal prototype to avoid an error.  */
3399 /* We use char because int might match the return type of a gcc2
3400     builtin and then its argument prototype would still apply.  */
3401 char $ac_func();
3402
3403 int main() {
3404
3405 /* The GNU C library defines this for functions which it implements
3406     to always fail with ENOSYS.  Some functions are actually named
3407     something starting with __ and the normal name is an alias.  */
3408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3409 choke me
3410 #else
3411 $ac_func();
3412 #endif
3413
3414 ; return 0; }
3415 EOF
3416 if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3417   rm -rf conftest*
3418   eval "ac_cv_func_$ac_func=yes"
3419 else
3420   echo "configure: failed program was:" >&5
3421   cat conftest.$ac_ext >&5
3422   rm -rf conftest*
3423   eval "ac_cv_func_$ac_func=no"
3424 fi
3425 rm -f conftest*
3426 fi
3427
3428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3429   echo "$ac_t""yes" 1>&6
3430   cat >> confdefs.h <<EOF
3431 #define CRAY_STACKSEG_END $ac_func
3432 EOF
3433
3434   break
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439 done
3440 fi
3441
3442 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3443 echo "configure:3444: checking stack direction for C alloca" >&5
3444 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   if test "$cross_compiling" = yes; then
3448   ac_cv_c_stack_direction=0
3449 else
3450   cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453 find_stack_direction ()
3454 {
3455   static char *addr = 0;
3456   auto char dummy;
3457   if (addr == 0)
3458     {
3459       addr = &dummy;
3460       return find_stack_direction ();
3461     }
3462   else
3463     return (&dummy > addr) ? 1 : -1;
3464 }
3465 main ()
3466 {
3467   exit (find_stack_direction() < 0);
3468 }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3471 then
3472   ac_cv_c_stack_direction=1
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -fr conftest*
3477   ac_cv_c_stack_direction=-1
3478 fi
3479 rm -fr conftest*
3480 fi
3481
3482 fi
3483
3484 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3485 cat >> confdefs.h <<EOF
3486 #define STACK_DIRECTION $ac_cv_c_stack_direction
3487 EOF
3488
3489 fi
3490
3491 for ac_hdr in unistd.h
3492 do
3493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3495 echo "configure:3496: checking for $ac_hdr" >&5
3496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502 #include <$ac_hdr>
3503 EOF
3504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3505 { (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3507 if test -z "$ac_err"; then
3508   rm -rf conftest*
3509   eval "ac_cv_header_$ac_safe=yes"
3510 else
3511   echo "$ac_err" >&5
3512   echo "configure: failed program was:" >&5
3513   cat conftest.$ac_ext >&5
3514   rm -rf conftest*
3515   eval "ac_cv_header_$ac_safe=no"
3516 fi
3517 rm -f conftest*
3518 fi
3519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3520   echo "$ac_t""yes" 1>&6
3521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3522   cat >> confdefs.h <<EOF
3523 #define $ac_tr_hdr 1
3524 EOF
3525  
3526 else
3527   echo "$ac_t""no" 1>&6
3528 fi
3529 done
3530
3531 for ac_func in getpagesize
3532 do
3533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3534 echo "configure:3535: checking for $ac_func" >&5
3535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 /* System header to define __stub macros and hopefully few prototypes,
3542     which can conflict with char $ac_func(); below.  */
3543 #include <assert.h>
3544 /* Override any gcc2 internal prototype to avoid an error.  */
3545 /* We use char because int might match the return type of a gcc2
3546     builtin and then its argument prototype would still apply.  */
3547 char $ac_func();
3548
3549 int main() {
3550
3551 /* The GNU C library defines this for functions which it implements
3552     to always fail with ENOSYS.  Some functions are actually named
3553     something starting with __ and the normal name is an alias.  */
3554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3555 choke me
3556 #else
3557 $ac_func();
3558 #endif
3559
3560 ; return 0; }
3561 EOF
3562 if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3563   rm -rf conftest*
3564   eval "ac_cv_func_$ac_func=yes"
3565 else
3566   echo "configure: failed program was:" >&5
3567   cat conftest.$ac_ext >&5
3568   rm -rf conftest*
3569   eval "ac_cv_func_$ac_func=no"
3570 fi
3571 rm -f conftest*
3572 fi
3573
3574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3575   echo "$ac_t""yes" 1>&6
3576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3577   cat >> confdefs.h <<EOF
3578 #define $ac_tr_func 1
3579 EOF
3580  
3581 else
3582   echo "$ac_t""no" 1>&6
3583 fi
3584 done
3585
3586 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3587 echo "configure:3588: checking for working mmap" >&5
3588 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   if test "$cross_compiling" = yes; then
3592   ac_cv_func_mmap_fixed_mapped=no
3593 else
3594   cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597
3598 /* Thanks to Mike Haertel and Jim Avera for this test.
3599    Here is a matrix of mmap possibilities:
3600         mmap private not fixed
3601         mmap private fixed at somewhere currently unmapped
3602         mmap private fixed at somewhere already mapped
3603         mmap shared not fixed
3604         mmap shared fixed at somewhere currently unmapped
3605         mmap shared fixed at somewhere already mapped
3606    For private mappings, we should verify that changes cannot be read()
3607    back from the file, nor mmap's back from the file at a different
3608    address.  (There have been systems where private was not correctly
3609    implemented like the infamous i386 svr4.0, and systems where the
3610    VM page cache was not coherent with the filesystem buffer cache
3611    like early versions of FreeBSD and possibly contemporary NetBSD.)
3612    For shared mappings, we should conversely verify that changes get
3613    propogated back to all the places they're supposed to be.
3614
3615    Grep wants private fixed already mapped.
3616    The main things grep needs to know about mmap are:
3617    * does it exist and is it safe to write into the mmap'd area
3618    * how to use it (BSD variants)  */
3619 #include <sys/types.h>
3620 #include <fcntl.h>
3621 #include <sys/mman.h>
3622
3623 /* This mess was copied from the GNU getpagesize.h.  */
3624 #ifndef HAVE_GETPAGESIZE
3625 # ifdef HAVE_UNISTD_H
3626 #  include <unistd.h>
3627 # endif
3628
3629 /* Assume that all systems that can run configure have sys/param.h.  */
3630 # ifndef HAVE_SYS_PARAM_H
3631 #  define HAVE_SYS_PARAM_H 1
3632 # endif
3633
3634 # ifdef _SC_PAGESIZE
3635 #  define getpagesize() sysconf(_SC_PAGESIZE)
3636 # else /* no _SC_PAGESIZE */
3637 #  ifdef HAVE_SYS_PARAM_H
3638 #   include <sys/param.h>
3639 #   ifdef EXEC_PAGESIZE
3640 #    define getpagesize() EXEC_PAGESIZE
3641 #   else /* no EXEC_PAGESIZE */
3642 #    ifdef NBPG
3643 #     define getpagesize() NBPG * CLSIZE
3644 #     ifndef CLSIZE
3645 #      define CLSIZE 1
3646 #     endif /* no CLSIZE */
3647 #    else /* no NBPG */
3648 #     ifdef NBPC
3649 #      define getpagesize() NBPC
3650 #     else /* no NBPC */
3651 #      ifdef PAGESIZE
3652 #       define getpagesize() PAGESIZE
3653 #      endif /* PAGESIZE */
3654 #     endif /* no NBPC */
3655 #    endif /* no NBPG */
3656 #   endif /* no EXEC_PAGESIZE */
3657 #  else /* no HAVE_SYS_PARAM_H */
3658 #   define getpagesize() 8192   /* punt totally */
3659 #  endif /* no HAVE_SYS_PARAM_H */
3660 # endif /* no _SC_PAGESIZE */
3661
3662 #endif /* no HAVE_GETPAGESIZE */
3663
3664 #ifdef __cplusplus
3665 extern "C" { void *malloc(unsigned); }
3666 #else
3667 char *malloc();
3668 #endif
3669
3670 int
3671 main()
3672 {
3673         char *data, *data2, *data3;
3674         int i, pagesize;
3675         int fd;
3676
3677         pagesize = getpagesize();
3678
3679         /*
3680          * First, make a file with some known garbage in it.
3681          */
3682         data = malloc(pagesize);
3683         if (!data)
3684                 exit(1);
3685         for (i = 0; i < pagesize; ++i)
3686                 *(data + i) = rand();
3687         umask(0);
3688         fd = creat("conftestmmap", 0600);
3689         if (fd < 0)
3690                 exit(1);
3691         if (write(fd, data, pagesize) != pagesize)
3692                 exit(1);
3693         close(fd);
3694
3695         /*
3696          * Next, try to mmap the file at a fixed address which
3697          * already has something else allocated at it.  If we can,
3698          * also make sure that we see the same garbage.
3699          */
3700         fd = open("conftestmmap", O_RDWR);
3701         if (fd < 0)
3702                 exit(1);
3703         data2 = malloc(2 * pagesize);
3704         if (!data2)
3705                 exit(1);
3706         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3707         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3708             MAP_PRIVATE | MAP_FIXED, fd, 0L))
3709                 exit(1);
3710         for (i = 0; i < pagesize; ++i)
3711                 if (*(data + i) != *(data2 + i))
3712                         exit(1);
3713
3714         /*
3715          * Finally, make sure that changes to the mapped area
3716          * do not percolate back to the file as seen by read().
3717          * (This is a bug on some variants of i386 svr4.0.)
3718          */
3719         for (i = 0; i < pagesize; ++i)
3720                 *(data2 + i) = *(data2 + i) + 1;
3721         data3 = malloc(pagesize);
3722         if (!data3)
3723                 exit(1);
3724         if (read(fd, data3, pagesize) != pagesize)
3725                 exit(1);
3726         for (i = 0; i < pagesize; ++i)
3727                 if (*(data + i) != *(data3 + i))
3728                         exit(1);
3729         close(fd);
3730         unlink("conftestmmap");
3731         exit(0);
3732 }
3733
3734 EOF
3735 if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3736 then
3737   ac_cv_func_mmap_fixed_mapped=yes
3738 else
3739   echo "configure: failed program was:" >&5
3740   cat conftest.$ac_ext >&5
3741   rm -fr conftest*
3742   ac_cv_func_mmap_fixed_mapped=no
3743 fi
3744 rm -fr conftest*
3745 fi
3746
3747 fi
3748
3749 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3750 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3751   cat >> confdefs.h <<\EOF
3752 #define HAVE_MMAP 1
3753 EOF
3754
3755 fi
3756
3757                               
3758    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3759 unistd.h values.h sys/param.h
3760 do
3761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3763 echo "configure:3764: checking for $ac_hdr" >&5
3764 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3765   echo $ac_n "(cached) $ac_c" 1>&6
3766 else
3767   cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 #include <$ac_hdr>
3771 EOF
3772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3773 { (eval echo configure:3774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3775 if test -z "$ac_err"; then
3776   rm -rf conftest*
3777   eval "ac_cv_header_$ac_safe=yes"
3778 else
3779   echo "$ac_err" >&5
3780   echo "configure: failed program was:" >&5
3781   cat conftest.$ac_ext >&5
3782   rm -rf conftest*
3783   eval "ac_cv_header_$ac_safe=no"
3784 fi
3785 rm -f conftest*
3786 fi
3787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3788   echo "$ac_t""yes" 1>&6
3789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3790   cat >> confdefs.h <<EOF
3791 #define $ac_tr_hdr 1
3792 EOF
3793  
3794 else
3795   echo "$ac_t""no" 1>&6
3796 fi
3797 done
3798
3799    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3800 __argz_count __argz_stringify __argz_next
3801 do
3802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_func" >&5
3804 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 /* System header to define __stub macros and hopefully few prototypes,
3811     which can conflict with char $ac_func(); below.  */
3812 #include <assert.h>
3813 /* Override any gcc2 internal prototype to avoid an error.  */
3814 /* We use char because int might match the return type of a gcc2
3815     builtin and then its argument prototype would still apply.  */
3816 char $ac_func();
3817
3818 int main() {
3819
3820 /* The GNU C library defines this for functions which it implements
3821     to always fail with ENOSYS.  Some functions are actually named
3822     something starting with __ and the normal name is an alias.  */
3823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3824 choke me
3825 #else
3826 $ac_func();
3827 #endif
3828
3829 ; return 0; }
3830 EOF
3831 if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3832   rm -rf conftest*
3833   eval "ac_cv_func_$ac_func=yes"
3834 else
3835   echo "configure: failed program was:" >&5
3836   cat conftest.$ac_ext >&5
3837   rm -rf conftest*
3838   eval "ac_cv_func_$ac_func=no"
3839 fi
3840 rm -f conftest*
3841 fi
3842
3843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3844   echo "$ac_t""yes" 1>&6
3845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3846   cat >> confdefs.h <<EOF
3847 #define $ac_tr_func 1
3848 EOF
3849  
3850 else
3851   echo "$ac_t""no" 1>&6
3852 fi
3853 done
3854
3855
3856    if test "${ac_cv_func_stpcpy+set}" != "set"; then
3857      for ac_func in stpcpy
3858 do
3859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3860 echo "configure:3861: checking for $ac_func" >&5
3861 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3862   echo $ac_n "(cached) $ac_c" 1>&6
3863 else
3864   cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 /* System header to define __stub macros and hopefully few prototypes,
3868     which can conflict with char $ac_func(); below.  */
3869 #include <assert.h>
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char $ac_func();
3874
3875 int main() {
3876
3877 /* The GNU C library defines this for functions which it implements
3878     to always fail with ENOSYS.  Some functions are actually named
3879     something starting with __ and the normal name is an alias.  */
3880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3881 choke me
3882 #else
3883 $ac_func();
3884 #endif
3885
3886 ; return 0; }
3887 EOF
3888 if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3889   rm -rf conftest*
3890   eval "ac_cv_func_$ac_func=yes"
3891 else
3892   echo "configure: failed program was:" >&5
3893   cat conftest.$ac_ext >&5
3894   rm -rf conftest*
3895   eval "ac_cv_func_$ac_func=no"
3896 fi
3897 rm -f conftest*
3898 fi
3899
3900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3901   echo "$ac_t""yes" 1>&6
3902     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3903   cat >> confdefs.h <<EOF
3904 #define $ac_tr_func 1
3905 EOF
3906  
3907 else
3908   echo "$ac_t""no" 1>&6
3909 fi
3910 done
3911
3912    fi
3913    if test "${ac_cv_func_stpcpy}" = "yes"; then
3914      cat >> confdefs.h <<\EOF
3915 #define HAVE_STPCPY 1
3916 EOF
3917
3918    fi
3919
3920    if test $ac_cv_header_locale_h = yes; then
3921     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3922 echo "configure:3923: checking for LC_MESSAGES" >&5
3923 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3924   echo $ac_n "(cached) $ac_c" 1>&6
3925 else
3926   cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <locale.h>
3930 int main() {
3931 return LC_MESSAGES
3932 ; return 0; }
3933 EOF
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3935   rm -rf conftest*
3936   am_cv_val_LC_MESSAGES=yes
3937 else
3938   echo "configure: failed program was:" >&5
3939   cat conftest.$ac_ext >&5
3940   rm -rf conftest*
3941   am_cv_val_LC_MESSAGES=no
3942 fi
3943 rm -f conftest*
3944 fi
3945
3946 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3947     if test $am_cv_val_LC_MESSAGES = yes; then
3948       cat >> confdefs.h <<\EOF
3949 #define HAVE_LC_MESSAGES 1
3950 EOF
3951
3952     fi
3953   fi
3954    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3955 echo "configure:3956: checking whether NLS is requested" >&5
3956         # Check whether --enable-nls or --disable-nls was given.
3957 if test "${enable_nls+set}" = set; then
3958   enableval="$enable_nls"
3959   USE_NLS=$enableval
3960 else
3961   USE_NLS=yes
3962 fi
3963
3964     echo "$ac_t""$USE_NLS" 1>&6
3965     
3966
3967     USE_INCLUDED_LIBINTL=no
3968
3969         if test "$USE_NLS" = "yes"; then
3970       cat >> confdefs.h <<\EOF
3971 #define ENABLE_NLS 1
3972 EOF
3973
3974       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3975 echo "configure:3976: checking whether included gettext is requested" >&5
3976       # Check whether --with-included-gettext or --without-included-gettext was given.
3977 if test "${with_included_gettext+set}" = set; then
3978   withval="$with_included_gettext"
3979   nls_cv_force_use_gnu_gettext=$withval
3980 else
3981   nls_cv_force_use_gnu_gettext=no
3982 fi
3983
3984       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3985
3986       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3987       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3988                                         nls_cv_header_intl=
3989         nls_cv_header_libgt=
3990         CATOBJEXT=NONE
3991
3992         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3993 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3994 echo "configure:3995: checking for libintl.h" >&5
3995 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 #include <libintl.h>
4002 EOF
4003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4004 { (eval echo configure:4005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4006 if test -z "$ac_err"; then
4007   rm -rf conftest*
4008   eval "ac_cv_header_$ac_safe=yes"
4009 else
4010   echo "$ac_err" >&5
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   eval "ac_cv_header_$ac_safe=no"
4015 fi
4016 rm -f conftest*
4017 fi
4018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4019   echo "$ac_t""yes" 1>&6
4020   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4021 echo "configure:4022: checking for gettext in libc" >&5
4022 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4023   echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025   cat > conftest.$ac_ext <<EOF
4026 #line 4027 "configure"
4027 #include "confdefs.h"
4028 #include <libintl.h>
4029 int main() {
4030 return (int) gettext ("")
4031 ; return 0; }
4032 EOF
4033 if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4034   rm -rf conftest*
4035   gt_cv_func_gettext_libc=yes
4036 else
4037   echo "configure: failed program was:" >&5
4038   cat conftest.$ac_ext >&5
4039   rm -rf conftest*
4040   gt_cv_func_gettext_libc=no
4041 fi
4042 rm -f conftest*
4043 fi
4044
4045 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4046
4047            if test "$gt_cv_func_gettext_libc" != "yes"; then
4048              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4049 echo "configure:4050: checking for bindtextdomain in -lintl" >&5
4050 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   ac_save_LIBS="$LIBS"
4055 LIBS="-lintl  $LIBS"
4056 cat > conftest.$ac_ext <<EOF
4057 #line 4058 "configure"
4058 #include "confdefs.h"
4059 /* Override any gcc2 internal prototype to avoid an error.  */
4060 /* We use char because int might match the return type of a gcc2
4061     builtin and then its argument prototype would still apply.  */
4062 char bindtextdomain();
4063
4064 int main() {
4065 bindtextdomain()
4066 ; return 0; }
4067 EOF
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4069   rm -rf conftest*
4070   eval "ac_cv_lib_$ac_lib_var=yes"
4071 else
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -rf conftest*
4075   eval "ac_cv_lib_$ac_lib_var=no"
4076 fi
4077 rm -f conftest*
4078 LIBS="$ac_save_LIBS"
4079
4080 fi
4081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4082   echo "$ac_t""yes" 1>&6
4083   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4084 echo "configure:4085: checking for gettext in libintl" >&5
4085 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091
4092 int main() {
4093 return (int) gettext ("")
4094 ; return 0; }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4097   rm -rf conftest*
4098   gt_cv_func_gettext_libintl=yes
4099 else
4100   echo "configure: failed program was:" >&5
4101   cat conftest.$ac_ext >&5
4102   rm -rf conftest*
4103   gt_cv_func_gettext_libintl=no
4104 fi
4105 rm -f conftest*
4106 fi
4107
4108 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4109 else
4110   echo "$ac_t""no" 1>&6
4111 fi
4112
4113            fi
4114
4115            if test "$gt_cv_func_gettext_libc" = "yes" \
4116               || test "$gt_cv_func_gettext_libintl" = "yes"; then
4117               cat >> confdefs.h <<\EOF
4118 #define HAVE_GETTEXT 1
4119 EOF
4120
4121               # Extract the first word of "msgfmt", so it can be a program name with args.
4122 set dummy msgfmt; ac_word=$2
4123 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4124 echo "configure:4125: checking for $ac_word" >&5
4125 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   case "$MSGFMT" in
4129   /*)
4130   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4131   ;;
4132   *)
4133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4134   for ac_dir in $PATH; do
4135     test -z "$ac_dir" && ac_dir=.
4136     if test -f $ac_dir/$ac_word; then
4137       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4138         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4139         break
4140       fi
4141     fi
4142   done
4143   IFS="$ac_save_ifs"
4144   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4145   ;;
4146 esac
4147 fi
4148 MSGFMT="$ac_cv_path_MSGFMT"
4149 if test -n "$MSGFMT"; then
4150   echo "$ac_t""$MSGFMT" 1>&6
4151 else
4152   echo "$ac_t""no" 1>&6
4153 fi
4154               if test "$MSGFMT" != "no"; then
4155                 for ac_func in dcgettext
4156 do
4157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4158 echo "configure:4159: checking for $ac_func" >&5
4159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 /* System header to define __stub macros and hopefully few prototypes,
4166     which can conflict with char $ac_func(); below.  */
4167 #include <assert.h>
4168 /* Override any gcc2 internal prototype to avoid an error.  */
4169 /* We use char because int might match the return type of a gcc2
4170     builtin and then its argument prototype would still apply.  */
4171 char $ac_func();
4172
4173 int main() {
4174
4175 /* The GNU C library defines this for functions which it implements
4176     to always fail with ENOSYS.  Some functions are actually named
4177     something starting with __ and the normal name is an alias.  */
4178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4179 choke me
4180 #else
4181 $ac_func();
4182 #endif
4183
4184 ; return 0; }
4185 EOF
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4187   rm -rf conftest*
4188   eval "ac_cv_func_$ac_func=yes"
4189 else
4190   echo "configure: failed program was:" >&5
4191   cat conftest.$ac_ext >&5
4192   rm -rf conftest*
4193   eval "ac_cv_func_$ac_func=no"
4194 fi
4195 rm -f conftest*
4196 fi
4197
4198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4199   echo "$ac_t""yes" 1>&6
4200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4201   cat >> confdefs.h <<EOF
4202 #define $ac_tr_func 1
4203 EOF
4204  
4205 else
4206   echo "$ac_t""no" 1>&6
4207 fi
4208 done
4209
4210                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4211 set dummy gmsgfmt; ac_word=$2
4212 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4213 echo "configure:4214: checking for $ac_word" >&5
4214 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   case "$GMSGFMT" in
4218   /*)
4219   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4220   ;;
4221   ?:/*)                  
4222   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4223   ;;
4224   *)
4225   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4226   ac_dummy="$PATH"
4227   for ac_dir in $ac_dummy; do 
4228     test -z "$ac_dir" && ac_dir=.
4229     if test -f $ac_dir/$ac_word; then
4230       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4231       break
4232     fi
4233   done
4234   IFS="$ac_save_ifs"
4235   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4236   ;;
4237 esac
4238 fi
4239 GMSGFMT="$ac_cv_path_GMSGFMT"
4240 if test -n "$GMSGFMT"; then
4241   echo "$ac_t""$GMSGFMT" 1>&6
4242 else
4243   echo "$ac_t""no" 1>&6
4244 fi
4245
4246                 # Extract the first word of "xgettext", so it can be a program name with args.
4247 set dummy xgettext; ac_word=$2
4248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4249 echo "configure:4250: checking for $ac_word" >&5
4250 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4251   echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253   case "$XGETTEXT" in
4254   /*)
4255   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4256   ;;
4257   *)
4258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4259   for ac_dir in $PATH; do
4260     test -z "$ac_dir" && ac_dir=.
4261     if test -f $ac_dir/$ac_word; then
4262       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4263         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4264         break
4265       fi
4266     fi
4267   done
4268   IFS="$ac_save_ifs"
4269   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4270   ;;
4271 esac
4272 fi
4273 XGETTEXT="$ac_cv_path_XGETTEXT"
4274 if test -n "$XGETTEXT"; then
4275   echo "$ac_t""$XGETTEXT" 1>&6
4276 else
4277   echo "$ac_t""no" 1>&6
4278 fi
4279
4280                 cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283
4284 int main() {
4285 extern int _nl_msg_cat_cntr;
4286                                return _nl_msg_cat_cntr
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290   rm -rf conftest*
4291   CATOBJEXT=.gmo
4292                    DATADIRNAME=share
4293 else
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -rf conftest*
4297   CATOBJEXT=.mo
4298                    DATADIRNAME=lib
4299 fi
4300 rm -f conftest*
4301                 INSTOBJEXT=.mo
4302               fi
4303             fi
4304         
4305 else
4306   echo "$ac_t""no" 1>&6
4307 fi
4308
4309
4310                 
4311         if test "$CATOBJEXT" = "NONE"; then
4312                           nls_cv_use_gnu_gettext=yes
4313         fi
4314       fi
4315
4316       if test "$nls_cv_use_gnu_gettext" = "yes"; then
4317                 INTLOBJS="\$(GETTOBJS)"
4318         # Extract the first word of "msgfmt", so it can be a program name with args.
4319 set dummy msgfmt; ac_word=$2
4320 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4321 echo "configure:4322: checking for $ac_word" >&5
4322 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4323   echo $ac_n "(cached) $ac_c" 1>&6
4324 else
4325   case "$MSGFMT" in
4326   /*)
4327   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4328   ;;
4329   *)
4330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4331   for ac_dir in $PATH; do
4332     test -z "$ac_dir" && ac_dir=.
4333     if test -f $ac_dir/$ac_word; then
4334       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4335         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4336         break
4337       fi
4338     fi
4339   done
4340   IFS="$ac_save_ifs"
4341   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4342   ;;
4343 esac
4344 fi
4345 MSGFMT="$ac_cv_path_MSGFMT"
4346 if test -n "$MSGFMT"; then
4347   echo "$ac_t""$MSGFMT" 1>&6
4348 else
4349   echo "$ac_t""no" 1>&6
4350 fi
4351
4352         # Extract the first word of "gmsgfmt", so it can be a program name with args.
4353 set dummy gmsgfmt; ac_word=$2
4354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4355 echo "configure:4356: checking for $ac_word" >&5
4356 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   case "$GMSGFMT" in
4360   /*)
4361   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4362   ;;
4363   ?:/*)                  
4364   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4365   ;;
4366   *)
4367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4368   ac_dummy="$PATH"
4369   for ac_dir in $ac_dummy; do 
4370     test -z "$ac_dir" && ac_dir=.
4371     if test -f $ac_dir/$ac_word; then
4372       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4373       break
4374     fi
4375   done
4376   IFS="$ac_save_ifs"
4377   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4378   ;;
4379 esac
4380 fi
4381 GMSGFMT="$ac_cv_path_GMSGFMT"
4382 if test -n "$GMSGFMT"; then
4383   echo "$ac_t""$GMSGFMT" 1>&6
4384 else
4385   echo "$ac_t""no" 1>&6
4386 fi
4387
4388         # Extract the first word of "xgettext", so it can be a program name with args.
4389 set dummy xgettext; ac_word=$2
4390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_word" >&5
4392 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   case "$XGETTEXT" in
4396   /*)
4397   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4398   ;;
4399   *)
4400   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4401   for ac_dir in $PATH; do
4402     test -z "$ac_dir" && ac_dir=.
4403     if test -f $ac_dir/$ac_word; then
4404       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4405         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4406         break
4407       fi
4408     fi
4409   done
4410   IFS="$ac_save_ifs"
4411   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4412   ;;
4413 esac
4414 fi
4415 XGETTEXT="$ac_cv_path_XGETTEXT"
4416 if test -n "$XGETTEXT"; then
4417   echo "$ac_t""$XGETTEXT" 1>&6
4418 else
4419   echo "$ac_t""no" 1>&6
4420 fi
4421
4422         
4423         USE_INCLUDED_LIBINTL=yes
4424         CATOBJEXT=.gmo
4425         INSTOBJEXT=.mo
4426         DATADIRNAME=share
4427         INTLDEPS='$(top_builddir)/../intl/libintl.a'
4428         INTLLIBS=$INTLDEPS
4429         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4430         nls_cv_header_intl=libintl.h
4431         nls_cv_header_libgt=libgettext.h
4432       fi
4433
4434             if test "$XGETTEXT" != ":"; then
4435                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4436           : ;
4437         else
4438           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4439           XGETTEXT=":"
4440         fi
4441       fi
4442
4443       # We need to process the po/ directory.
4444       POSUB=po
4445     else
4446       DATADIRNAME=share
4447       nls_cv_header_intl=libintl.h
4448       nls_cv_header_libgt=libgettext.h
4449     fi
4450
4451     # If this is used in GNU gettext we have to set USE_NLS to `yes'
4452     # because some of the sources are only built for this goal.
4453     if test "$PACKAGE" = gettext; then
4454       USE_NLS=yes
4455       USE_INCLUDED_LIBINTL=yes
4456     fi
4457
4458                 for lang in $ALL_LINGUAS; do
4459       GMOFILES="$GMOFILES $lang.gmo"
4460       POFILES="$POFILES $lang.po"
4461     done
4462
4463         
4464     
4465     
4466     
4467     
4468     
4469     
4470     
4471     
4472     
4473     
4474   
4475
4476    if test "x$CATOBJEXT" != "x"; then
4477      if test "x$ALL_LINGUAS" = "x"; then
4478        LINGUAS=
4479      else
4480        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4481 echo "configure:4482: checking for catalogs to be installed" >&5
4482        NEW_LINGUAS=
4483        for lang in ${LINGUAS=$ALL_LINGUAS}; do
4484          case "$ALL_LINGUAS" in
4485           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4486          esac
4487        done
4488        LINGUAS=$NEW_LINGUAS
4489        echo "$ac_t""$LINGUAS" 1>&6
4490      fi
4491
4492           if test -n "$LINGUAS"; then
4493        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4494      fi
4495    fi
4496
4497             if test $ac_cv_header_locale_h = yes; then
4498      INCLUDE_LOCALE_H="#include <locale.h>"
4499    else
4500      INCLUDE_LOCALE_H="\
4501 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
4502    fi
4503    
4504
4505             if test -f $srcdir/po2tbl.sed.in; then
4506       if test "$CATOBJEXT" = ".cat"; then
4507          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4508 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4509 echo "configure:4510: checking for linux/version.h" >&5
4510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <linux/version.h>
4517 EOF
4518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4519 { (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4521 if test -z "$ac_err"; then
4522   rm -rf conftest*
4523   eval "ac_cv_header_$ac_safe=yes"
4524 else
4525   echo "$ac_err" >&5
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   eval "ac_cv_header_$ac_safe=no"
4530 fi
4531 rm -f conftest*
4532 fi
4533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535   msgformat=linux
4536 else
4537   echo "$ac_t""no" 1>&6
4538 msgformat=xopen
4539 fi
4540
4541
4542                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4543       fi
4544             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4545          $srcdir/po2tbl.sed.in > po2tbl.sed
4546    fi
4547
4548             if test "$PACKAGE" = "gettext"; then
4549      GT_NO="#NO#"
4550      GT_YES=
4551    else
4552      GT_NO=
4553      GT_YES="#YES#"
4554    fi
4555    
4556    
4557
4558    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4559    
4560
4561       l=
4562    
4563
4564             if test -d $srcdir/po; then
4565       test -d po || mkdir po
4566       if test "x$srcdir" != "x."; then
4567          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4568             posrcprefix="$srcdir/"
4569          else
4570             posrcprefix="../$srcdir/"
4571          fi
4572       else
4573          posrcprefix="../"
4574       fi
4575       rm -f po/POTFILES
4576       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4577          < $srcdir/po/POTFILES.in > po/POTFILES
4578    fi
4579   
4580
4581 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4582 echo "configure:4583: checking whether to enable maintainer-specific portions of Makefiles" >&5
4583     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4584 if test "${enable_maintainer_mode+set}" = set; then
4585   enableval="$enable_maintainer_mode"
4586   USE_MAINTAINER_MODE=$enableval
4587 else
4588   USE_MAINTAINER_MODE=no
4589 fi
4590
4591   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4592   
4593
4594 if test $USE_MAINTAINER_MODE = yes; then
4595   MAINTAINER_MODE_TRUE=
4596   MAINTAINER_MODE_FALSE='#'
4597 else
4598   MAINTAINER_MODE_TRUE='#'
4599   MAINTAINER_MODE_FALSE=
4600 fi
4601   MAINT=$MAINTAINER_MODE_TRUE
4602   
4603
4604 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4605 echo "configure:4606: checking for Cygwin environment" >&5
4606 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4607   echo $ac_n "(cached) $ac_c" 1>&6
4608 else
4609   cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612
4613 int main() {
4614
4615 #ifndef __CYGWIN__
4616 #define __CYGWIN__ __CYGWIN32__
4617 #endif
4618 return __CYGWIN__;
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4622   rm -rf conftest*
4623   ac_cv_cygwin=yes
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   ac_cv_cygwin=no
4629 fi
4630 rm -f conftest*
4631 rm -f conftest*
4632 fi
4633
4634 echo "$ac_t""$ac_cv_cygwin" 1>&6
4635 CYGWIN=
4636 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4637 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4638 echo "configure:4639: checking for mingw32 environment" >&5
4639 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645
4646 int main() {
4647 return __MINGW32__;
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4651   rm -rf conftest*
4652   ac_cv_mingw32=yes
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   ac_cv_mingw32=no
4658 fi
4659 rm -f conftest*
4660 rm -f conftest*
4661 fi
4662
4663 echo "$ac_t""$ac_cv_mingw32" 1>&6
4664 MINGW32=
4665 test "$ac_cv_mingw32" = yes && MINGW32=yes
4666
4667
4668 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4669 echo "configure:4670: checking for executable suffix" >&5
4670 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4674   ac_cv_exeext=.exe
4675 else
4676   rm -f conftest*
4677   echo 'int main () { return 0; }' > conftest.$ac_ext
4678   ac_cv_exeext=
4679   if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4680     for file in conftest.*; do
4681       case $file in
4682       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4683       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4684       esac
4685     done
4686   else
4687     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4688   fi
4689   rm -f conftest*
4690   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4691 fi
4692 fi
4693
4694 EXEEXT=""
4695 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4696 echo "$ac_t""${ac_cv_exeext}" 1>&6
4697 ac_exeext=$EXEEXT
4698
4699
4700 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4701 do
4702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4704 echo "configure:4705: checking for $ac_hdr" >&5
4705 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4706   echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708   cat > conftest.$ac_ext <<EOF
4709 #line 4710 "configure"
4710 #include "confdefs.h"
4711 #include <$ac_hdr>
4712 EOF
4713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4714 { (eval echo configure:4715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4716 if test -z "$ac_err"; then
4717   rm -rf conftest*
4718   eval "ac_cv_header_$ac_safe=yes"
4719 else
4720   echo "$ac_err" >&5
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -rf conftest*
4724   eval "ac_cv_header_$ac_safe=no"
4725 fi
4726 rm -f conftest*
4727 fi
4728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4731   cat >> confdefs.h <<EOF
4732 #define $ac_tr_hdr 1
4733 EOF
4734  
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738 done
4739
4740
4741 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
4742 # people who are not cross-compiling but are compiling cross-assemblers.
4743 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
4744 echo "configure:4745: checking whether compiling a cross-assembler" >&5
4745 if test "${host}" = "${target}"; then
4746   cross_gas=no
4747 else
4748   cross_gas=yes
4749   cat >> confdefs.h <<\EOF
4750 #define CROSS_COMPILE 1
4751 EOF
4752
4753 fi
4754 echo "$ac_t""$cross_gas" 1>&6
4755
4756 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4757 # for constant arguments.  Useless!
4758 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4759 echo "configure:4760: checking for working alloca.h" >&5
4760 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 #include <alloca.h>
4767 int main() {
4768 char *p = alloca(2 * sizeof(int));
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   ac_cv_header_alloca_h=yes
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   ac_cv_header_alloca_h=no
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4784 if test $ac_cv_header_alloca_h = yes; then
4785   cat >> confdefs.h <<\EOF
4786 #define HAVE_ALLOCA_H 1
4787 EOF
4788
4789 fi
4790
4791 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4792 echo "configure:4793: checking for alloca" >&5
4793 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4794   echo $ac_n "(cached) $ac_c" 1>&6
4795 else
4796   cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799
4800 #ifdef __GNUC__
4801 # define alloca __builtin_alloca
4802 #else
4803 # ifdef _MSC_VER
4804 #  include <malloc.h>
4805 #  define alloca _alloca
4806 # else
4807 #  if HAVE_ALLOCA_H
4808 #   include <alloca.h>
4809 #  else
4810 #   ifdef _AIX
4811  #pragma alloca
4812 #   else
4813 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4814 char *alloca ();
4815 #    endif
4816 #   endif
4817 #  endif
4818 # endif
4819 #endif
4820
4821 int main() {
4822 char *p = (char *) alloca(1);
4823 ; return 0; }
4824 EOF
4825 if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4826   rm -rf conftest*
4827   ac_cv_func_alloca_works=yes
4828 else
4829   echo "configure: failed program was:" >&5
4830   cat conftest.$ac_ext >&5
4831   rm -rf conftest*
4832   ac_cv_func_alloca_works=no
4833 fi
4834 rm -f conftest*
4835 fi
4836
4837 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4838 if test $ac_cv_func_alloca_works = yes; then
4839   cat >> confdefs.h <<\EOF
4840 #define HAVE_ALLOCA 1
4841 EOF
4842
4843 fi
4844
4845 if test $ac_cv_func_alloca_works = no; then
4846   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4847   # that cause trouble.  Some versions do not even contain alloca or
4848   # contain a buggy version.  If you still want to use their alloca,
4849   # use ar to extract alloca.o from them instead of compiling alloca.c.
4850   ALLOCA=alloca.${ac_objext}
4851   cat >> confdefs.h <<\EOF
4852 #define C_ALLOCA 1
4853 EOF
4854
4855
4856 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4857 echo "configure:4858: checking whether alloca needs Cray hooks" >&5
4858 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 #if defined(CRAY) && ! defined(CRAY2)
4865 webecray
4866 #else
4867 wenotbecray
4868 #endif
4869
4870 EOF
4871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4872   egrep "webecray" >/dev/null 2>&1; then
4873   rm -rf conftest*
4874   ac_cv_os_cray=yes
4875 else
4876   rm -rf conftest*
4877   ac_cv_os_cray=no
4878 fi
4879 rm -f conftest*
4880
4881 fi
4882
4883 echo "$ac_t""$ac_cv_os_cray" 1>&6
4884 if test $ac_cv_os_cray = yes; then
4885 for ac_func in _getb67 GETB67 getb67; do
4886   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4887 echo "configure:4888: checking for $ac_func" >&5
4888 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 /* System header to define __stub macros and hopefully few prototypes,
4895     which can conflict with char $ac_func(); below.  */
4896 #include <assert.h>
4897 /* Override any gcc2 internal prototype to avoid an error.  */
4898 /* We use char because int might match the return type of a gcc2
4899     builtin and then its argument prototype would still apply.  */
4900 char $ac_func();
4901
4902 int main() {
4903
4904 /* The GNU C library defines this for functions which it implements
4905     to always fail with ENOSYS.  Some functions are actually named
4906     something starting with __ and the normal name is an alias.  */
4907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4908 choke me
4909 #else
4910 $ac_func();
4911 #endif
4912
4913 ; return 0; }
4914 EOF
4915 if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4916   rm -rf conftest*
4917   eval "ac_cv_func_$ac_func=yes"
4918 else
4919   echo "configure: failed program was:" >&5
4920   cat conftest.$ac_ext >&5
4921   rm -rf conftest*
4922   eval "ac_cv_func_$ac_func=no"
4923 fi
4924 rm -f conftest*
4925 fi
4926
4927 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4928   echo "$ac_t""yes" 1>&6
4929   cat >> confdefs.h <<EOF
4930 #define CRAY_STACKSEG_END $ac_func
4931 EOF
4932
4933   break
4934 else
4935   echo "$ac_t""no" 1>&6
4936 fi
4937
4938 done
4939 fi
4940
4941 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4942 echo "configure:4943: checking stack direction for C alloca" >&5
4943 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946   if test "$cross_compiling" = yes; then
4947   ac_cv_c_stack_direction=0
4948 else
4949   cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 find_stack_direction ()
4953 {
4954   static char *addr = 0;
4955   auto char dummy;
4956   if (addr == 0)
4957     {
4958       addr = &dummy;
4959       return find_stack_direction ();
4960     }
4961   else
4962     return (&dummy > addr) ? 1 : -1;
4963 }
4964 main ()
4965 {
4966   exit (find_stack_direction() < 0);
4967 }
4968 EOF
4969 if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4970 then
4971   ac_cv_c_stack_direction=1
4972 else
4973   echo "configure: failed program was:" >&5
4974   cat conftest.$ac_ext >&5
4975   rm -fr conftest*
4976   ac_cv_c_stack_direction=-1
4977 fi
4978 rm -fr conftest*
4979 fi
4980
4981 fi
4982
4983 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4984 cat >> confdefs.h <<EOF
4985 #define STACK_DIRECTION $ac_cv_c_stack_direction
4986 EOF
4987
4988 fi
4989
4990 echo $ac_n "checking for inline""... $ac_c" 1>&6
4991 echo "configure:4992: checking for inline" >&5
4992 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4993   echo $ac_n "(cached) $ac_c" 1>&6
4994 else
4995   ac_cv_c_inline=no
4996 for ac_kw in inline __inline__ __inline; do
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000
5001 int main() {
5002 } $ac_kw foo() {
5003 ; return 0; }
5004 EOF
5005 if { (eval echo configure:5006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5006   rm -rf conftest*
5007   ac_cv_c_inline=$ac_kw; break
5008 else
5009   echo "configure: failed program was:" >&5
5010   cat conftest.$ac_ext >&5
5011 fi
5012 rm -f conftest*
5013 done
5014
5015 fi
5016
5017 echo "$ac_t""$ac_cv_c_inline" 1>&6
5018 case "$ac_cv_c_inline" in
5019   inline | yes) ;;
5020   no) cat >> confdefs.h <<\EOF
5021 #define inline 
5022 EOF
5023  ;;
5024   *)  cat >> confdefs.h <<EOF
5025 #define inline $ac_cv_c_inline
5026 EOF
5027  ;;
5028 esac
5029
5030
5031 # VMS doesn't have unlink.
5032 for ac_func in unlink remove
5033 do
5034 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5035 echo "configure:5036: checking for $ac_func" >&5
5036 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5037   echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039   cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042 /* System header to define __stub macros and hopefully few prototypes,
5043     which can conflict with char $ac_func(); below.  */
5044 #include <assert.h>
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char $ac_func();
5049
5050 int main() {
5051
5052 /* The GNU C library defines this for functions which it implements
5053     to always fail with ENOSYS.  Some functions are actually named
5054     something starting with __ and the normal name is an alias.  */
5055 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5056 choke me
5057 #else
5058 $ac_func();
5059 #endif
5060
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064   rm -rf conftest*
5065   eval "ac_cv_func_$ac_func=yes"
5066 else
5067   echo "configure: failed program was:" >&5
5068   cat conftest.$ac_ext >&5
5069   rm -rf conftest*
5070   eval "ac_cv_func_$ac_func=no"
5071 fi
5072 rm -f conftest*
5073 fi
5074
5075 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5076   echo "$ac_t""yes" 1>&6
5077     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5078   cat >> confdefs.h <<EOF
5079 #define $ac_tr_func 1
5080 EOF
5081  break
5082 else
5083   echo "$ac_t""no" 1>&6
5084 fi
5085 done
5086
5087
5088 # Some systems don't have sbrk().
5089 for ac_func in sbrk
5090 do
5091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5092 echo "configure:5093: checking for $ac_func" >&5
5093 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 /* System header to define __stub macros and hopefully few prototypes,
5100     which can conflict with char $ac_func(); below.  */
5101 #include <assert.h>
5102 /* Override any gcc2 internal prototype to avoid an error.  */
5103 /* We use char because int might match the return type of a gcc2
5104     builtin and then its argument prototype would still apply.  */
5105 char $ac_func();
5106
5107 int main() {
5108
5109 /* The GNU C library defines this for functions which it implements
5110     to always fail with ENOSYS.  Some functions are actually named
5111     something starting with __ and the normal name is an alias.  */
5112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5113 choke me
5114 #else
5115 $ac_func();
5116 #endif
5117
5118 ; return 0; }
5119 EOF
5120 if { (eval echo configure:5121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5121   rm -rf conftest*
5122   eval "ac_cv_func_$ac_func=yes"
5123 else
5124   echo "configure: failed program was:" >&5
5125   cat conftest.$ac_ext >&5
5126   rm -rf conftest*
5127   eval "ac_cv_func_$ac_func=no"
5128 fi
5129 rm -f conftest*
5130 fi
5131
5132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5135   cat >> confdefs.h <<EOF
5136 #define $ac_tr_func 1
5137 EOF
5138  
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142 done
5143
5144
5145 # do we need the math library?
5146 case "${need_libm}" in
5147 yes) 
5148   LIBM=
5149 case "$host" in
5150 *-*-beos* | *-*-cygwin*)
5151   # These system don't have libm
5152   ;;
5153 *-ncr-sysv4.3*)
5154   echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
5155 echo "configure:5156: checking for _mwvalidcheckl in -lmw" >&5
5156 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'`
5157 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160   ac_save_LIBS="$LIBS"
5161 LIBS="-lmw  $LIBS"
5162 cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165 /* Override any gcc2 internal prototype to avoid an error.  */
5166 /* We use char because int might match the return type of a gcc2
5167     builtin and then its argument prototype would still apply.  */
5168 char _mwvalidcheckl();
5169
5170 int main() {
5171 _mwvalidcheckl()
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175   rm -rf conftest*
5176   eval "ac_cv_lib_$ac_lib_var=yes"
5177 else
5178   echo "configure: failed program was:" >&5
5179   cat conftest.$ac_ext >&5
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=no"
5182 fi
5183 rm -f conftest*
5184 LIBS="$ac_save_LIBS"
5185
5186 fi
5187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5188   echo "$ac_t""yes" 1>&6
5189   LIBM="-lmw"
5190 else
5191   echo "$ac_t""no" 1>&6
5192 fi
5193
5194   echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5195 echo "configure:5196: checking for main in -lm" >&5
5196 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200   ac_save_LIBS="$LIBS"
5201 LIBS="-lm  $LIBS"
5202 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205
5206 int main() {
5207 main()
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   eval "ac_cv_lib_$ac_lib_var=yes"
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=no"
5218 fi
5219 rm -f conftest*
5220 LIBS="$ac_save_LIBS"
5221
5222 fi
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5224   echo "$ac_t""yes" 1>&6
5225   LIBM="$LIBM -lm"
5226 else
5227   echo "$ac_t""no" 1>&6
5228 fi
5229
5230   ;;
5231 *)
5232   echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5233 echo "configure:5234: checking for main in -lm" >&5
5234 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   ac_save_LIBS="$LIBS"
5239 LIBS="-lm  $LIBS"
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243
5244 int main() {
5245 main()
5246 ; return 0; }
5247 EOF
5248 if { (eval echo configure:5249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5249   rm -rf conftest*
5250   eval "ac_cv_lib_$ac_lib_var=yes"
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   rm -rf conftest*
5255   eval "ac_cv_lib_$ac_lib_var=no"
5256 fi
5257 rm -f conftest*
5258 LIBS="$ac_save_LIBS"
5259
5260 fi
5261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5262   echo "$ac_t""yes" 1>&6
5263   LIBM="-lm"
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267
5268   ;;
5269 esac
5270
5271   
5272   ;;
5273 esac
5274
5275 # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
5276 # enough, but on some of those systems, the assert macro relies on requoting
5277 # working properly!
5278 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5279 echo "configure:5280: checking for working assert macro" >&5
5280 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5286 #include <assert.h>
5287 #include <stdio.h>
5288 int main() {
5289
5290 /* check for requoting problems */
5291 static int a, b, c, d;
5292 static char *s;
5293 assert (!strcmp(s, "foo bar baz quux"));
5294 /* check for newline handling */
5295 assert (a == b
5296         || c == d);
5297
5298 ; return 0; }
5299 EOF
5300 if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5301   rm -rf conftest*
5302   gas_cv_assert_ok=yes
5303 else
5304   echo "configure: failed program was:" >&5
5305   cat conftest.$ac_ext >&5
5306   rm -rf conftest*
5307   gas_cv_assert_ok=no
5308 fi
5309 rm -f conftest*
5310 fi
5311 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5312 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5313 #define BROKEN_ASSERT 1
5314 EOF
5315
5316
5317
5318 # On some systems, the system header files may not declare malloc, realloc,
5319 # and free.  There are places where gas needs these functions to have been
5320 # declared -- such as when taking their addresses.
5321 gas_test_headers="
5322 #ifdef HAVE_MEMORY_H
5323 #include <memory.h>
5324 #endif
5325 #ifdef HAVE_STRING_H
5326 #include <string.h>
5327 #else
5328 #ifdef HAVE_STRINGS_H
5329 #include <strings.h>
5330 #endif
5331 #endif
5332 #ifdef HAVE_STDLIB_H
5333 #include <stdlib.h>
5334 #endif
5335 #ifdef HAVE_UNISTD_H
5336 #include <unistd.h>
5337 #endif
5338 "
5339
5340 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5341 echo "configure:5342: checking whether declaration is required for strstr" >&5
5342 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 $gas_test_headers
5349 int main() {
5350
5351 typedef char *(*f)();
5352 f x;
5353 x = (f) strstr;
5354
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   gas_cv_decl_needed_strstr=no
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   gas_cv_decl_needed_strstr=yes
5365 fi
5366 rm -f conftest*
5367 fi
5368 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5369 if test $gas_cv_decl_needed_strstr = yes; then
5370  cat >> confdefs.h <<\EOF
5371 #define NEED_DECLARATION_STRSTR 1
5372 EOF
5373
5374 fi
5375
5376
5377 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5378 echo "configure:5379: checking whether declaration is required for malloc" >&5
5379 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5380   echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382   cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 $gas_test_headers
5386 int main() {
5387
5388 typedef char *(*f)();
5389 f x;
5390 x = (f) malloc;
5391
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5395   rm -rf conftest*
5396   gas_cv_decl_needed_malloc=no
5397 else
5398   echo "configure: failed program was:" >&5
5399   cat conftest.$ac_ext >&5
5400   rm -rf conftest*
5401   gas_cv_decl_needed_malloc=yes
5402 fi
5403 rm -f conftest*
5404 fi
5405 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5406 if test $gas_cv_decl_needed_malloc = yes; then
5407  cat >> confdefs.h <<\EOF
5408 #define NEED_DECLARATION_MALLOC 1
5409 EOF
5410
5411 fi
5412
5413
5414 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5415 echo "configure:5416: checking whether declaration is required for free" >&5
5416 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5417   echo $ac_n "(cached) $ac_c" 1>&6
5418 else
5419   cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 $gas_test_headers
5423 int main() {
5424
5425 typedef void (*f)();
5426 f x;
5427 x = (f) free;
5428
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5432   rm -rf conftest*
5433   gas_cv_decl_needed_free=no
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   gas_cv_decl_needed_free=yes
5439 fi
5440 rm -f conftest*
5441 fi
5442 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5443 if test $gas_cv_decl_needed_free = yes; then
5444  cat >> confdefs.h <<\EOF
5445 #define NEED_DECLARATION_FREE 1
5446 EOF
5447
5448 fi
5449
5450
5451 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5452 echo "configure:5453: checking whether declaration is required for sbrk" >&5
5453 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5454   echo $ac_n "(cached) $ac_c" 1>&6
5455 else
5456   cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459 $gas_test_headers
5460 int main() {
5461
5462 typedef char *(*f)();
5463 f x;
5464 x = (f) sbrk;
5465
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469   rm -rf conftest*
5470   gas_cv_decl_needed_sbrk=no
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   gas_cv_decl_needed_sbrk=yes
5476 fi
5477 rm -f conftest*
5478 fi
5479 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5480 if test $gas_cv_decl_needed_sbrk = yes; then
5481  cat >> confdefs.h <<\EOF
5482 #define NEED_DECLARATION_SBRK 1
5483 EOF
5484
5485 fi
5486
5487
5488 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
5489 echo "configure:5490: checking whether declaration is required for environ" >&5
5490 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5491   echo $ac_n "(cached) $ac_c" 1>&6
5492 else
5493   cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 $gas_test_headers
5497 int main() {
5498
5499 typedef char **f;
5500 f x;
5501 x = (f) environ;
5502
5503 ; return 0; }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5506   rm -rf conftest*
5507   gas_cv_decl_needed_environ=no
5508 else
5509   echo "configure: failed program was:" >&5
5510   cat conftest.$ac_ext >&5
5511   rm -rf conftest*
5512   gas_cv_decl_needed_environ=yes
5513 fi
5514 rm -f conftest*
5515 fi
5516 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5517 if test $gas_cv_decl_needed_environ = yes; then
5518  cat >> confdefs.h <<\EOF
5519 #define NEED_DECLARATION_ENVIRON 1
5520 EOF
5521
5522 fi
5523
5524
5525 # Does errno.h declare errno, or do we have to add a separate declaration
5526 # for it?
5527
5528 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
5529 echo "configure:5530: checking whether declaration is required for errno" >&5
5530 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5531   echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533   cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536
5537 #ifdef HAVE_ERRNO_H
5538 #include <errno.h>
5539 #endif
5540
5541 int main() {
5542
5543 typedef int f;
5544 f x;
5545 x = (f) errno;
5546
5547 ; return 0; }
5548 EOF
5549 if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5550   rm -rf conftest*
5551   gas_cv_decl_needed_errno=no
5552 else
5553   echo "configure: failed program was:" >&5
5554   cat conftest.$ac_ext >&5
5555   rm -rf conftest*
5556   gas_cv_decl_needed_errno=yes
5557 fi
5558 rm -f conftest*
5559 fi
5560 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5561 if test $gas_cv_decl_needed_errno = yes; then
5562  cat >> confdefs.h <<\EOF
5563 #define NEED_DECLARATION_ERRNO 1
5564 EOF
5565
5566 fi
5567
5568
5569
5570
5571 trap '' 1 2 15
5572 cat > confcache <<\EOF
5573 # This file is a shell script that caches the results of configure
5574 # tests run on this system so they can be shared between configure
5575 # scripts and configure runs.  It is not useful on other systems.
5576 # If it contains results you don't want to keep, you may remove or edit it.
5577 #
5578 # By default, configure uses ./config.cache as the cache file,
5579 # creating it if it does not exist already.  You can give configure
5580 # the --cache-file=FILE option to use a different cache file; that is
5581 # what configure does when it calls configure scripts in
5582 # subdirectories, so they share the cache.
5583 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5584 # config.status only pays attention to the cache file if you give it the
5585 # --recheck option to rerun configure.
5586 #
5587 EOF
5588 # The following way of writing the cache mishandles newlines in values,
5589 # but we know of no workaround that is simple, portable, and efficient.
5590 # So, don't put newlines in cache variables' values.
5591 # Ultrix sh set writes to stderr and can't be redirected directly,
5592 # and sets the high bit in the cache file unless we assign to the vars.
5593 (set) 2>&1 |
5594   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5595   *ac_space=\ *)
5596     # `set' does not quote correctly, so add quotes (double-quote substitution
5597     # turns \\\\ into \\, and sed turns \\ into \).
5598     sed -n \
5599       -e "s/'/'\\\\''/g" \
5600       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5601     ;;
5602   *)
5603     # `set' quotes correctly as required by POSIX, so do not add quotes.
5604     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5605     ;;
5606   esac >> confcache
5607 if cmp -s $cache_file confcache; then
5608   :
5609 else
5610   if test -w $cache_file; then
5611     echo "updating cache $cache_file"
5612     cat confcache > $cache_file
5613   else
5614     echo "not updating unwritable cache $cache_file"
5615   fi
5616 fi
5617 rm -f confcache
5618
5619 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5620
5621 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5622 # Let make expand exec_prefix.
5623 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5624
5625 # Any assignment to VPATH causes Sun make to only execute
5626 # the first set of double-colon rules, so remove it if not needed.
5627 # If there is a colon in the path, we need to keep it.
5628 if test "x$srcdir" = x.; then
5629   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5630 fi
5631
5632 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5633
5634 DEFS=-DHAVE_CONFIG_H
5635
5636 # Without the "./", some shells look in PATH for config.status.
5637 : ${CONFIG_STATUS=./config.status}
5638
5639 echo creating $CONFIG_STATUS
5640 rm -f $CONFIG_STATUS
5641 cat > $CONFIG_STATUS <<EOF
5642 #! /bin/sh
5643 # Generated automatically by configure.
5644 # Run this file to recreate the current configuration.
5645 # This directory was configured as follows,
5646 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5647 #
5648 # $0 $ac_configure_args
5649 #
5650 # Compiler output produced by configure, useful for debugging
5651 # configure, is in ./config.log if it exists.
5652
5653 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5654 for ac_option
5655 do
5656   case "\$ac_option" in
5657   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5658     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5659     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5660   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5661     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5662     exit 0 ;;
5663   -help | --help | --hel | --he | --h)
5664     echo "\$ac_cs_usage"; exit 0 ;;
5665   *) echo "\$ac_cs_usage"; exit 1 ;;
5666   esac
5667 done
5668
5669 ac_given_srcdir=$srcdir
5670 ac_given_INSTALL="$INSTALL"
5671
5672 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
5673 EOF
5674 cat >> $CONFIG_STATUS <<EOF
5675
5676 # Protect against being on the right side of a sed subst in config.status.
5677 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5678  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5679 $ac_vpsub
5680 $extrasub
5681 s%@SHELL@%$SHELL%g
5682 s%@CFLAGS@%$CFLAGS%g
5683 s%@CPPFLAGS@%$CPPFLAGS%g
5684 s%@CXXFLAGS@%$CXXFLAGS%g
5685 s%@FFLAGS@%$FFLAGS%g
5686 s%@DEFS@%$DEFS%g
5687 s%@LDFLAGS@%$LDFLAGS%g
5688 s%@LIBS@%$LIBS%g
5689 s%@exec_prefix@%$exec_prefix%g
5690 s%@prefix@%$prefix%g
5691 s%@program_transform_name@%$program_transform_name%g
5692 s%@bindir@%$bindir%g
5693 s%@sbindir@%$sbindir%g
5694 s%@libexecdir@%$libexecdir%g
5695 s%@datadir@%$datadir%g
5696 s%@sysconfdir@%$sysconfdir%g
5697 s%@sharedstatedir@%$sharedstatedir%g
5698 s%@localstatedir@%$localstatedir%g
5699 s%@libdir@%$libdir%g
5700 s%@includedir@%$includedir%g
5701 s%@oldincludedir@%$oldincludedir%g
5702 s%@infodir@%$infodir%g
5703 s%@mandir@%$mandir%g
5704 s%@host@%$host%g
5705 s%@host_alias@%$host_alias%g
5706 s%@host_cpu@%$host_cpu%g
5707 s%@host_vendor@%$host_vendor%g
5708 s%@host_os@%$host_os%g
5709 s%@target@%$target%g
5710 s%@target_alias@%$target_alias%g
5711 s%@target_cpu@%$target_cpu%g
5712 s%@target_vendor@%$target_vendor%g
5713 s%@target_os@%$target_os%g
5714 s%@build@%$build%g
5715 s%@build_alias@%$build_alias%g
5716 s%@build_cpu@%$build_cpu%g
5717 s%@build_vendor@%$build_vendor%g
5718 s%@build_os@%$build_os%g
5719 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5720 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5721 s%@INSTALL_DATA@%$INSTALL_DATA%g
5722 s%@PACKAGE@%$PACKAGE%g
5723 s%@VERSION@%$VERSION%g
5724 s%@ACLOCAL@%$ACLOCAL%g
5725 s%@AUTOCONF@%$AUTOCONF%g
5726 s%@AUTOMAKE@%$AUTOMAKE%g
5727 s%@AUTOHEADER@%$AUTOHEADER%g
5728 s%@MAKEINFO@%$MAKEINFO%g
5729 s%@SET_MAKE@%$SET_MAKE%g
5730 s%@RANLIB@%$RANLIB%g
5731 s%@CC@%$CC%g
5732 s%@LN_S@%$LN_S%g
5733 s%@LIBTOOL@%$LIBTOOL%g
5734 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5735 s%@GDBINIT@%$GDBINIT%g
5736 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5737 s%@extra_objects@%$extra_objects%g
5738 s%@target_cpu_type@%$target_cpu_type%g
5739 s%@obj_format@%$obj_format%g
5740 s%@te_file@%$te_file%g
5741 s%@install_tooldir@%$install_tooldir%g
5742 s%@atof@%$atof%g
5743 s%@BFDLIB@%$BFDLIB%g
5744 s%@OPCODES_LIB@%$OPCODES_LIB%g
5745 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5746 s%@YACC@%$YACC%g
5747 s%@LEX@%$LEX%g
5748 s%@LEXLIB@%$LEXLIB%g
5749 s%@CPP@%$CPP%g
5750 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5751 s%@ALLOCA@%$ALLOCA%g
5752 s%@USE_NLS@%$USE_NLS%g
5753 s%@MSGFMT@%$MSGFMT%g
5754 s%@GMSGFMT@%$GMSGFMT%g
5755 s%@XGETTEXT@%$XGETTEXT%g
5756 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5757 s%@CATALOGS@%$CATALOGS%g
5758 s%@CATOBJEXT@%$CATOBJEXT%g
5759 s%@DATADIRNAME@%$DATADIRNAME%g
5760 s%@GMOFILES@%$GMOFILES%g
5761 s%@INSTOBJEXT@%$INSTOBJEXT%g
5762 s%@INTLDEPS@%$INTLDEPS%g
5763 s%@INTLLIBS@%$INTLLIBS%g
5764 s%@INTLOBJS@%$INTLOBJS%g
5765 s%@POFILES@%$POFILES%g
5766 s%@POSUB@%$POSUB%g
5767 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5768 s%@GT_NO@%$GT_NO%g
5769 s%@GT_YES@%$GT_YES%g
5770 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5771 s%@l@%$l%g
5772 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5773 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5774 s%@MAINT@%$MAINT%g
5775 s%@EXEEXT@%$EXEEXT%g
5776 s%@LIBM@%$LIBM%g
5777
5778 CEOF
5779 EOF
5780
5781 cat >> $CONFIG_STATUS <<\EOF
5782
5783 # Split the substitutions into bite-sized pieces for seds with
5784 # small command number limits, like on Digital OSF/1 and HP-UX.
5785 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5786 ac_file=1 # Number of current file.
5787 ac_beg=1 # First line for current file.
5788 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5789 ac_more_lines=:
5790 ac_sed_cmds=""
5791 while $ac_more_lines; do
5792   if test $ac_beg -gt 1; then
5793     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5794   else
5795     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5796   fi
5797   if test ! -s conftest.s$ac_file; then
5798     ac_more_lines=false
5799     rm -f conftest.s$ac_file
5800   else
5801     if test -z "$ac_sed_cmds"; then
5802       ac_sed_cmds="sed -f conftest.s$ac_file"
5803     else
5804       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5805     fi
5806     ac_file=`expr $ac_file + 1`
5807     ac_beg=$ac_end
5808     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5809   fi
5810 done
5811 if test -z "$ac_sed_cmds"; then
5812   ac_sed_cmds=cat
5813 fi
5814 EOF
5815
5816 cat >> $CONFIG_STATUS <<EOF
5817
5818 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
5819 EOF
5820 cat >> $CONFIG_STATUS <<\EOF
5821 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5822   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5823   case "$ac_file" in
5824   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5825        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5826   *) ac_file_in="${ac_file}.in" ;;
5827   esac
5828
5829   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5830
5831   # Remove last slash and all that follows it.  Not all systems have dirname.
5832   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5833   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5834     # The file is in a subdirectory.
5835     test ! -d "$ac_dir" && mkdir "$ac_dir"
5836     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5837     # A "../" for each directory in $ac_dir_suffix.
5838     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5839   else
5840     ac_dir_suffix= ac_dots=
5841   fi
5842
5843   case "$ac_given_srcdir" in
5844   .)  srcdir=.
5845       if test -z "$ac_dots"; then top_srcdir=.
5846       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5847   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5848   *) # Relative path.
5849     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5850     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5851   esac
5852
5853   case "$ac_given_INSTALL" in
5854   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5855   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5856   esac
5857
5858   echo creating "$ac_file"
5859   rm -f "$ac_file"
5860   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5861   case "$ac_file" in
5862   *Makefile*) ac_comsub="1i\\
5863 # $configure_input" ;;
5864   *) ac_comsub= ;;
5865   esac
5866
5867   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5868   sed -e "$ac_comsub
5869 s%@configure_input@%$configure_input%g
5870 s%@srcdir@%$srcdir%g
5871 s%@top_srcdir@%$top_srcdir%g
5872 s%@INSTALL@%$INSTALL%g
5873 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5874 fi; done
5875 rm -f conftest.s*
5876
5877 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5878 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5879 #
5880 # ac_d sets the value in "#define NAME VALUE" lines.
5881 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5882 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5883 ac_dC='\3'
5884 ac_dD='%g'
5885 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5886 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5887 ac_uB='\([      ]\)%\1#\2define\3'
5888 ac_uC=' '
5889 ac_uD='\4%g'
5890 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5891 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5892 ac_eB='$%\1#\2define\3'
5893 ac_eC=' '
5894 ac_eD='%g'
5895
5896 if test "${CONFIG_HEADERS+set}" != set; then
5897 EOF
5898 cat >> $CONFIG_STATUS <<EOF
5899   CONFIG_HEADERS="config.h:config.in"
5900 EOF
5901 cat >> $CONFIG_STATUS <<\EOF
5902 fi
5903 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5904   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5905   case "$ac_file" in
5906   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5907        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5908   *) ac_file_in="${ac_file}.in" ;;
5909   esac
5910
5911   echo creating $ac_file
5912
5913   rm -f conftest.frag conftest.in conftest.out
5914   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5915   cat $ac_file_inputs > conftest.in
5916
5917 EOF
5918
5919 # Transform confdefs.h into a sed script conftest.vals that substitutes
5920 # the proper values into config.h.in to produce config.h.  And first:
5921 # Protect against being on the right side of a sed subst in config.status.
5922 # Protect against being in an unquoted here document in config.status.
5923 rm -f conftest.vals
5924 cat > conftest.hdr <<\EOF
5925 s/[\\&%]/\\&/g
5926 s%[\\$`]%\\&%g
5927 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5928 s%ac_d%ac_u%gp
5929 s%ac_u%ac_e%gp
5930 EOF
5931 sed -n -f conftest.hdr confdefs.h > conftest.vals
5932 rm -f conftest.hdr
5933
5934 # This sed command replaces #undef with comments.  This is necessary, for
5935 # example, in the case of _POSIX_SOURCE, which is predefined and required
5936 # on some systems where configure will not decide to define it.
5937 cat >> conftest.vals <<\EOF
5938 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5939 EOF
5940
5941 # Break up conftest.vals because some shells have a limit on
5942 # the size of here documents, and old seds have small limits too.
5943
5944 rm -f conftest.tail
5945 while :
5946 do
5947   ac_lines=`grep -c . conftest.vals`
5948   # grep -c gives empty output for an empty file on some AIX systems.
5949   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5950   # Write a limited-size here document to conftest.frag.
5951   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5952   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5953   echo 'CEOF
5954   sed -f conftest.frag conftest.in > conftest.out
5955   rm -f conftest.in
5956   mv conftest.out conftest.in
5957 ' >> $CONFIG_STATUS
5958   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5959   rm -f conftest.vals
5960   mv conftest.tail conftest.vals
5961 done
5962 rm -f conftest.vals
5963
5964 cat >> $CONFIG_STATUS <<\EOF
5965   rm -f conftest.frag conftest.h
5966   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5967   cat conftest.in >> conftest.h
5968   rm -f conftest.in
5969   if cmp -s $ac_file conftest.h 2>/dev/null; then
5970     echo "$ac_file is unchanged"
5971     rm -f conftest.h
5972   else
5973     # Remove last slash and all that follows it.  Not all systems have dirname.
5974       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5975       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5976       # The file is in a subdirectory.
5977       test ! -d "$ac_dir" && mkdir "$ac_dir"
5978     fi
5979     rm -f $ac_file
5980     mv conftest.h $ac_file
5981   fi
5982 fi; done
5983
5984 EOF
5985 cat >> $CONFIG_STATUS <<EOF
5986
5987 target_cpu_type=${target_cpu_type}
5988  cgen_cpu_prefix=${cgen_cpu_prefix}
5989  obj_format=${obj_format}
5990  te_file=${te_file}
5991 EOF
5992 cat >> $CONFIG_STATUS <<\EOF
5993 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5994 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5995  echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5996  echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5997  echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5998  echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
5999  if test "x$cgen_cpu_prefix" != x ; then
6000    echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
6001  fi
6002
6003  sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6004 exit 0
6005 EOF
6006 chmod +x $CONFIG_STATUS
6007 rm -fr confdefs* $ac_clean_files
6008 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6009