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