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