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