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