ATMEL AVR microcontroller support.
[external/binutils.git] / opcodes / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-shared[=PKGS]  build shared libraries [default=no]"
16 ac_help="$ac_help
17   --enable-static[=PKGS]  build static libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23   --disable-libtool-lock  avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25   --enable-targets        alternative target configurations"
26 ac_help="$ac_help
27   --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
28 ac_help="$ac_help
29   --enable-maintainer-mode enable make rules and dependencies not useful
30                           (and sometimes confusing) to the casual installer"
31 ac_help="$ac_help
32   --disable-nls           do not use Native Language Support"
33 ac_help="$ac_help
34   --with-included-gettext use the GNU gettext library included here"
35
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
69
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
76
77 ac_prev=
78 for ac_option
79 do
80
81   # If the previous option needs an argument, assign it.
82   if test -n "$ac_prev"; then
83     eval "$ac_prev=\$ac_option"
84     ac_prev=
85     continue
86   fi
87
88   case "$ac_option" in
89   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90   *) ac_optarg= ;;
91   esac
92
93   # Accept the important Cygnus configure options, so we can diagnose typos.
94
95   case "$ac_option" in
96
97   -bindir | --bindir | --bindi | --bind | --bin | --bi)
98     ac_prev=bindir ;;
99   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100     bindir="$ac_optarg" ;;
101
102   -build | --build | --buil | --bui | --bu)
103     ac_prev=build ;;
104   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105     build="$ac_optarg" ;;
106
107   -cache-file | --cache-file | --cache-fil | --cache-fi \
108   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109     ac_prev=cache_file ;;
110   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112     cache_file="$ac_optarg" ;;
113
114   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115     ac_prev=datadir ;;
116   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117   | --da=*)
118     datadir="$ac_optarg" ;;
119
120   -disable-* | --disable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     eval "enable_${ac_feature}=no" ;;
128
129   -enable-* | --enable-*)
130     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131     # Reject names that are not valid shell variable names.
132     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134     fi
135     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136     case "$ac_option" in
137       *=*) ;;
138       *) ac_optarg=yes ;;
139     esac
140     eval "enable_${ac_feature}='$ac_optarg'" ;;
141
142   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144   | --exec | --exe | --ex)
145     ac_prev=exec_prefix ;;
146   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148   | --exec=* | --exe=* | --ex=*)
149     exec_prefix="$ac_optarg" ;;
150
151   -gas | --gas | --ga | --g)
152     # Obsolete; use --with-gas.
153     with_gas=yes ;;
154
155   -help | --help | --hel | --he)
156     # Omit some internal or obsolete options to make the list less imposing.
157     # This message is too long to be a string in the A/UX 3.1 sh.
158     cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162   --cache-file=FILE       cache test results in FILE
163   --help                  print this message
164   --no-create             do not create output files
165   --quiet, --silent       do not print \`checking...' messages
166   --version               print the version of autoconf that created configure
167 Directory and file names:
168   --prefix=PREFIX         install architecture-independent files in PREFIX
169                           [$ac_default_prefix]
170   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
171                           [same as prefix]
172   --bindir=DIR            user executables in DIR [EPREFIX/bin]
173   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
174   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
175   --datadir=DIR           read-only architecture-independent data in DIR
176                           [PREFIX/share]
177   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
178   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
179                           [PREFIX/com]
180   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
181   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
182   --includedir=DIR        C header files in DIR [PREFIX/include]
183   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
184   --infodir=DIR           info documentation in DIR [PREFIX/info]
185   --mandir=DIR            man documentation in DIR [PREFIX/man]
186   --srcdir=DIR            find the sources in DIR [configure dir or ..]
187   --program-prefix=PREFIX prepend PREFIX to installed program names
188   --program-suffix=SUFFIX append SUFFIX to installed program names
189   --program-transform-name=PROGRAM
190                           run sed PROGRAM on installed program names
191 EOF
192     cat << EOF
193 Host type:
194   --build=BUILD           configure for building on BUILD [BUILD=HOST]
195   --host=HOST             configure for HOST [guessed]
196   --target=TARGET         configure for TARGET [TARGET=HOST]
197 Features and packages:
198   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
199   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
200   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
201   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
202   --x-includes=DIR        X include files are in DIR
203   --x-libraries=DIR       X library files are in DIR
204 EOF
205     if test -n "$ac_help"; then
206       echo "--enable and --with options recognized:$ac_help"
207     fi
208     exit 0 ;;
209
210   -host | --host | --hos | --ho)
211     ac_prev=host ;;
212   -host=* | --host=* | --hos=* | --ho=*)
213     host="$ac_optarg" ;;
214
215   -includedir | --includedir | --includedi | --included | --include \
216   | --includ | --inclu | --incl | --inc)
217     ac_prev=includedir ;;
218   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219   | --includ=* | --inclu=* | --incl=* | --inc=*)
220     includedir="$ac_optarg" ;;
221
222   -infodir | --infodir | --infodi | --infod | --info | --inf)
223     ac_prev=infodir ;;
224   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225     infodir="$ac_optarg" ;;
226
227   -libdir | --libdir | --libdi | --libd)
228     ac_prev=libdir ;;
229   -libdir=* | --libdir=* | --libdi=* | --libd=*)
230     libdir="$ac_optarg" ;;
231
232   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233   | --libexe | --libex | --libe)
234     ac_prev=libexecdir ;;
235   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236   | --libexe=* | --libex=* | --libe=*)
237     libexecdir="$ac_optarg" ;;
238
239   -localstatedir | --localstatedir | --localstatedi | --localstated \
240   | --localstate | --localstat | --localsta | --localst \
241   | --locals | --local | --loca | --loc | --lo)
242     ac_prev=localstatedir ;;
243   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246     localstatedir="$ac_optarg" ;;
247
248   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249     ac_prev=mandir ;;
250   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251     mandir="$ac_optarg" ;;
252
253   -nfp | --nfp | --nf)
254     # Obsolete; use --without-fp.
255     with_fp=no ;;
256
257   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258   | --no-cr | --no-c)
259     no_create=yes ;;
260
261   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263     no_recursion=yes ;;
264
265   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267   | --oldin | --oldi | --old | --ol | --o)
268     ac_prev=oldincludedir ;;
269   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272     oldincludedir="$ac_optarg" ;;
273
274   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275     ac_prev=prefix ;;
276   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277     prefix="$ac_optarg" ;;
278
279   -program-prefix | --program-prefix | --program-prefi | --program-pref \
280   | --program-pre | --program-pr | --program-p)
281     ac_prev=program_prefix ;;
282   -program-prefix=* | --program-prefix=* | --program-prefi=* \
283   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284     program_prefix="$ac_optarg" ;;
285
286   -program-suffix | --program-suffix | --program-suffi | --program-suff \
287   | --program-suf | --program-su | --program-s)
288     ac_prev=program_suffix ;;
289   -program-suffix=* | --program-suffix=* | --program-suffi=* \
290   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291     program_suffix="$ac_optarg" ;;
292
293   -program-transform-name | --program-transform-name \
294   | --program-transform-nam | --program-transform-na \
295   | --program-transform-n | --program-transform- \
296   | --program-transform | --program-transfor \
297   | --program-transfo | --program-transf \
298   | --program-trans | --program-tran \
299   | --progr-tra | --program-tr | --program-t)
300     ac_prev=program_transform_name ;;
301   -program-transform-name=* | --program-transform-name=* \
302   | --program-transform-nam=* | --program-transform-na=* \
303   | --program-transform-n=* | --program-transform-=* \
304   | --program-transform=* | --program-transfor=* \
305   | --program-transfo=* | --program-transf=* \
306   | --program-trans=* | --program-tran=* \
307   | --progr-tra=* | --program-tr=* | --program-t=*)
308     program_transform_name="$ac_optarg" ;;
309
310   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311   | -silent | --silent | --silen | --sile | --sil)
312     silent=yes ;;
313
314   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315     ac_prev=sbindir ;;
316   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317   | --sbi=* | --sb=*)
318     sbindir="$ac_optarg" ;;
319
320   -sharedstatedir | --sharedstatedir | --sharedstatedi \
321   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322   | --sharedst | --shareds | --shared | --share | --shar \
323   | --sha | --sh)
324     ac_prev=sharedstatedir ;;
325   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328   | --sha=* | --sh=*)
329     sharedstatedir="$ac_optarg" ;;
330
331   -site | --site | --sit)
332     ac_prev=site ;;
333   -site=* | --site=* | --sit=*)
334     site="$ac_optarg" ;;
335
336   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337     ac_prev=srcdir ;;
338   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339     srcdir="$ac_optarg" ;;
340
341   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342   | --syscon | --sysco | --sysc | --sys | --sy)
343     ac_prev=sysconfdir ;;
344   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346     sysconfdir="$ac_optarg" ;;
347
348   -target | --target | --targe | --targ | --tar | --ta | --t)
349     ac_prev=target ;;
350   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351     target="$ac_optarg" ;;
352
353   -v | -verbose | --verbose | --verbos | --verbo | --verb)
354     verbose=yes ;;
355
356   -version | --version | --versio | --versi | --vers)
357     echo "configure generated by autoconf version 2.13.1"
358     exit 0 ;;
359
360   -with-* | --with-*)
361     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362     # Reject names that are not valid shell variable names.
363     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365     fi
366     ac_package=`echo $ac_package| sed 's/-/_/g'`
367     case "$ac_option" in
368       *=*) ;;
369       *) ac_optarg=yes ;;
370     esac
371     eval "with_${ac_package}='$ac_optarg'" ;;
372
373   -without-* | --without-*)
374     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375     # Reject names that are not valid shell variable names.
376     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
378     fi
379     ac_package=`echo $ac_package| sed 's/-/_/g'`
380     eval "with_${ac_package}=no" ;;
381
382   --x)
383     # Obsolete; use --with-x.
384     with_x=yes ;;
385
386   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387   | --x-incl | --x-inc | --x-in | --x-i)
388     ac_prev=x_includes ;;
389   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391     x_includes="$ac_optarg" ;;
392
393   -x-libraries | --x-libraries | --x-librarie | --x-librari \
394   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395     ac_prev=x_libraries ;;
396   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398     x_libraries="$ac_optarg" ;;
399
400   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
401     ;;
402
403   *)
404     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405       echo "configure: warning: $ac_option: invalid host type" 1>&2
406     fi
407     if test "x$nonopt" != xNONE; then
408       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
409     fi
410     nonopt="$ac_option"
411     ;;
412
413   esac
414 done
415
416 if test -n "$ac_prev"; then
417   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418 fi
419
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
421
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431   exec 6>/dev/null
432 else
433   exec 6>&1
434 fi
435 exec 5>./config.log
436
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
441
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
446 do
447   case "$ac_arg" in
448   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449   | --no-cr | --no-c) ;;
450   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455   esac
456 done
457
458 # NLS nuisances.
459 # Only set these to C if already set.  These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
467
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
472
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=z8k-dis.c
476
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479   ac_srcdir_defaulted=yes
480   # Try the directory containing this script, then its parent.
481   ac_prog=$0
482   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484   srcdir=$ac_confdir
485   if test ! -r $srcdir/$ac_unique_file; then
486     srcdir=..
487   fi
488 else
489   ac_srcdir_defaulted=no
490 fi
491 if test ! -r $srcdir/$ac_unique_file; then
492   if test "$ac_srcdir_defaulted" = yes; then
493     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494   else
495     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
496   fi
497 fi
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
499
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502   if test "x$prefix" != xNONE; then
503     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504   else
505     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
506   fi
507 fi
508 for ac_site_file in $CONFIG_SITE; do
509   if test -r "$ac_site_file"; then
510     echo "loading site script $ac_site_file"
511     . "$ac_site_file"
512   fi
513 done
514
515 if test -r "$cache_file"; then
516   echo "loading cache $cache_file"
517       test -f "$cache_file" && . $cache_file
518 else
519   echo "creating cache $cache_file"
520   > $cache_file
521 fi
522
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
529
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535     ac_n= ac_c='
536 ' ac_t='        '
537   else
538     ac_n=-n ac_c= ac_t=
539   fi
540 else
541   ac_n= ac_c='\c' ac_t=
542 fi
543
544
545
546 ac_aux_dir=
547 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
548   if test -f $ac_dir/install-sh; then
549     ac_aux_dir=$ac_dir
550     ac_install_sh="$ac_aux_dir/install-sh -c"
551     break
552   elif test -f $ac_dir/install.sh; then
553     ac_aux_dir=$ac_dir
554     ac_install_sh="$ac_aux_dir/install.sh -c"
555     break
556   fi
557 done
558 if test -z "$ac_aux_dir"; then
559   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
560 fi
561 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
562 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
563 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
564
565
566 echo $ac_n "checking host system type""... $ac_c" 1>&6
567 echo "configure:568: checking host system type" >&5
568 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
569
570 # Make sure we can run config.sub.
571   if $ac_config_sub sun4 >/dev/null 2>&1; then :
572     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
573   fi
574
575   ac_cv_host_alias=$host
576   case "$ac_cv_host_alias" in
577   NONE)
578     case $nonopt in
579     NONE)
580       if ac_cv_host_alias=`$ac_config_guess`; then :
581       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
582       fi ;;
583     *) ac_cv_host_alias=$nonopt ;;
584     esac ;;
585   esac
586
587   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
588   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
589   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
590   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
591 else
592   echo $ac_n "(cached) $ac_c" 1>&6
593 fi
594
595 echo "$ac_t""$ac_cv_host" 1>&6
596
597 host=$ac_cv_host
598 host_alias=$ac_cv_host_alias
599 host_cpu=$ac_cv_host_cpu
600 host_vendor=$ac_cv_host_vendor
601 host_os=$ac_cv_host_os
602
603
604
605
606
607 echo $ac_n "checking target system type""... $ac_c" 1>&6
608 echo "configure:609: checking target system type" >&5
609 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
610
611 # Make sure we can run config.sub.
612   if $ac_config_sub sun4 >/dev/null 2>&1; then :
613     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
614   fi
615
616   ac_cv_target_alias=$target
617   case "$ac_cv_target_alias" in
618   NONE)
619     case $nonopt in
620     NONE)
621       ac_cv_target_alias=$host_alias ;;
622
623     *) ac_cv_target_alias=$nonopt ;;
624     esac ;;
625   esac
626
627   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
628   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
629   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
630   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
631 else
632   echo $ac_n "(cached) $ac_c" 1>&6
633 fi
634
635 echo "$ac_t""$ac_cv_target" 1>&6
636
637 target=$ac_cv_target
638 target_alias=$ac_cv_target_alias
639 target_cpu=$ac_cv_target_cpu
640 target_vendor=$ac_cv_target_vendor
641 target_os=$ac_cv_target_os
642
643
644
645
646
647 echo $ac_n "checking build system type""... $ac_c" 1>&6
648 echo "configure:649: checking build system type" >&5
649 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
650
651 # Make sure we can run config.sub.
652   if $ac_config_sub sun4 >/dev/null 2>&1; then :
653     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
654   fi
655
656   ac_cv_build_alias=$build
657   case "$ac_cv_build_alias" in
658   NONE)
659     case $nonopt in
660     NONE)
661       ac_cv_build_alias=$host_alias ;;
662
663     *) ac_cv_build_alias=$nonopt ;;
664     esac ;;
665   esac
666
667   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
668   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
669   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
670   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
671 else
672   echo $ac_n "(cached) $ac_c" 1>&6
673 fi
674
675 echo "$ac_t""$ac_cv_build" 1>&6
676
677 build=$ac_cv_build
678 build_alias=$ac_cv_build_alias
679 build_cpu=$ac_cv_build_cpu
680 build_vendor=$ac_cv_build_vendor
681 build_os=$ac_cv_build_os
682
683
684
685
686
687 # Do some error checking and defaulting for the host and target type.
688 # The inputs are:
689 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
690 #
691 # The rules are:
692 # 1. You are not allowed to specify --host, --target, and nonopt at the
693 #    same time.
694 # 2. Host defaults to nonopt.
695 # 3. If nonopt is not specified, then host defaults to the current host,
696 #    as determined by config.guess.
697 # 4. Target and build default to nonopt.
698 # 5. If nonopt is not specified, then target and build default to host.
699
700 # The aliases save the names the user supplied, while $host etc.
701 # will get canonicalized.
702 case $host---$target---$nonopt in
703 NONE---*---* | *---NONE---* | *---*---NONE) ;;
704 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
705 esac
706
707 test "$host_alias" != "$target_alias" &&
708   test "$program_prefix$program_suffix$program_transform_name" = \
709     NONENONEs,x,x, &&
710   program_prefix=${target_alias}-
711
712 # Extract the first word of "gcc", so it can be a program name with args.
713 set dummy gcc; ac_word=$2
714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715 echo "configure:716: checking for $ac_word" >&5
716 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
717   echo $ac_n "(cached) $ac_c" 1>&6
718 else
719   if test -n "$CC"; then
720   ac_cv_prog_CC="$CC" # Let the user override the test.
721 else
722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
723   ac_dummy="$PATH"
724   for ac_dir in $ac_dummy; do
725     test -z "$ac_dir" && ac_dir=.
726     if test -f $ac_dir/$ac_word; then
727       ac_cv_prog_CC="gcc"
728       break
729     fi
730   done
731   IFS="$ac_save_ifs"
732 fi
733 fi
734 CC="$ac_cv_prog_CC"
735 if test -n "$CC"; then
736   echo "$ac_t""$CC" 1>&6
737 else
738   echo "$ac_t""no" 1>&6
739 fi
740
741 if test -z "$CC"; then
742   # Extract the first word of "cc", so it can be a program name with args.
743 set dummy cc; ac_word=$2
744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
745 echo "configure:746: checking for $ac_word" >&5
746 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   if test -n "$CC"; then
750   ac_cv_prog_CC="$CC" # Let the user override the test.
751 else
752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
753   ac_prog_rejected=no
754   ac_dummy="$PATH"
755   for ac_dir in $ac_dummy; do
756     test -z "$ac_dir" && ac_dir=.
757     if test -f $ac_dir/$ac_word; then
758       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
759         ac_prog_rejected=yes
760         continue
761       fi
762       ac_cv_prog_CC="cc"
763       break
764     fi
765   done
766   IFS="$ac_save_ifs"
767 if test $ac_prog_rejected = yes; then
768   # We found a bogon in the path, so make sure we never use it.
769   set dummy $ac_cv_prog_CC
770   shift
771   if test $# -gt 0; then
772     # We chose a different compiler from the bogus one.
773     # However, it has the same basename, so the bogon will be chosen
774     # first if we set CC to just the basename; use the full file name.
775     shift
776     set dummy "$ac_dir/$ac_word" "$@"
777     shift
778     ac_cv_prog_CC="$@"
779   fi
780 fi
781 fi
782 fi
783 CC="$ac_cv_prog_CC"
784 if test -n "$CC"; then
785   echo "$ac_t""$CC" 1>&6
786 else
787   echo "$ac_t""no" 1>&6
788 fi
789
790   if test -z "$CC"; then
791     case "`uname -s`" in
792     *win32* | *WIN32* | *CYGWIN*)
793       # Extract the first word of "cl", so it can be a program name with args.
794 set dummy cl; ac_word=$2
795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
796 echo "configure:797: checking for $ac_word" >&5
797 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
798   echo $ac_n "(cached) $ac_c" 1>&6
799 else
800   if test -n "$CC"; then
801   ac_cv_prog_CC="$CC" # Let the user override the test.
802 else
803   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
804   ac_dummy="$PATH"
805   for ac_dir in $ac_dummy; do
806     test -z "$ac_dir" && ac_dir=.
807     if test -f $ac_dir/$ac_word; then
808       ac_cv_prog_CC="cl"
809       break
810     fi
811   done
812   IFS="$ac_save_ifs"
813 fi
814 fi
815 CC="$ac_cv_prog_CC"
816 if test -n "$CC"; then
817   echo "$ac_t""$CC" 1>&6
818 else
819   echo "$ac_t""no" 1>&6
820 fi
821  ;;
822     esac
823   fi
824   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
825 fi
826
827 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
828 echo "configure:829: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
829
830 ac_ext=c
831 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
832 ac_cpp='$CPP $CPPFLAGS'
833 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
834 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
835 cross_compiling=$ac_cv_prog_cc_cross
836
837 cat > conftest.$ac_ext << EOF
838
839 #line 840 "configure"
840 #include "confdefs.h"
841
842 main(){return(0);}
843 EOF
844 if { (eval echo configure:845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
845   ac_cv_prog_cc_works=yes
846   # If we can't run a trivial program, we are probably using a cross compiler.
847   if (./conftest; exit) 2>/dev/null; then
848     ac_cv_prog_cc_cross=no
849   else
850     ac_cv_prog_cc_cross=yes
851   fi
852 else
853   echo "configure: failed program was:" >&5
854   cat conftest.$ac_ext >&5
855   ac_cv_prog_cc_works=no
856 fi
857 rm -fr conftest*
858 ac_ext=c
859 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
860 ac_cpp='$CPP $CPPFLAGS'
861 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
862 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
863 cross_compiling=$ac_cv_prog_cc_cross
864
865 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
866 if test $ac_cv_prog_cc_works = no; then
867   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
868 fi
869 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
870 echo "configure:871: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
871 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
872 cross_compiling=$ac_cv_prog_cc_cross
873
874 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
875 echo "configure:876: checking whether we are using GNU C" >&5
876 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
877   echo $ac_n "(cached) $ac_c" 1>&6
878 else
879   cat > conftest.c <<EOF
880 #ifdef __GNUC__
881   yes;
882 #endif
883 EOF
884 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
885   ac_cv_prog_gcc=yes
886 else
887   ac_cv_prog_gcc=no
888 fi
889 fi
890
891 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
892
893 if test $ac_cv_prog_gcc = yes; then
894   GCC=yes
895 else
896   GCC=
897 fi
898
899 ac_test_CFLAGS="${CFLAGS+set}"
900 ac_save_CFLAGS="$CFLAGS"
901 CFLAGS=
902 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
903 echo "configure:904: checking whether ${CC-cc} accepts -g" >&5
904 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
905   echo $ac_n "(cached) $ac_c" 1>&6
906 else
907   echo 'void f(){}' > conftest.c
908 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
909   ac_cv_prog_cc_g=yes
910 else
911   ac_cv_prog_cc_g=no
912 fi
913 rm -f conftest*
914
915 fi
916
917 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
918 if test "$ac_test_CFLAGS" = set; then
919   CFLAGS="$ac_save_CFLAGS"
920 elif test $ac_cv_prog_cc_g = yes; then
921   if test "$GCC" = yes; then
922     CFLAGS="-g -O2"
923   else
924     CFLAGS="-g"
925   fi
926 else
927   if test "$GCC" = yes; then
928     CFLAGS="-O2"
929   else
930     CFLAGS=
931   fi
932 fi
933
934 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
935 echo "configure:936: checking for POSIXized ISC" >&5
936 if test -d /etc/conf/kconfig.d &&
937   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
938 then
939   echo "$ac_t""yes" 1>&6
940   ISC=yes # If later tests want to check for ISC.
941   cat >> confdefs.h <<\EOF
942 #define _POSIX_SOURCE 1
943 EOF
944
945   if test "$GCC" = yes; then
946     CC="$CC -posix"
947   else
948     CC="$CC -Xp"
949   fi
950 else
951   echo "$ac_t""no" 1>&6
952   ISC=
953 fi
954
955
956 # We currently only use the version number for the name of any shared
957 # library.  For user convenience, we always use the same version
958 # number that BFD is using.
959 BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[  ]//g' -e 's/^.*,\(.*\)).*$/\1/p'`
960
961 # Find a good install program.  We prefer a C program (faster),
962 # so one script is as good as another.  But avoid the broken or
963 # incompatible versions:
964 # SysV /etc/install, /usr/sbin/install
965 # SunOS /usr/etc/install
966 # IRIX /sbin/install
967 # AIX /bin/install
968 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
969 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
970 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
971 # ./install, which can be erroneously created by make from ./install.sh.
972 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
973 echo "configure:974: checking for a BSD compatible install" >&5
974 if test -z "$INSTALL"; then
975 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
976   echo $ac_n "(cached) $ac_c" 1>&6
977 else
978     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
979   for ac_dir in $PATH; do
980     # Account for people who put trailing slashes in PATH elements.
981     case "$ac_dir/" in
982     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
983     *)
984       # OSF1 and SCO ODT 3.0 have their own names for install.
985       # Don't use installbsd from OSF since it installs stuff as root
986       # by default.
987       for ac_prog in ginstall scoinst install; do
988         if test -f $ac_dir/$ac_prog; then
989           if test $ac_prog = install &&
990             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
991             # AIX install.  It has an incompatible calling convention.
992             :
993           elif test $ac_prog = install &&
994             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
995             # program-specific install script used by HP pwplus--don't use.
996             :
997           else
998             ac_cv_path_install="$ac_dir/$ac_prog -c"
999             break 2
1000           fi
1001         fi
1002       done
1003       ;;
1004     esac
1005   done
1006   IFS="$ac_save_IFS"
1007
1008 fi
1009   if test "${ac_cv_path_install+set}" = set; then
1010     INSTALL="$ac_cv_path_install"
1011   else
1012     # As a last resort, use the slow shell script.  We don't cache a
1013     # path for INSTALL within a source directory, because that will
1014     # break other packages using the cache if that directory is
1015     # removed, or if the path is relative.
1016     INSTALL="$ac_install_sh"
1017   fi
1018 fi
1019 echo "$ac_t""$INSTALL" 1>&6
1020
1021 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1022 # It thinks the first close brace ends the variable substitution.
1023 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1024
1025 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1026
1027 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1028
1029 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1030 echo "configure:1031: checking whether build environment is sane" >&5
1031 # Just in case
1032 sleep 1
1033 echo timestamp > conftestfile
1034 # Do `set' in a subshell so we don't clobber the current shell's
1035 # arguments.  Must try -L first in case configure is actually a
1036 # symlink; some systems play weird games with the mod time of symlinks
1037 # (eg FreeBSD returns the mod time of the symlink's containing
1038 # directory).
1039 if (
1040    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1041    if test "$*" = "X"; then
1042       # -L didn't work.
1043       set X `ls -t $srcdir/configure conftestfile`
1044    fi
1045    if test "$*" != "X $srcdir/configure conftestfile" \
1046       && test "$*" != "X conftestfile $srcdir/configure"; then
1047
1048       # If neither matched, then we have a broken ls.  This can happen
1049       # if, for instance, CONFIG_SHELL is bash and it inherits a
1050       # broken ls alias from the environment.  This has actually
1051       # happened.  Such a system could not be considered "sane".
1052       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1053 alias in your environment" 1>&2; exit 1; }
1054    fi
1055
1056    test "$2" = conftestfile
1057    )
1058 then
1059    # Ok.
1060    :
1061 else
1062    { echo "configure: error: newly created file is older than distributed files!
1063 Check your system clock" 1>&2; exit 1; }
1064 fi
1065 rm -f conftest*
1066 echo "$ac_t""yes" 1>&6
1067 if test "$program_transform_name" = s,x,x,; then
1068   program_transform_name=
1069 else
1070   # Double any \ or $.  echo might interpret backslashes.
1071   cat <<\EOF_SED > conftestsed
1072 s,\\,\\\\,g; s,\$,$$,g
1073 EOF_SED
1074   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1075   rm -f conftestsed
1076 fi
1077 test "$program_prefix" != NONE &&
1078   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1079 # Use a double $ so make ignores it.
1080 test "$program_suffix" != NONE &&
1081   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1082
1083 # sed with no file args requires a program.
1084 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1085
1086 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1087 echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5
1088 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1089 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092   cat > conftestmake <<\EOF
1093 all:
1094         @echo 'ac_maketemp="${MAKE}"'
1095 EOF
1096 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1097 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1098 if test -n "$ac_maketemp"; then
1099   eval ac_cv_prog_make_${ac_make}_set=yes
1100 else
1101   eval ac_cv_prog_make_${ac_make}_set=no
1102 fi
1103 rm -f conftestmake
1104 fi
1105 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1106   echo "$ac_t""yes" 1>&6
1107   SET_MAKE=
1108 else
1109   echo "$ac_t""no" 1>&6
1110   SET_MAKE="MAKE=${MAKE-make}"
1111 fi
1112
1113
1114 PACKAGE=opcodes
1115
1116 VERSION=${BFD_VERSION}
1117
1118 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1119   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1120 fi
1121 cat >> confdefs.h <<EOF
1122 #define PACKAGE "$PACKAGE"
1123 EOF
1124
1125 cat >> confdefs.h <<EOF
1126 #define VERSION "$VERSION"
1127 EOF
1128
1129
1130
1131 missing_dir=`cd $ac_aux_dir && pwd`
1132 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1133 echo "configure:1134: checking for working aclocal" >&5
1134 # Run test in a subshell; some versions of sh will print an error if
1135 # an executable is not found, even if stderr is redirected.
1136 # Redirect stdin to placate older versions of autoconf.  Sigh.
1137 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1138    ACLOCAL=aclocal
1139    echo "$ac_t""found" 1>&6
1140 else
1141    ACLOCAL="$missing_dir/missing aclocal"
1142    echo "$ac_t""missing" 1>&6
1143 fi
1144
1145 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1146 echo "configure:1147: checking for working autoconf" >&5
1147 # Run test in a subshell; some versions of sh will print an error if
1148 # an executable is not found, even if stderr is redirected.
1149 # Redirect stdin to placate older versions of autoconf.  Sigh.
1150 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1151    AUTOCONF=autoconf
1152    echo "$ac_t""found" 1>&6
1153 else
1154    AUTOCONF="$missing_dir/missing autoconf"
1155    echo "$ac_t""missing" 1>&6
1156 fi
1157
1158 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1159 echo "configure:1160: checking for working automake" >&5
1160 # Run test in a subshell; some versions of sh will print an error if
1161 # an executable is not found, even if stderr is redirected.
1162 # Redirect stdin to placate older versions of autoconf.  Sigh.
1163 if (automake --version) < /dev/null > /dev/null 2>&1; then
1164    AUTOMAKE=automake
1165    echo "$ac_t""found" 1>&6
1166 else
1167    AUTOMAKE="$missing_dir/missing automake"
1168    echo "$ac_t""missing" 1>&6
1169 fi
1170
1171 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1172 echo "configure:1173: checking for working autoheader" >&5
1173 # Run test in a subshell; some versions of sh will print an error if
1174 # an executable is not found, even if stderr is redirected.
1175 # Redirect stdin to placate older versions of autoconf.  Sigh.
1176 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1177    AUTOHEADER=autoheader
1178    echo "$ac_t""found" 1>&6
1179 else
1180    AUTOHEADER="$missing_dir/missing autoheader"
1181    echo "$ac_t""missing" 1>&6
1182 fi
1183
1184 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1185 echo "configure:1186: checking for working makeinfo" >&5
1186 # Run test in a subshell; some versions of sh will print an error if
1187 # an executable is not found, even if stderr is redirected.
1188 # Redirect stdin to placate older versions of autoconf.  Sigh.
1189 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1190    MAKEINFO=makeinfo
1191    echo "$ac_t""found" 1>&6
1192 else
1193    MAKEINFO="$missing_dir/missing makeinfo"
1194    echo "$ac_t""missing" 1>&6
1195 fi
1196
1197
1198
1199 if test $host != $build; then
1200   ac_tool_prefix=${host_alias}-
1201 else
1202   ac_tool_prefix=
1203 fi
1204
1205 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1206 set dummy ${ac_tool_prefix}ar; ac_word=$2
1207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1208 echo "configure:1209: checking for $ac_word" >&5
1209 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
1210   echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212   if test -n "$AR"; then
1213   ac_cv_prog_AR="$AR" # Let the user override the test.
1214 else
1215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1216   ac_dummy="$PATH"
1217   for ac_dir in $ac_dummy; do
1218     test -z "$ac_dir" && ac_dir=.
1219     if test -f $ac_dir/$ac_word; then
1220       ac_cv_prog_AR="${ac_tool_prefix}ar"
1221       break
1222     fi
1223   done
1224   IFS="$ac_save_ifs"
1225   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1226 fi
1227 fi
1228 AR="$ac_cv_prog_AR"
1229 if test -n "$AR"; then
1230   echo "$ac_t""$AR" 1>&6
1231 else
1232   echo "$ac_t""no" 1>&6
1233 fi
1234
1235
1236
1237 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1238 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1240 echo "configure:1241: checking for $ac_word" >&5
1241 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
1242   echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244   if test -n "$RANLIB"; then
1245   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1246 else
1247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1248   ac_dummy="$PATH"
1249   for ac_dir in $ac_dummy; do
1250     test -z "$ac_dir" && ac_dir=.
1251     if test -f $ac_dir/$ac_word; then
1252       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1253       break
1254     fi
1255   done
1256   IFS="$ac_save_ifs"
1257 fi
1258 fi
1259 RANLIB="$ac_cv_prog_RANLIB"
1260 if test -n "$RANLIB"; then
1261   echo "$ac_t""$RANLIB" 1>&6
1262 else
1263   echo "$ac_t""no" 1>&6
1264 fi
1265
1266
1267 if test -z "$ac_cv_prog_RANLIB"; then
1268 if test -n "$ac_tool_prefix"; then
1269   # Extract the first word of "ranlib", so it can be a program name with args.
1270 set dummy ranlib; ac_word=$2
1271 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1272 echo "configure:1273: checking for $ac_word" >&5
1273 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
1274   echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276   if test -n "$RANLIB"; then
1277   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1278 else
1279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1280   ac_dummy="$PATH"
1281   for ac_dir in $ac_dummy; do
1282     test -z "$ac_dir" && ac_dir=.
1283     if test -f $ac_dir/$ac_word; then
1284       ac_cv_prog_RANLIB="ranlib"
1285       break
1286     fi
1287   done
1288   IFS="$ac_save_ifs"
1289   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1290 fi
1291 fi
1292 RANLIB="$ac_cv_prog_RANLIB"
1293 if test -n "$RANLIB"; then
1294   echo "$ac_t""$RANLIB" 1>&6
1295 else
1296   echo "$ac_t""no" 1>&6
1297 fi
1298
1299 else
1300   RANLIB=":"
1301 fi
1302 fi
1303
1304
1305 # Check whether --enable-shared or --disable-shared was given.
1306 if test "${enable_shared+set}" = set; then
1307   enableval="$enable_shared"
1308   p=${PACKAGE-default}
1309 case "$enableval" in
1310 yes) enable_shared=yes ;;
1311 no) enable_shared=no ;;
1312 *)
1313   enable_shared=no
1314   # Look at the argument we got.  We use all the common list separators.
1315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1316   for pkg in $enableval; do
1317     if test "X$pkg" = "X$p"; then
1318       enable_shared=yes
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322   ;;
1323 esac
1324 else
1325   enable_shared=no
1326 fi
1327
1328
1329 # Check whether --enable-static or --disable-static was given.
1330 if test "${enable_static+set}" = set; then
1331   enableval="$enable_static"
1332   p=${PACKAGE-default}
1333 case "$enableval" in
1334 yes) enable_static=yes ;;
1335 no) enable_static=no ;;
1336 *)
1337   enable_static=no
1338   # Look at the argument we got.  We use all the common list separators.
1339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1340   for pkg in $enableval; do
1341     if test "X$pkg" = "X$p"; then
1342       enable_static=yes
1343     fi
1344   done
1345   IFS="$ac_save_ifs"
1346   ;;
1347 esac
1348 else
1349   enable_static=yes
1350 fi
1351
1352 # Check whether --enable-fast-install or --disable-fast-install was given.
1353 if test "${enable_fast_install+set}" = set; then
1354   enableval="$enable_fast_install"
1355   p=${PACKAGE-default}
1356 case "$enableval" in
1357 yes) enable_fast_install=yes ;;
1358 no) enable_fast_install=no ;;
1359 *)
1360   enable_fast_install=no
1361   # Look at the argument we got.  We use all the common list separators.
1362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1363   for pkg in $enableval; do
1364     if test "X$pkg" = "X$p"; then
1365       enable_fast_install=yes
1366     fi
1367   done
1368   IFS="$ac_save_ifs"
1369   ;;
1370 esac
1371 else
1372   enable_fast_install=yes
1373 fi
1374
1375 # Extract the first word of "ranlib", so it can be a program name with args.
1376 set dummy ranlib; ac_word=$2
1377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1378 echo "configure:1379: checking for $ac_word" >&5
1379 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
1380   echo $ac_n "(cached) $ac_c" 1>&6
1381 else
1382   if test -n "$RANLIB"; then
1383   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1384 else
1385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1386   ac_dummy="$PATH"
1387   for ac_dir in $ac_dummy; do
1388     test -z "$ac_dir" && ac_dir=.
1389     if test -f $ac_dir/$ac_word; then
1390       ac_cv_prog_RANLIB="ranlib"
1391       break
1392     fi
1393   done
1394   IFS="$ac_save_ifs"
1395   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1396 fi
1397 fi
1398 RANLIB="$ac_cv_prog_RANLIB"
1399 if test -n "$RANLIB"; then
1400   echo "$ac_t""$RANLIB" 1>&6
1401 else
1402   echo "$ac_t""no" 1>&6
1403 fi
1404
1405 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1406 if test "${with_gnu_ld+set}" = set; then
1407   withval="$with_gnu_ld"
1408   test "$withval" = no || with_gnu_ld=yes
1409 else
1410   with_gnu_ld=no
1411 fi
1412
1413 ac_prog=ld
1414 if test "$ac_cv_prog_gcc" = yes; then
1415   # Check if gcc -print-prog-name=ld gives a path.
1416   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1417 echo "configure:1418: checking for ld used by GCC" >&5
1418   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1419   case "$ac_prog" in
1420     # Accept absolute paths.
1421     [\\/]* | [A-Za-z]:[\\/]*)
1422       re_direlt='/[^/][^/]*/\.\./'
1423       # Canonicalize the path of ld
1424       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1425       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1426         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1427       done
1428       test -z "$LD" && LD="$ac_prog"
1429       ;;
1430   "")
1431     # If it fails, then pretend we aren't using GCC.
1432     ac_prog=ld
1433     ;;
1434   *)
1435     # If it is relative, then search for the first ld in PATH.
1436     with_gnu_ld=unknown
1437     ;;
1438   esac
1439 elif test "$with_gnu_ld" = yes; then
1440   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1441 echo "configure:1442: checking for GNU ld" >&5
1442 else
1443   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1444 echo "configure:1445: checking for non-GNU ld" >&5
1445 fi
1446 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
1447   echo $ac_n "(cached) $ac_c" 1>&6
1448 else
1449   if test -z "$LD"; then
1450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1451   for ac_dir in $PATH; do
1452     test -z "$ac_dir" && ac_dir=.
1453     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1454       ac_cv_path_LD="$ac_dir/$ac_prog"
1455       # Check to see if the program is GNU ld.  I'd rather use --version,
1456       # but apparently some GNU ld's only accept -v.
1457       # Break only if it was the GNU/non-GNU ld that we prefer.
1458       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1459         test "$with_gnu_ld" != no && break
1460       else
1461         test "$with_gnu_ld" != yes && break
1462       fi
1463     fi
1464   done
1465   IFS="$ac_save_ifs"
1466 else
1467   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1468 fi
1469 fi
1470
1471 LD="$ac_cv_path_LD"
1472 if test -n "$LD"; then
1473   echo "$ac_t""$LD" 1>&6
1474 else
1475   echo "$ac_t""no" 1>&6
1476 fi
1477 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1478 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1479 echo "configure:1480: checking if the linker ($LD) is GNU ld" >&5
1480 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
1481   echo $ac_n "(cached) $ac_c" 1>&6
1482 else
1483   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1484 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1485   ac_cv_prog_gnu_ld=yes
1486 else
1487   ac_cv_prog_gnu_ld=no
1488 fi
1489 fi
1490
1491 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1492
1493
1494 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1495 echo "configure:1496: checking for BSD-compatible nm" >&5
1496 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
1497   echo $ac_n "(cached) $ac_c" 1>&6
1498 else
1499   if test -n "$NM"; then
1500   # Let the user override the test.
1501   ac_cv_path_NM="$NM"
1502 else
1503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1504   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1505     test -z "$ac_dir" && ac_dir=.
1506     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1507       # Check to see if the nm accepts a BSD-compat flag.
1508       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1509       #   nm: unknown option "B" ignored
1510       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1511         ac_cv_path_NM="$ac_dir/nm -B"
1512         break
1513       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1514         ac_cv_path_NM="$ac_dir/nm -p"
1515         break
1516       else
1517         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1518         continue # so that we can try to find one that supports BSD flags
1519       fi
1520     fi
1521   done
1522   IFS="$ac_save_ifs"
1523   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1524 fi
1525 fi
1526
1527 NM="$ac_cv_path_NM"
1528 echo "$ac_t""$NM" 1>&6
1529
1530 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1531 echo "configure:1532: checking whether ln -s works" >&5
1532 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
1533   echo $ac_n "(cached) $ac_c" 1>&6
1534 else
1535   rm -f conftestdata
1536 if ln -s X conftestdata 2>/dev/null
1537 then
1538   rm -f conftestdata
1539   ac_cv_prog_LN_S="ln -s"
1540 else
1541   ac_cv_prog_LN_S=ln
1542 fi
1543 fi
1544 LN_S="$ac_cv_prog_LN_S"
1545 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1546   echo "$ac_t""yes" 1>&6
1547 else
1548   echo "$ac_t""no" 1>&6
1549 fi
1550
1551
1552 case "$target" in
1553 NONE) lt_target="$host" ;;
1554 *) lt_target="$target" ;;
1555 esac
1556
1557 # Check for any special flags to pass to ltconfig.
1558 libtool_flags="--cache-file=$cache_file"
1559 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1560 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1561 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1562 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1563 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1564
1565
1566 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1567 if test "${enable_libtool_lock+set}" = set; then
1568   enableval="$enable_libtool_lock"
1569   :
1570 fi
1571
1572 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1573 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1574
1575 # Some flags need to be propagated to the compiler or linker for good
1576 # libtool support.
1577 case "$lt_target" in
1578 *-*-irix6*)
1579   # Find out which ABI we are using.
1580   echo '#line 1581 "configure"' > conftest.$ac_ext
1581   if { (eval echo configure:1582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1582     case "`/usr/bin/file conftest.o`" in
1583     *32-bit*)
1584       LD="${LD-ld} -32"
1585       ;;
1586     *N32*)
1587       LD="${LD-ld} -n32"
1588       ;;
1589     *64-bit*)
1590       LD="${LD-ld} -64"
1591       ;;
1592     esac
1593   fi
1594   rm -rf conftest*
1595   ;;
1596
1597 *-*-sco3.2v5*)
1598   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1599   SAVE_CFLAGS="$CFLAGS"
1600   CFLAGS="$CFLAGS -belf"
1601   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1602 echo "configure:1603: checking whether the C compiler needs -belf" >&5
1603 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
1604   echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606   cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609
1610 int main() {
1611
1612 ; return 0; }
1613 EOF
1614 if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1615   rm -rf conftest*
1616   lt_cv_cc_needs_belf=yes
1617 else
1618   echo "configure: failed program was:" >&5
1619   cat conftest.$ac_ext >&5
1620   rm -rf conftest*
1621   lt_cv_cc_needs_belf=no
1622 fi
1623 rm -f conftest*
1624 fi
1625
1626 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1627   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1628     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1629     CFLAGS="$SAVE_CFLAGS"
1630   fi
1631   ;;
1632
1633
1634 esac
1635
1636
1637 # Save cache, so that ltconfig can load it
1638 cat > confcache <<\EOF
1639 # This file is a shell script that caches the results of configure
1640 # tests run on this system so they can be shared between configure
1641 # scripts and configure runs.  It is not useful on other systems.
1642 # If it contains results you don't want to keep, you may remove or edit it.
1643 #
1644 # By default, configure uses ./config.cache as the cache file,
1645 # creating it if it does not exist already.  You can give configure
1646 # the --cache-file=FILE option to use a different cache file; that is
1647 # what configure does when it calls configure scripts in
1648 # subdirectories, so they share the cache.
1649 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1650 # config.status only pays attention to the cache file if you give it the
1651 # --recheck option to rerun configure.
1652 #
1653 EOF
1654 # The following way of writing the cache mishandles newlines in values,
1655 # but we know of no workaround that is simple, portable, and efficient.
1656 # So, don't put newlines in cache variables' values.
1657 # Ultrix sh set writes to stderr and can't be redirected directly,
1658 # and sets the high bit in the cache file unless we assign to the vars.
1659 (set) 2>&1 |
1660   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1661   *ac_space=\ *)
1662     # `set' does not quote correctly, so add quotes (double-quote substitution
1663     # turns \\\\ into \\, and sed turns \\ into \).
1664     sed -n \
1665       -e "s/'/'\\\\''/g" \
1666       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1667     ;;
1668   *)
1669     # `set' quotes correctly as required by POSIX, so do not add quotes.
1670     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1671     ;;
1672   esac >> confcache
1673 if cmp -s $cache_file confcache; then
1674   :
1675 else
1676   if test -w $cache_file; then
1677     echo "updating cache $cache_file"
1678     cat confcache > $cache_file
1679   else
1680     echo "not updating unwritable cache $cache_file"
1681   fi
1682 fi
1683 rm -f confcache
1684
1685
1686 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1687 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1688 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1689 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1690 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1691 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1692 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1693 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1694
1695 # Reload cache, that may have been modified by ltconfig
1696 if test -r "$cache_file"; then
1697   echo "loading cache $cache_file"
1698       test -f "$cache_file" && . $cache_file
1699 else
1700   echo "creating cache $cache_file"
1701   > $cache_file
1702 fi
1703
1704
1705 # This can be used to rebuild libtool when needed
1706 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1707
1708 # Always use our own libtool.
1709 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1710
1711 # Redirect the config.log output again, so that the ltconfig log is not
1712 # clobbered by the next message.
1713 exec 5>>./config.log
1714
1715
1716 # Check whether --enable-targets or --disable-targets was given.
1717 if test "${enable_targets+set}" = set; then
1718   enableval="$enable_targets"
1719   case "${enableval}" in
1720   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1721             ;;
1722   no)       enable_targets= ;;
1723   *)        enable_targets=$enableval ;;
1724 esac
1725 fi
1726 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1727 if test "${enable_commonbfdlib+set}" = set; then
1728   enableval="$enable_commonbfdlib"
1729   case "${enableval}" in
1730   yes) commonbfdlib=true ;;
1731   no)  commonbfdlib=false ;;
1732   *)   { echo "configure: error: bad value ${enableval} for opcodes commonbfdlib option" 1>&2; exit 1; } ;;
1733 esac
1734 fi
1735
1736
1737
1738
1739
1740 if test -z "$target" ; then
1741     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1742 fi
1743 if test "$program_transform_name" = s,x,x,; then
1744   program_transform_name=
1745 else
1746   # Double any \ or $.  echo might interpret backslashes.
1747   cat <<\EOF_SED > conftestsed
1748 s,\\,\\\\,g; s,\$,$$,g
1749 EOF_SED
1750   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1751   rm -f conftestsed
1752 fi
1753 test "$program_prefix" != NONE &&
1754   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1755 # Use a double $ so make ignores it.
1756 test "$program_suffix" != NONE &&
1757   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1758
1759 # sed with no file args requires a program.
1760 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1761
1762
1763 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1764 echo "configure:1765: checking whether to enable maintainer-specific portions of Makefiles" >&5
1765     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1766 if test "${enable_maintainer_mode+set}" = set; then
1767   enableval="$enable_maintainer_mode"
1768   USE_MAINTAINER_MODE=$enableval
1769 else
1770   USE_MAINTAINER_MODE=no
1771 fi
1772
1773   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1774   
1775
1776 if test $USE_MAINTAINER_MODE = yes; then
1777   MAINTAINER_MODE_TRUE=
1778   MAINTAINER_MODE_FALSE='#'
1779 else
1780   MAINTAINER_MODE_TRUE='#'
1781   MAINTAINER_MODE_FALSE=
1782 fi
1783   MAINT=$MAINTAINER_MODE_TRUE
1784   
1785
1786 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1787 echo "configure:1788: checking for Cygwin environment" >&5
1788 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
1789   echo $ac_n "(cached) $ac_c" 1>&6
1790 else
1791   cat > conftest.$ac_ext <<EOF
1792 #line 1793 "configure"
1793 #include "confdefs.h"
1794
1795 int main() {
1796
1797 #ifndef __CYGWIN__
1798 #define __CYGWIN__ __CYGWIN32__
1799 #endif
1800 return __CYGWIN__;
1801 ; return 0; }
1802 EOF
1803 if { (eval echo configure:1804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1804   rm -rf conftest*
1805   ac_cv_cygwin=yes
1806 else
1807   echo "configure: failed program was:" >&5
1808   cat conftest.$ac_ext >&5
1809   rm -rf conftest*
1810   ac_cv_cygwin=no
1811 fi
1812 rm -f conftest*
1813 fi
1814
1815 echo "$ac_t""$ac_cv_cygwin" 1>&6
1816 CYGWIN=
1817 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1818 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1819 echo "configure:1820: checking for mingw32 environment" >&5
1820 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
1821   echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823   cat > conftest.$ac_ext <<EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1826
1827 int main() {
1828 return __MINGW32__;
1829 ; return 0; }
1830 EOF
1831 if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1832   rm -rf conftest*
1833   ac_cv_mingw32=yes
1834 else
1835   echo "configure: failed program was:" >&5
1836   cat conftest.$ac_ext >&5
1837   rm -rf conftest*
1838   ac_cv_mingw32=no
1839 fi
1840 rm -f conftest*
1841 fi
1842
1843 echo "$ac_t""$ac_cv_mingw32" 1>&6
1844 MINGW32=
1845 test "$ac_cv_mingw32" = yes && MINGW32=yes
1846 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
1847 echo "configure:1848: checking for EMX OS/2 environment" >&5
1848 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
1849   echo $ac_n "(cached) $ac_c" 1>&6
1850 else
1851   cat > conftest.$ac_ext <<EOF
1852 #line 1853 "configure"
1853 #include "confdefs.h"
1854
1855 int main() {
1856 return __EMX__;
1857 ; return 0; }
1858 EOF
1859 if { (eval echo configure:1860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860   rm -rf conftest*
1861   ac_cv_emxos2=yes
1862 else
1863   echo "configure: failed program was:" >&5
1864   cat conftest.$ac_ext >&5
1865   rm -rf conftest*
1866   ac_cv_emxos2=no
1867 fi
1868 rm -f conftest*
1869 fi
1870
1871 echo "$ac_t""$ac_cv_emxos2" 1>&6
1872 EMXOS2=
1873 test "$ac_cv_emxos2" = yes && EMXOS2=yes
1874
1875
1876
1877 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1878 echo "configure:1879: checking for executable suffix" >&5
1879 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
1880   echo $ac_n "(cached) $ac_c" 1>&6
1881 else
1882   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
1883   ac_cv_exeext=.exe
1884 else
1885   rm -f conftest*
1886   echo 'int main () { return 0; }' > conftest.$ac_ext
1887   ac_cv_exeext=
1888   if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1889     for file in conftest.*; do
1890       case $file in
1891       *.c | *.C | *.o | *.obj | *.xcoff) ;;
1892       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1893       esac
1894     done
1895   else
1896     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1897   fi
1898   rm -f conftest*
1899   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1900 fi
1901 fi
1902
1903 EXEEXT=""
1904 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1905 echo "$ac_t""${ac_cv_exeext}" 1>&6
1906 ac_exeext=$EXEEXT
1907
1908
1909 # host-specific stuff:
1910
1911 # Extract the first word of "gcc", so it can be a program name with args.
1912 set dummy gcc; ac_word=$2
1913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1914 echo "configure:1915: checking for $ac_word" >&5
1915 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
1916   echo $ac_n "(cached) $ac_c" 1>&6
1917 else
1918   if test -n "$CC"; then
1919   ac_cv_prog_CC="$CC" # Let the user override the test.
1920 else
1921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1922   ac_dummy="$PATH"
1923   for ac_dir in $ac_dummy; do
1924     test -z "$ac_dir" && ac_dir=.
1925     if test -f $ac_dir/$ac_word; then
1926       ac_cv_prog_CC="gcc"
1927       break
1928     fi
1929   done
1930   IFS="$ac_save_ifs"
1931 fi
1932 fi
1933 CC="$ac_cv_prog_CC"
1934 if test -n "$CC"; then
1935   echo "$ac_t""$CC" 1>&6
1936 else
1937   echo "$ac_t""no" 1>&6
1938 fi
1939
1940 if test -z "$CC"; then
1941   # Extract the first word of "cc", so it can be a program name with args.
1942 set dummy cc; ac_word=$2
1943 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1944 echo "configure:1945: checking for $ac_word" >&5
1945 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
1946   echo $ac_n "(cached) $ac_c" 1>&6
1947 else
1948   if test -n "$CC"; then
1949   ac_cv_prog_CC="$CC" # Let the user override the test.
1950 else
1951   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1952   ac_prog_rejected=no
1953   ac_dummy="$PATH"
1954   for ac_dir in $ac_dummy; do
1955     test -z "$ac_dir" && ac_dir=.
1956     if test -f $ac_dir/$ac_word; then
1957       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1958         ac_prog_rejected=yes
1959         continue
1960       fi
1961       ac_cv_prog_CC="cc"
1962       break
1963     fi
1964   done
1965   IFS="$ac_save_ifs"
1966 if test $ac_prog_rejected = yes; then
1967   # We found a bogon in the path, so make sure we never use it.
1968   set dummy $ac_cv_prog_CC
1969   shift
1970   if test $# -gt 0; then
1971     # We chose a different compiler from the bogus one.
1972     # However, it has the same basename, so the bogon will be chosen
1973     # first if we set CC to just the basename; use the full file name.
1974     shift
1975     set dummy "$ac_dir/$ac_word" "$@"
1976     shift
1977     ac_cv_prog_CC="$@"
1978   fi
1979 fi
1980 fi
1981 fi
1982 CC="$ac_cv_prog_CC"
1983 if test -n "$CC"; then
1984   echo "$ac_t""$CC" 1>&6
1985 else
1986   echo "$ac_t""no" 1>&6
1987 fi
1988
1989   if test -z "$CC"; then
1990     case "`uname -s`" in
1991     *win32* | *WIN32* | *CYGWIN*)
1992       # Extract the first word of "cl", so it can be a program name with args.
1993 set dummy cl; ac_word=$2
1994 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1995 echo "configure:1996: checking for $ac_word" >&5
1996 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
1997   echo $ac_n "(cached) $ac_c" 1>&6
1998 else
1999   if test -n "$CC"; then
2000   ac_cv_prog_CC="$CC" # Let the user override the test.
2001 else
2002   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2003   ac_dummy="$PATH"
2004   for ac_dir in $ac_dummy; do
2005     test -z "$ac_dir" && ac_dir=.
2006     if test -f $ac_dir/$ac_word; then
2007       ac_cv_prog_CC="cl"
2008       break
2009     fi
2010   done
2011   IFS="$ac_save_ifs"
2012 fi
2013 fi
2014 CC="$ac_cv_prog_CC"
2015 if test -n "$CC"; then
2016   echo "$ac_t""$CC" 1>&6
2017 else
2018   echo "$ac_t""no" 1>&6
2019 fi
2020  ;;
2021     esac
2022   fi
2023   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2024 fi
2025
2026 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2027 echo "configure:2028: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2028
2029 ac_ext=c
2030 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2031 ac_cpp='$CPP $CPPFLAGS'
2032 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2033 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2034 cross_compiling=$ac_cv_prog_cc_cross
2035
2036 cat > conftest.$ac_ext << EOF
2037
2038 #line 2039 "configure"
2039 #include "confdefs.h"
2040
2041 main(){return(0);}
2042 EOF
2043 if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2044   ac_cv_prog_cc_works=yes
2045   # If we can't run a trivial program, we are probably using a cross compiler.
2046   if (./conftest; exit) 2>/dev/null; then
2047     ac_cv_prog_cc_cross=no
2048   else
2049     ac_cv_prog_cc_cross=yes
2050   fi
2051 else
2052   echo "configure: failed program was:" >&5
2053   cat conftest.$ac_ext >&5
2054   ac_cv_prog_cc_works=no
2055 fi
2056 rm -fr conftest*
2057 ac_ext=c
2058 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2059 ac_cpp='$CPP $CPPFLAGS'
2060 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2061 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2062 cross_compiling=$ac_cv_prog_cc_cross
2063
2064 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2065 if test $ac_cv_prog_cc_works = no; then
2066   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2067 fi
2068 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2069 echo "configure:2070: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2070 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2071 cross_compiling=$ac_cv_prog_cc_cross
2072
2073 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2074 echo "configure:2075: checking whether we are using GNU C" >&5
2075 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2076   echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078   cat > conftest.c <<EOF
2079 #ifdef __GNUC__
2080   yes;
2081 #endif
2082 EOF
2083 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2084   ac_cv_prog_gcc=yes
2085 else
2086   ac_cv_prog_gcc=no
2087 fi
2088 fi
2089
2090 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2091
2092 if test $ac_cv_prog_gcc = yes; then
2093   GCC=yes
2094 else
2095   GCC=
2096 fi
2097
2098 ac_test_CFLAGS="${CFLAGS+set}"
2099 ac_save_CFLAGS="$CFLAGS"
2100 CFLAGS=
2101 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2102 echo "configure:2103: checking whether ${CC-cc} accepts -g" >&5
2103 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   echo 'void f(){}' > conftest.c
2107 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2108   ac_cv_prog_cc_g=yes
2109 else
2110   ac_cv_prog_cc_g=no
2111 fi
2112 rm -f conftest*
2113
2114 fi
2115
2116 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2117 if test "$ac_test_CFLAGS" = set; then
2118   CFLAGS="$ac_save_CFLAGS"
2119 elif test $ac_cv_prog_cc_g = yes; then
2120   if test "$GCC" = yes; then
2121     CFLAGS="-g -O2"
2122   else
2123     CFLAGS="-g"
2124   fi
2125 else
2126   if test "$GCC" = yes; then
2127     CFLAGS="-O2"
2128   else
2129     CFLAGS=
2130   fi
2131 fi
2132
2133
2134 ALL_LINGUAS=
2135 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2136 echo "configure:2137: checking how to run the C preprocessor" >&5
2137 # On Suns, sometimes $CPP names a directory.
2138 if test -n "$CPP" && test -d "$CPP"; then
2139   CPP=
2140 fi
2141 if test -z "$CPP"; then
2142 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2143   echo $ac_n "(cached) $ac_c" 1>&6
2144 else
2145     # This must be in double quotes, not single quotes, because CPP may get
2146   # substituted into the Makefile and "${CC-cc}" will confuse make.
2147   CPP="${CC-cc} -E"
2148   # On the NeXT, cc -E runs the code through the compiler's parser,
2149   # not just through cpp.
2150   cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 #include <assert.h>
2154 Syntax Error
2155 EOF
2156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2157 { (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2159 if test -z "$ac_err"; then
2160   :
2161 else
2162   echo "$ac_err" >&5
2163   echo "configure: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   rm -rf conftest*
2166   CPP="${CC-cc} -E -traditional-cpp"
2167   cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170 #include <assert.h>
2171 Syntax Error
2172 EOF
2173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2174 { (eval echo configure:2175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2176 if test -z "$ac_err"; then
2177   :
2178 else
2179   echo "$ac_err" >&5
2180   echo "configure: failed program was:" >&5
2181   cat conftest.$ac_ext >&5
2182   rm -rf conftest*
2183   CPP="${CC-cc} -nologo -E"
2184   cat > conftest.$ac_ext <<EOF
2185 #line 2186 "configure"
2186 #include "confdefs.h"
2187 #include <assert.h>
2188 Syntax Error
2189 EOF
2190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2191 { (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2193 if test -z "$ac_err"; then
2194   :
2195 else
2196   echo "$ac_err" >&5
2197   echo "configure: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   rm -rf conftest*
2200   CPP=/lib/cpp
2201 fi
2202 rm -f conftest*
2203 fi
2204 rm -f conftest*
2205 fi
2206 rm -f conftest*
2207   ac_cv_prog_CPP="$CPP"
2208 fi
2209   CPP="$ac_cv_prog_CPP"
2210 else
2211   ac_cv_prog_CPP="$CPP"
2212 fi
2213 echo "$ac_t""$CPP" 1>&6
2214
2215 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2216 echo "configure:2217: checking for ANSI C header files" >&5
2217 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
2218   echo $ac_n "(cached) $ac_c" 1>&6
2219 else
2220   cat > conftest.$ac_ext <<EOF
2221 #line 2222 "configure"
2222 #include "confdefs.h"
2223 #include <stdlib.h>
2224 #include <stdarg.h>
2225 #include <string.h>
2226 #include <float.h>
2227 EOF
2228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2229 { (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2231 if test -z "$ac_err"; then
2232   rm -rf conftest*
2233   ac_cv_header_stdc=yes
2234 else
2235   echo "$ac_err" >&5
2236   echo "configure: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   rm -rf conftest*
2239   ac_cv_header_stdc=no
2240 fi
2241 rm -f conftest*
2242
2243 if test $ac_cv_header_stdc = yes; then
2244   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2245 cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <string.h>
2249 EOF
2250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2251   egrep "memchr" >/dev/null 2>&1; then
2252   :
2253 else
2254   rm -rf conftest*
2255   ac_cv_header_stdc=no
2256 fi
2257 rm -f conftest*
2258
2259 fi
2260
2261 if test $ac_cv_header_stdc = yes; then
2262   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2263 cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 #include <stdlib.h>
2267 EOF
2268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2269   egrep "free" >/dev/null 2>&1; then
2270   :
2271 else
2272   rm -rf conftest*
2273   ac_cv_header_stdc=no
2274 fi
2275 rm -f conftest*
2276
2277 fi
2278
2279 if test $ac_cv_header_stdc = yes; then
2280   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2281 if test "$cross_compiling" = yes; then
2282   :
2283 else
2284   cat > conftest.$ac_ext <<EOF
2285 #line 2286 "configure"
2286 #include "confdefs.h"
2287 #include <ctype.h>
2288 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2289 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2290 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2291 int main () { int i; for (i = 0; i < 256; i++)
2292 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2293 exit (0); }
2294
2295 EOF
2296 if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2297 then
2298   :
2299 else
2300   echo "configure: failed program was:" >&5
2301   cat conftest.$ac_ext >&5
2302   rm -fr conftest*
2303   ac_cv_header_stdc=no
2304 fi
2305 rm -fr conftest*
2306 fi
2307
2308 fi
2309 fi
2310
2311 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2312 if test $ac_cv_header_stdc = yes; then
2313   cat >> confdefs.h <<\EOF
2314 #define STDC_HEADERS 1
2315 EOF
2316
2317 fi
2318
2319 echo $ac_n "checking for working const""... $ac_c" 1>&6
2320 echo "configure:2321: checking for working const" >&5
2321 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
2322   echo $ac_n "(cached) $ac_c" 1>&6
2323 else
2324   cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327
2328 int main() {
2329
2330 /* Ultrix mips cc rejects this.  */
2331 typedef int charset[2]; const charset x;
2332 /* SunOS 4.1.1 cc rejects this.  */
2333 char const *const *ccp;
2334 char **p;
2335 /* NEC SVR4.0.2 mips cc rejects this.  */
2336 struct point {int x, y;};
2337 static struct point const zero = {0,0};
2338 /* AIX XL C 1.02.0.0 rejects this.
2339    It does not let you subtract one const X* pointer from another in an arm
2340    of an if-expression whose if-part is not a constant expression */
2341 const char *g = "string";
2342 ccp = &g + (g ? g-g : 0);
2343 /* HPUX 7.0 cc rejects these. */
2344 ++ccp;
2345 p = (char**) ccp;
2346 ccp = (char const *const *) p;
2347 { /* SCO 3.2v4 cc rejects this.  */
2348   char *t;
2349   char const *s = 0 ? (char *) 0 : (char const *) 0;
2350
2351   *t++ = 0;
2352 }
2353 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2354   int x[] = {25, 17};
2355   const int *foo = &x[0];
2356   ++foo;
2357 }
2358 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2359   typedef const int *iptr;
2360   iptr p = 0;
2361   ++p;
2362 }
2363 { /* AIX XL C 1.02.0.0 rejects this saying
2364      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2365   struct s { int j; const int *ap[3]; };
2366   struct s *b; b->j = 5;
2367 }
2368 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2369   const int foo = 10;
2370 }
2371
2372 ; return 0; }
2373 EOF
2374 if { (eval echo configure:2375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2375   rm -rf conftest*
2376   ac_cv_c_const=yes
2377 else
2378   echo "configure: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   rm -rf conftest*
2381   ac_cv_c_const=no
2382 fi
2383 rm -f conftest*
2384 fi
2385
2386 echo "$ac_t""$ac_cv_c_const" 1>&6
2387 if test $ac_cv_c_const = no; then
2388   cat >> confdefs.h <<\EOF
2389 #define const 
2390 EOF
2391
2392 fi
2393
2394 echo $ac_n "checking for inline""... $ac_c" 1>&6
2395 echo "configure:2396: checking for inline" >&5
2396 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   ac_cv_c_inline=no
2400 for ac_kw in inline __inline__ __inline; do
2401   cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404
2405 int main() {
2406 } $ac_kw int foo() {
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2410   rm -rf conftest*
2411   ac_cv_c_inline=$ac_kw; break
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415 fi
2416 rm -f conftest*
2417 done
2418
2419 fi
2420
2421 echo "$ac_t""$ac_cv_c_inline" 1>&6
2422 case "$ac_cv_c_inline" in
2423   inline | yes) ;;
2424   no) cat >> confdefs.h <<\EOF
2425 #define inline 
2426 EOF
2427  ;;
2428   *)  cat >> confdefs.h <<EOF
2429 #define inline $ac_cv_c_inline
2430 EOF
2431  ;;
2432 esac
2433
2434 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2435 echo "configure:2436: checking for off_t" >&5
2436 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 #include <sys/types.h>
2443 #if STDC_HEADERS
2444 #include <stdlib.h>
2445 #include <stddef.h>
2446 #endif
2447 EOF
2448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2449   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2450   rm -rf conftest*
2451   eval "ac_cv_type_off_t=yes"
2452 else
2453   rm -rf conftest*
2454   eval "ac_cv_type_off_t=no"
2455 fi
2456 rm -f conftest*
2457
2458 fi
2459 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
2460   echo "$ac_t""yes" 1>&6
2461 else
2462   echo "$ac_t""no" 1>&6
2463   cat >> confdefs.h <<EOF
2464 #define off_t long
2465 EOF
2466
2467 fi
2468
2469 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2470 echo "configure:2471: checking for size_t" >&5
2471 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 #include <sys/types.h>
2478 #if STDC_HEADERS
2479 #include <stdlib.h>
2480 #include <stddef.h>
2481 #endif
2482 EOF
2483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2484   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2485   rm -rf conftest*
2486   eval "ac_cv_type_size_t=yes"
2487 else
2488   rm -rf conftest*
2489   eval "ac_cv_type_size_t=no"
2490 fi
2491 rm -f conftest*
2492
2493 fi
2494 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
2495   echo "$ac_t""yes" 1>&6
2496 else
2497   echo "$ac_t""no" 1>&6
2498   cat >> confdefs.h <<EOF
2499 #define size_t unsigned
2500 EOF
2501
2502 fi
2503
2504 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2505 # for constant arguments.  Useless!
2506 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2507 echo "configure:2508: checking for working alloca.h" >&5
2508 if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then
2509   echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511   cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 #include <alloca.h>
2515 int main() {
2516 char *p = alloca(2 * sizeof(int));
2517 ; return 0; }
2518 EOF
2519 if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2520   rm -rf conftest*
2521   ac_cv_header_alloca_h=yes
2522 else
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -rf conftest*
2526   ac_cv_header_alloca_h=no
2527 fi
2528 rm -f conftest*
2529 fi
2530
2531 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2532 if test $ac_cv_header_alloca_h = yes; then
2533   cat >> confdefs.h <<\EOF
2534 #define HAVE_ALLOCA_H 1
2535 EOF
2536
2537 fi
2538
2539 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2540 echo "configure:2541: checking for alloca" >&5
2541 if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then
2542   echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544   cat > conftest.$ac_ext <<EOF
2545 #line 2546 "configure"
2546 #include "confdefs.h"
2547
2548 #ifdef __GNUC__
2549 # define alloca __builtin_alloca
2550 #else
2551 # ifdef _MSC_VER
2552 #  include <malloc.h>
2553 #  define alloca _alloca
2554 # else
2555 #  if HAVE_ALLOCA_H
2556 #   include <alloca.h>
2557 #  else
2558 #   ifdef _AIX
2559  #pragma alloca
2560 #   else
2561 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2562 char *alloca ();
2563 #    endif
2564 #   endif
2565 #  endif
2566 # endif
2567 #endif
2568
2569 int main() {
2570 char *p = (char *) alloca(1);
2571 ; return 0; }
2572 EOF
2573 if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2574   rm -rf conftest*
2575   ac_cv_func_alloca_works=yes
2576 else
2577   echo "configure: failed program was:" >&5
2578   cat conftest.$ac_ext >&5
2579   rm -rf conftest*
2580   ac_cv_func_alloca_works=no
2581 fi
2582 rm -f conftest*
2583 fi
2584
2585 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2586 if test $ac_cv_func_alloca_works = yes; then
2587   cat >> confdefs.h <<\EOF
2588 #define HAVE_ALLOCA 1
2589 EOF
2590
2591 fi
2592
2593 if test $ac_cv_func_alloca_works = no; then
2594   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2595   # that cause trouble.  Some versions do not even contain alloca or
2596   # contain a buggy version.  If you still want to use their alloca,
2597   # use ar to extract alloca.o from them instead of compiling alloca.c.
2598   ALLOCA=alloca.${ac_objext}
2599   cat >> confdefs.h <<\EOF
2600 #define C_ALLOCA 1
2601 EOF
2602
2603
2604 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2605 echo "configure:2606: checking whether alloca needs Cray hooks" >&5
2606 if eval "test \"\${ac_cv_os_cray+set}\" = set"; then
2607   echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609   cat > conftest.$ac_ext <<EOF
2610 #line 2611 "configure"
2611 #include "confdefs.h"
2612 #if defined(CRAY) && ! defined(CRAY2)
2613 webecray
2614 #else
2615 wenotbecray
2616 #endif
2617
2618 EOF
2619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2620   egrep "webecray" >/dev/null 2>&1; then
2621   rm -rf conftest*
2622   ac_cv_os_cray=yes
2623 else
2624   rm -rf conftest*
2625   ac_cv_os_cray=no
2626 fi
2627 rm -f conftest*
2628
2629 fi
2630
2631 echo "$ac_t""$ac_cv_os_cray" 1>&6
2632 if test $ac_cv_os_cray = yes; then
2633 for ac_func in _getb67 GETB67 getb67; do
2634   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2635 echo "configure:2636: checking for $ac_func" >&5
2636 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   cat > conftest.$ac_ext <<EOF
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642 /* System header to define __stub macros and hopefully few prototypes,
2643     which can conflict with char $ac_func(); below.  */
2644 #include <assert.h>
2645 /* Override any gcc2 internal prototype to avoid an error.  */
2646 /* We use char because int might match the return type of a gcc2
2647     builtin and then its argument prototype would still apply.  */
2648 char $ac_func();
2649 char (*f)();
2650
2651 int main() {
2652
2653 /* The GNU C library defines this for functions which it implements
2654     to always fail with ENOSYS.  Some functions are actually named
2655     something starting with __ and the normal name is an alias.  */
2656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2657 choke me
2658 #else
2659 f = $ac_func;
2660 #endif
2661
2662 ; return 0; }
2663 EOF
2664 if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2665   rm -rf conftest*
2666   eval "ac_cv_func_$ac_func=yes"
2667 else
2668   echo "configure: failed program was:" >&5
2669   cat conftest.$ac_ext >&5
2670   rm -rf conftest*
2671   eval "ac_cv_func_$ac_func=no"
2672 fi
2673 rm -f conftest*
2674 fi
2675
2676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2677   echo "$ac_t""yes" 1>&6
2678   cat >> confdefs.h <<EOF
2679 #define CRAY_STACKSEG_END $ac_func
2680 EOF
2681
2682   break
2683 else
2684   echo "$ac_t""no" 1>&6
2685 fi
2686
2687 done
2688 fi
2689
2690 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2691 echo "configure:2692: checking stack direction for C alloca" >&5
2692 if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then
2693   echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695   if test "$cross_compiling" = yes; then
2696   ac_cv_c_stack_direction=0
2697 else
2698   cat > conftest.$ac_ext <<EOF
2699 #line 2700 "configure"
2700 #include "confdefs.h"
2701 find_stack_direction ()
2702 {
2703   static char *addr = 0;
2704   auto char dummy;
2705   if (addr == 0)
2706     {
2707       addr = &dummy;
2708       return find_stack_direction ();
2709     }
2710   else
2711     return (&dummy > addr) ? 1 : -1;
2712 }
2713 main ()
2714 {
2715   exit (find_stack_direction() < 0);
2716 }
2717 EOF
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2719 then
2720   ac_cv_c_stack_direction=1
2721 else
2722   echo "configure: failed program was:" >&5
2723   cat conftest.$ac_ext >&5
2724   rm -fr conftest*
2725   ac_cv_c_stack_direction=-1
2726 fi
2727 rm -fr conftest*
2728 fi
2729
2730 fi
2731
2732 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2733 cat >> confdefs.h <<EOF
2734 #define STACK_DIRECTION $ac_cv_c_stack_direction
2735 EOF
2736
2737 fi
2738
2739 for ac_hdr in unistd.h
2740 do
2741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2743 echo "configure:2744: checking for $ac_hdr" >&5
2744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
2745   echo $ac_n "(cached) $ac_c" 1>&6
2746 else
2747   cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750 #include <$ac_hdr>
2751 EOF
2752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2753 { (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2755 if test -z "$ac_err"; then
2756   rm -rf conftest*
2757   eval "ac_cv_header_$ac_safe=yes"
2758 else
2759   echo "$ac_err" >&5
2760   echo "configure: failed program was:" >&5
2761   cat conftest.$ac_ext >&5
2762   rm -rf conftest*
2763   eval "ac_cv_header_$ac_safe=no"
2764 fi
2765 rm -f conftest*
2766 fi
2767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2768   echo "$ac_t""yes" 1>&6
2769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2770   cat >> confdefs.h <<EOF
2771 #define $ac_tr_hdr 1
2772 EOF
2773  
2774 else
2775   echo "$ac_t""no" 1>&6
2776 fi
2777 done
2778
2779 for ac_func in getpagesize
2780 do
2781 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2782 echo "configure:2783: checking for $ac_func" >&5
2783 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789 /* System header to define __stub macros and hopefully few prototypes,
2790     which can conflict with char $ac_func(); below.  */
2791 #include <assert.h>
2792 /* Override any gcc2 internal prototype to avoid an error.  */
2793 /* We use char because int might match the return type of a gcc2
2794     builtin and then its argument prototype would still apply.  */
2795 char $ac_func();
2796 char (*f)();
2797
2798 int main() {
2799
2800 /* The GNU C library defines this for functions which it implements
2801     to always fail with ENOSYS.  Some functions are actually named
2802     something starting with __ and the normal name is an alias.  */
2803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2804 choke me
2805 #else
2806 f = $ac_func;
2807 #endif
2808
2809 ; return 0; }
2810 EOF
2811 if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2812   rm -rf conftest*
2813   eval "ac_cv_func_$ac_func=yes"
2814 else
2815   echo "configure: failed program was:" >&5
2816   cat conftest.$ac_ext >&5
2817   rm -rf conftest*
2818   eval "ac_cv_func_$ac_func=no"
2819 fi
2820 rm -f conftest*
2821 fi
2822
2823 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2824   echo "$ac_t""yes" 1>&6
2825     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2826   cat >> confdefs.h <<EOF
2827 #define $ac_tr_func 1
2828 EOF
2829  
2830 else
2831   echo "$ac_t""no" 1>&6
2832 fi
2833 done
2834
2835 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2836 echo "configure:2837: checking for working mmap" >&5
2837 if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then
2838   echo $ac_n "(cached) $ac_c" 1>&6
2839 else
2840   if test "$cross_compiling" = yes; then
2841   ac_cv_func_mmap_fixed_mapped=no
2842 else
2843   cat > conftest.$ac_ext <<EOF
2844 #line 2845 "configure"
2845 #include "confdefs.h"
2846
2847 /* Thanks to Mike Haertel and Jim Avera for this test.
2848    Here is a matrix of mmap possibilities:
2849         mmap private not fixed
2850         mmap private fixed at somewhere currently unmapped
2851         mmap private fixed at somewhere already mapped
2852         mmap shared not fixed
2853         mmap shared fixed at somewhere currently unmapped
2854         mmap shared fixed at somewhere already mapped
2855    For private mappings, we should verify that changes cannot be read()
2856    back from the file, nor mmap's back from the file at a different
2857    address.  (There have been systems where private was not correctly
2858    implemented like the infamous i386 svr4.0, and systems where the
2859    VM page cache was not coherent with the filesystem buffer cache
2860    like early versions of FreeBSD and possibly contemporary NetBSD.)
2861    For shared mappings, we should conversely verify that changes get
2862    propogated back to all the places they're supposed to be.
2863
2864    Grep wants private fixed already mapped.
2865    The main things grep needs to know about mmap are:
2866    * does it exist and is it safe to write into the mmap'd area
2867    * how to use it (BSD variants)  */
2868 #include <sys/types.h>
2869 #include <fcntl.h>
2870 #include <sys/mman.h>
2871
2872 /* This mess was copied from the GNU getpagesize.h.  */
2873 #ifndef HAVE_GETPAGESIZE
2874 # ifdef HAVE_UNISTD_H
2875 #  include <unistd.h>
2876 # endif
2877
2878 /* Assume that all systems that can run configure have sys/param.h.  */
2879 # ifndef HAVE_SYS_PARAM_H
2880 #  define HAVE_SYS_PARAM_H 1
2881 # endif
2882
2883 # ifdef _SC_PAGESIZE
2884 #  define getpagesize() sysconf(_SC_PAGESIZE)
2885 # else /* no _SC_PAGESIZE */
2886 #  ifdef HAVE_SYS_PARAM_H
2887 #   include <sys/param.h>
2888 #   ifdef EXEC_PAGESIZE
2889 #    define getpagesize() EXEC_PAGESIZE
2890 #   else /* no EXEC_PAGESIZE */
2891 #    ifdef NBPG
2892 #     define getpagesize() NBPG * CLSIZE
2893 #     ifndef CLSIZE
2894 #      define CLSIZE 1
2895 #     endif /* no CLSIZE */
2896 #    else /* no NBPG */
2897 #     ifdef NBPC
2898 #      define getpagesize() NBPC
2899 #     else /* no NBPC */
2900 #      ifdef PAGESIZE
2901 #       define getpagesize() PAGESIZE
2902 #      endif /* PAGESIZE */
2903 #     endif /* no NBPC */
2904 #    endif /* no NBPG */
2905 #   endif /* no EXEC_PAGESIZE */
2906 #  else /* no HAVE_SYS_PARAM_H */
2907 #   define getpagesize() 8192   /* punt totally */
2908 #  endif /* no HAVE_SYS_PARAM_H */
2909 # endif /* no _SC_PAGESIZE */
2910
2911 #endif /* no HAVE_GETPAGESIZE */
2912
2913 #ifdef __cplusplus
2914 extern "C" { void *malloc(unsigned); }
2915 #else
2916 char *malloc();
2917 #endif
2918
2919 int
2920 main()
2921 {
2922         char *data, *data2, *data3;
2923         int i, pagesize;
2924         int fd;
2925
2926         pagesize = getpagesize();
2927
2928         /*
2929          * First, make a file with some known garbage in it.
2930          */
2931         data = malloc(pagesize);
2932         if (!data)
2933                 exit(1);
2934         for (i = 0; i < pagesize; ++i)
2935                 *(data + i) = rand();
2936         umask(0);
2937         fd = creat("conftestmmap", 0600);
2938         if (fd < 0)
2939                 exit(1);
2940         if (write(fd, data, pagesize) != pagesize)
2941                 exit(1);
2942         close(fd);
2943
2944         /*
2945          * Next, try to mmap the file at a fixed address which
2946          * already has something else allocated at it.  If we can,
2947          * also make sure that we see the same garbage.
2948          */
2949         fd = open("conftestmmap", O_RDWR);
2950         if (fd < 0)
2951                 exit(1);
2952         data2 = malloc(2 * pagesize);
2953         if (!data2)
2954                 exit(1);
2955         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2956         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2957             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2958                 exit(1);
2959         for (i = 0; i < pagesize; ++i)
2960                 if (*(data + i) != *(data2 + i))
2961                         exit(1);
2962
2963         /*
2964          * Finally, make sure that changes to the mapped area
2965          * do not percolate back to the file as seen by read().
2966          * (This is a bug on some variants of i386 svr4.0.)
2967          */
2968         for (i = 0; i < pagesize; ++i)
2969                 *(data2 + i) = *(data2 + i) + 1;
2970         data3 = malloc(pagesize);
2971         if (!data3)
2972                 exit(1);
2973         if (read(fd, data3, pagesize) != pagesize)
2974                 exit(1);
2975         for (i = 0; i < pagesize; ++i)
2976                 if (*(data + i) != *(data3 + i))
2977                         exit(1);
2978         close(fd);
2979         unlink("conftestmmap");
2980         exit(0);
2981 }
2982
2983 EOF
2984 if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2985 then
2986   ac_cv_func_mmap_fixed_mapped=yes
2987 else
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   rm -fr conftest*
2991   ac_cv_func_mmap_fixed_mapped=no
2992 fi
2993 rm -fr conftest*
2994 fi
2995
2996 fi
2997
2998 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2999 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3000   cat >> confdefs.h <<\EOF
3001 #define HAVE_MMAP 1
3002 EOF
3003
3004 fi
3005
3006                               
3007    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3008 unistd.h values.h sys/param.h
3009 do
3010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3012 echo "configure:3013: checking for $ac_hdr" >&5
3013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   cat > conftest.$ac_ext <<EOF
3017 #line 3018 "configure"
3018 #include "confdefs.h"
3019 #include <$ac_hdr>
3020 EOF
3021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3022 { (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3024 if test -z "$ac_err"; then
3025   rm -rf conftest*
3026   eval "ac_cv_header_$ac_safe=yes"
3027 else
3028   echo "$ac_err" >&5
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -rf conftest*
3032   eval "ac_cv_header_$ac_safe=no"
3033 fi
3034 rm -f conftest*
3035 fi
3036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3037   echo "$ac_t""yes" 1>&6
3038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3039   cat >> confdefs.h <<EOF
3040 #define $ac_tr_hdr 1
3041 EOF
3042  
3043 else
3044   echo "$ac_t""no" 1>&6
3045 fi
3046 done
3047
3048    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3049 __argz_count __argz_stringify __argz_next
3050 do
3051 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3052 echo "configure:3053: checking for $ac_func" >&5
3053 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* System header to define __stub macros and hopefully few prototypes,
3060     which can conflict with char $ac_func(); below.  */
3061 #include <assert.h>
3062 /* Override any gcc2 internal prototype to avoid an error.  */
3063 /* We use char because int might match the return type of a gcc2
3064     builtin and then its argument prototype would still apply.  */
3065 char $ac_func();
3066 char (*f)();
3067
3068 int main() {
3069
3070 /* The GNU C library defines this for functions which it implements
3071     to always fail with ENOSYS.  Some functions are actually named
3072     something starting with __ and the normal name is an alias.  */
3073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3074 choke me
3075 #else
3076 f = $ac_func;
3077 #endif
3078
3079 ; return 0; }
3080 EOF
3081 if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3082   rm -rf conftest*
3083   eval "ac_cv_func_$ac_func=yes"
3084 else
3085   echo "configure: failed program was:" >&5
3086   cat conftest.$ac_ext >&5
3087   rm -rf conftest*
3088   eval "ac_cv_func_$ac_func=no"
3089 fi
3090 rm -f conftest*
3091 fi
3092
3093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3094   echo "$ac_t""yes" 1>&6
3095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3096   cat >> confdefs.h <<EOF
3097 #define $ac_tr_func 1
3098 EOF
3099  
3100 else
3101   echo "$ac_t""no" 1>&6
3102 fi
3103 done
3104
3105
3106    if test "${ac_cv_func_stpcpy+set}" != "set"; then
3107      for ac_func in stpcpy
3108 do
3109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3110 echo "configure:3111: checking for $ac_func" >&5
3111 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   cat > conftest.$ac_ext <<EOF
3115 #line 3116 "configure"
3116 #include "confdefs.h"
3117 /* System header to define __stub macros and hopefully few prototypes,
3118     which can conflict with char $ac_func(); below.  */
3119 #include <assert.h>
3120 /* Override any gcc2 internal prototype to avoid an error.  */
3121 /* We use char because int might match the return type of a gcc2
3122     builtin and then its argument prototype would still apply.  */
3123 char $ac_func();
3124 char (*f)();
3125
3126 int main() {
3127
3128 /* The GNU C library defines this for functions which it implements
3129     to always fail with ENOSYS.  Some functions are actually named
3130     something starting with __ and the normal name is an alias.  */
3131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3132 choke me
3133 #else
3134 f = $ac_func;
3135 #endif
3136
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3140   rm -rf conftest*
3141   eval "ac_cv_func_$ac_func=yes"
3142 else
3143   echo "configure: failed program was:" >&5
3144   cat conftest.$ac_ext >&5
3145   rm -rf conftest*
3146   eval "ac_cv_func_$ac_func=no"
3147 fi
3148 rm -f conftest*
3149 fi
3150
3151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3152   echo "$ac_t""yes" 1>&6
3153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3154   cat >> confdefs.h <<EOF
3155 #define $ac_tr_func 1
3156 EOF
3157  
3158 else
3159   echo "$ac_t""no" 1>&6
3160 fi
3161 done
3162
3163    fi
3164    if test "${ac_cv_func_stpcpy}" = "yes"; then
3165      cat >> confdefs.h <<\EOF
3166 #define HAVE_STPCPY 1
3167 EOF
3168
3169    fi
3170
3171    if test $ac_cv_header_locale_h = yes; then
3172     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3173 echo "configure:3174: checking for LC_MESSAGES" >&5
3174 if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   cat > conftest.$ac_ext <<EOF
3178 #line 3179 "configure"
3179 #include "confdefs.h"
3180 #include <locale.h>
3181 int main() {
3182 return LC_MESSAGES
3183 ; return 0; }
3184 EOF
3185 if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3186   rm -rf conftest*
3187   am_cv_val_LC_MESSAGES=yes
3188 else
3189   echo "configure: failed program was:" >&5
3190   cat conftest.$ac_ext >&5
3191   rm -rf conftest*
3192   am_cv_val_LC_MESSAGES=no
3193 fi
3194 rm -f conftest*
3195 fi
3196
3197 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3198     if test $am_cv_val_LC_MESSAGES = yes; then
3199       cat >> confdefs.h <<\EOF
3200 #define HAVE_LC_MESSAGES 1
3201 EOF
3202
3203     fi
3204   fi
3205    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3206 echo "configure:3207: checking whether NLS is requested" >&5
3207         # Check whether --enable-nls or --disable-nls was given.
3208 if test "${enable_nls+set}" = set; then
3209   enableval="$enable_nls"
3210   USE_NLS=$enableval
3211 else
3212   USE_NLS=yes
3213 fi
3214
3215     echo "$ac_t""$USE_NLS" 1>&6
3216     
3217
3218     USE_INCLUDED_LIBINTL=no
3219
3220         if test "$USE_NLS" = "yes"; then
3221       cat >> confdefs.h <<\EOF
3222 #define ENABLE_NLS 1
3223 EOF
3224
3225       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3226 echo "configure:3227: checking whether included gettext is requested" >&5
3227       # Check whether --with-included-gettext or --without-included-gettext was given.
3228 if test "${with_included_gettext+set}" = set; then
3229   withval="$with_included_gettext"
3230   nls_cv_force_use_gnu_gettext=$withval
3231 else
3232   nls_cv_force_use_gnu_gettext=no
3233 fi
3234
3235       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3236
3237       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3238       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3239                                         nls_cv_header_intl=
3240         nls_cv_header_libgt=
3241         CATOBJEXT=NONE
3242
3243         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3244 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3245 echo "configure:3246: checking for libintl.h" >&5
3246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3247   echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <libintl.h>
3253 EOF
3254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3255 { (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3257 if test -z "$ac_err"; then
3258   rm -rf conftest*
3259   eval "ac_cv_header_$ac_safe=yes"
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   eval "ac_cv_header_$ac_safe=no"
3266 fi
3267 rm -f conftest*
3268 fi
3269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3270   echo "$ac_t""yes" 1>&6
3271   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3272 echo "configure:3273: checking for gettext in libc" >&5
3273 if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then
3274   echo $ac_n "(cached) $ac_c" 1>&6
3275 else
3276   cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <libintl.h>
3280 int main() {
3281 return (int) gettext ("")
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3285   rm -rf conftest*
3286   gt_cv_func_gettext_libc=yes
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291   gt_cv_func_gettext_libc=no
3292 fi
3293 rm -f conftest*
3294 fi
3295
3296 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3297
3298            if test "$gt_cv_func_gettext_libc" != "yes"; then
3299              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3300 echo "configure:3301: checking for bindtextdomain in -lintl" >&5
3301 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'`
3302 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   ac_save_LIBS="$LIBS"
3306 LIBS="-lintl  $LIBS"
3307 cat > conftest.$ac_ext <<EOF
3308 #line 3309 "configure"
3309 #include "confdefs.h"
3310 /* Override any gcc2 internal prototype to avoid an error.  */
3311 /* We use char because int might match the return type of a gcc2
3312     builtin and then its argument prototype would still apply.  */
3313 char bindtextdomain();
3314
3315 int main() {
3316 bindtextdomain()
3317 ; return 0; }
3318 EOF
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320   rm -rf conftest*
3321   eval "ac_cv_lib_$ac_lib_var=yes"
3322 else
3323   echo "configure: failed program was:" >&5
3324   cat conftest.$ac_ext >&5
3325   rm -rf conftest*
3326   eval "ac_cv_lib_$ac_lib_var=no"
3327 fi
3328 rm -f conftest*
3329 LIBS="$ac_save_LIBS"
3330
3331 fi
3332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3333   echo "$ac_t""yes" 1>&6
3334   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3335 echo "configure:3336: checking for gettext in libintl" >&5
3336 if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then
3337   echo $ac_n "(cached) $ac_c" 1>&6
3338 else
3339   cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342
3343 int main() {
3344 return (int) gettext ("")
3345 ; return 0; }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3348   rm -rf conftest*
3349   gt_cv_func_gettext_libintl=yes
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -rf conftest*
3354   gt_cv_func_gettext_libintl=no
3355 fi
3356 rm -f conftest*
3357 fi
3358
3359 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3360 else
3361   echo "$ac_t""no" 1>&6
3362 fi
3363
3364            fi
3365
3366            if test "$gt_cv_func_gettext_libc" = "yes" \
3367               || test "$gt_cv_func_gettext_libintl" = "yes"; then
3368               cat >> confdefs.h <<\EOF
3369 #define HAVE_GETTEXT 1
3370 EOF
3371
3372               # Extract the first word of "msgfmt", so it can be a program name with args.
3373 set dummy msgfmt; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   case "$MSGFMT" in
3380   /*)
3381   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3382   ;;
3383   *)
3384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3385   for ac_dir in $PATH; do
3386     test -z "$ac_dir" && ac_dir=.
3387     if test -f $ac_dir/$ac_word; then
3388       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3389         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3390         break
3391       fi
3392     fi
3393   done
3394   IFS="$ac_save_ifs"
3395   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3396   ;;
3397 esac
3398 fi
3399 MSGFMT="$ac_cv_path_MSGFMT"
3400 if test -n "$MSGFMT"; then
3401   echo "$ac_t""$MSGFMT" 1>&6
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405               if test "$MSGFMT" != "no"; then
3406                 for ac_func in dcgettext
3407 do
3408 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3409 echo "configure:3410: checking for $ac_func" >&5
3410 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 /* System header to define __stub macros and hopefully few prototypes,
3417     which can conflict with char $ac_func(); below.  */
3418 #include <assert.h>
3419 /* Override any gcc2 internal prototype to avoid an error.  */
3420 /* We use char because int might match the return type of a gcc2
3421     builtin and then its argument prototype would still apply.  */
3422 char $ac_func();
3423 char (*f)();
3424
3425 int main() {
3426
3427 /* The GNU C library defines this for functions which it implements
3428     to always fail with ENOSYS.  Some functions are actually named
3429     something starting with __ and the normal name is an alias.  */
3430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3431 choke me
3432 #else
3433 f = $ac_func;
3434 #endif
3435
3436 ; return 0; }
3437 EOF
3438 if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3439   rm -rf conftest*
3440   eval "ac_cv_func_$ac_func=yes"
3441 else
3442   echo "configure: failed program was:" >&5
3443   cat conftest.$ac_ext >&5
3444   rm -rf conftest*
3445   eval "ac_cv_func_$ac_func=no"
3446 fi
3447 rm -f conftest*
3448 fi
3449
3450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3451   echo "$ac_t""yes" 1>&6
3452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3453   cat >> confdefs.h <<EOF
3454 #define $ac_tr_func 1
3455 EOF
3456  
3457 else
3458   echo "$ac_t""no" 1>&6
3459 fi
3460 done
3461
3462                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3463 set dummy gmsgfmt; ac_word=$2
3464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3465 echo "configure:3466: checking for $ac_word" >&5
3466 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   case "$GMSGFMT" in
3470   /*)
3471   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3472   ;;
3473   ?:/*)                  
3474   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3475   ;;
3476   *)
3477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3478   ac_dummy="$PATH"
3479   for ac_dir in $ac_dummy; do 
3480     test -z "$ac_dir" && ac_dir=.
3481     if test -f $ac_dir/$ac_word; then
3482       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3483       break
3484     fi
3485   done
3486   IFS="$ac_save_ifs"
3487   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3488   ;;
3489 esac
3490 fi
3491 GMSGFMT="$ac_cv_path_GMSGFMT"
3492 if test -n "$GMSGFMT"; then
3493   echo "$ac_t""$GMSGFMT" 1>&6
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497
3498                 # Extract the first word of "xgettext", so it can be a program name with args.
3499 set dummy xgettext; ac_word=$2
3500 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3501 echo "configure:3502: checking for $ac_word" >&5
3502 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   case "$XGETTEXT" in
3506   /*)
3507   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3508   ;;
3509   *)
3510   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3511   for ac_dir in $PATH; do
3512     test -z "$ac_dir" && ac_dir=.
3513     if test -f $ac_dir/$ac_word; then
3514       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3515         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3516         break
3517       fi
3518     fi
3519   done
3520   IFS="$ac_save_ifs"
3521   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3522   ;;
3523 esac
3524 fi
3525 XGETTEXT="$ac_cv_path_XGETTEXT"
3526 if test -n "$XGETTEXT"; then
3527   echo "$ac_t""$XGETTEXT" 1>&6
3528 else
3529   echo "$ac_t""no" 1>&6
3530 fi
3531
3532                 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535
3536 int main() {
3537 extern int _nl_msg_cat_cntr;
3538                                return _nl_msg_cat_cntr
3539 ; return 0; }
3540 EOF
3541 if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3542   rm -rf conftest*
3543   CATOBJEXT=.gmo
3544                    DATADIRNAME=share
3545 else
3546   echo "configure: failed program was:" >&5
3547   cat conftest.$ac_ext >&5
3548   rm -rf conftest*
3549   CATOBJEXT=.mo
3550                    DATADIRNAME=lib
3551 fi
3552 rm -f conftest*
3553                 INSTOBJEXT=.mo
3554               fi
3555             fi
3556         
3557 else
3558   echo "$ac_t""no" 1>&6
3559 fi
3560
3561
3562                 
3563         if test "$CATOBJEXT" = "NONE"; then
3564                           nls_cv_use_gnu_gettext=yes
3565         fi
3566       fi
3567
3568       if test "$nls_cv_use_gnu_gettext" = "yes"; then
3569                 INTLOBJS="\$(GETTOBJS)"
3570         # Extract the first word of "msgfmt", so it can be a program name with args.
3571 set dummy msgfmt; ac_word=$2
3572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3573 echo "configure:3574: checking for $ac_word" >&5
3574 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   case "$MSGFMT" in
3578   /*)
3579   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3580   ;;
3581   *)
3582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3583   for ac_dir in $PATH; do
3584     test -z "$ac_dir" && ac_dir=.
3585     if test -f $ac_dir/$ac_word; then
3586       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3587         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3588         break
3589       fi
3590     fi
3591   done
3592   IFS="$ac_save_ifs"
3593   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3594   ;;
3595 esac
3596 fi
3597 MSGFMT="$ac_cv_path_MSGFMT"
3598 if test -n "$MSGFMT"; then
3599   echo "$ac_t""$MSGFMT" 1>&6
3600 else
3601   echo "$ac_t""no" 1>&6
3602 fi
3603
3604         # Extract the first word of "gmsgfmt", so it can be a program name with args.
3605 set dummy gmsgfmt; ac_word=$2
3606 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3607 echo "configure:3608: checking for $ac_word" >&5
3608 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   case "$GMSGFMT" in
3612   /*)
3613   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3614   ;;
3615   ?:/*)                  
3616   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3617   ;;
3618   *)
3619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3620   ac_dummy="$PATH"
3621   for ac_dir in $ac_dummy; do 
3622     test -z "$ac_dir" && ac_dir=.
3623     if test -f $ac_dir/$ac_word; then
3624       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3625       break
3626     fi
3627   done
3628   IFS="$ac_save_ifs"
3629   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3630   ;;
3631 esac
3632 fi
3633 GMSGFMT="$ac_cv_path_GMSGFMT"
3634 if test -n "$GMSGFMT"; then
3635   echo "$ac_t""$GMSGFMT" 1>&6
3636 else
3637   echo "$ac_t""no" 1>&6
3638 fi
3639
3640         # Extract the first word of "xgettext", so it can be a program name with args.
3641 set dummy xgettext; ac_word=$2
3642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3643 echo "configure:3644: checking for $ac_word" >&5
3644 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   case "$XGETTEXT" in
3648   /*)
3649   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3650   ;;
3651   *)
3652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3653   for ac_dir in $PATH; do
3654     test -z "$ac_dir" && ac_dir=.
3655     if test -f $ac_dir/$ac_word; then
3656       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3657         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3658         break
3659       fi
3660     fi
3661   done
3662   IFS="$ac_save_ifs"
3663   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3664   ;;
3665 esac
3666 fi
3667 XGETTEXT="$ac_cv_path_XGETTEXT"
3668 if test -n "$XGETTEXT"; then
3669   echo "$ac_t""$XGETTEXT" 1>&6
3670 else
3671   echo "$ac_t""no" 1>&6
3672 fi
3673
3674         
3675         USE_INCLUDED_LIBINTL=yes
3676         CATOBJEXT=.gmo
3677         INSTOBJEXT=.mo
3678         DATADIRNAME=share
3679         INTLDEPS='$(top_builddir)/../intl/libintl.a'
3680         INTLLIBS=$INTLDEPS
3681         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3682         nls_cv_header_intl=libintl.h
3683         nls_cv_header_libgt=libgettext.h
3684       fi
3685
3686             if test "$XGETTEXT" != ":"; then
3687                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3688           : ;
3689         else
3690           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3691           XGETTEXT=":"
3692         fi
3693       fi
3694
3695       # We need to process the po/ directory.
3696       POSUB=po
3697     else
3698       DATADIRNAME=share
3699       nls_cv_header_intl=libintl.h
3700       nls_cv_header_libgt=libgettext.h
3701     fi
3702
3703     # If this is used in GNU gettext we have to set USE_NLS to `yes'
3704     # because some of the sources are only built for this goal.
3705     if test "$PACKAGE" = gettext; then
3706       USE_NLS=yes
3707       USE_INCLUDED_LIBINTL=yes
3708     fi
3709
3710                 for lang in $ALL_LINGUAS; do
3711       GMOFILES="$GMOFILES $lang.gmo"
3712       POFILES="$POFILES $lang.po"
3713     done
3714
3715         
3716     
3717     
3718     
3719     
3720     
3721     
3722     
3723     
3724     
3725     
3726   
3727
3728    if test "x$CATOBJEXT" != "x"; then
3729      if test "x$ALL_LINGUAS" = "x"; then
3730        LINGUAS=
3731      else
3732        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3733 echo "configure:3734: checking for catalogs to be installed" >&5
3734        NEW_LINGUAS=
3735        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3736          case "$ALL_LINGUAS" in
3737           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3738          esac
3739        done
3740        LINGUAS=$NEW_LINGUAS
3741        echo "$ac_t""$LINGUAS" 1>&6
3742      fi
3743
3744           if test -n "$LINGUAS"; then
3745        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3746      fi
3747    fi
3748
3749             if test $ac_cv_header_locale_h = yes; then
3750      INCLUDE_LOCALE_H="#include <locale.h>"
3751    else
3752      INCLUDE_LOCALE_H="\
3753 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
3754    fi
3755    
3756
3757             if test -f $srcdir/po2tbl.sed.in; then
3758       if test "$CATOBJEXT" = ".cat"; then
3759          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3760 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3761 echo "configure:3762: checking for linux/version.h" >&5
3762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3763   echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765   cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 #include <linux/version.h>
3769 EOF
3770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3771 { (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3773 if test -z "$ac_err"; then
3774   rm -rf conftest*
3775   eval "ac_cv_header_$ac_safe=yes"
3776 else
3777   echo "$ac_err" >&5
3778   echo "configure: failed program was:" >&5
3779   cat conftest.$ac_ext >&5
3780   rm -rf conftest*
3781   eval "ac_cv_header_$ac_safe=no"
3782 fi
3783 rm -f conftest*
3784 fi
3785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3786   echo "$ac_t""yes" 1>&6
3787   msgformat=linux
3788 else
3789   echo "$ac_t""no" 1>&6
3790 msgformat=xopen
3791 fi
3792
3793
3794                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3795       fi
3796             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3797          $srcdir/po2tbl.sed.in > po2tbl.sed
3798    fi
3799
3800             if test "$PACKAGE" = "gettext"; then
3801      GT_NO="#NO#"
3802      GT_YES=
3803    else
3804      GT_NO=
3805      GT_YES="#YES#"
3806    fi
3807    
3808    
3809
3810    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3811    
3812
3813       l=
3814    
3815
3816             if test -d $srcdir/po; then
3817       test -d po || mkdir po
3818       if test "x$srcdir" != "x."; then
3819          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3820             posrcprefix="$srcdir/"
3821          else
3822             posrcprefix="../$srcdir/"
3823          fi
3824       else
3825          posrcprefix="../"
3826       fi
3827       rm -f po/POTFILES
3828       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3829          < $srcdir/po/POTFILES.in > po/POTFILES
3830    fi
3831   
3832
3833 . ${srcdir}/../bfd/configure.host
3834
3835
3836 # Find a good install program.  We prefer a C program (faster),
3837 # so one script is as good as another.  But avoid the broken or
3838 # incompatible versions:
3839 # SysV /etc/install, /usr/sbin/install
3840 # SunOS /usr/etc/install
3841 # IRIX /sbin/install
3842 # AIX /bin/install
3843 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3844 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3845 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3846 # ./install, which can be erroneously created by make from ./install.sh.
3847 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3848 echo "configure:3849: checking for a BSD compatible install" >&5
3849 if test -z "$INSTALL"; then
3850 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3854   for ac_dir in $PATH; do
3855     # Account for people who put trailing slashes in PATH elements.
3856     case "$ac_dir/" in
3857     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3858     *)
3859       # OSF1 and SCO ODT 3.0 have their own names for install.
3860       # Don't use installbsd from OSF since it installs stuff as root
3861       # by default.
3862       for ac_prog in ginstall scoinst install; do
3863         if test -f $ac_dir/$ac_prog; then
3864           if test $ac_prog = install &&
3865             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3866             # AIX install.  It has an incompatible calling convention.
3867             :
3868           elif test $ac_prog = install &&
3869             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3870             # program-specific install script used by HP pwplus--don't use.
3871             :
3872           else
3873             ac_cv_path_install="$ac_dir/$ac_prog -c"
3874             break 2
3875           fi
3876         fi
3877       done
3878       ;;
3879     esac
3880   done
3881   IFS="$ac_save_IFS"
3882
3883 fi
3884   if test "${ac_cv_path_install+set}" = set; then
3885     INSTALL="$ac_cv_path_install"
3886   else
3887     # As a last resort, use the slow shell script.  We don't cache a
3888     # path for INSTALL within a source directory, because that will
3889     # break other packages using the cache if that directory is
3890     # removed, or if the path is relative.
3891     INSTALL="$ac_install_sh"
3892   fi
3893 fi
3894 echo "$ac_t""$INSTALL" 1>&6
3895
3896 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3897 # It thinks the first close brace ends the variable substitution.
3898 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3899
3900 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3901
3902 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3903
3904
3905 for ac_hdr in string.h strings.h stdlib.h
3906 do
3907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3909 echo "configure:3910: checking for $ac_hdr" >&5
3910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <$ac_hdr>
3917 EOF
3918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3919 { (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3921 if test -z "$ac_err"; then
3922   rm -rf conftest*
3923   eval "ac_cv_header_$ac_safe=yes"
3924 else
3925   echo "$ac_err" >&5
3926   echo "configure: failed program was:" >&5
3927   cat conftest.$ac_ext >&5
3928   rm -rf conftest*
3929   eval "ac_cv_header_$ac_safe=no"
3930 fi
3931 rm -f conftest*
3932 fi
3933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3934   echo "$ac_t""yes" 1>&6
3935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3936   cat >> confdefs.h <<EOF
3937 #define $ac_tr_hdr 1
3938 EOF
3939  
3940 else
3941   echo "$ac_t""no" 1>&6
3942 fi
3943 done
3944
3945
3946
3947 using_cgen=no
3948
3949 # Horrible hacks to build DLLs on Windows.
3950 WIN32LDFLAGS=
3951 WIN32LIBADD=
3952 case "${host}" in
3953 *-*-cygwin*)
3954   if test "$enable_shared" = "yes"; then
3955     WIN32LDFLAGS="-no-undefined"
3956     WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
3957   fi
3958   ;;
3959 esac
3960
3961
3962
3963 # target-specific stuff:
3964
3965 # Canonicalize the secondary target names.
3966 if test -n "$enable_targets" ; then
3967     for targ in `echo $enable_targets | sed 's/,/ /g'`
3968     do
3969         result=`$ac_config_sub $targ 2>/dev/null`
3970         if test -n "$result" ; then
3971             canon_targets="$canon_targets $result"
3972         else
3973             # Allow targets that config.sub doesn't recognize, like "all".
3974             canon_targets="$canon_targets $targ"
3975         fi
3976     done
3977 fi
3978
3979 all_targets=false
3980 selarchs=
3981 for targ in $target $canon_targets
3982 do
3983     if test "x$targ" = "xall" ; then
3984         all_targets=true
3985     else
3986         . $srcdir/../bfd/config.bfd
3987         selarchs="$selarchs $targ_archs"
3988     fi
3989 done    
3990
3991 # Utility var, documents generic cgen support files.
3992
3993 cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
3994
3995 # We don't do any links based on the target system, just makefile config.
3996
3997 if test x${all_targets} = xfalse ; then
3998
3999     # Target architecture .o files.
4000     ta=
4001
4002     for arch in $selarchs
4003     do
4004         ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
4005         archdefs="$archdefs -DARCH_$ad"
4006         case "$arch" in
4007         bfd_a29k_arch)          ta="$ta a29k-dis.lo" ;;
4008         bfd_alliant_arch)       ;;
4009         bfd_alpha_arch)         ta="$ta alpha-dis.lo alpha-opc.lo" ;;
4010         bfd_arc_arch)           ta="$ta arc-dis.lo arc-opc.lo" ;;
4011         bfd_arm_arch)           ta="$ta arm-dis.lo" ;;
4012         bfd_avr_arch)           ta="$ta avr-dis.lo" ;;
4013         bfd_convex_arch)        ;;
4014         bfd_d10v_arch)          ta="$ta d10v-dis.lo d10v-opc.lo" ;;
4015         bfd_d30v_arch)          ta="$ta d30v-dis.lo d30v-opc.lo" ;;
4016         bfd_fr30_arch)          ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
4017         bfd_h8300_arch)         ta="$ta h8300-dis.lo" ;;
4018         bfd_h8500_arch)         ta="$ta h8500-dis.lo" ;;
4019         bfd_hppa_arch)          ta="$ta hppa-dis.lo" ;;
4020         bfd_i370_arch)          ta="$ta i370-dis.lo i370-opc.lo" ;;
4021         bfd_i386_arch)          ta="$ta i386-dis.lo" ;;
4022         bfd_i860_arch)          ;;
4023         bfd_i960_arch)          ta="$ta i960-dis.lo" ;;
4024         bfd_m32r_arch)          ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
4025         bfd_m68k_arch)          ta="$ta m68k-dis.lo m68k-opc.lo" ;;
4026         bfd_m88k_arch)          ta="$ta m88k-dis.lo" ;;
4027         bfd_mcore_arch)         ta="$ta mcore-dis.lo" ;;
4028         bfd_mips_arch)          ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
4029         bfd_mn10200_arch)       ta="$ta m10200-dis.lo m10200-opc.lo" ;;
4030         bfd_mn10300_arch)       ta="$ta m10300-dis.lo m10300-opc.lo" ;;
4031         bfd_ns32k_arch)         ta="$ta ns32k-dis.lo" ;;
4032         bfd_pj_arch)            ta="$ta pj-dis.lo pj-opc.lo" ;;
4033         bfd_powerpc_arch)       ta="$ta ppc-dis.lo ppc-opc.lo" ;;
4034         bfd_pyramid_arch)       ;;
4035         bfd_romp_arch)          ;;
4036         bfd_rs6000_arch)        ta="$ta ppc-dis.lo ppc-opc.lo" ;;
4037         bfd_sh_arch)            ta="$ta sh-dis.lo" ;;
4038         bfd_sparc_arch)         ta="$ta sparc-dis.lo sparc-opc.lo" ;;
4039         bfd_tahoe_arch)         ;;
4040         bfd_tic30_arch)         ta="$ta tic30-dis.lo" ;;
4041         bfd_tic80_arch)         ta="$ta tic80-dis.lo tic80-opc.lo" ;;
4042         bfd_v850_arch)          ta="$ta v850-opc.lo v850-dis.lo" ;;
4043         bfd_v850e_arch)         ta="$ta v850-opc.lo v850-dis.lo" ;;
4044         bfd_v850ea_arch)        ta="$ta v850-opc.lo v850-dis.lo" ;;
4045         bfd_vax_arch)           ta="$ta vax-dis.lo" ;;
4046         bfd_w65_arch)           ta="$ta w65-dis.lo" ;;
4047         bfd_we32k_arch)         ;;
4048         bfd_z8k_arch)           ta="$ta z8k-dis.lo" ;;
4049
4050         "")                     ;;
4051         *)              { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
4052         esac
4053     done
4054
4055     if test $using_cgen = yes ; then
4056         ta="$ta $cgen_files"
4057     fi
4058
4059     # Weed out duplicate .o files.
4060     f=""
4061     for i in $ta ; do
4062         case " $f " in
4063         *" $i "*) ;;
4064         *) f="$f $i" ;;
4065         esac
4066     done
4067     ta="$f"
4068
4069     # And duplicate -D flags.
4070     f=""
4071     for i in $archdefs ; do
4072         case " $f " in
4073         *" $i "*) ;;
4074         *) f="$f $i" ;;
4075         esac
4076     done
4077     archdefs="$f"
4078
4079     BFD_MACHINES="$ta"
4080
4081 else    # all_targets is true
4082     archdefs=-DARCH_all
4083     BFD_MACHINES='$(ALL_MACHINES)'
4084 fi
4085
4086
4087
4088
4089 trap '' 1 2 15
4090 cat > confcache <<\EOF
4091 # This file is a shell script that caches the results of configure
4092 # tests run on this system so they can be shared between configure
4093 # scripts and configure runs.  It is not useful on other systems.
4094 # If it contains results you don't want to keep, you may remove or edit it.
4095 #
4096 # By default, configure uses ./config.cache as the cache file,
4097 # creating it if it does not exist already.  You can give configure
4098 # the --cache-file=FILE option to use a different cache file; that is
4099 # what configure does when it calls configure scripts in
4100 # subdirectories, so they share the cache.
4101 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4102 # config.status only pays attention to the cache file if you give it the
4103 # --recheck option to rerun configure.
4104 #
4105 EOF
4106 # The following way of writing the cache mishandles newlines in values,
4107 # but we know of no workaround that is simple, portable, and efficient.
4108 # So, don't put newlines in cache variables' values.
4109 # Ultrix sh set writes to stderr and can't be redirected directly,
4110 # and sets the high bit in the cache file unless we assign to the vars.
4111 (set) 2>&1 |
4112   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4113   *ac_space=\ *)
4114     # `set' does not quote correctly, so add quotes (double-quote substitution
4115     # turns \\\\ into \\, and sed turns \\ into \).
4116     sed -n \
4117       -e "s/'/'\\\\''/g" \
4118       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4119     ;;
4120   *)
4121     # `set' quotes correctly as required by POSIX, so do not add quotes.
4122     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4123     ;;
4124   esac >> confcache
4125 if cmp -s $cache_file confcache; then
4126   :
4127 else
4128   if test -w $cache_file; then
4129     echo "updating cache $cache_file"
4130     cat confcache > $cache_file
4131   else
4132     echo "not updating unwritable cache $cache_file"
4133   fi
4134 fi
4135 rm -f confcache
4136
4137 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4138
4139 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4140 # Let make expand exec_prefix.
4141 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4142
4143 # Any assignment to VPATH causes Sun make to only execute
4144 # the first set of double-colon rules, so remove it if not needed.
4145 # If there is a colon in the path, we need to keep it.
4146 if test "x$srcdir" = x.; then
4147   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4148 fi
4149
4150 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4151
4152 DEFS=-DHAVE_CONFIG_H
4153
4154 # Without the "./", some shells look in PATH for config.status.
4155 : ${CONFIG_STATUS=./config.status}
4156
4157 echo creating $CONFIG_STATUS
4158 rm -f $CONFIG_STATUS
4159 cat > $CONFIG_STATUS <<EOF
4160 #! /bin/sh
4161 # Generated automatically by configure.
4162 # Run this file to recreate the current configuration.
4163 # This directory was configured as follows,
4164 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4165 #
4166 # $0 $ac_configure_args
4167 #
4168 # Compiler output produced by configure, useful for debugging
4169 # configure, is in ./config.log if it exists.
4170
4171 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4172 for ac_option
4173 do
4174   case "\$ac_option" in
4175   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4176     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4177     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4178   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4179     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
4180     exit 0 ;;
4181   -help | --help | --hel | --he | --h)
4182     echo "\$ac_cs_usage"; exit 0 ;;
4183   *) echo "\$ac_cs_usage"; exit 1 ;;
4184   esac
4185 done
4186
4187 ac_given_srcdir=$srcdir
4188 ac_given_INSTALL="$INSTALL"
4189
4190 trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4191 EOF
4192 cat >> $CONFIG_STATUS <<EOF
4193
4194 # Protect against being on the right side of a sed subst in config.status.
4195 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4196  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4197 $ac_vpsub
4198 $extrasub
4199 s%@SHELL@%$SHELL%g
4200 s%@CFLAGS@%$CFLAGS%g
4201 s%@CPPFLAGS@%$CPPFLAGS%g
4202 s%@CXXFLAGS@%$CXXFLAGS%g
4203 s%@FFLAGS@%$FFLAGS%g
4204 s%@DEFS@%$DEFS%g
4205 s%@LDFLAGS@%$LDFLAGS%g
4206 s%@LIBS@%$LIBS%g
4207 s%@exec_prefix@%$exec_prefix%g
4208 s%@prefix@%$prefix%g
4209 s%@program_transform_name@%$program_transform_name%g
4210 s%@bindir@%$bindir%g
4211 s%@sbindir@%$sbindir%g
4212 s%@libexecdir@%$libexecdir%g
4213 s%@datadir@%$datadir%g
4214 s%@sysconfdir@%$sysconfdir%g
4215 s%@sharedstatedir@%$sharedstatedir%g
4216 s%@localstatedir@%$localstatedir%g
4217 s%@libdir@%$libdir%g
4218 s%@includedir@%$includedir%g
4219 s%@oldincludedir@%$oldincludedir%g
4220 s%@infodir@%$infodir%g
4221 s%@mandir@%$mandir%g
4222 s%@host@%$host%g
4223 s%@host_alias@%$host_alias%g
4224 s%@host_cpu@%$host_cpu%g
4225 s%@host_vendor@%$host_vendor%g
4226 s%@host_os@%$host_os%g
4227 s%@target@%$target%g
4228 s%@target_alias@%$target_alias%g
4229 s%@target_cpu@%$target_cpu%g
4230 s%@target_vendor@%$target_vendor%g
4231 s%@target_os@%$target_os%g
4232 s%@build@%$build%g
4233 s%@build_alias@%$build_alias%g
4234 s%@build_cpu@%$build_cpu%g
4235 s%@build_vendor@%$build_vendor%g
4236 s%@build_os@%$build_os%g
4237 s%@CC@%$CC%g
4238 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4239 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4240 s%@INSTALL_DATA@%$INSTALL_DATA%g
4241 s%@PACKAGE@%$PACKAGE%g
4242 s%@VERSION@%$VERSION%g
4243 s%@ACLOCAL@%$ACLOCAL%g
4244 s%@AUTOCONF@%$AUTOCONF%g
4245 s%@AUTOMAKE@%$AUTOMAKE%g
4246 s%@AUTOHEADER@%$AUTOHEADER%g
4247 s%@MAKEINFO@%$MAKEINFO%g
4248 s%@SET_MAKE@%$SET_MAKE%g
4249 s%@AR@%$AR%g
4250 s%@RANLIB@%$RANLIB%g
4251 s%@LN_S@%$LN_S%g
4252 s%@LIBTOOL@%$LIBTOOL%g
4253 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
4254 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
4255 s%@MAINT@%$MAINT%g
4256 s%@EXEEXT@%$EXEEXT%g
4257 s%@CPP@%$CPP%g
4258 s%@ALLOCA@%$ALLOCA%g
4259 s%@USE_NLS@%$USE_NLS%g
4260 s%@MSGFMT@%$MSGFMT%g
4261 s%@GMSGFMT@%$GMSGFMT%g
4262 s%@XGETTEXT@%$XGETTEXT%g
4263 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4264 s%@CATALOGS@%$CATALOGS%g
4265 s%@CATOBJEXT@%$CATOBJEXT%g
4266 s%@DATADIRNAME@%$DATADIRNAME%g
4267 s%@GMOFILES@%$GMOFILES%g
4268 s%@INSTOBJEXT@%$INSTOBJEXT%g
4269 s%@INTLDEPS@%$INTLDEPS%g
4270 s%@INTLLIBS@%$INTLLIBS%g
4271 s%@INTLOBJS@%$INTLOBJS%g
4272 s%@POFILES@%$POFILES%g
4273 s%@POSUB@%$POSUB%g
4274 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
4275 s%@GT_NO@%$GT_NO%g
4276 s%@GT_YES@%$GT_YES%g
4277 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4278 s%@l@%$l%g
4279 s%@HDEFINES@%$HDEFINES%g
4280 s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
4281 s%@WIN32LIBADD@%$WIN32LIBADD%g
4282 s%@archdefs@%$archdefs%g
4283 s%@BFD_MACHINES@%$BFD_MACHINES%g
4284
4285 CEOF
4286 EOF
4287
4288 cat >> $CONFIG_STATUS <<\EOF
4289
4290 # Split the substitutions into bite-sized pieces for seds with
4291 # small command number limits, like on Digital OSF/1 and HP-UX.
4292 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4293 ac_file=1 # Number of current file.
4294 ac_beg=1 # First line for current file.
4295 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4296 ac_more_lines=:
4297 ac_sed_cmds=""
4298 while $ac_more_lines; do
4299   if test $ac_beg -gt 1; then
4300     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4301   else
4302     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4303   fi
4304   if test ! -s conftest.s$ac_file; then
4305     ac_more_lines=false
4306     rm -f conftest.s$ac_file
4307   else
4308     if test -z "$ac_sed_cmds"; then
4309       ac_sed_cmds="sed -f conftest.s$ac_file"
4310     else
4311       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4312     fi
4313     ac_file=`expr $ac_file + 1`
4314     ac_beg=$ac_end
4315     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4316   fi
4317 done
4318 if test -z "$ac_sed_cmds"; then
4319   ac_sed_cmds=cat
4320 fi
4321 EOF
4322
4323 cat >> $CONFIG_STATUS <<EOF
4324
4325 CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
4326 EOF
4327 cat >> $CONFIG_STATUS <<\EOF
4328 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4329   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4330   case "$ac_file" in
4331   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4332        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4333   *) ac_file_in="${ac_file}.in" ;;
4334   esac
4335
4336   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4337
4338   # Remove last slash and all that follows it.  Not all systems have dirname.
4339   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4340   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4341     # The file is in a subdirectory.
4342     test ! -d "$ac_dir" && mkdir "$ac_dir"
4343     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4344     # A "../" for each directory in $ac_dir_suffix.
4345     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4346   else
4347     ac_dir_suffix= ac_dots=
4348   fi
4349
4350   case "$ac_given_srcdir" in
4351   .)  srcdir=.
4352       if test -z "$ac_dots"; then top_srcdir=.
4353       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4354   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4355   *) # Relative path.
4356     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4357     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4358   esac
4359
4360   case "$ac_given_INSTALL" in
4361   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4362   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4363   esac
4364
4365   echo creating "$ac_file"
4366   rm -f "$ac_file"
4367   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4368   case "$ac_file" in
4369   *Makefile*) ac_comsub="1i\\
4370 # $configure_input" ;;
4371   *) ac_comsub= ;;
4372   esac
4373
4374   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4375   sed -e "$ac_comsub
4376 s%@configure_input@%$configure_input%g
4377 s%@srcdir@%$srcdir%g
4378 s%@top_srcdir@%$top_srcdir%g
4379 s%@INSTALL@%$INSTALL%g
4380 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4381 fi; done
4382 rm -f conftest.s*
4383
4384 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4385 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4386 #
4387 # ac_d sets the value in "#define NAME VALUE" lines.
4388 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4389 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4390 ac_dC='\3'
4391 ac_dD='%g'
4392 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4393 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4394 ac_uB='\([      ]\)%\1#\2define\3'
4395 ac_uC=' '
4396 ac_uD='\4%g'
4397 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4398 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4399 ac_eB='$%\1#\2define\3'
4400 ac_eC=' '
4401 ac_eD='%g'
4402
4403 if test "${CONFIG_HEADERS+set}" != set; then
4404 EOF
4405 cat >> $CONFIG_STATUS <<EOF
4406   CONFIG_HEADERS="config.h:config.in"
4407 EOF
4408 cat >> $CONFIG_STATUS <<\EOF
4409 fi
4410 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4411   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4412   case "$ac_file" in
4413   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4414        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4415   *) ac_file_in="${ac_file}.in" ;;
4416   esac
4417
4418   echo creating $ac_file
4419
4420   rm -f conftest.frag conftest.in conftest.out
4421   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4422   cat $ac_file_inputs > conftest.in
4423
4424 EOF
4425
4426 # Transform confdefs.h into a sed script conftest.vals that substitutes
4427 # the proper values into config.h.in to produce config.h.  And first:
4428 # Protect against being on the right side of a sed subst in config.status.
4429 # Protect against being in an unquoted here document in config.status.
4430 rm -f conftest.vals
4431 cat > conftest.hdr <<\EOF
4432 s/[\\&%]/\\&/g
4433 s%[\\$`]%\\&%g
4434 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4435 s%ac_d%ac_u%gp
4436 s%ac_u%ac_e%gp
4437 EOF
4438 sed -n -f conftest.hdr confdefs.h > conftest.vals
4439 rm -f conftest.hdr
4440
4441 # This sed command replaces #undef with comments.  This is necessary, for
4442 # example, in the case of _POSIX_SOURCE, which is predefined and required
4443 # on some systems where configure will not decide to define it.
4444 cat >> conftest.vals <<\EOF
4445 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4446 EOF
4447
4448 # Break up conftest.vals because some shells have a limit on
4449 # the size of here documents, and old seds have small limits too.
4450
4451 rm -f conftest.tail
4452 while :
4453 do
4454   ac_lines=`grep -c . conftest.vals`
4455   # grep -c gives empty output for an empty file on some AIX systems.
4456   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4457   # Write a limited-size here document to conftest.frag.
4458   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4459   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4460   echo 'CEOF
4461   sed -f conftest.frag conftest.in > conftest.out
4462   rm -f conftest.in
4463   mv conftest.out conftest.in
4464 ' >> $CONFIG_STATUS
4465   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4466   rm -f conftest.vals
4467   mv conftest.tail conftest.vals
4468 done
4469 rm -f conftest.vals
4470
4471 cat >> $CONFIG_STATUS <<\EOF
4472   rm -f conftest.frag conftest.h
4473   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4474   cat conftest.in >> conftest.h
4475   rm -f conftest.in
4476   if cmp -s $ac_file conftest.h 2>/dev/null; then
4477     echo "$ac_file is unchanged"
4478     rm -f conftest.h
4479   else
4480     # Remove last slash and all that follows it.  Not all systems have dirname.
4481       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4482       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4483       # The file is in a subdirectory.
4484       test ! -d "$ac_dir" && mkdir "$ac_dir"
4485     fi
4486     rm -f $ac_file
4487     mv conftest.h $ac_file
4488   fi
4489 fi; done
4490
4491 EOF
4492 cat >> $CONFIG_STATUS <<EOF
4493
4494
4495 EOF
4496 cat >> $CONFIG_STATUS <<\EOF
4497 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4498 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
4499 exit 0
4500 EOF
4501 chmod +x $CONFIG_STATUS
4502 rm -fr confdefs* $ac_clean_files
4503 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
4504