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