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