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