OSDN Git Service

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