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