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