]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
Added Foundry SDK changes.
[thirdparty/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12.2
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --disable-nls do not use Native Language Support"
16 ac_help="$ac_help
17 --with-included-gettext use the GNU gettext library included here"
18 ac_help="$ac_help
19 --enable-netrom "
20 ac_help="$ac_help
21 --with-mmalloc use memory mapped malloc package"
22 ac_help="$ac_help
23 --enable-ide Enable IDE support"
24 ac_help="$ac_help
25 --with-foundry-libs=directory use the Foundry SDK in directory"
26 ac_help="$ac_help
27 --enable-gdbtk "
28 ac_help="$ac_help
29 --with-tclconfig directory containing tcl configuration (tclConfig.sh)"
30 ac_help="$ac_help
31 --with-tkconfig directory containing tk configuration (tkConfig.sh)"
32 ac_help="$ac_help
33 --with-tclinclude directory where tcl private headers are"
34 ac_help="$ac_help
35 --with-tkinclude directory where tk private headers are"
36 ac_help="$ac_help
37 --with-x use the X Window System"
38 ac_help="$ac_help
39 --with-sim-gpu2=path Use GPU2 library under given directory"
40 ac_help="$ac_help
41 --with-sim-funit=path Use target FP lib under given directory"
42 ac_help="$ac_help
43 --enable-shared use shared libraries"
44
45 # Initialize some variables set by options.
46 # The variables have the same names as the options, with
47 # dashes changed to underlines.
48 build=NONE
49 cache_file=./config.cache
50 exec_prefix=NONE
51 host=NONE
52 no_create=
53 nonopt=NONE
54 no_recursion=
55 prefix=NONE
56 program_prefix=NONE
57 program_suffix=NONE
58 program_transform_name=s,x,x,
59 silent=
60 site=
61 srcdir=
62 target=NONE
63 verbose=
64 x_includes=NONE
65 x_libraries=NONE
66 bindir='${exec_prefix}/bin'
67 sbindir='${exec_prefix}/sbin'
68 libexecdir='${exec_prefix}/libexec'
69 datadir='${prefix}/share'
70 sysconfdir='${prefix}/etc'
71 sharedstatedir='${prefix}/com'
72 localstatedir='${prefix}/var'
73 libdir='${exec_prefix}/lib'
74 includedir='${prefix}/include'
75 oldincludedir='/usr/include'
76 infodir='${prefix}/info'
77 mandir='${prefix}/man'
78
79 # Initialize some other variables.
80 subdirs=
81 MFLAGS= MAKEFLAGS=
82 SHELL=${CONFIG_SHELL-/bin/sh}
83 # Maximum number of lines to put in a shell here document.
84 ac_max_here_lines=12
85
86 ac_prev=
87 for ac_option
88 do
89
90 # If the previous option needs an argument, assign it.
91 if test -n "$ac_prev"; then
92 eval "$ac_prev=\$ac_option"
93 ac_prev=
94 continue
95 fi
96
97 case "$ac_option" in
98 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99 *) ac_optarg= ;;
100 esac
101
102 # Accept the important Cygnus configure options, so we can diagnose typos.
103
104 case "$ac_option" in
105
106 -bindir | --bindir | --bindi | --bind | --bin | --bi)
107 ac_prev=bindir ;;
108 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
109 bindir="$ac_optarg" ;;
110
111 -build | --build | --buil | --bui | --bu)
112 ac_prev=build ;;
113 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
114 build="$ac_optarg" ;;
115
116 -cache-file | --cache-file | --cache-fil | --cache-fi \
117 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
118 ac_prev=cache_file ;;
119 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
120 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
121 cache_file="$ac_optarg" ;;
122
123 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
124 ac_prev=datadir ;;
125 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
126 | --da=*)
127 datadir="$ac_optarg" ;;
128
129 -disable-* | --disable-*)
130 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
131 # Reject names that are not valid shell variable names.
132 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134 fi
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136 eval "enable_${ac_feature}=no" ;;
137
138 -enable-* | --enable-*)
139 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
140 # Reject names that are not valid shell variable names.
141 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
142 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143 fi
144 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145 case "$ac_option" in
146 *=*) ;;
147 *) ac_optarg=yes ;;
148 esac
149 eval "enable_${ac_feature}='$ac_optarg'" ;;
150
151 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
152 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
153 | --exec | --exe | --ex)
154 ac_prev=exec_prefix ;;
155 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
156 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
157 | --exec=* | --exe=* | --ex=*)
158 exec_prefix="$ac_optarg" ;;
159
160 -gas | --gas | --ga | --g)
161 # Obsolete; use --with-gas.
162 with_gas=yes ;;
163
164 -help | --help | --hel | --he)
165 # Omit some internal or obsolete options to make the list less imposing.
166 # This message is too long to be a string in the A/UX 3.1 sh.
167 cat << EOF
168 Usage: configure [options] [host]
169 Options: [defaults in brackets after descriptions]
170 Configuration:
171 --cache-file=FILE cache test results in FILE
172 --help print this message
173 --no-create do not create output files
174 --quiet, --silent do not print \`checking...' messages
175 --version print the version of autoconf that created configure
176 Directory and file names:
177 --prefix=PREFIX install architecture-independent files in PREFIX
178 [$ac_default_prefix]
179 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
180 [same as prefix]
181 --bindir=DIR user executables in DIR [EPREFIX/bin]
182 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
183 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
184 --datadir=DIR read-only architecture-independent data in DIR
185 [PREFIX/share]
186 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
187 --sharedstatedir=DIR modifiable architecture-independent data in DIR
188 [PREFIX/com]
189 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
190 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
191 --includedir=DIR C header files in DIR [PREFIX/include]
192 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
193 --infodir=DIR info documentation in DIR [PREFIX/info]
194 --mandir=DIR man documentation in DIR [PREFIX/man]
195 --srcdir=DIR find the sources in DIR [configure dir or ..]
196 --program-prefix=PREFIX prepend PREFIX to installed program names
197 --program-suffix=SUFFIX append SUFFIX to installed program names
198 --program-transform-name=PROGRAM
199 run sed PROGRAM on installed program names
200 EOF
201 cat << EOF
202 Host type:
203 --build=BUILD configure for building on BUILD [BUILD=HOST]
204 --host=HOST configure for HOST [guessed]
205 --target=TARGET configure for TARGET [TARGET=HOST]
206 Features and packages:
207 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
208 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
209 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
210 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
211 --x-includes=DIR X include files are in DIR
212 --x-libraries=DIR X library files are in DIR
213 EOF
214 if test -n "$ac_help"; then
215 echo "--enable and --with options recognized:$ac_help"
216 fi
217 exit 0 ;;
218
219 -host | --host | --hos | --ho)
220 ac_prev=host ;;
221 -host=* | --host=* | --hos=* | --ho=*)
222 host="$ac_optarg" ;;
223
224 -includedir | --includedir | --includedi | --included | --include \
225 | --includ | --inclu | --incl | --inc)
226 ac_prev=includedir ;;
227 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
228 | --includ=* | --inclu=* | --incl=* | --inc=*)
229 includedir="$ac_optarg" ;;
230
231 -infodir | --infodir | --infodi | --infod | --info | --inf)
232 ac_prev=infodir ;;
233 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
234 infodir="$ac_optarg" ;;
235
236 -libdir | --libdir | --libdi | --libd)
237 ac_prev=libdir ;;
238 -libdir=* | --libdir=* | --libdi=* | --libd=*)
239 libdir="$ac_optarg" ;;
240
241 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
242 | --libexe | --libex | --libe)
243 ac_prev=libexecdir ;;
244 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
245 | --libexe=* | --libex=* | --libe=*)
246 libexecdir="$ac_optarg" ;;
247
248 -localstatedir | --localstatedir | --localstatedi | --localstated \
249 | --localstate | --localstat | --localsta | --localst \
250 | --locals | --local | --loca | --loc | --lo)
251 ac_prev=localstatedir ;;
252 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
253 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
254 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
255 localstatedir="$ac_optarg" ;;
256
257 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
258 ac_prev=mandir ;;
259 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
260 mandir="$ac_optarg" ;;
261
262 -nfp | --nfp | --nf)
263 # Obsolete; use --without-fp.
264 with_fp=no ;;
265
266 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
267 | --no-cr | --no-c)
268 no_create=yes ;;
269
270 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
271 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272 no_recursion=yes ;;
273
274 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
275 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
276 | --oldin | --oldi | --old | --ol | --o)
277 ac_prev=oldincludedir ;;
278 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
279 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
280 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
281 oldincludedir="$ac_optarg" ;;
282
283 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
284 ac_prev=prefix ;;
285 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
286 prefix="$ac_optarg" ;;
287
288 -program-prefix | --program-prefix | --program-prefi | --program-pref \
289 | --program-pre | --program-pr | --program-p)
290 ac_prev=program_prefix ;;
291 -program-prefix=* | --program-prefix=* | --program-prefi=* \
292 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
293 program_prefix="$ac_optarg" ;;
294
295 -program-suffix | --program-suffix | --program-suffi | --program-suff \
296 | --program-suf | --program-su | --program-s)
297 ac_prev=program_suffix ;;
298 -program-suffix=* | --program-suffix=* | --program-suffi=* \
299 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
300 program_suffix="$ac_optarg" ;;
301
302 -program-transform-name | --program-transform-name \
303 | --program-transform-nam | --program-transform-na \
304 | --program-transform-n | --program-transform- \
305 | --program-transform | --program-transfor \
306 | --program-transfo | --program-transf \
307 | --program-trans | --program-tran \
308 | --progr-tra | --program-tr | --program-t)
309 ac_prev=program_transform_name ;;
310 -program-transform-name=* | --program-transform-name=* \
311 | --program-transform-nam=* | --program-transform-na=* \
312 | --program-transform-n=* | --program-transform-=* \
313 | --program-transform=* | --program-transfor=* \
314 | --program-transfo=* | --program-transf=* \
315 | --program-trans=* | --program-tran=* \
316 | --progr-tra=* | --program-tr=* | --program-t=*)
317 program_transform_name="$ac_optarg" ;;
318
319 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
320 | -silent | --silent | --silen | --sile | --sil)
321 silent=yes ;;
322
323 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
324 ac_prev=sbindir ;;
325 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
326 | --sbi=* | --sb=*)
327 sbindir="$ac_optarg" ;;
328
329 -sharedstatedir | --sharedstatedir | --sharedstatedi \
330 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
331 | --sharedst | --shareds | --shared | --share | --shar \
332 | --sha | --sh)
333 ac_prev=sharedstatedir ;;
334 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
335 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
336 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
337 | --sha=* | --sh=*)
338 sharedstatedir="$ac_optarg" ;;
339
340 -site | --site | --sit)
341 ac_prev=site ;;
342 -site=* | --site=* | --sit=*)
343 site="$ac_optarg" ;;
344
345 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 ac_prev=srcdir ;;
347 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348 srcdir="$ac_optarg" ;;
349
350 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351 | --syscon | --sysco | --sysc | --sys | --sy)
352 ac_prev=sysconfdir ;;
353 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355 sysconfdir="$ac_optarg" ;;
356
357 -target | --target | --targe | --targ | --tar | --ta | --t)
358 ac_prev=target ;;
359 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360 target="$ac_optarg" ;;
361
362 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 verbose=yes ;;
364
365 -version | --version | --versio | --versi | --vers)
366 echo "configure generated by autoconf version 2.12.2"
367 exit 0 ;;
368
369 -with-* | --with-*)
370 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 case "$ac_option" in
377 *=*) ;;
378 *) ac_optarg=yes ;;
379 esac
380 eval "with_${ac_package}='$ac_optarg'" ;;
381
382 -without-* | --without-*)
383 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
384 # Reject names that are not valid shell variable names.
385 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387 fi
388 ac_package=`echo $ac_package| sed 's/-/_/g'`
389 eval "with_${ac_package}=no" ;;
390
391 --x)
392 # Obsolete; use --with-x.
393 with_x=yes ;;
394
395 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396 | --x-incl | --x-inc | --x-in | --x-i)
397 ac_prev=x_includes ;;
398 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400 x_includes="$ac_optarg" ;;
401
402 -x-libraries | --x-libraries | --x-librarie | --x-librari \
403 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404 ac_prev=x_libraries ;;
405 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407 x_libraries="$ac_optarg" ;;
408
409 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
410 ;;
411
412 *)
413 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414 echo "configure: warning: $ac_option: invalid host type" 1>&2
415 fi
416 if test "x$nonopt" != xNONE; then
417 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418 fi
419 nonopt="$ac_option"
420 ;;
421
422 esac
423 done
424
425 if test -n "$ac_prev"; then
426 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427 fi
428
429 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430
431 # File descriptor usage:
432 # 0 standard input
433 # 1 file creation
434 # 2 errors and warnings
435 # 3 some systems may open it to /dev/tty
436 # 4 used on the Kubota Titan
437 # 6 checking for... messages and results
438 # 5 compiler messages saved in config.log
439 if test "$silent" = yes; then
440 exec 6>/dev/null
441 else
442 exec 6>&1
443 fi
444 exec 5>./config.log
445
446 echo "\
447 This file contains any messages produced by compilers while
448 running configure, to aid debugging if configure makes a mistake.
449 " 1>&5
450
451 # Strip out --no-create and --no-recursion so they do not pile up.
452 # Also quote any args containing shell metacharacters.
453 ac_configure_args=
454 for ac_arg
455 do
456 case "$ac_arg" in
457 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458 | --no-cr | --no-c) ;;
459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464 esac
465 done
466
467 # NLS nuisances.
468 # Only set these to C if already set. These must not be set unconditionally
469 # because not all systems understand e.g. LANG=C (notably SCO).
470 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471 # Non-C LC_CTYPE values break the ctype check.
472 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
473 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
476
477 # confdefs.h avoids OS command line length limits that DEFS can exceed.
478 rm -rf conftest* confdefs.h
479 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
480 echo > confdefs.h
481
482 # A filename unique to this package, relative to the directory that
483 # configure is in, which we can look for to find out if srcdir is correct.
484 ac_unique_file=main.c
485
486 # Find the source files, if location was not specified.
487 if test -z "$srcdir"; then
488 ac_srcdir_defaulted=yes
489 # Try the directory containing this script, then its parent.
490 ac_prog=$0
491 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493 srcdir=$ac_confdir
494 if test ! -r $srcdir/$ac_unique_file; then
495 srcdir=..
496 fi
497 else
498 ac_srcdir_defaulted=no
499 fi
500 if test ! -r $srcdir/$ac_unique_file; then
501 if test "$ac_srcdir_defaulted" = yes; then
502 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503 else
504 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505 fi
506 fi
507 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509 # Prefer explicitly selected file to automatically selected ones.
510 if test -z "$CONFIG_SITE"; then
511 if test "x$prefix" != xNONE; then
512 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
513 else
514 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
515 fi
516 fi
517 for ac_site_file in $CONFIG_SITE; do
518 if test -r "$ac_site_file"; then
519 echo "loading site script $ac_site_file"
520 . "$ac_site_file"
521 fi
522 done
523
524 if test -r "$cache_file"; then
525 echo "loading cache $cache_file"
526 . $cache_file
527 else
528 echo "creating cache $cache_file"
529 > $cache_file
530 fi
531
532 ac_ext=c
533 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
534 ac_cpp='$CPP $CPPFLAGS'
535 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
536 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
537 cross_compiling=$ac_cv_prog_cc_cross
538
539 ac_exeext=
540 ac_objext=o
541 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
542 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
543 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
544 ac_n= ac_c='
545 ' ac_t=' '
546 else
547 ac_n=-n ac_c= ac_t=
548 fi
549 else
550 ac_n= ac_c='\c' ac_t=
551 fi
552
553
554
555
556 # Extract the first word of "gcc", so it can be a program name with args.
557 set dummy gcc; ac_word=$2
558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
559 echo "configure:560: checking for $ac_word" >&5
560 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
561 echo $ac_n "(cached) $ac_c" 1>&6
562 else
563 if test -n "$CC"; then
564 ac_cv_prog_CC="$CC" # Let the user override the test.
565 else
566 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
567 for ac_dir in $PATH; do
568 test -z "$ac_dir" && ac_dir=.
569 if test -f $ac_dir/$ac_word; then
570 ac_cv_prog_CC="gcc"
571 break
572 fi
573 done
574 IFS="$ac_save_ifs"
575 fi
576 fi
577 CC="$ac_cv_prog_CC"
578 if test -n "$CC"; then
579 echo "$ac_t""$CC" 1>&6
580 else
581 echo "$ac_t""no" 1>&6
582 fi
583
584 if test -z "$CC"; then
585 # Extract the first word of "cc", so it can be a program name with args.
586 set dummy cc; ac_word=$2
587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
588 echo "configure:589: checking for $ac_word" >&5
589 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
590 echo $ac_n "(cached) $ac_c" 1>&6
591 else
592 if test -n "$CC"; then
593 ac_cv_prog_CC="$CC" # Let the user override the test.
594 else
595 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
596 ac_prog_rejected=no
597 for ac_dir in $PATH; do
598 test -z "$ac_dir" && ac_dir=.
599 if test -f $ac_dir/$ac_word; then
600 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
601 ac_prog_rejected=yes
602 continue
603 fi
604 ac_cv_prog_CC="cc"
605 break
606 fi
607 done
608 IFS="$ac_save_ifs"
609 if test $ac_prog_rejected = yes; then
610 # We found a bogon in the path, so make sure we never use it.
611 set dummy $ac_cv_prog_CC
612 shift
613 if test $# -gt 0; then
614 # We chose a different compiler from the bogus one.
615 # However, it has the same basename, so the bogon will be chosen
616 # first if we set CC to just the basename; use the full file name.
617 shift
618 set dummy "$ac_dir/$ac_word" "$@"
619 shift
620 ac_cv_prog_CC="$@"
621 fi
622 fi
623 fi
624 fi
625 CC="$ac_cv_prog_CC"
626 if test -n "$CC"; then
627 echo "$ac_t""$CC" 1>&6
628 else
629 echo "$ac_t""no" 1>&6
630 fi
631
632 if test -z "$CC"; then
633 case "`uname -s`" in
634 *win32* | *WIN32*)
635 # Extract the first word of "cl", so it can be a program name with args.
636 set dummy cl; ac_word=$2
637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
638 echo "configure:639: checking for $ac_word" >&5
639 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
640 echo $ac_n "(cached) $ac_c" 1>&6
641 else
642 if test -n "$CC"; then
643 ac_cv_prog_CC="$CC" # Let the user override the test.
644 else
645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
646 for ac_dir in $PATH; do
647 test -z "$ac_dir" && ac_dir=.
648 if test -f $ac_dir/$ac_word; then
649 ac_cv_prog_CC="cl"
650 break
651 fi
652 done
653 IFS="$ac_save_ifs"
654 fi
655 fi
656 CC="$ac_cv_prog_CC"
657 if test -n "$CC"; then
658 echo "$ac_t""$CC" 1>&6
659 else
660 echo "$ac_t""no" 1>&6
661 fi
662 ;;
663 esac
664 fi
665 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
666 fi
667
668 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
669 echo "configure:670: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
670
671 ac_ext=c
672 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
673 ac_cpp='$CPP $CPPFLAGS'
674 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
675 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
676 cross_compiling=$ac_cv_prog_cc_cross
677
678 cat > conftest.$ac_ext <<EOF
679 #line 680 "configure"
680 #include "confdefs.h"
681 main(){return(0);}
682 EOF
683 if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
684 ac_cv_prog_cc_works=yes
685 # If we can't run a trivial program, we are probably using a cross compiler.
686 if (./conftest; exit) 2>/dev/null; then
687 ac_cv_prog_cc_cross=no
688 else
689 ac_cv_prog_cc_cross=yes
690 fi
691 else
692 echo "configure: failed program was:" >&5
693 cat conftest.$ac_ext >&5
694 ac_cv_prog_cc_works=no
695 fi
696 rm -fr conftest*
697
698 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
699 if test $ac_cv_prog_cc_works = no; then
700 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
701 fi
702 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
703 echo "configure:704: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
704 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
705 cross_compiling=$ac_cv_prog_cc_cross
706
707 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
708 echo "configure:709: checking whether we are using GNU C" >&5
709 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
710 echo $ac_n "(cached) $ac_c" 1>&6
711 else
712 cat > conftest.c <<EOF
713 #ifdef __GNUC__
714 yes;
715 #endif
716 EOF
717 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
718 ac_cv_prog_gcc=yes
719 else
720 ac_cv_prog_gcc=no
721 fi
722 fi
723
724 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
725
726 if test $ac_cv_prog_gcc = yes; then
727 GCC=yes
728 else
729 GCC=
730 fi
731
732 ac_test_CFLAGS="${CFLAGS+set}"
733 ac_save_CFLAGS="$CFLAGS"
734 CFLAGS=
735 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
736 echo "configure:737: checking whether ${CC-cc} accepts -g" >&5
737 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
738 echo $ac_n "(cached) $ac_c" 1>&6
739 else
740 echo 'void f(){}' > conftest.c
741 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
742 ac_cv_prog_cc_g=yes
743 else
744 ac_cv_prog_cc_g=no
745 fi
746 rm -f conftest*
747
748 fi
749
750 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
751 if test "$ac_test_CFLAGS" = set; then
752 CFLAGS="$ac_save_CFLAGS"
753 elif test $ac_cv_prog_cc_g = yes; then
754 if test "$GCC" = yes; then
755 CFLAGS="-g -O2"
756 else
757 CFLAGS="-g"
758 fi
759 else
760 if test "$GCC" = yes; then
761 CFLAGS="-O2"
762 else
763 CFLAGS=
764 fi
765 fi
766
767 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
768 echo "configure:769: checking how to run the C preprocessor" >&5
769 # On Suns, sometimes $CPP names a directory.
770 if test -n "$CPP" && test -d "$CPP"; then
771 CPP=
772 fi
773 if test -z "$CPP"; then
774 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
776 else
777 # This must be in double quotes, not single quotes, because CPP may get
778 # substituted into the Makefile and "${CC-cc}" will confuse make.
779 CPP="${CC-cc} -E"
780 # On the NeXT, cc -E runs the code through the compiler's parser,
781 # not just through cpp.
782 cat > conftest.$ac_ext <<EOF
783 #line 784 "configure"
784 #include "confdefs.h"
785 #include <assert.h>
786 Syntax Error
787 EOF
788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
789 { (eval echo configure:790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
791 if test -z "$ac_err"; then
792 :
793 else
794 echo "$ac_err" >&5
795 echo "configure: failed program was:" >&5
796 cat conftest.$ac_ext >&5
797 rm -rf conftest*
798 CPP="${CC-cc} -E -traditional-cpp"
799 cat > conftest.$ac_ext <<EOF
800 #line 801 "configure"
801 #include "confdefs.h"
802 #include <assert.h>
803 Syntax Error
804 EOF
805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
806 { (eval echo configure:807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
808 if test -z "$ac_err"; then
809 :
810 else
811 echo "$ac_err" >&5
812 echo "configure: failed program was:" >&5
813 cat conftest.$ac_ext >&5
814 rm -rf conftest*
815 CPP="${CC-cc} -nologo -E"
816 cat > conftest.$ac_ext <<EOF
817 #line 818 "configure"
818 #include "confdefs.h"
819 #include <assert.h>
820 Syntax Error
821 EOF
822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
823 { (eval echo configure:824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
825 if test -z "$ac_err"; then
826 :
827 else
828 echo "$ac_err" >&5
829 echo "configure: failed program was:" >&5
830 cat conftest.$ac_ext >&5
831 rm -rf conftest*
832 CPP=/lib/cpp
833 fi
834 rm -f conftest*
835 fi
836 rm -f conftest*
837 fi
838 rm -f conftest*
839 ac_cv_prog_CPP="$CPP"
840 fi
841 CPP="$ac_cv_prog_CPP"
842 else
843 ac_cv_prog_CPP="$CPP"
844 fi
845 echo "$ac_t""$CPP" 1>&6
846
847 echo $ac_n "checking for AIX""... $ac_c" 1>&6
848 echo "configure:849: checking for AIX" >&5
849 cat > conftest.$ac_ext <<EOF
850 #line 851 "configure"
851 #include "confdefs.h"
852 #ifdef _AIX
853 yes
854 #endif
855
856 EOF
857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
858 egrep "yes" >/dev/null 2>&1; then
859 rm -rf conftest*
860 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
861 #define _ALL_SOURCE 1
862 EOF
863
864 else
865 rm -rf conftest*
866 echo "$ac_t""no" 1>&6
867 fi
868 rm -f conftest*
869
870
871 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
872 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
873 echo "configure:874: checking for minix/config.h" >&5
874 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
876 else
877 cat > conftest.$ac_ext <<EOF
878 #line 879 "configure"
879 #include "confdefs.h"
880 #include <minix/config.h>
881 EOF
882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
883 { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
885 if test -z "$ac_err"; then
886 rm -rf conftest*
887 eval "ac_cv_header_$ac_safe=yes"
888 else
889 echo "$ac_err" >&5
890 echo "configure: failed program was:" >&5
891 cat conftest.$ac_ext >&5
892 rm -rf conftest*
893 eval "ac_cv_header_$ac_safe=no"
894 fi
895 rm -f conftest*
896 fi
897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
898 echo "$ac_t""yes" 1>&6
899 MINIX=yes
900 else
901 echo "$ac_t""no" 1>&6
902 MINIX=
903 fi
904
905 if test "$MINIX" = yes; then
906 cat >> confdefs.h <<\EOF
907 #define _POSIX_SOURCE 1
908 EOF
909
910 cat >> confdefs.h <<\EOF
911 #define _POSIX_1_SOURCE 2
912 EOF
913
914 cat >> confdefs.h <<\EOF
915 #define _MINIX 1
916 EOF
917
918 fi
919
920 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
921 echo "configure:922: checking for POSIXized ISC" >&5
922 if test -d /etc/conf/kconfig.d &&
923 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
924 then
925 echo "$ac_t""yes" 1>&6
926 ISC=yes # If later tests want to check for ISC.
927 cat >> confdefs.h <<\EOF
928 #define _POSIX_SOURCE 1
929 EOF
930
931 if test "$GCC" = yes; then
932 CC="$CC -posix"
933 else
934 CC="$CC -Xp"
935 fi
936 else
937 echo "$ac_t""no" 1>&6
938 ISC=
939 fi
940
941
942 DLLTOOL=${DLLTOOL-dlltool}
943
944
945 ac_aux_dir=
946 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
947 if test -f $ac_dir/install-sh; then
948 ac_aux_dir=$ac_dir
949 ac_install_sh="$ac_aux_dir/install-sh -c"
950 break
951 elif test -f $ac_dir/install.sh; then
952 ac_aux_dir=$ac_dir
953 ac_install_sh="$ac_aux_dir/install.sh -c"
954 break
955 fi
956 done
957 if test -z "$ac_aux_dir"; then
958 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
959 fi
960 ac_config_guess=$ac_aux_dir/config.guess
961 ac_config_sub=$ac_aux_dir/config.sub
962 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
963
964
965 # Do some error checking and defaulting for the host and target type.
966 # The inputs are:
967 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
968 #
969 # The rules are:
970 # 1. You are not allowed to specify --host, --target, and nonopt at the
971 # same time.
972 # 2. Host defaults to nonopt.
973 # 3. If nonopt is not specified, then host defaults to the current host,
974 # as determined by config.guess.
975 # 4. Target and build default to nonopt.
976 # 5. If nonopt is not specified, then target and build default to host.
977
978 # The aliases save the names the user supplied, while $host etc.
979 # will get canonicalized.
980 case $host---$target---$nonopt in
981 NONE---*---* | *---NONE---* | *---*---NONE) ;;
982 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
983 esac
984
985
986 # Make sure we can run config.sub.
987 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
988 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
989 fi
990
991 echo $ac_n "checking host system type""... $ac_c" 1>&6
992 echo "configure:993: checking host system type" >&5
993
994 host_alias=$host
995 case "$host_alias" in
996 NONE)
997 case $nonopt in
998 NONE)
999 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1000 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1001 fi ;;
1002 *) host_alias=$nonopt ;;
1003 esac ;;
1004 esac
1005
1006 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1007 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1008 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1009 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1010 echo "$ac_t""$host" 1>&6
1011
1012 echo $ac_n "checking target system type""... $ac_c" 1>&6
1013 echo "configure:1014: checking target system type" >&5
1014
1015 target_alias=$target
1016 case "$target_alias" in
1017 NONE)
1018 case $nonopt in
1019 NONE) target_alias=$host_alias ;;
1020 *) target_alias=$nonopt ;;
1021 esac ;;
1022 esac
1023
1024 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1025 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1026 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1027 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1028 echo "$ac_t""$target" 1>&6
1029
1030 echo $ac_n "checking build system type""... $ac_c" 1>&6
1031 echo "configure:1032: checking build system type" >&5
1032
1033 build_alias=$build
1034 case "$build_alias" in
1035 NONE)
1036 case $nonopt in
1037 NONE) build_alias=$host_alias ;;
1038 *) build_alias=$nonopt ;;
1039 esac ;;
1040 esac
1041
1042 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1043 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046 echo "$ac_t""$build" 1>&6
1047
1048 test "$host_alias" != "$target_alias" &&
1049 test "$program_prefix$program_suffix$program_transform_name" = \
1050 NONENONEs,x,x, &&
1051 program_prefix=${target_alias}-
1052
1053
1054 ALL_LINGUAS=
1055 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1056 echo "configure:1057: checking whether ${MAKE-make} sets \${MAKE}" >&5
1057 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1058 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1059 echo $ac_n "(cached) $ac_c" 1>&6
1060 else
1061 cat > conftestmake <<\EOF
1062 all:
1063 @echo 'ac_maketemp="${MAKE}"'
1064 EOF
1065 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1066 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1067 if test -n "$ac_maketemp"; then
1068 eval ac_cv_prog_make_${ac_make}_set=yes
1069 else
1070 eval ac_cv_prog_make_${ac_make}_set=no
1071 fi
1072 rm -f conftestmake
1073 fi
1074 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1075 echo "$ac_t""yes" 1>&6
1076 SET_MAKE=
1077 else
1078 echo "$ac_t""no" 1>&6
1079 SET_MAKE="MAKE=${MAKE-make}"
1080 fi
1081
1082 # Extract the first word of "ranlib", so it can be a program name with args.
1083 set dummy ranlib; ac_word=$2
1084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1085 echo "configure:1086: checking for $ac_word" >&5
1086 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1087 echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089 if test -n "$RANLIB"; then
1090 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1091 else
1092 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1093 for ac_dir in $PATH; do
1094 test -z "$ac_dir" && ac_dir=.
1095 if test -f $ac_dir/$ac_word; then
1096 ac_cv_prog_RANLIB="ranlib"
1097 break
1098 fi
1099 done
1100 IFS="$ac_save_ifs"
1101 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1102 fi
1103 fi
1104 RANLIB="$ac_cv_prog_RANLIB"
1105 if test -n "$RANLIB"; then
1106 echo "$ac_t""$RANLIB" 1>&6
1107 else
1108 echo "$ac_t""no" 1>&6
1109 fi
1110
1111 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1112 echo "configure:1113: checking for ANSI C header files" >&5
1113 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1114 echo $ac_n "(cached) $ac_c" 1>&6
1115 else
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1118 "configure"
1118 #include "confdefs.h"
1119 #include <stdlib.h>
1120 #include <stdarg.h>
1121 #include <string.h>
1122 #include <float.h>
1123 EOF
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1128 rm -rf conftest*
1129 ac_cv_header_stdc=yes
1130 else
1131 echo "$ac_err" >&5
1132 echo "configure: failed program was:" >&5
1133 cat conftest.$ac_ext >&5
1134 rm -rf conftest*
1135 ac_cv_header_stdc=no
1136 fi
1137 rm -f conftest*
1138
1139 if test $ac_cv_header_stdc = yes; then
1140 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1141 cat > conftest.$ac_ext <<EOF
1142 #line 1143 "configure"
1143 #include "confdefs.h"
1144 #include <string.h>
1145 EOF
1146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1147 egrep "memchr" >/dev/null 2>&1; then
1148 :
1149 else
1150 rm -rf conftest*
1151 ac_cv_header_stdc=no
1152 fi
1153 rm -f conftest*
1154
1155 fi
1156
1157 if test $ac_cv_header_stdc = yes; then
1158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1159 cat > conftest.$ac_ext <<EOF
1160 #line 1161 "configure"
1161 #include "confdefs.h"
1162 #include <stdlib.h>
1163 EOF
1164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1165 egrep "free" >/dev/null 2>&1; then
1166 :
1167 else
1168 rm -rf conftest*
1169 ac_cv_header_stdc=no
1170 fi
1171 rm -f conftest*
1172
1173 fi
1174
1175 if test $ac_cv_header_stdc = yes; then
1176 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1177 if test "$cross_compiling" = yes; then
1178 :
1179 else
1180 cat > conftest.$ac_ext <<EOF
1181 #line 1182 "configure"
1182 #include "confdefs.h"
1183 #include <ctype.h>
1184 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1185 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1186 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1187 int main () { int i; for (i = 0; i < 256; i++)
1188 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1189 exit (0); }
1190
1191 EOF
1192 if { (eval echo configure:1193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1193 then
1194 :
1195 else
1196 echo "configure: failed program was:" >&5
1197 cat conftest.$ac_ext >&5
1198 rm -fr conftest*
1199 ac_cv_header_stdc=no
1200 fi
1201 rm -fr conftest*
1202 fi
1203
1204 fi
1205 fi
1206
1207 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1208 if test $ac_cv_header_stdc = yes; then
1209 cat >> confdefs.h <<\EOF
1210 #define STDC_HEADERS 1
1211 EOF
1212
1213 fi
1214
1215 echo $ac_n "checking for working const""... $ac_c" 1>&6
1216 echo "configure:1217: checking for working const" >&5
1217 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1218 echo $ac_n "(cached) $ac_c" 1>&6
1219 else
1220 cat > conftest.$ac_ext <<EOF
1221 #line 1222 "configure"
1222 #include "confdefs.h"
1223
1224 int main() {
1225
1226 /* Ultrix mips cc rejects this. */
1227 typedef int charset[2]; const charset x;
1228 /* SunOS 4.1.1 cc rejects this. */
1229 char const *const *ccp;
1230 char **p;
1231 /* NEC SVR4.0.2 mips cc rejects this. */
1232 struct point {int x, y;};
1233 static struct point const zero = {0,0};
1234 /* AIX XL C 1.02.0.0 rejects this.
1235 It does not let you subtract one const X* pointer from another in an arm
1236 of an if-expression whose if-part is not a constant expression */
1237 const char *g = "string";
1238 ccp = &g + (g ? g-g : 0);
1239 /* HPUX 7.0 cc rejects these. */
1240 ++ccp;
1241 p = (char**) ccp;
1242 ccp = (char const *const *) p;
1243 { /* SCO 3.2v4 cc rejects this. */
1244 char *t;
1245 char const *s = 0 ? (char *) 0 : (char const *) 0;
1246
1247 *t++ = 0;
1248 }
1249 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1250 int x[] = {25, 17};
1251 const int *foo = &x[0];
1252 ++foo;
1253 }
1254 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1255 typedef const int *iptr;
1256 iptr p = 0;
1257 ++p;
1258 }
1259 { /* AIX XL C 1.02.0.0 rejects this saying
1260 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1261 struct s { int j; const int *ap[3]; };
1262 struct s *b; b->j = 5;
1263 }
1264 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1265 const int foo = 10;
1266 }
1267
1268 ; return 0; }
1269 EOF
1270 if { (eval echo configure:1271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1271 rm -rf conftest*
1272 ac_cv_c_const=yes
1273 else
1274 echo "configure: failed program was:" >&5
1275 cat conftest.$ac_ext >&5
1276 rm -rf conftest*
1277 ac_cv_c_const=no
1278 fi
1279 rm -f conftest*
1280 fi
1281
1282 echo "$ac_t""$ac_cv_c_const" 1>&6
1283 if test $ac_cv_c_const = no; then
1284 cat >> confdefs.h <<\EOF
1285 #define const
1286 EOF
1287
1288 fi
1289
1290 echo $ac_n "checking for inline""... $ac_c" 1>&6
1291 echo "configure:1292: checking for inline" >&5
1292 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1293 echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295 ac_cv_c_inline=no
1296 for ac_kw in inline __inline__ __inline; do
1297 cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300
1301 int main() {
1302 } $ac_kw foo() {
1303 ; return 0; }
1304 EOF
1305 if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1306 rm -rf conftest*
1307 ac_cv_c_inline=$ac_kw; break
1308 else
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 fi
1312 rm -f conftest*
1313 done
1314
1315 fi
1316
1317 echo "$ac_t""$ac_cv_c_inline" 1>&6
1318 case "$ac_cv_c_inline" in
1319 inline | yes) ;;
1320 no) cat >> confdefs.h <<\EOF
1321 #define inline
1322 EOF
1323 ;;
1324 *) cat >> confdefs.h <<EOF
1325 #define inline $ac_cv_c_inline
1326 EOF
1327 ;;
1328 esac
1329
1330 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1331 echo "configure:1332: checking for off_t" >&5
1332 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338 #include <sys/types.h>
1339 #if STDC_HEADERS
1340 #include <stdlib.h>
1341 #include <stddef.h>
1342 #endif
1343 EOF
1344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1345 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1346 rm -rf conftest*
1347 ac_cv_type_off_t=yes
1348 else
1349 rm -rf conftest*
1350 ac_cv_type_off_t=no
1351 fi
1352 rm -f conftest*
1353
1354 fi
1355 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1356 if test $ac_cv_type_off_t = no; then
1357 cat >> confdefs.h <<\EOF
1358 #define off_t long
1359 EOF
1360
1361 fi
1362
1363 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1364 echo "configure:1365: checking for size_t" >&5
1365 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368 cat > conftest.$ac_ext <<EOF
1369 #line 1370 "configure"
1370 #include "confdefs.h"
1371 #include <sys/types.h>
1372 #if STDC_HEADERS
1373 #include <stdlib.h>
1374 #include <stddef.h>
1375 #endif
1376 EOF
1377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1378 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1379 rm -rf conftest*
1380 ac_cv_type_size_t=yes
1381 else
1382 rm -rf conftest*
1383 ac_cv_type_size_t=no
1384 fi
1385 rm -f conftest*
1386
1387 fi
1388 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1389 if test $ac_cv_type_size_t = no; then
1390 cat >> confdefs.h <<\EOF
1391 #define size_t unsigned
1392 EOF
1393
1394 fi
1395
1396 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1397 # for constant arguments. Useless!
1398 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1399 echo "configure:1400: checking for working alloca.h" >&5
1400 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
1402 else
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1406 #include <alloca.h>
1407 int main() {
1408 char *p = alloca(2 * sizeof(int));
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1412 rm -rf conftest*
1413 ac_cv_header_alloca_h=yes
1414 else
1415 echo "configure: failed program was:" >&5
1416 cat conftest.$ac_ext >&5
1417 rm -rf conftest*
1418 ac_cv_header_alloca_h=no
1419 fi
1420 rm -f conftest*
1421 fi
1422
1423 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1424 if test $ac_cv_header_alloca_h = yes; then
1425 cat >> confdefs.h <<\EOF
1426 #define HAVE_ALLOCA_H 1
1427 EOF
1428
1429 fi
1430
1431 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1432 echo "configure:1433: checking for alloca" >&5
1433 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1434 echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436 cat > conftest.$ac_ext <<EOF
1437 #line 1438 "configure"
1438 #include "confdefs.h"
1439
1440 #ifdef __GNUC__
1441 # define alloca __builtin_alloca
1442 #else
1443 # ifdef _MSC_VER
1444 # include <malloc.h>
1445 # define alloca _alloca
1446 # else
1447 # if HAVE_ALLOCA_H
1448 # include <alloca.h>
1449 # else
1450 # ifdef _AIX
1451 #pragma alloca
1452 # else
1453 # ifndef alloca /* predefined by HP cc +Olibcalls */
1454 char *alloca ();
1455 # endif
1456 # endif
1457 # endif
1458 # endif
1459 #endif
1460
1461 int main() {
1462 char *p = (char *) alloca(1);
1463 ; return 0; }
1464 EOF
1465 if { (eval echo configure:1466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1466 rm -rf conftest*
1467 ac_cv_func_alloca_works=yes
1468 else
1469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
1471 rm -rf conftest*
1472 ac_cv_func_alloca_works=no
1473 fi
1474 rm -f conftest*
1475 fi
1476
1477 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1478 if test $ac_cv_func_alloca_works = yes; then
1479 cat >> confdefs.h <<\EOF
1480 #define HAVE_ALLOCA 1
1481 EOF
1482
1483 fi
1484
1485 if test $ac_cv_func_alloca_works = no; then
1486 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1487 # that cause trouble. Some versions do not even contain alloca or
1488 # contain a buggy version. If you still want to use their alloca,
1489 # use ar to extract alloca.o from them instead of compiling alloca.c.
1490 ALLOCA=alloca.${ac_objext}
1491 cat >> confdefs.h <<\EOF
1492 #define C_ALLOCA 1
1493 EOF
1494
1495
1496 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1497 echo "configure:1498: checking whether alloca needs Cray hooks" >&5
1498 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501 cat > conftest.$ac_ext <<EOF
1502 #line 1503 "configure"
1503 #include "confdefs.h"
1504 #if defined(CRAY) && ! defined(CRAY2)
1505 webecray
1506 #else
1507 wenotbecray
1508 #endif
1509
1510 EOF
1511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1512 egrep "webecray" >/dev/null 2>&1; then
1513 rm -rf conftest*
1514 ac_cv_os_cray=yes
1515 else
1516 rm -rf conftest*
1517 ac_cv_os_cray=no
1518 fi
1519 rm -f conftest*
1520
1521 fi
1522
1523 echo "$ac_t""$ac_cv_os_cray" 1>&6
1524 if test $ac_cv_os_cray = yes; then
1525 for ac_func in _getb67 GETB67 getb67; do
1526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1527 echo "configure:1528: checking for $ac_func" >&5
1528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1529 echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531 cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1534 /* System header to define __stub macros and hopefully few prototypes,
1535 which can conflict with char $ac_func(); below. */
1536 #include <assert.h>
1537 /* Override any gcc2 internal prototype to avoid an error. */
1538 /* We use char because int might match the return type of a gcc2
1539 builtin and then its argument prototype would still apply. */
1540 char $ac_func();
1541
1542 int main() {
1543
1544 /* The GNU C library defines this for functions which it implements
1545 to always fail with ENOSYS. Some functions are actually named
1546 something starting with __ and the normal name is an alias. */
1547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1548 choke me
1549 #else
1550 $ac_func();
1551 #endif
1552
1553 ; return 0; }
1554 EOF
1555 if { (eval echo configure:1556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1556 rm -rf conftest*
1557 eval "ac_cv_func_$ac_func=yes"
1558 else
1559 echo "configure: failed program was:" >&5
1560 cat conftest.$ac_ext >&5
1561 rm -rf conftest*
1562 eval "ac_cv_func_$ac_func=no"
1563 fi
1564 rm -f conftest*
1565 fi
1566
1567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1568 echo "$ac_t""yes" 1>&6
1569 cat >> confdefs.h <<EOF
1570 #define CRAY_STACKSEG_END $ac_func
1571 EOF
1572
1573 break
1574 else
1575 echo "$ac_t""no" 1>&6
1576 fi
1577
1578 done
1579 fi
1580
1581 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1582 echo "configure:1583: checking stack direction for C alloca" >&5
1583 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586 if test "$cross_compiling" = yes; then
1587 ac_cv_c_stack_direction=0
1588 else
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592 find_stack_direction ()
1593 {
1594 static char *addr = 0;
1595 auto char dummy;
1596 if (addr == 0)
1597 {
1598 addr = &dummy;
1599 return find_stack_direction ();
1600 }
1601 else
1602 return (&dummy > addr) ? 1 : -1;
1603 }
1604 main ()
1605 {
1606 exit (find_stack_direction() < 0);
1607 }
1608 EOF
1609 if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1610 then
1611 ac_cv_c_stack_direction=1
1612 else
1613 echo "configure: failed program was:" >&5
1614 cat conftest.$ac_ext >&5
1615 rm -fr conftest*
1616 ac_cv_c_stack_direction=-1
1617 fi
1618 rm -fr conftest*
1619 fi
1620
1621 fi
1622
1623 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1624 cat >> confdefs.h <<EOF
1625 #define STACK_DIRECTION $ac_cv_c_stack_direction
1626 EOF
1627
1628 fi
1629
1630 for ac_hdr in unistd.h
1631 do
1632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1634 echo "configure:1635: checking for $ac_hdr" >&5
1635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1636 echo $ac_n "(cached) $ac_c" 1>&6
1637 else
1638 cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641 #include <$ac_hdr>
1642 EOF
1643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1644 { (eval echo configure:1645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1646 if test -z "$ac_err"; then
1647 rm -rf conftest*
1648 eval "ac_cv_header_$ac_safe=yes"
1649 else
1650 echo "$ac_err" >&5
1651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 rm -rf conftest*
1654 eval "ac_cv_header_$ac_safe=no"
1655 fi
1656 rm -f conftest*
1657 fi
1658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1659 echo "$ac_t""yes" 1>&6
1660 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1661 cat >> confdefs.h <<EOF
1662 #define $ac_tr_hdr 1
1663 EOF
1664
1665 else
1666 echo "$ac_t""no" 1>&6
1667 fi
1668 done
1669
1670 for ac_func in getpagesize
1671 do
1672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_func" >&5
1674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677 cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 /* System header to define __stub macros and hopefully few prototypes,
1681 which can conflict with char $ac_func(); below. */
1682 #include <assert.h>
1683 /* Override any gcc2 internal prototype to avoid an error. */
1684 /* We use char because int might match the return type of a gcc2
1685 builtin and then its argument prototype would still apply. */
1686 char $ac_func();
1687
1688 int main() {
1689
1690 /* The GNU C library defines this for functions which it implements
1691 to always fail with ENOSYS. Some functions are actually named
1692 something starting with __ and the normal name is an alias. */
1693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1694 choke me
1695 #else
1696 $ac_func();
1697 #endif
1698
1699 ; return 0; }
1700 EOF
1701 if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702 rm -rf conftest*
1703 eval "ac_cv_func_$ac_func=yes"
1704 else
1705 echo "configure: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1707 rm -rf conftest*
1708 eval "ac_cv_func_$ac_func=no"
1709 fi
1710 rm -f conftest*
1711 fi
1712
1713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1714 echo "$ac_t""yes" 1>&6
1715 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1716 cat >> confdefs.h <<EOF
1717 #define $ac_tr_func 1
1718 EOF
1719
1720 else
1721 echo "$ac_t""no" 1>&6
1722 fi
1723 done
1724
1725 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1726 echo "configure:1727: checking for working mmap" >&5
1727 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730 if test "$cross_compiling" = yes; then
1731 ac_cv_func_mmap_fixed_mapped=no
1732 else
1733 cat > conftest.$ac_ext <<EOF
1734 #line 1735 "configure"
1735 #include "confdefs.h"
1736
1737 /* Thanks to Mike Haertel and Jim Avera for this test.
1738 Here is a matrix of mmap possibilities:
1739 mmap private not fixed
1740 mmap private fixed at somewhere currently unmapped
1741 mmap private fixed at somewhere already mapped
1742 mmap shared not fixed
1743 mmap shared fixed at somewhere currently unmapped
1744 mmap shared fixed at somewhere already mapped
1745 For private mappings, we should verify that changes cannot be read()
1746 back from the file, nor mmap's back from the file at a different
1747 address. (There have been systems where private was not correctly
1748 implemented like the infamous i386 svr4.0, and systems where the
1749 VM page cache was not coherent with the filesystem buffer cache
1750 like early versions of FreeBSD and possibly contemporary NetBSD.)
1751 For shared mappings, we should conversely verify that changes get
1752 propogated back to all the places they're supposed to be.
1753
1754 Grep wants private fixed already mapped.
1755 The main things grep needs to know about mmap are:
1756 * does it exist and is it safe to write into the mmap'd area
1757 * how to use it (BSD variants) */
1758 #include <sys/types.h>
1759 #include <fcntl.h>
1760 #include <sys/mman.h>
1761
1762 /* This mess was copied from the GNU getpagesize.h. */
1763 #ifndef HAVE_GETPAGESIZE
1764 # ifdef HAVE_UNISTD_H
1765 # include <unistd.h>
1766 # endif
1767
1768 /* Assume that all systems that can run configure have sys/param.h. */
1769 # ifndef HAVE_SYS_PARAM_H
1770 # define HAVE_SYS_PARAM_H 1
1771 # endif
1772
1773 # ifdef _SC_PAGESIZE
1774 # define getpagesize() sysconf(_SC_PAGESIZE)
1775 # else /* no _SC_PAGESIZE */
1776 # ifdef HAVE_SYS_PARAM_H
1777 # include <sys/param.h>
1778 # ifdef EXEC_PAGESIZE
1779 # define getpagesize() EXEC_PAGESIZE
1780 # else /* no EXEC_PAGESIZE */
1781 # ifdef NBPG
1782 # define getpagesize() NBPG * CLSIZE
1783 # ifndef CLSIZE
1784 # define CLSIZE 1
1785 # endif /* no CLSIZE */
1786 # else /* no NBPG */
1787 # ifdef NBPC
1788 # define getpagesize() NBPC
1789 # else /* no NBPC */
1790 # ifdef PAGESIZE
1791 # define getpagesize() PAGESIZE
1792 # endif /* PAGESIZE */
1793 # endif /* no NBPC */
1794 # endif /* no NBPG */
1795 # endif /* no EXEC_PAGESIZE */
1796 # else /* no HAVE_SYS_PARAM_H */
1797 # define getpagesize() 8192 /* punt totally */
1798 # endif /* no HAVE_SYS_PARAM_H */
1799 # endif /* no _SC_PAGESIZE */
1800
1801 #endif /* no HAVE_GETPAGESIZE */
1802
1803 #ifdef __cplusplus
1804 extern "C" { void *malloc(unsigned); }
1805 #else
1806 char *malloc();
1807 #endif
1808
1809 int
1810 main()
1811 {
1812 char *data, *data2, *data3;
1813 int i, pagesize;
1814 int fd;
1815
1816 pagesize = getpagesize();
1817
1818 /*
1819 * First, make a file with some known garbage in it.
1820 */
1821 data = malloc(pagesize);
1822 if (!data)
1823 exit(1);
1824 for (i = 0; i < pagesize; ++i)
1825 *(data + i) = rand();
1826 umask(0);
1827 fd = creat("conftestmmap", 0600);
1828 if (fd < 0)
1829 exit(1);
1830 if (write(fd, data, pagesize) != pagesize)
1831 exit(1);
1832 close(fd);
1833
1834 /*
1835 * Next, try to mmap the file at a fixed address which
1836 * already has something else allocated at it. If we can,
1837 * also make sure that we see the same garbage.
1838 */
1839 fd = open("conftestmmap", O_RDWR);
1840 if (fd < 0)
1841 exit(1);
1842 data2 = malloc(2 * pagesize);
1843 if (!data2)
1844 exit(1);
1845 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1846 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1847 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1848 exit(1);
1849 for (i = 0; i < pagesize; ++i)
1850 if (*(data + i) != *(data2 + i))
1851 exit(1);
1852
1853 /*
1854 * Finally, make sure that changes to the mapped area
1855 * do not percolate back to the file as seen by read().
1856 * (This is a bug on some variants of i386 svr4.0.)
1857 */
1858 for (i = 0; i < pagesize; ++i)
1859 *(data2 + i) = *(data2 + i) + 1;
1860 data3 = malloc(pagesize);
1861 if (!data3)
1862 exit(1);
1863 if (read(fd, data3, pagesize) != pagesize)
1864 exit(1);
1865 for (i = 0; i < pagesize; ++i)
1866 if (*(data + i) != *(data3 + i))
1867 exit(1);
1868 close(fd);
1869 unlink("conftestmmap");
1870 exit(0);
1871 }
1872
1873 EOF
1874 if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1875 then
1876 ac_cv_func_mmap_fixed_mapped=yes
1877 else
1878 echo "configure: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 rm -fr conftest*
1881 ac_cv_func_mmap_fixed_mapped=no
1882 fi
1883 rm -fr conftest*
1884 fi
1885
1886 fi
1887
1888 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1889 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1890 cat >> confdefs.h <<\EOF
1891 #define HAVE_MMAP 1
1892 EOF
1893
1894 fi
1895
1896
1897 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1898 unistd.h values.h sys/param.h
1899 do
1900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1902 echo "configure:1903: checking for $ac_hdr" >&5
1903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1905 else
1906 cat > conftest.$ac_ext <<EOF
1907 #line 1908 "configure"
1908 #include "confdefs.h"
1909 #include <$ac_hdr>
1910 EOF
1911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1912 { (eval echo configure:1913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1914 if test -z "$ac_err"; then
1915 rm -rf conftest*
1916 eval "ac_cv_header_$ac_safe=yes"
1917 else
1918 echo "$ac_err" >&5
1919 echo "configure: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 rm -rf conftest*
1922 eval "ac_cv_header_$ac_safe=no"
1923 fi
1924 rm -f conftest*
1925 fi
1926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1927 echo "$ac_t""yes" 1>&6
1928 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1929 cat >> confdefs.h <<EOF
1930 #define $ac_tr_hdr 1
1931 EOF
1932
1933 else
1934 echo "$ac_t""no" 1>&6
1935 fi
1936 done
1937
1938 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
1939 __argz_count __argz_stringify __argz_next
1940 do
1941 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1942 echo "configure:1943: checking for $ac_func" >&5
1943 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945 else
1946 cat > conftest.$ac_ext <<EOF
1947 #line 1948 "configure"
1948 #include "confdefs.h"
1949 /* System header to define __stub macros and hopefully few prototypes,
1950 which can conflict with char $ac_func(); below. */
1951 #include <assert.h>
1952 /* Override any gcc2 internal prototype to avoid an error. */
1953 /* We use char because int might match the return type of a gcc2
1954 builtin and then its argument prototype would still apply. */
1955 char $ac_func();
1956
1957 int main() {
1958
1959 /* The GNU C library defines this for functions which it implements
1960 to always fail with ENOSYS. Some functions are actually named
1961 something starting with __ and the normal name is an alias. */
1962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1963 choke me
1964 #else
1965 $ac_func();
1966 #endif
1967
1968 ; return 0; }
1969 EOF
1970 if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1971 rm -rf conftest*
1972 eval "ac_cv_func_$ac_func=yes"
1973 else
1974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -rf conftest*
1977 eval "ac_cv_func_$ac_func=no"
1978 fi
1979 rm -f conftest*
1980 fi
1981
1982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1983 echo "$ac_t""yes" 1>&6
1984 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1985 cat >> confdefs.h <<EOF
1986 #define $ac_tr_func 1
1987 EOF
1988
1989 else
1990 echo "$ac_t""no" 1>&6
1991 fi
1992 done
1993
1994
1995 if test "${ac_cv_func_stpcpy+set}" != "set"; then
1996 for ac_func in stpcpy
1997 do
1998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1999 echo "configure:2000: checking for $ac_func" >&5
2000 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002 else
2003 cat > conftest.$ac_ext <<EOF
2004 #line 2005 "configure"
2005 #include "confdefs.h"
2006 /* System header to define __stub macros and hopefully few prototypes,
2007 which can conflict with char $ac_func(); below. */
2008 #include <assert.h>
2009 /* Override any gcc2 internal prototype to avoid an error. */
2010 /* We use char because int might match the return type of a gcc2
2011 builtin and then its argument prototype would still apply. */
2012 char $ac_func();
2013
2014 int main() {
2015
2016 /* The GNU C library defines this for functions which it implements
2017 to always fail with ENOSYS. Some functions are actually named
2018 something starting with __ and the normal name is an alias. */
2019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2020 choke me
2021 #else
2022 $ac_func();
2023 #endif
2024
2025 ; return 0; }
2026 EOF
2027 if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2028 rm -rf conftest*
2029 eval "ac_cv_func_$ac_func=yes"
2030 else
2031 echo "configure: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 rm -rf conftest*
2034 eval "ac_cv_func_$ac_func=no"
2035 fi
2036 rm -f conftest*
2037 fi
2038
2039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2040 echo "$ac_t""yes" 1>&6
2041 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2042 cat >> confdefs.h <<EOF
2043 #define $ac_tr_func 1
2044 EOF
2045
2046 else
2047 echo "$ac_t""no" 1>&6
2048 fi
2049 done
2050
2051 fi
2052 if test "${ac_cv_func_stpcpy}" = "yes"; then
2053 cat >> confdefs.h <<\EOF
2054 #define HAVE_STPCPY 1
2055 EOF
2056
2057 fi
2058
2059 if test $ac_cv_header_locale_h = yes; then
2060 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2061 echo "configure:2062: checking for LC_MESSAGES" >&5
2062 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2063 echo $ac_n "(cached) $ac_c" 1>&6
2064 else
2065 cat > conftest.$ac_ext <<EOF
2066 #line 2067 "configure"
2067 #include "confdefs.h"
2068 #include <locale.h>
2069 int main() {
2070 return LC_MESSAGES
2071 ; return 0; }
2072 EOF
2073 if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2074 rm -rf conftest*
2075 am_cv_val_LC_MESSAGES=yes
2076 else
2077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 rm -rf conftest*
2080 am_cv_val_LC_MESSAGES=no
2081 fi
2082 rm -f conftest*
2083 fi
2084
2085 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2086 if test $am_cv_val_LC_MESSAGES = yes; then
2087 cat >> confdefs.h <<\EOF
2088 #define HAVE_LC_MESSAGES 1
2089 EOF
2090
2091 fi
2092 fi
2093 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2094 echo "configure:2095: checking whether NLS is requested" >&5
2095 # Check whether --enable-nls or --disable-nls was given.
2096 if test "${enable_nls+set}" = set; then
2097 enableval="$enable_nls"
2098 USE_NLS=$enableval
2099 else
2100 USE_NLS=yes
2101 fi
2102
2103 echo "$ac_t""$USE_NLS" 1>&6
2104
2105
2106 USE_INCLUDED_LIBINTL=no
2107
2108 if test "$USE_NLS" = "yes"; then
2109 cat >> confdefs.h <<\EOF
2110 #define ENABLE_NLS 1
2111 EOF
2112
2113 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2114 echo "configure:2115: checking whether included gettext is requested" >&5
2115 # Check whether --with-included-gettext or --without-included-gettext was given.
2116 if test "${with_included_gettext+set}" = set; then
2117 withval="$with_included_gettext"
2118 nls_cv_force_use_gnu_gettext=$withval
2119 else
2120 nls_cv_force_use_gnu_gettext=no
2121 fi
2122
2123 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2124
2125 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2126 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2127 nls_cv_header_intl=
2128 nls_cv_header_libgt=
2129 CATOBJEXT=NONE
2130
2131 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2132 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2133 echo "configure:2134: checking for libintl.h" >&5
2134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2136 else
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <libintl.h>
2141 EOF
2142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2143 { (eval echo configure:2144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2145 if test -z "$ac_err"; then
2146 rm -rf conftest*
2147 eval "ac_cv_header_$ac_safe=yes"
2148 else
2149 echo "$ac_err" >&5
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2152 rm -rf conftest*
2153 eval "ac_cv_header_$ac_safe=no"
2154 fi
2155 rm -f conftest*
2156 fi
2157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2158 echo "$ac_t""yes" 1>&6
2159 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2160 echo "configure:2161: checking for gettext in libc" >&5
2161 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2162 echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164 cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 #include <libintl.h>
2168 int main() {
2169 return (int) gettext ("")
2170 ; return 0; }
2171 EOF
2172 if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2173 rm -rf conftest*
2174 gt_cv_func_gettext_libc=yes
2175 else
2176 echo "configure: failed program was:" >&5
2177 cat conftest.$ac_ext >&5
2178 rm -rf conftest*
2179 gt_cv_func_gettext_libc=no
2180 fi
2181 rm -f conftest*
2182 fi
2183
2184 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2185
2186 if test "$gt_cv_func_gettext_libc" != "yes"; then
2187 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2188 echo "configure:2189: checking for bindtextdomain in -lintl" >&5
2189 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193 ac_save_LIBS="$LIBS"
2194 LIBS="-lintl $LIBS"
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 /* Override any gcc2 internal prototype to avoid an error. */
2199 /* We use char because int might match the return type of a gcc2
2200 builtin and then its argument prototype would still apply. */
2201 char bindtextdomain();
2202
2203 int main() {
2204 bindtextdomain()
2205 ; return 0; }
2206 EOF
2207 if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2208 rm -rf conftest*
2209 eval "ac_cv_lib_$ac_lib_var=yes"
2210 else
2211 echo "configure: failed program was:" >&5
2212 cat conftest.$ac_ext >&5
2213 rm -rf conftest*
2214 eval "ac_cv_lib_$ac_lib_var=no"
2215 fi
2216 rm -f conftest*
2217 LIBS="$ac_save_LIBS"
2218
2219 fi
2220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2223 echo "configure:2224: checking for gettext in libintl" >&5
2224 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 cat > conftest.$ac_ext <<EOF
2228 #line 2229 "configure"
2229 #include "confdefs.h"
2230
2231 int main() {
2232 return (int) gettext ("")
2233 ; return 0; }
2234 EOF
2235 if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2236 rm -rf conftest*
2237 gt_cv_func_gettext_libintl=yes
2238 else
2239 echo "configure: failed program was:" >&5
2240 cat conftest.$ac_ext >&5
2241 rm -rf conftest*
2242 gt_cv_func_gettext_libintl=no
2243 fi
2244 rm -f conftest*
2245 fi
2246
2247 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2248 else
2249 echo "$ac_t""no" 1>&6
2250 fi
2251
2252 fi
2253
2254 if test "$gt_cv_func_gettext_libc" = "yes" \
2255 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2256 cat >> confdefs.h <<\EOF
2257 #define HAVE_GETTEXT 1
2258 EOF
2259
2260 # Extract the first word of "msgfmt", so it can be a program name with args.
2261 set dummy msgfmt; ac_word=$2
2262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2263 echo "configure:2264: checking for $ac_word" >&5
2264 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2265 echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267 case "$MSGFMT" in
2268 /*)
2269 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2270 ;;
2271 *)
2272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2273 for ac_dir in $PATH; do
2274 test -z "$ac_dir" && ac_dir=.
2275 if test -f $ac_dir/$ac_word; then
2276 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2277 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2278 break
2279 fi
2280 fi
2281 done
2282 IFS="$ac_save_ifs"
2283 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2284 ;;
2285 esac
2286 fi
2287 MSGFMT="$ac_cv_path_MSGFMT"
2288 if test -n "$MSGFMT"; then
2289 echo "$ac_t""$MSGFMT" 1>&6
2290 else
2291 echo "$ac_t""no" 1>&6
2292 fi
2293 if test "$MSGFMT" != "no"; then
2294 for ac_func in dcgettext
2295 do
2296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2297 echo "configure:2298: checking for $ac_func" >&5
2298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2300 else
2301 cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 /* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $ac_func(); below. */
2306 #include <assert.h>
2307 /* Override any gcc2 internal prototype to avoid an error. */
2308 /* We use char because int might match the return type of a gcc2
2309 builtin and then its argument prototype would still apply. */
2310 char $ac_func();
2311
2312 int main() {
2313
2314 /* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2318 choke me
2319 #else
2320 $ac_func();
2321 #endif
2322
2323 ; return 0; }
2324 EOF
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326 rm -rf conftest*
2327 eval "ac_cv_func_$ac_func=yes"
2328 else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 eval "ac_cv_func_$ac_func=no"
2333 fi
2334 rm -f conftest*
2335 fi
2336
2337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2340 cat >> confdefs.h <<EOF
2341 #define $ac_tr_func 1
2342 EOF
2343
2344 else
2345 echo "$ac_t""no" 1>&6
2346 fi
2347 done
2348
2349 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2350 set dummy gmsgfmt; ac_word=$2
2351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2352 echo "configure:2353: checking for $ac_word" >&5
2353 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356 case "$GMSGFMT" in
2357 /*)
2358 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2359 ;;
2360 ?:/*)
2361 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2362 ;;
2363 *)
2364 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2365 for ac_dir in $PATH; do
2366 test -z "$ac_dir" && ac_dir=.
2367 if test -f $ac_dir/$ac_word; then
2368 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2369 break
2370 fi
2371 done
2372 IFS="$ac_save_ifs"
2373 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2374 ;;
2375 esac
2376 fi
2377 GMSGFMT="$ac_cv_path_GMSGFMT"
2378 if test -n "$GMSGFMT"; then
2379 echo "$ac_t""$GMSGFMT" 1>&6
2380 else
2381 echo "$ac_t""no" 1>&6
2382 fi
2383
2384 # Extract the first word of "xgettext", so it can be a program name with args.
2385 set dummy xgettext; ac_word=$2
2386 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2387 echo "configure:2388: checking for $ac_word" >&5
2388 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2389 echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391 case "$XGETTEXT" in
2392 /*)
2393 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2394 ;;
2395 *)
2396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2397 for ac_dir in $PATH; do
2398 test -z "$ac_dir" && ac_dir=.
2399 if test -f $ac_dir/$ac_word; then
2400 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2401 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2402 break
2403 fi
2404 fi
2405 done
2406 IFS="$ac_save_ifs"
2407 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2408 ;;
2409 esac
2410 fi
2411 XGETTEXT="$ac_cv_path_XGETTEXT"
2412 if test -n "$XGETTEXT"; then
2413 echo "$ac_t""$XGETTEXT" 1>&6
2414 else
2415 echo "$ac_t""no" 1>&6
2416 fi
2417
2418 cat > conftest.$ac_ext <<EOF
2419 #line 2420 "configure"
2420 #include "confdefs.h"
2421
2422 int main() {
2423 extern int _nl_msg_cat_cntr;
2424 return _nl_msg_cat_cntr
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2428 rm -rf conftest*
2429 CATOBJEXT=.gmo
2430 DATADIRNAME=share
2431 else
2432 echo "configure: failed program was:" >&5
2433 cat conftest.$ac_ext >&5
2434 rm -rf conftest*
2435 CATOBJEXT=.mo
2436 DATADIRNAME=lib
2437 fi
2438 rm -f conftest*
2439 INSTOBJEXT=.mo
2440 fi
2441 fi
2442
2443 else
2444 echo "$ac_t""no" 1>&6
2445 fi
2446
2447
2448
2449 if test "$CATOBJEXT" = "NONE"; then
2450 nls_cv_use_gnu_gettext=yes
2451 fi
2452 fi
2453
2454 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2455 INTLOBJS="\$(GETTOBJS)"
2456 # Extract the first word of "msgfmt", so it can be a program name with args.
2457 set dummy msgfmt; ac_word=$2
2458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2459 echo "configure:2460: checking for $ac_word" >&5
2460 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2461 echo $ac_n "(cached) $ac_c" 1>&6
2462 else
2463 case "$MSGFMT" in
2464 /*)
2465 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2466 ;;
2467 *)
2468 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2469 for ac_dir in $PATH; do
2470 test -z "$ac_dir" && ac_dir=.
2471 if test -f $ac_dir/$ac_word; then
2472 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2473 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2474 break
2475 fi
2476 fi
2477 done
2478 IFS="$ac_save_ifs"
2479 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2480 ;;
2481 esac
2482 fi
2483 MSGFMT="$ac_cv_path_MSGFMT"
2484 if test -n "$MSGFMT"; then
2485 echo "$ac_t""$MSGFMT" 1>&6
2486 else
2487 echo "$ac_t""no" 1>&6
2488 fi
2489
2490 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2491 set dummy gmsgfmt; ac_word=$2
2492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2493 echo "configure:2494: checking for $ac_word" >&5
2494 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2495 echo $ac_n "(cached) $ac_c" 1>&6
2496 else
2497 case "$GMSGFMT" in
2498 /*)
2499 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2500 ;;
2501 ?:/*)
2502 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2503 ;;
2504 *)
2505 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2506 for ac_dir in $PATH; do
2507 test -z "$ac_dir" && ac_dir=.
2508 if test -f $ac_dir/$ac_word; then
2509 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2510 break
2511 fi
2512 done
2513 IFS="$ac_save_ifs"
2514 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2515 ;;
2516 esac
2517 fi
2518 GMSGFMT="$ac_cv_path_GMSGFMT"
2519 if test -n "$GMSGFMT"; then
2520 echo "$ac_t""$GMSGFMT" 1>&6
2521 else
2522 echo "$ac_t""no" 1>&6
2523 fi
2524
2525 # Extract the first word of "xgettext", so it can be a program name with args.
2526 set dummy xgettext; ac_word=$2
2527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2528 echo "configure:2529: checking for $ac_word" >&5
2529 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2530 echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532 case "$XGETTEXT" in
2533 /*)
2534 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2535 ;;
2536 *)
2537 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2538 for ac_dir in $PATH; do
2539 test -z "$ac_dir" && ac_dir=.
2540 if test -f $ac_dir/$ac_word; then
2541 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2542 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2543 break
2544 fi
2545 fi
2546 done
2547 IFS="$ac_save_ifs"
2548 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2549 ;;
2550 esac
2551 fi
2552 XGETTEXT="$ac_cv_path_XGETTEXT"
2553 if test -n "$XGETTEXT"; then
2554 echo "$ac_t""$XGETTEXT" 1>&6
2555 else
2556 echo "$ac_t""no" 1>&6
2557 fi
2558
2559
2560 USE_INCLUDED_LIBINTL=yes
2561 CATOBJEXT=.gmo
2562 INSTOBJEXT=.mo
2563 DATADIRNAME=share
2564 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2565 INTLLIBS=$INTLDEPS
2566 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2567 nls_cv_header_intl=libintl.h
2568 nls_cv_header_libgt=libgettext.h
2569 fi
2570
2571 if test "$XGETTEXT" != ":"; then
2572 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2573 : ;
2574 else
2575 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2576 XGETTEXT=":"
2577 fi
2578 fi
2579
2580 # We need to process the po/ directory.
2581 POSUB=po
2582 else
2583 DATADIRNAME=share
2584 nls_cv_header_intl=libintl.h
2585 nls_cv_header_libgt=libgettext.h
2586 fi
2587
2588 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2589 # because some of the sources are only built for this goal.
2590 if test "$PACKAGE" = gettext; then
2591 USE_NLS=yes
2592 USE_INCLUDED_LIBINTL=yes
2593 fi
2594
2595 for lang in $ALL_LINGUAS; do
2596 GMOFILES="$GMOFILES $lang.gmo"
2597 POFILES="$POFILES $lang.po"
2598 done
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613 if test "x$CATOBJEXT" != "x"; then
2614 if test "x$ALL_LINGUAS" = "x"; then
2615 LINGUAS=
2616 else
2617 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2618 echo "configure:2619: checking for catalogs to be installed" >&5
2619 NEW_LINGUAS=
2620 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2621 case "$ALL_LINGUAS" in
2622 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2623 esac
2624 done
2625 LINGUAS=$NEW_LINGUAS
2626 echo "$ac_t""$LINGUAS" 1>&6
2627 fi
2628
2629 if test -n "$LINGUAS"; then
2630 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2631 fi
2632 fi
2633
2634 if test $ac_cv_header_locale_h = yes; then
2635 INCLUDE_LOCALE_H="#include <locale.h>"
2636 else
2637 INCLUDE_LOCALE_H="\
2638 /* The system does not provide the header <locale.h>. Take care yourself. */"
2639 fi
2640
2641
2642 if test -f $srcdir/po2tbl.sed.in; then
2643 if test "$CATOBJEXT" = ".cat"; then
2644 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2645 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2646 echo "configure:2647: checking for linux/version.h" >&5
2647 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2648 echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650 cat > conftest.$ac_ext <<EOF
2651 #line 2652 "configure"
2652 #include "confdefs.h"
2653 #include <linux/version.h>
2654 EOF
2655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2656 { (eval echo configure:2657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2658 if test -z "$ac_err"; then
2659 rm -rf conftest*
2660 eval "ac_cv_header_$ac_safe=yes"
2661 else
2662 echo "$ac_err" >&5
2663 echo "configure: failed program was:" >&5
2664 cat conftest.$ac_ext >&5
2665 rm -rf conftest*
2666 eval "ac_cv_header_$ac_safe=no"
2667 fi
2668 rm -f conftest*
2669 fi
2670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2671 echo "$ac_t""yes" 1>&6
2672 msgformat=linux
2673 else
2674 echo "$ac_t""no" 1>&6
2675 msgformat=xopen
2676 fi
2677
2678
2679 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2680 fi
2681 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2682 $srcdir/po2tbl.sed.in > po2tbl.sed
2683 fi
2684
2685 if test "$PACKAGE" = "gettext"; then
2686 GT_NO="#NO#"
2687 GT_YES=
2688 else
2689 GT_NO=
2690 GT_YES="#YES#"
2691 fi
2692
2693
2694
2695 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2696
2697
2698 l=
2699
2700
2701 if test -d $srcdir/po; then
2702 test -d po || mkdir po
2703 if test "x$srcdir" != "x."; then
2704 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2705 posrcprefix="$srcdir/"
2706 else
2707 posrcprefix="../$srcdir/"
2708 fi
2709 else
2710 posrcprefix="../"
2711 fi
2712 rm -f po/POTFILES
2713 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2714 < $srcdir/po/POTFILES.in > po/POTFILES
2715 fi
2716
2717
2718
2719 CONFIG_OBS=
2720 CONFIG_DEPS=
2721 CONFIG_SRCS=
2722
2723 configdirs="doc testsuite"
2724
2725
2726 . ${srcdir}/configure.host
2727
2728 . ${srcdir}/configure.tgt
2729
2730
2731 # Find a good install program. We prefer a C program (faster),
2732 # so one script is as good as another. But avoid the broken or
2733 # incompatible versions:
2734 # SysV /etc/install, /usr/sbin/install
2735 # SunOS /usr/etc/install
2736 # IRIX /sbin/install
2737 # AIX /bin/install
2738 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2739 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2740 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2741 # ./install, which can be erroneously created by make from ./install.sh.
2742 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2743 echo "configure:2744: checking for a BSD compatible install" >&5
2744 if test -z "$INSTALL"; then
2745 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2746 echo $ac_n "(cached) $ac_c" 1>&6
2747 else
2748 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2749 for ac_dir in $PATH; do
2750 # Account for people who put trailing slashes in PATH elements.
2751 case "$ac_dir/" in
2752 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2753 *)
2754 # OSF1 and SCO ODT 3.0 have their own names for install.
2755 # Don't use installbsd from OSF since it installs stuff as root
2756 # by default.
2757 for ac_prog in ginstall scoinst install; do
2758 if test -f $ac_dir/$ac_prog; then
2759 if test $ac_prog = install &&
2760 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2761 # AIX install. It has an incompatible calling convention.
2762 :
2763 else
2764 ac_cv_path_install="$ac_dir/$ac_prog -c"
2765 break 2
2766 fi
2767 fi
2768 done
2769 ;;
2770 esac
2771 done
2772 IFS="$ac_save_IFS"
2773
2774 fi
2775 if test "${ac_cv_path_install+set}" = set; then
2776 INSTALL="$ac_cv_path_install"
2777 else
2778 # As a last resort, use the slow shell script. We don't cache a
2779 # path for INSTALL within a source directory, because that will
2780 # break other packages using the cache if that directory is
2781 # removed, or if the path is relative.
2782 INSTALL="$ac_install_sh"
2783 fi
2784 fi
2785 echo "$ac_t""$INSTALL" 1>&6
2786
2787 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2788 # It thinks the first close brace ends the variable substitution.
2789 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2790
2791 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2792
2793 if test $host != $build; then
2794 ac_tool_prefix=${host_alias}-
2795 else
2796 ac_tool_prefix=
2797 fi
2798
2799 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2800 set dummy ${ac_tool_prefix}ar; ac_word=$2
2801 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2802 echo "configure:2803: checking for $ac_word" >&5
2803 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2804 echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806 if test -n "$AR"; then
2807 ac_cv_prog_AR="$AR" # Let the user override the test.
2808 else
2809 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2810 for ac_dir in $PATH; do
2811 test -z "$ac_dir" && ac_dir=.
2812 if test -f $ac_dir/$ac_word; then
2813 ac_cv_prog_AR="${ac_tool_prefix}ar"
2814 break
2815 fi
2816 done
2817 IFS="$ac_save_ifs"
2818 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2819 fi
2820 fi
2821 AR="$ac_cv_prog_AR"
2822 if test -n "$AR"; then
2823 echo "$ac_t""$AR" 1>&6
2824 else
2825 echo "$ac_t""no" 1>&6
2826 fi
2827
2828
2829
2830 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2831 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2833 echo "configure:2834: checking for $ac_word" >&5
2834 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2835 echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837 if test -n "$RANLIB"; then
2838 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2839 else
2840 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2841 for ac_dir in $PATH; do
2842 test -z "$ac_dir" && ac_dir=.
2843 if test -f $ac_dir/$ac_word; then
2844 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2845 break
2846 fi
2847 done
2848 IFS="$ac_save_ifs"
2849 fi
2850 fi
2851 RANLIB="$ac_cv_prog_RANLIB"
2852 if test -n "$RANLIB"; then
2853 echo "$ac_t""$RANLIB" 1>&6
2854 else
2855 echo "$ac_t""no" 1>&6
2856 fi
2857
2858
2859 if test -z "$ac_cv_prog_RANLIB"; then
2860 if test -n "$ac_tool_prefix"; then
2861 # Extract the first word of "ranlib", so it can be a program name with args.
2862 set dummy ranlib; ac_word=$2
2863 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2864 echo "configure:2865: checking for $ac_word" >&5
2865 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2866 echo $ac_n "(cached) $ac_c" 1>&6
2867 else
2868 if test -n "$RANLIB"; then
2869 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2870 else
2871 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2872 for ac_dir in $PATH; do
2873 test -z "$ac_dir" && ac_dir=.
2874 if test -f $ac_dir/$ac_word; then
2875 ac_cv_prog_RANLIB="ranlib"
2876 break
2877 fi
2878 done
2879 IFS="$ac_save_ifs"
2880 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2881 fi
2882 fi
2883 RANLIB="$ac_cv_prog_RANLIB"
2884 if test -n "$RANLIB"; then
2885 echo "$ac_t""$RANLIB" 1>&6
2886 else
2887 echo "$ac_t""no" 1>&6
2888 fi
2889
2890 else
2891 RANLIB=":"
2892 fi
2893 fi
2894
2895 for ac_prog in 'bison -y' byacc
2896 do
2897 # Extract the first word of "$ac_prog", so it can be a program name with args.
2898 set dummy $ac_prog; ac_word=$2
2899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2900 echo "configure:2901: checking for $ac_word" >&5
2901 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2902 echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904 if test -n "$YACC"; then
2905 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2906 else
2907 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2908 for ac_dir in $PATH; do
2909 test -z "$ac_dir" && ac_dir=.
2910 if test -f $ac_dir/$ac_word; then
2911 ac_cv_prog_YACC="$ac_prog"
2912 break
2913 fi
2914 done
2915 IFS="$ac_save_ifs"
2916 fi
2917 fi
2918 YACC="$ac_cv_prog_YACC"
2919 if test -n "$YACC"; then
2920 echo "$ac_t""$YACC" 1>&6
2921 else
2922 echo "$ac_t""no" 1>&6
2923 fi
2924
2925 test -n "$YACC" && break
2926 done
2927 test -n "$YACC" || YACC="yacc"
2928
2929 for ac_prog in mawk gawk nawk awk
2930 do
2931 # Extract the first word of "$ac_prog", so it can be a program name with args.
2932 set dummy $ac_prog; ac_word=$2
2933 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2934 echo "configure:2935: checking for $ac_word" >&5
2935 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2936 echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938 if test -n "$AWK"; then
2939 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2940 else
2941 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2942 for ac_dir in $PATH; do
2943 test -z "$ac_dir" && ac_dir=.
2944 if test -f $ac_dir/$ac_word; then
2945 ac_cv_prog_AWK="$ac_prog"
2946 break
2947 fi
2948 done
2949 IFS="$ac_save_ifs"
2950 fi
2951 fi
2952 AWK="$ac_cv_prog_AWK"
2953 if test -n "$AWK"; then
2954 echo "$ac_t""$AWK" 1>&6
2955 else
2956 echo "$ac_t""no" 1>&6
2957 fi
2958
2959 test -n "$AWK" && break
2960 done
2961
2962
2963 if test "$program_transform_name" = s,x,x,; then
2964 program_transform_name=
2965 else
2966 # Double any \ or $. echo might interpret backslashes.
2967 cat <<\EOF_SED > conftestsed
2968 s,\\,\\\\,g; s,\$,$$,g
2969 EOF_SED
2970 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2971 rm -f conftestsed
2972 fi
2973 test "$program_prefix" != NONE &&
2974 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2975 # Use a double $ so make ignores it.
2976 test "$program_suffix" != NONE &&
2977 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2978
2979 # sed with no file args requires a program.
2980 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2981
2982
2983 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2984 echo "configure:2985: checking return type of signal handlers" >&5
2985 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2986 echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988 cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 #include <sys/types.h>
2992 #include <signal.h>
2993 #ifdef signal
2994 #undef signal
2995 #endif
2996 #ifdef __cplusplus
2997 extern "C" void (*signal (int, void (*)(int)))(int);
2998 #else
2999 void (*signal ()) ();
3000 #endif
3001
3002 int main() {
3003 int i;
3004 ; return 0; }
3005 EOF
3006 if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3007 rm -rf conftest*
3008 ac_cv_type_signal=void
3009 else
3010 echo "configure: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 rm -rf conftest*
3013 ac_cv_type_signal=int
3014 fi
3015 rm -f conftest*
3016 fi
3017
3018 echo "$ac_t""$ac_cv_type_signal" 1>&6
3019 cat >> confdefs.h <<EOF
3020 #define RETSIGTYPE $ac_cv_type_signal
3021 EOF
3022
3023
3024
3025 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3026 echo "configure:3027: checking for ANSI C header files" >&5
3027 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3028 echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033 #include <stdlib.h>
3034 #include <stdarg.h>
3035 #include <string.h>
3036 #include <float.h>
3037 EOF
3038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3039 { (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3041 if test -z "$ac_err"; then
3042 rm -rf conftest*
3043 ac_cv_header_stdc=yes
3044 else
3045 echo "$ac_err" >&5
3046 echo "configure: failed program was:" >&5
3047 cat conftest.$ac_ext >&5
3048 rm -rf conftest*
3049 ac_cv_header_stdc=no
3050 fi
3051 rm -f conftest*
3052
3053 if test $ac_cv_header_stdc = yes; then
3054 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3055 cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 #include <string.h>
3059 EOF
3060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3061 egrep "memchr" >/dev/null 2>&1; then
3062 :
3063 else
3064 rm -rf conftest*
3065 ac_cv_header_stdc=no
3066 fi
3067 rm -f conftest*
3068
3069 fi
3070
3071 if test $ac_cv_header_stdc = yes; then
3072 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3073 cat > conftest.$ac_ext <<EOF
3074 #line 3075 "configure"
3075 #include "confdefs.h"
3076 #include <stdlib.h>
3077 EOF
3078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3079 egrep "free" >/dev/null 2>&1; then
3080 :
3081 else
3082 rm -rf conftest*
3083 ac_cv_header_stdc=no
3084 fi
3085 rm -f conftest*
3086
3087 fi
3088
3089 if test $ac_cv_header_stdc = yes; then
3090 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3091 if test "$cross_compiling" = yes; then
3092 :
3093 else
3094 cat > conftest.$ac_ext <<EOF
3095 #line 3096 "configure"
3096 #include "confdefs.h"
3097 #include <ctype.h>
3098 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3099 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3100 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3101 int main () { int i; for (i = 0; i < 256; i++)
3102 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3103 exit (0); }
3104
3105 EOF
3106 if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3107 then
3108 :
3109 else
3110 echo "configure: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3112 rm -fr conftest*
3113 ac_cv_header_stdc=no
3114 fi
3115 rm -fr conftest*
3116 fi
3117
3118 fi
3119 fi
3120
3121 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3122 if test $ac_cv_header_stdc = yes; then
3123 cat >> confdefs.h <<\EOF
3124 #define STDC_HEADERS 1
3125 EOF
3126
3127 fi
3128
3129 for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h libintl.h wctype.h wchar.h
3130 do
3131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_hdr" >&5
3134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3135 echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <$ac_hdr>
3141 EOF
3142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3143 { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3145 if test -z "$ac_err"; then
3146 rm -rf conftest*
3147 eval "ac_cv_header_$ac_safe=yes"
3148 else
3149 echo "$ac_err" >&5
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3152 rm -rf conftest*
3153 eval "ac_cv_header_$ac_safe=no"
3154 fi
3155 rm -f conftest*
3156 fi
3157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3158 echo "$ac_t""yes" 1>&6
3159 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3160 cat >> confdefs.h <<EOF
3161 #define $ac_tr_hdr 1
3162 EOF
3163
3164 else
3165 echo "$ac_t""no" 1>&6
3166 fi
3167 done
3168
3169
3170 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3171 echo "configure:3172: checking whether stat file-mode macros are broken" >&5
3172 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 #include <sys/types.h>
3179 #include <sys/stat.h>
3180
3181 #if defined(S_ISBLK) && defined(S_IFDIR)
3182 # if S_ISBLK (S_IFDIR)
3183 You lose.
3184 # endif
3185 #endif
3186
3187 #if defined(S_ISBLK) && defined(S_IFCHR)
3188 # if S_ISBLK (S_IFCHR)
3189 You lose.
3190 # endif
3191 #endif
3192
3193 #if defined(S_ISLNK) && defined(S_IFREG)
3194 # if S_ISLNK (S_IFREG)
3195 You lose.
3196 # endif
3197 #endif
3198
3199 #if defined(S_ISSOCK) && defined(S_IFREG)
3200 # if S_ISSOCK (S_IFREG)
3201 You lose.
3202 # endif
3203 #endif
3204
3205 EOF
3206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3207 egrep "You lose" >/dev/null 2>&1; then
3208 rm -rf conftest*
3209 ac_cv_header_stat_broken=yes
3210 else
3211 rm -rf conftest*
3212 ac_cv_header_stat_broken=no
3213 fi
3214 rm -f conftest*
3215
3216 fi
3217
3218 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3219 if test $ac_cv_header_stat_broken = yes; then
3220 cat >> confdefs.h <<\EOF
3221 #define STAT_MACROS_BROKEN 1
3222 EOF
3223
3224 fi
3225
3226
3227 echo $ac_n "checking for working const""... $ac_c" 1>&6
3228 echo "configure:3229: checking for working const" >&5
3229 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3230 echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232 cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235
3236 int main() {
3237
3238 /* Ultrix mips cc rejects this. */
3239 typedef int charset[2]; const charset x;
3240 /* SunOS 4.1.1 cc rejects this. */
3241 char const *const *ccp;
3242 char **p;
3243 /* NEC SVR4.0.2 mips cc rejects this. */
3244 struct point {int x, y;};
3245 static struct point const zero = {0,0};
3246 /* AIX XL C 1.02.0.0 rejects this.
3247 It does not let you subtract one const X* pointer from another in an arm
3248 of an if-expression whose if-part is not a constant expression */
3249 const char *g = "string";
3250 ccp = &g + (g ? g-g : 0);
3251 /* HPUX 7.0 cc rejects these. */
3252 ++ccp;
3253 p = (char**) ccp;
3254 ccp = (char const *const *) p;
3255 { /* SCO 3.2v4 cc rejects this. */
3256 char *t;
3257 char const *s = 0 ? (char *) 0 : (char const *) 0;
3258
3259 *t++ = 0;
3260 }
3261 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3262 int x[] = {25, 17};
3263 const int *foo = &x[0];
3264 ++foo;
3265 }
3266 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3267 typedef const int *iptr;
3268 iptr p = 0;
3269 ++p;
3270 }
3271 { /* AIX XL C 1.02.0.0 rejects this saying
3272 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3273 struct s { int j; const int *ap[3]; };
3274 struct s *b; b->j = 5;
3275 }
3276 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3277 const int foo = 10;
3278 }
3279
3280 ; return 0; }
3281 EOF
3282 if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3283 rm -rf conftest*
3284 ac_cv_c_const=yes
3285 else
3286 echo "configure: failed program was:" >&5
3287 cat conftest.$ac_ext >&5
3288 rm -rf conftest*
3289 ac_cv_c_const=no
3290 fi
3291 rm -f conftest*
3292 fi
3293
3294 echo "$ac_t""$ac_cv_c_const" 1>&6
3295 if test $ac_cv_c_const = no; then
3296 cat >> confdefs.h <<\EOF
3297 #define const
3298 EOF
3299
3300 fi
3301
3302
3303 for ac_func in setpgid sbrk select poll sigaction isascii bzero bcopy memcpy btowc
3304 do
3305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3306 echo "configure:3307: checking for $ac_func" >&5
3307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3308 echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310 cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 /* System header to define __stub macros and hopefully few prototypes,
3314 which can conflict with char $ac_func(); below. */
3315 #include <assert.h>
3316 /* Override any gcc2 internal prototype to avoid an error. */
3317 /* We use char because int might match the return type of a gcc2
3318 builtin and then its argument prototype would still apply. */
3319 char $ac_func();
3320
3321 int main() {
3322
3323 /* The GNU C library defines this for functions which it implements
3324 to always fail with ENOSYS. Some functions are actually named
3325 something starting with __ and the normal name is an alias. */
3326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3327 choke me
3328 #else
3329 $ac_func();
3330 #endif
3331
3332 ; return 0; }
3333 EOF
3334 if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3335 rm -rf conftest*
3336 eval "ac_cv_func_$ac_func=yes"
3337 else
3338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 rm -rf conftest*
3341 eval "ac_cv_func_$ac_func=no"
3342 fi
3343 rm -f conftest*
3344 fi
3345
3346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3347 echo "$ac_t""yes" 1>&6
3348 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3349 cat >> confdefs.h <<EOF
3350 #define $ac_tr_func 1
3351 EOF
3352
3353 else
3354 echo "$ac_t""no" 1>&6
3355 fi
3356 done
3357
3358 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3359 # for constant arguments. Useless!
3360 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3361 echo "configure:3362: checking for working alloca.h" >&5
3362 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3363 echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365 cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 #include <alloca.h>
3369 int main() {
3370 char *p = alloca(2 * sizeof(int));
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374 rm -rf conftest*
3375 ac_cv_header_alloca_h=yes
3376 else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 ac_cv_header_alloca_h=no
3381 fi
3382 rm -f conftest*
3383 fi
3384
3385 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3386 if test $ac_cv_header_alloca_h = yes; then
3387 cat >> confdefs.h <<\EOF
3388 #define HAVE_ALLOCA_H 1
3389 EOF
3390
3391 fi
3392
3393 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3394 echo "configure:3395: checking for alloca" >&5
3395 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3396 echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401
3402 #ifdef __GNUC__
3403 # define alloca __builtin_alloca
3404 #else
3405 # ifdef _MSC_VER
3406 # include <malloc.h>
3407 # define alloca _alloca
3408 # else
3409 # if HAVE_ALLOCA_H
3410 # include <alloca.h>
3411 # else
3412 # ifdef _AIX
3413 #pragma alloca
3414 # else
3415 # ifndef alloca /* predefined by HP cc +Olibcalls */
3416 char *alloca ();
3417 # endif
3418 # endif
3419 # endif
3420 # endif
3421 #endif
3422
3423 int main() {
3424 char *p = (char *) alloca(1);
3425 ; return 0; }
3426 EOF
3427 if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3428 rm -rf conftest*
3429 ac_cv_func_alloca_works=yes
3430 else
3431 echo "configure: failed program was:" >&5
3432 cat conftest.$ac_ext >&5
3433 rm -rf conftest*
3434 ac_cv_func_alloca_works=no
3435 fi
3436 rm -f conftest*
3437 fi
3438
3439 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3440 if test $ac_cv_func_alloca_works = yes; then
3441 cat >> confdefs.h <<\EOF
3442 #define HAVE_ALLOCA 1
3443 EOF
3444
3445 fi
3446
3447 if test $ac_cv_func_alloca_works = no; then
3448 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3449 # that cause trouble. Some versions do not even contain alloca or
3450 # contain a buggy version. If you still want to use their alloca,
3451 # use ar to extract alloca.o from them instead of compiling alloca.c.
3452 ALLOCA=alloca.${ac_objext}
3453 cat >> confdefs.h <<\EOF
3454 #define C_ALLOCA 1
3455 EOF
3456
3457
3458 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3459 echo "configure:3460: checking whether alloca needs Cray hooks" >&5
3460 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3461 echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #if defined(CRAY) && ! defined(CRAY2)
3467 webecray
3468 #else
3469 wenotbecray
3470 #endif
3471
3472 EOF
3473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3474 egrep "webecray" >/dev/null 2>&1; then
3475 rm -rf conftest*
3476 ac_cv_os_cray=yes
3477 else
3478 rm -rf conftest*
3479 ac_cv_os_cray=no
3480 fi
3481 rm -f conftest*
3482
3483 fi
3484
3485 echo "$ac_t""$ac_cv_os_cray" 1>&6
3486 if test $ac_cv_os_cray = yes; then
3487 for ac_func in _getb67 GETB67 getb67; do
3488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3489 echo "configure:3490: checking for $ac_func" >&5
3490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493 cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 /* System header to define __stub macros and hopefully few prototypes,
3497 which can conflict with char $ac_func(); below. */
3498 #include <assert.h>
3499 /* Override any gcc2 internal prototype to avoid an error. */
3500 /* We use char because int might match the return type of a gcc2
3501 builtin and then its argument prototype would still apply. */
3502 char $ac_func();
3503
3504 int main() {
3505
3506 /* The GNU C library defines this for functions which it implements
3507 to always fail with ENOSYS. Some functions are actually named
3508 something starting with __ and the normal name is an alias. */
3509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3510 choke me
3511 #else
3512 $ac_func();
3513 #endif
3514
3515 ; return 0; }
3516 EOF
3517 if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3518 rm -rf conftest*
3519 eval "ac_cv_func_$ac_func=yes"
3520 else
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3523 rm -rf conftest*
3524 eval "ac_cv_func_$ac_func=no"
3525 fi
3526 rm -f conftest*
3527 fi
3528
3529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3530 echo "$ac_t""yes" 1>&6
3531 cat >> confdefs.h <<EOF
3532 #define CRAY_STACKSEG_END $ac_func
3533 EOF
3534
3535 break
3536 else
3537 echo "$ac_t""no" 1>&6
3538 fi
3539
3540 done
3541 fi
3542
3543 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3544 echo "configure:3545: checking stack direction for C alloca" >&5
3545 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3546 echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548 if test "$cross_compiling" = yes; then
3549 ac_cv_c_stack_direction=0
3550 else
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 find_stack_direction ()
3555 {
3556 static char *addr = 0;
3557 auto char dummy;
3558 if (addr == 0)
3559 {
3560 addr = &dummy;
3561 return find_stack_direction ();
3562 }
3563 else
3564 return (&dummy > addr) ? 1 : -1;
3565 }
3566 main ()
3567 {
3568 exit (find_stack_direction() < 0);
3569 }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3572 then
3573 ac_cv_c_stack_direction=1
3574 else
3575 echo "configure: failed program was:" >&5
3576 cat conftest.$ac_ext >&5
3577 rm -fr conftest*
3578 ac_cv_c_stack_direction=-1
3579 fi
3580 rm -fr conftest*
3581 fi
3582
3583 fi
3584
3585 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3586 cat >> confdefs.h <<EOF
3587 #define STACK_DIRECTION $ac_cv_c_stack_direction
3588 EOF
3589
3590 fi
3591
3592
3593 # If we are configured native on GNU/Linux, work around problems with sys/procfs.h
3594 if test "${target}" = "${host}"; then
3595 case "${host}" in
3596 i[3456]86-*-linux*)
3597 cat >> confdefs.h <<\EOF
3598 #define START_INFERIOR_TRAPS_EXPECTED 2
3599 EOF
3600
3601 cat >> confdefs.h <<\EOF
3602 #define sys_quotactl 1
3603 EOF
3604
3605 ;;
3606 esac
3607 fi
3608
3609 echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
3610 echo "configure:3611: checking for gregset_t type" >&5
3611 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
3612 echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <sys/procfs.h>
3618 int main() {
3619 gregset_t *gregsetp = 0
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623 rm -rf conftest*
3624 gdb_cv_have_gregset_t=yes
3625 else
3626 echo "configure: failed program was:" >&5
3627 cat conftest.$ac_ext >&5
3628 rm -rf conftest*
3629 gdb_cv_have_gregset_t=no
3630 fi
3631 rm -f conftest*
3632 fi
3633
3634 echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
3635 if test $gdb_cv_have_gregset_t = yes; then
3636 cat >> confdefs.h <<\EOF
3637 #define HAVE_GREGSET_T 1
3638 EOF
3639
3640 fi
3641
3642 echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
3643 echo "configure:3644: checking for fpregset_t type" >&5
3644 if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
3645 echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 #include <sys/procfs.h>
3651 int main() {
3652 fpregset_t *fpregsetp = 0
3653 ; return 0; }
3654 EOF
3655 if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3656 rm -rf conftest*
3657 gdb_cv_have_fpregset_t=yes
3658 else
3659 echo "configure: failed program was:" >&5
3660 cat conftest.$ac_ext >&5
3661 rm -rf conftest*
3662 gdb_cv_have_fpregset_t=no
3663 fi
3664 rm -f conftest*
3665 fi
3666
3667 echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
3668 if test $gdb_cv_have_fpregset_t = yes; then
3669 cat >> confdefs.h <<\EOF
3670 #define HAVE_FPREGSET_T 1
3671 EOF
3672
3673 fi
3674
3675 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3676 echo "configure:3677: checking for main in -lm" >&5
3677 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3679 echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681 ac_save_LIBS="$LIBS"
3682 LIBS="-lm $LIBS"
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686
3687 int main() {
3688 main()
3689 ; return 0; }
3690 EOF
3691 if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3692 rm -rf conftest*
3693 eval "ac_cv_lib_$ac_lib_var=yes"
3694 else
3695 echo "configure: failed program was:" >&5
3696 cat conftest.$ac_ext >&5
3697 rm -rf conftest*
3698 eval "ac_cv_lib_$ac_lib_var=no"
3699 fi
3700 rm -f conftest*
3701 LIBS="$ac_save_LIBS"
3702
3703 fi
3704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3705 echo "$ac_t""yes" 1>&6
3706 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3707 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3708 cat >> confdefs.h <<EOF
3709 #define $ac_tr_lib 1
3710 EOF
3711
3712 LIBS="-lm $LIBS"
3713
3714 else
3715 echo "$ac_t""no" 1>&6
3716 fi
3717
3718
3719
3720 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
3721 echo "configure:3722: checking for long long support in compiler" >&5
3722 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
3723 echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728
3729 int main() {
3730
3731 extern long long foo;
3732 switch (foo & 2) { case 0: return 1; }
3733
3734 ; return 0; }
3735 EOF
3736 if { (eval echo configure:3737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3737 rm -rf conftest*
3738 gdb_cv_c_long_long=yes
3739 else
3740 echo "configure: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3742 rm -rf conftest*
3743 gdb_cv_c_long_long=no
3744 fi
3745 rm -f conftest*
3746 fi
3747
3748 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
3749 if test $gdb_cv_c_long_long = yes; then
3750 cat >> confdefs.h <<\EOF
3751 #define CC_HAS_LONG_LONG 1
3752 EOF
3753
3754 fi
3755
3756
3757 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
3758 echo "configure:3759: checking for long long support in printf" >&5
3759 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
3760 echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762 if test "$cross_compiling" = yes; then
3763 gdb_cv_printf_has_long_long=no
3764 else
3765 cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768
3769 int main () {
3770 char buf[32];
3771 long long l = 0;
3772 l = (l << 16) + 0x0123;
3773 l = (l << 16) + 0x4567;
3774 l = (l << 16) + 0x89ab;
3775 l = (l << 16) + 0xcdef;
3776 sprintf (buf, "0x%016llx", l);
3777 return (strcmp ("0x0123456789abcdef", buf));
3778 }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3781 then
3782 gdb_cv_printf_has_long_long=yes
3783 else
3784 echo "configure: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 rm -fr conftest*
3787 gdb_cv_printf_has_long_long=no
3788 fi
3789 rm -fr conftest*
3790 fi
3791
3792 fi
3793
3794 if test $gdb_cv_printf_has_long_long = yes; then
3795 cat >> confdefs.h <<\EOF
3796 #define PRINTF_HAS_LONG_LONG 1
3797 EOF
3798
3799 fi
3800 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
3801
3802
3803 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
3804 echo "configure:3805: checking for long double support in compiler" >&5
3805 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
3806 echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808 cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811
3812 int main() {
3813 long double foo;
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3817 rm -rf conftest*
3818 ac_cv_c_long_double=yes
3819 else
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822 rm -rf conftest*
3823 ac_cv_c_long_double=no
3824 fi
3825 rm -f conftest*
3826 fi
3827
3828 echo "$ac_t""$ac_cv_c_long_double" 1>&6
3829 if test $ac_cv_c_long_double = yes; then
3830 cat >> confdefs.h <<\EOF
3831 #define HAVE_LONG_DOUBLE 1
3832 EOF
3833
3834 fi
3835
3836
3837 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
3838 echo "configure:3839: checking for long double support in printf" >&5
3839 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
3840 echo $ac_n "(cached) $ac_c" 1>&6
3841 else
3842 if test "$cross_compiling" = yes; then
3843 gdb_cv_printf_has_long_double=no
3844 else
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848
3849 int main () {
3850 char buf[16];
3851 long double f = 3.141592653;
3852 sprintf (buf, "%Lg", f);
3853 return (strncmp ("3.14159", buf, 7));
3854 }
3855 EOF
3856 if { (eval echo configure:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3857 then
3858 gdb_cv_printf_has_long_double=yes
3859 else
3860 echo "configure: failed program was:" >&5
3861 cat conftest.$ac_ext >&5
3862 rm -fr conftest*
3863 gdb_cv_printf_has_long_double=no
3864 fi
3865 rm -fr conftest*
3866 fi
3867
3868 fi
3869
3870 if test $gdb_cv_printf_has_long_double = yes; then
3871 cat >> confdefs.h <<\EOF
3872 #define PRINTF_HAS_LONG_DOUBLE 1
3873 EOF
3874
3875 fi
3876 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
3877
3878
3879 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
3880 echo "configure:3881: checking for long double support in scanf" >&5
3881 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
3882 echo $ac_n "(cached) $ac_c" 1>&6
3883 else
3884 if test "$cross_compiling" = yes; then
3885 gdb_cv_scanf_has_long_double=no
3886 else
3887 cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890
3891 int main () {
3892 char *buf = "3.141592653";
3893 long double f = 0;
3894 sscanf (buf, "%Lg", &f);
3895 return !(f > 3.14159 && f < 3.14160);
3896 }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3899 then
3900 gdb_cv_scanf_has_long_double=yes
3901 else
3902 echo "configure: failed program was:" >&5
3903 cat conftest.$ac_ext >&5
3904 rm -fr conftest*
3905 gdb_cv_scanf_has_long_double=no
3906 fi
3907 rm -fr conftest*
3908 fi
3909
3910 fi
3911
3912 if test $gdb_cv_scanf_has_long_double = yes; then
3913 cat >> confdefs.h <<\EOF
3914 #define SCANF_HAS_LONG_DOUBLE 1
3915 EOF
3916
3917 fi
3918 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
3919
3920 for ac_hdr in unistd.h
3921 do
3922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3924 echo "configure:3925: checking for $ac_hdr" >&5
3925 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3926 echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928 cat > conftest.$ac_ext <<EOF
3929 #line 3930 "configure"
3930 #include "confdefs.h"
3931 #include <$ac_hdr>
3932 EOF
3933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3934 { (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3936 if test -z "$ac_err"; then
3937 rm -rf conftest*
3938 eval "ac_cv_header_$ac_safe=yes"
3939 else
3940 echo "$ac_err" >&5
3941 echo "configure: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 rm -rf conftest*
3944 eval "ac_cv_header_$ac_safe=no"
3945 fi
3946 rm -f conftest*
3947 fi
3948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3949 echo "$ac_t""yes" 1>&6
3950 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3951 cat >> confdefs.h <<EOF
3952 #define $ac_tr_hdr 1
3953 EOF
3954
3955 else
3956 echo "$ac_t""no" 1>&6
3957 fi
3958 done
3959
3960 for ac_func in getpagesize
3961 do
3962 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3963 echo "configure:3964: checking for $ac_func" >&5
3964 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3965 echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 /* System header to define __stub macros and hopefully few prototypes,
3971 which can conflict with char $ac_func(); below. */
3972 #include <assert.h>
3973 /* Override any gcc2 internal prototype to avoid an error. */
3974 /* We use char because int might match the return type of a gcc2
3975 builtin and then its argument prototype would still apply. */
3976 char $ac_func();
3977
3978 int main() {
3979
3980 /* The GNU C library defines this for functions which it implements
3981 to always fail with ENOSYS. Some functions are actually named
3982 something starting with __ and the normal name is an alias. */
3983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3984 choke me
3985 #else
3986 $ac_func();
3987 #endif
3988
3989 ; return 0; }
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992 rm -rf conftest*
3993 eval "ac_cv_func_$ac_func=yes"
3994 else
3995 echo "configure: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
3997 rm -rf conftest*
3998 eval "ac_cv_func_$ac_func=no"
3999 fi
4000 rm -f conftest*
4001 fi
4002
4003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4004 echo "$ac_t""yes" 1>&6
4005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006 cat >> confdefs.h <<EOF
4007 #define $ac_tr_func 1
4008 EOF
4009
4010 else
4011 echo "$ac_t""no" 1>&6
4012 fi
4013 done
4014
4015 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4016 echo "configure:4017: checking for working mmap" >&5
4017 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020 if test "$cross_compiling" = yes; then
4021 ac_cv_func_mmap_fixed_mapped=no
4022 else
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026
4027 /* Thanks to Mike Haertel and Jim Avera for this test.
4028 Here is a matrix of mmap possibilities:
4029 mmap private not fixed
4030 mmap private fixed at somewhere currently unmapped
4031 mmap private fixed at somewhere already mapped
4032 mmap shared not fixed
4033 mmap shared fixed at somewhere currently unmapped
4034 mmap shared fixed at somewhere already mapped
4035 For private mappings, we should verify that changes cannot be read()
4036 back from the file, nor mmap's back from the file at a different
4037 address. (There have been systems where private was not correctly
4038 implemented like the infamous i386 svr4.0, and systems where the
4039 VM page cache was not coherent with the filesystem buffer cache
4040 like early versions of FreeBSD and possibly contemporary NetBSD.)
4041 For shared mappings, we should conversely verify that changes get
4042 propogated back to all the places they're supposed to be.
4043
4044 Grep wants private fixed already mapped.
4045 The main things grep needs to know about mmap are:
4046 * does it exist and is it safe to write into the mmap'd area
4047 * how to use it (BSD variants) */
4048 #include <sys/types.h>
4049 #include <fcntl.h>
4050 #include <sys/mman.h>
4051
4052 /* This mess was copied from the GNU getpagesize.h. */
4053 #ifndef HAVE_GETPAGESIZE
4054 # ifdef HAVE_UNISTD_H
4055 # include <unistd.h>
4056 # endif
4057
4058 /* Assume that all systems that can run configure have sys/param.h. */
4059 # ifndef HAVE_SYS_PARAM_H
4060 # define HAVE_SYS_PARAM_H 1
4061 # endif
4062
4063 # ifdef _SC_PAGESIZE
4064 # define getpagesize() sysconf(_SC_PAGESIZE)
4065 # else /* no _SC_PAGESIZE */
4066 # ifdef HAVE_SYS_PARAM_H
4067 # include <sys/param.h>
4068 # ifdef EXEC_PAGESIZE
4069 # define getpagesize() EXEC_PAGESIZE
4070 # else /* no EXEC_PAGESIZE */
4071 # ifdef NBPG
4072 # define getpagesize() NBPG * CLSIZE
4073 # ifndef CLSIZE
4074 # define CLSIZE 1
4075 # endif /* no CLSIZE */
4076 # else /* no NBPG */
4077 # ifdef NBPC
4078 # define getpagesize() NBPC
4079 # else /* no NBPC */
4080 # ifdef PAGESIZE
4081 # define getpagesize() PAGESIZE
4082 # endif /* PAGESIZE */
4083 # endif /* no NBPC */
4084 # endif /* no NBPG */
4085 # endif /* no EXEC_PAGESIZE */
4086 # else /* no HAVE_SYS_PARAM_H */
4087 # define getpagesize() 8192 /* punt totally */
4088 # endif /* no HAVE_SYS_PARAM_H */
4089 # endif /* no _SC_PAGESIZE */
4090
4091 #endif /* no HAVE_GETPAGESIZE */
4092
4093 #ifdef __cplusplus
4094 extern "C" { void *malloc(unsigned); }
4095 #else
4096 char *malloc();
4097 #endif
4098
4099 int
4100 main()
4101 {
4102 char *data, *data2, *data3;
4103 int i, pagesize;
4104 int fd;
4105
4106 pagesize = getpagesize();
4107
4108 /*
4109 * First, make a file with some known garbage in it.
4110 */
4111 data = malloc(pagesize);
4112 if (!data)
4113 exit(1);
4114 for (i = 0; i < pagesize; ++i)
4115 *(data + i) = rand();
4116 umask(0);
4117 fd = creat("conftestmmap", 0600);
4118 if (fd < 0)
4119 exit(1);
4120 if (write(fd, data, pagesize) != pagesize)
4121 exit(1);
4122 close(fd);
4123
4124 /*
4125 * Next, try to mmap the file at a fixed address which
4126 * already has something else allocated at it. If we can,
4127 * also make sure that we see the same garbage.
4128 */
4129 fd = open("conftestmmap", O_RDWR);
4130 if (fd < 0)
4131 exit(1);
4132 data2 = malloc(2 * pagesize);
4133 if (!data2)
4134 exit(1);
4135 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4136 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4137 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4138 exit(1);
4139 for (i = 0; i < pagesize; ++i)
4140 if (*(data + i) != *(data2 + i))
4141 exit(1);
4142
4143 /*
4144 * Finally, make sure that changes to the mapped area
4145 * do not percolate back to the file as seen by read().
4146 * (This is a bug on some variants of i386 svr4.0.)
4147 */
4148 for (i = 0; i < pagesize; ++i)
4149 *(data2 + i) = *(data2 + i) + 1;
4150 data3 = malloc(pagesize);
4151 if (!data3)
4152 exit(1);
4153 if (read(fd, data3, pagesize) != pagesize)
4154 exit(1);
4155 for (i = 0; i < pagesize; ++i)
4156 if (*(data + i) != *(data3 + i))
4157 exit(1);
4158 close(fd);
4159 unlink("conftestmmap");
4160 exit(0);
4161 }
4162
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4165 then
4166 ac_cv_func_mmap_fixed_mapped=yes
4167 else
4168 echo "configure: failed program was:" >&5
4169 cat conftest.$ac_ext >&5
4170 rm -fr conftest*
4171 ac_cv_func_mmap_fixed_mapped=no
4172 fi
4173 rm -fr conftest*
4174 fi
4175
4176 fi
4177
4178 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4179 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4180 cat >> confdefs.h <<\EOF
4181 #define HAVE_MMAP 1
4182 EOF
4183
4184 fi
4185
4186
4187 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4188 echo "configure:4189: checking whether malloc must be declared" >&5
4189 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4190 echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195
4196 #include <stdio.h>
4197 #ifdef HAVE_STRING_H
4198 #include <string.h>
4199 #else
4200 #ifdef HAVE_STRINGS_H
4201 #include <strings.h>
4202 #endif
4203 #endif
4204 #ifdef HAVE_STDLIB_H
4205 #include <stdlib.h>
4206 #endif
4207 #ifdef HAVE_UNISTD_H
4208 #include <unistd.h>
4209 #endif
4210 int main() {
4211 char *(*pfn) = (char *(*)) malloc
4212 ; return 0; }
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4215 rm -rf conftest*
4216 bfd_cv_decl_needed_malloc=no
4217 else
4218 echo "configure: failed program was:" >&5
4219 cat conftest.$ac_ext >&5
4220 rm -rf conftest*
4221 bfd_cv_decl_needed_malloc=yes
4222 fi
4223 rm -f conftest*
4224 fi
4225
4226 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4227 if test $bfd_cv_decl_needed_malloc = yes; then
4228 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4229 cat >> confdefs.h <<EOF
4230 #define $bfd_tr_decl 1
4231 EOF
4232
4233 fi
4234
4235 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4236 echo "configure:4237: checking whether realloc must be declared" >&5
4237 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4238 echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243
4244 #include <stdio.h>
4245 #ifdef HAVE_STRING_H
4246 #include <string.h>
4247 #else
4248 #ifdef HAVE_STRINGS_H
4249 #include <strings.h>
4250 #endif
4251 #endif
4252 #ifdef HAVE_STDLIB_H
4253 #include <stdlib.h>
4254 #endif
4255 #ifdef HAVE_UNISTD_H
4256 #include <unistd.h>
4257 #endif
4258 int main() {
4259 char *(*pfn) = (char *(*)) realloc
4260 ; return 0; }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4263 rm -rf conftest*
4264 bfd_cv_decl_needed_realloc=no
4265 else
4266 echo "configure: failed program was:" >&5
4267 cat conftest.$ac_ext >&5
4268 rm -rf conftest*
4269 bfd_cv_decl_needed_realloc=yes
4270 fi
4271 rm -f conftest*
4272 fi
4273
4274 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4275 if test $bfd_cv_decl_needed_realloc = yes; then
4276 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4277 cat >> confdefs.h <<EOF
4278 #define $bfd_tr_decl 1
4279 EOF
4280
4281 fi
4282
4283 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4284 echo "configure:4285: checking whether free must be declared" >&5
4285 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4286 echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291
4292 #include <stdio.h>
4293 #ifdef HAVE_STRING_H
4294 #include <string.h>
4295 #else
4296 #ifdef HAVE_STRINGS_H
4297 #include <strings.h>
4298 #endif
4299 #endif
4300 #ifdef HAVE_STDLIB_H
4301 #include <stdlib.h>
4302 #endif
4303 #ifdef HAVE_UNISTD_H
4304 #include <unistd.h>
4305 #endif
4306 int main() {
4307 char *(*pfn) = (char *(*)) free
4308 ; return 0; }
4309 EOF
4310 if { (eval echo configure:4311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4311 rm -rf conftest*
4312 bfd_cv_decl_needed_free=no
4313 else
4314 echo "configure: failed program was:" >&5
4315 cat conftest.$ac_ext >&5
4316 rm -rf conftest*
4317 bfd_cv_decl_needed_free=yes
4318 fi
4319 rm -f conftest*
4320 fi
4321
4322 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4323 if test $bfd_cv_decl_needed_free = yes; then
4324 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4325 cat >> confdefs.h <<EOF
4326 #define $bfd_tr_decl 1
4327 EOF
4328
4329 fi
4330
4331
4332 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
4333 echo "configure:4334: checking whether strerror must be declared" >&5
4334 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4335 echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337 cat > conftest.$ac_ext <<EOF
4338 #line 4339 "configure"
4339 #include "confdefs.h"
4340
4341 #include <stdio.h>
4342 #ifdef HAVE_STRING_H
4343 #include <string.h>
4344 #else
4345 #ifdef HAVE_STRINGS_H
4346 #include <strings.h>
4347 #endif
4348 #endif
4349 #ifdef HAVE_STDLIB_H
4350 #include <stdlib.h>
4351 #endif
4352 #ifdef HAVE_UNISTD_H
4353 #include <unistd.h>
4354 #endif
4355 int main() {
4356 char *(*pfn) = (char *(*)) strerror
4357 ; return 0; }
4358 EOF
4359 if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4360 rm -rf conftest*
4361 bfd_cv_decl_needed_strerror=no
4362 else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -rf conftest*
4366 bfd_cv_decl_needed_strerror=yes
4367 fi
4368 rm -f conftest*
4369 fi
4370
4371 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4372 if test $bfd_cv_decl_needed_strerror = yes; then
4373 bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4374 cat >> confdefs.h <<EOF
4375 #define $bfd_tr_decl 1
4376 EOF
4377
4378 fi
4379
4380
4381
4382
4383 if test ${build} = ${host} -a ${host} = ${target} ; then
4384 case ${host_os} in
4385 hpux*)
4386 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4387 echo "configure:4388: checking for HPUX/OSF thread support" >&5
4388 if test -f /usr/include/dce/cma_config.h ; then
4389 if test "$GCC" = "yes" ; then
4390 echo "$ac_t""yes" 1>&6
4391 cat >> confdefs.h <<\EOF
4392 #define HAVE_HPUX_THREAD_SUPPORT 1
4393 EOF
4394
4395 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
4396 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4397 else
4398 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4399 fi
4400 else
4401 echo "$ac_t""no" 1>&6
4402 fi
4403 ;;
4404 solaris*)
4405 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4406 echo "configure:4407: checking for Solaris thread debugging library" >&5
4407 if test -f /usr/lib/libthread_db.so.1 ; then
4408 echo "$ac_t""yes" 1>&6
4409 cat >> confdefs.h <<\EOF
4410 #define HAVE_THREAD_DB_LIB 1
4411 EOF
4412
4413 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
4414 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4415 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4416 echo "configure:4417: checking for dlopen in -ldl" >&5
4417 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421 ac_save_LIBS="$LIBS"
4422 LIBS="-ldl $LIBS"
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 /* Override any gcc2 internal prototype to avoid an error. */
4427 /* We use char because int might match the return type of a gcc2
4428 builtin and then its argument prototype would still apply. */
4429 char dlopen();
4430
4431 int main() {
4432 dlopen()
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436 rm -rf conftest*
4437 eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439 echo "configure: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
4441 rm -rf conftest*
4442 eval "ac_cv_lib_$ac_lib_var=no"
4443 fi
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4446
4447 fi
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449 echo "$ac_t""yes" 1>&6
4450 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4451 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4452 cat >> confdefs.h <<EOF
4453 #define $ac_tr_lib 1
4454 EOF
4455
4456 LIBS="-ldl $LIBS"
4457
4458 else
4459 echo "$ac_t""no" 1>&6
4460 fi
4461
4462 if test "$GCC" = "yes" ; then
4463 # The GNU linker requires the -export-dynamic option to make
4464 # all symbols visible in the dynamic symbol table.
4465 hold_ldflags=$LDFLAGS
4466 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4467 echo "configure:4468: checking for the ld -export-dynamic flag" >&5
4468 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
4469 cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472
4473 int main() {
4474 int i;
4475 ; return 0; }
4476 EOF
4477 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4478 rm -rf conftest*
4479 found=yes
4480 else
4481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
4484 found=no
4485 fi
4486 rm -f conftest*
4487 LDFLAGS=$hold_ldflags
4488 echo "$ac_t""$found" 1>&6
4489 if test $found = yes; then
4490 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
4491 fi
4492 fi
4493 else
4494 echo "$ac_t""no" 1>&6
4495 fi
4496 ;;
4497 esac
4498
4499 fi
4500
4501 ENABLE_CFLAGS=
4502
4503 # Check whether --enable-netrom or --disable-netrom was given.
4504 if test "${enable_netrom+set}" = set; then
4505 enableval="$enable_netrom"
4506 case "${enableval}" in
4507 yes) enable_netrom=yes ;;
4508 no) enable_netrom=no ;;
4509 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
4510 esac
4511 fi
4512
4513
4514 if test "${enable_netrom}" = "yes"; then
4515 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
4516 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
4517 fi
4518
4519 MMALLOC_CFLAGS=
4520 MMALLOC=
4521
4522
4523
4524 # Check whether --with-mmalloc or --without-mmalloc was given.
4525 if test "${with_mmalloc+set}" = set; then
4526 withval="$with_mmalloc"
4527 case "${withval}" in
4528 yes) want_mmalloc=true ;;
4529 no) want_mmalloc=false;;
4530 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
4531 esac
4532 else
4533 want_mmalloc=false
4534 fi
4535
4536 if test x$want_mmalloc = xtrue; then
4537 cat >> confdefs.h <<\EOF
4538 #define USE_MMALLOC 1
4539 EOF
4540
4541 cat >> confdefs.h <<\EOF
4542 #define MMCHECK_FORCE 1
4543 EOF
4544
4545 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
4546 MMALLOC='../mmalloc/libmmalloc.a'
4547 fi
4548
4549 # start-sanitize-gdbtk
4550 ENABLE_IDE=
4551 # Check whether --enable-ide or --disable-ide was given.
4552 if test "${enable_ide+set}" = set; then
4553 enableval="$enable_ide"
4554 :
4555 fi
4556
4557 if test "$enable_ide" = yes; then
4558 enable_ide=yes
4559 ENABLE_IDE=1
4560 else
4561 enable_ide=no
4562 fi
4563
4564
4565 # Check whether --with-foundry-libs or --without-foundry-libs was given.
4566 if test "${with_foundry_libs+set}" = set; then
4567 withval="$with_foundry_libs"
4568 FOUNDRY_LIB_BASE=${withval}
4569 fi
4570
4571
4572
4573 #
4574 # This is the Foundry SDK
4575 #
4576 # These variables are used to determine where the Foundry libs and
4577 # header files are located.
4578 #
4579 if test "$FOUNDRY_LIB_BASE" != ""; then
4580 LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
4581 GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4582 if test x$enable_ide = xyes; then
4583 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
4584 IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
4585 else
4586 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4587 fi
4588 LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
4589 LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
4590 IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
4591 else
4592 LIBGUI="../libgui/src/libgui.a"
4593 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
4594 if test x$enable_ide = xyes; then
4595 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
4596 IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
4597 else
4598 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
4599 fi
4600 LIBIDETCL="../libidetcl/src/libidetcl.a"
4601 LIBIDE="../libide/src/libide.a"
4602 IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
4603 fi
4604
4605
4606
4607
4608
4609
4610
4611
4612 ENABLE_GDBTK=
4613
4614 # Check whether --enable-gdbtk or --disable-gdbtk was given.
4615 if test "${enable_gdbtk+set}" = set; then
4616 enableval="$enable_gdbtk"
4617 case "${enableval}" in
4618 yes)
4619 case "$host" in
4620 *go32*)
4621 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
4622 enable_gdbtk=no ;;
4623 *windows*)
4624 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
4625 enable_gdbtk=no ;;
4626 *)
4627 enable_gdbtk=yes ;;
4628 esac ;;
4629 no)
4630 enable_gdbtk=no ;;
4631 *)
4632 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
4633 esac
4634 else
4635
4636 # Default is on for everything but go32 and cygwin32
4637 case "$host" in
4638 *go32* | *windows*)
4639 ;;
4640 *)
4641 enable_gdbtk=yes ;;
4642 esac
4643
4644 fi
4645
4646
4647 # In the cygwin32 environment, we need some additional flags.
4648 echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
4649 echo "configure:4650: checking for cygwin32" >&5
4650 if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then
4651 echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653 cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656
4657 #ifdef __CYGWIN32__
4658 lose
4659 #endif
4660 EOF
4661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4662 egrep "lose" >/dev/null 2>&1; then
4663 rm -rf conftest*
4664 gdb_cv_os_cygwin32=yes
4665 else
4666 rm -rf conftest*
4667 gdb_cv_os_cygwin32=no
4668 fi
4669 rm -f conftest*
4670
4671 fi
4672
4673 echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6
4674
4675 WIN32LIBS=
4676 WIN32LDAPP=
4677
4678
4679
4680 WINDRES=${WINDRES-windres}
4681
4682
4683 if test x$gdb_cv_os_cygwin32 = xyes; then
4684 if test x$enable_ide = xyes; then
4685 WIN32LIBS="-ladvapi32"
4686 fi
4687 fi
4688
4689 configdir="unix"
4690
4691 GDBTKLIBS=
4692 if test "${enable_gdbtk}" = "yes"; then
4693
4694
4695 #
4696 # Ok, lets find the tcl configuration
4697 # First, look for one uninstalled.
4698 # the alternative search directory is invoked by --with-tclconfig
4699 #
4700
4701 if test x"${no_tcl}" = x ; then
4702 # we reset no_tcl in case something fails here
4703 no_tcl=true
4704 # Check whether --with-tclconfig or --without-tclconfig was given.
4705 if test "${with_tclconfig+set}" = set; then
4706 withval="$with_tclconfig"
4707 with_tclconfig=${withval}
4708 fi
4709
4710 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
4711 echo "configure:4712: checking for Tcl configuration" >&5
4712 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
4713 echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715
4716
4717 # First check to see if --with-tclconfig was specified.
4718 if test x"${with_tclconfig}" != x ; then
4719 if test -f "${with_tclconfig}/tclConfig.sh" ; then
4720 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
4721 else
4722 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
4723 fi
4724 fi
4725
4726 # then check for a private Tcl installation
4727 if test x"${ac_cv_c_tclconfig}" = x ; then
4728 for i in \
4729 ../tcl \
4730 `ls -dr ../tcl[7-9]* 2>/dev/null` \
4731 ../../tcl \
4732 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
4733 ../../../tcl \
4734 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
4735 if test -f "$i/${configdir}/tclConfig.sh" ; then
4736 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
4737 break
4738 fi
4739 done
4740 fi
4741 # check in a few common install locations
4742 if test x"${ac_cv_c_tclconfig}" = x ; then
4743 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4744 if test -f "$i/tclConfig.sh" ; then
4745 ac_cv_c_tclconfig=`(cd $i; pwd)`
4746 break
4747 fi
4748 done
4749 fi
4750 # check in a few other private locations
4751 if test x"${ac_cv_c_tclconfig}" = x ; then
4752 for i in \
4753 ${srcdir}/../tcl \
4754 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
4755 if test -f "$i/${configdir}/tclConfig.sh" ; then
4756 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
4757 break
4758 fi
4759 done
4760 fi
4761
4762 fi
4763
4764 if test x"${ac_cv_c_tclconfig}" = x ; then
4765 TCLCONFIG="# no Tcl configs found"
4766 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
4767 else
4768 no_tcl=
4769 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
4770 echo "$ac_t""found $TCLCONFIG" 1>&6
4771 fi
4772 fi
4773
4774 if test -z "${no_tcl}"; then
4775
4776 . $TCLCONFIG
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803 #
4804 # Ok, lets find the tk configuration
4805 # First, look for one uninstalled.
4806 # the alternative search directory is invoked by --with-tkconfig
4807 #
4808
4809 if test x"${no_tk}" = x ; then
4810 # we reset no_tk in case something fails here
4811 no_tk=true
4812 # Check whether --with-tkconfig or --without-tkconfig was given.
4813 if test "${with_tkconfig+set}" = set; then
4814 withval="$with_tkconfig"
4815 with_tkconfig=${withval}
4816 fi
4817
4818 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
4819 echo "configure:4820: checking for Tk configuration" >&5
4820 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
4821 echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823
4824
4825 # First check to see if --with-tkconfig was specified.
4826 if test x"${with_tkconfig}" != x ; then
4827 if test -f "${with_tkconfig}/tkConfig.sh" ; then
4828 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
4829 else
4830 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
4831 fi
4832 fi
4833
4834 # then check for a private Tk library
4835 if test x"${ac_cv_c_tkconfig}" = x ; then
4836 for i in \
4837 ../tk \
4838 `ls -dr ../tk[4-9]* 2>/dev/null` \
4839 ../../tk \
4840 `ls -dr ../../tk[4-9]* 2>/dev/null` \
4841 ../../../tk \
4842 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
4843 if test -f "$i/${configdir}/tkConfig.sh" ; then
4844 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
4845 break
4846 fi
4847 done
4848 fi
4849 # check in a few common install locations
4850 if test x"${ac_cv_c_tkconfig}" = x ; then
4851 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4852 if test -f "$i/tkConfig.sh" ; then
4853 ac_cv_c_tkconfig=`(cd $i; pwd)`
4854 break
4855 fi
4856 done
4857 fi
4858 # check in a few other private locations
4859 if test x"${ac_cv_c_tkconfig}" = x ; then
4860 for i in \
4861 ${srcdir}/../tk \
4862 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
4863 if test -f "$i/${configdir}/tkConfig.sh" ; then
4864 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
4865 break
4866 fi
4867 done
4868 fi
4869
4870 fi
4871
4872 if test x"${ac_cv_c_tkconfig}" = x ; then
4873 TKCONFIG="# no Tk configs found"
4874 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
4875 else
4876 no_tk=
4877 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
4878 echo "$ac_t""found $TKCONFIG" 1>&6
4879 fi
4880 fi
4881
4882
4883
4884 # If $no_tk is nonempty, then we can't do Tk, and there is no
4885 # point to doing Tcl.
4886 if test -z "${no_tk}"; then
4887
4888 if test -f "$TKCONFIG" ; then
4889 . $TKCONFIG
4890 fi
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905 #
4906 # Ok, lets find the tcl source trees so we can use the headers
4907 # Warning: transition of version 9 to 10 will break this algorithm
4908 # because 10 sorts before 9. We also look for just tcl. We have to
4909 # be careful that we don't match stuff like tclX by accident.
4910 # the alternative search directory is involked by --with-tclinclude
4911 #
4912
4913 no_tcl=true
4914 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
4915 echo "configure:4916: checking for Tcl private headers. dir=${configdir}" >&5
4916 # Check whether --with-tclinclude or --without-tclinclude was given.
4917 if test "${with_tclinclude+set}" = set; then
4918 withval="$with_tclinclude"
4919 with_tclinclude=${withval}
4920 fi
4921
4922 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
4923 echo $ac_n "(cached) $ac_c" 1>&6
4924 else
4925
4926 # first check to see if --with-tclinclude was specified
4927 if test x"${with_tclinclude}" != x ; then
4928 if test -f ${with_tclinclude}/tclInt.h ; then
4929 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
4930 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
4931 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
4932 else
4933 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
4934 fi
4935 fi
4936
4937 # next check if it came with Tcl configuration file
4938 if test x"${ac_cv_c_tclconfig}" = x ; then
4939 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
4940 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
4941 fi
4942 fi
4943
4944 # next check in private source directory
4945 #
4946 # since ls returns lowest version numbers first, reverse its output
4947 if test x"${ac_cv_c_tclh}" = x ; then
4948 for i in \
4949 ${srcdir}/../tcl \
4950 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
4951 ${srcdir}/../../tcl \
4952 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
4953 ${srcdir}/../../../tcl \
4954 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
4955 if test -f $i/generic/tclInt.h ; then
4956 ac_cv_c_tclh=`(cd $i/generic; pwd)`
4957 break
4958 fi
4959 done
4960 fi
4961 # finally check in a few common install locations
4962 #
4963 # since ls returns lowest version numbers first, reverse its output
4964 if test x"${ac_cv_c_tclh}" = x ; then
4965 for i in \
4966 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
4967 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
4968 /usr/local/src/tcl \
4969 /usr/local/lib/tcl \
4970 ${prefix}/include ; do
4971 if test -f $i/generic/tclInt.h ; then
4972 ac_cv_c_tclh=`(cd $i/generic; pwd)`
4973 break
4974 fi
4975 done
4976 fi
4977 # see if one is installed
4978 if test x"${ac_cv_c_tclh}" = x ; then
4979 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
4980 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
4981 echo "configure:4982: checking for tclInt.h" >&5
4982 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4983 echo $ac_n "(cached) $ac_c" 1>&6
4984 else
4985 cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988 #include <tclInt.h>
4989 EOF
4990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4991 { (eval echo configure:4992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4993 if test -z "$ac_err"; then
4994 rm -rf conftest*
4995 eval "ac_cv_header_$ac_safe=yes"
4996 else
4997 echo "$ac_err" >&5
4998 echo "configure: failed program was:" >&5
4999 cat conftest.$ac_ext >&5
5000 rm -rf conftest*
5001 eval "ac_cv_header_$ac_safe=no"
5002 fi
5003 rm -f conftest*
5004 fi
5005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5006 echo "$ac_t""yes" 1>&6
5007 ac_cv_c_tclh=installed
5008 else
5009 echo "$ac_t""no" 1>&6
5010 ac_cv_c_tclh=""
5011 fi
5012
5013 fi
5014
5015 fi
5016
5017 if test x"${ac_cv_c_tclh}" = x ; then
5018 TCLHDIR="# no Tcl private headers found"
5019 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
5020 fi
5021 if test x"${ac_cv_c_tclh}" != x ; then
5022 no_tcl=""
5023 if test x"${ac_cv_c_tclh}" = x"installed" ; then
5024 echo "$ac_t""is installed" 1>&6
5025 TCLHDIR=""
5026 else
5027 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
5028 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
5029 TCLHDIR="-I${ac_cv_c_tclh}"
5030 fi
5031 fi
5032
5033
5034
5035
5036 #
5037 # Ok, lets find the tk source trees so we can use the headers
5038 # If the directory (presumably symlink) named "tk" exists, use that one
5039 # in preference to any others. Same logic is used when choosing library
5040 # and again with Tcl. The search order is the best place to look first, then in
5041 # decreasing significance. The loop breaks if the trigger file is found.
5042 # Note the gross little conversion here of srcdir by cd'ing to the found
5043 # directory. This converts the path from a relative to an absolute, so
5044 # recursive cache variables for the path will work right. We check all
5045 # the possible paths in one loop rather than many seperate loops to speed
5046 # things up.
5047 # the alternative search directory is involked by --with-tkinclude
5048 #
5049 no_tk=true
5050 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
5051 echo "configure:5052: checking for Tk private headers" >&5
5052 # Check whether --with-tkinclude or --without-tkinclude was given.
5053 if test "${with_tkinclude+set}" = set; then
5054 withval="$with_tkinclude"
5055 with_tkinclude=${withval}
5056 fi
5057
5058 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
5059 echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061
5062 # first check to see if --with-tkinclude was specified
5063 if test x"${with_tkinclude}" != x ; then
5064 if test -f ${with_tkinclude}/tk.h ; then
5065 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5066 elif test -f ${with_tkinclude}/generic/tk.h ; then
5067 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5068 else
5069 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5070 fi
5071 fi
5072
5073 # next check if it came with Tk configuration file
5074 if test x"${ac_cv_c_tkconfig}" = x ; then
5075 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
5076 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
5077 fi
5078 fi
5079
5080 # next check in private source directory
5081 #
5082 # since ls returns lowest version numbers first, reverse its output
5083 if test x"${ac_cv_c_tkh}" = x ; then
5084 for i in \
5085 ${srcdir}/../tk \
5086 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
5087 ${srcdir}/../../tk \
5088 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
5089 ${srcdir}/../../../tk \
5090 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
5091 if test -f $i/generic/tk.h ; then
5092 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5093 break
5094 fi
5095 done
5096 fi
5097 # finally check in a few common install locations
5098 #
5099 # since ls returns lowest version numbers first, reverse its output
5100 if test x"${ac_cv_c_tkh}" = x ; then
5101 for i in \
5102 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
5103 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
5104 /usr/local/src/tk \
5105 /usr/local/lib/tk \
5106 ${prefix}/include ; do
5107 if test -f $i/generic/tk.h ; then
5108 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5109 break
5110 fi
5111 done
5112 fi
5113 # see if one is installed
5114 if test x"${ac_cv_c_tkh}" = x ; then
5115 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5116 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5117 echo "configure:5118: checking for tk.h" >&5
5118 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 #include <tk.h>
5125 EOF
5126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5127 { (eval echo configure:5128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5129 if test -z "$ac_err"; then
5130 rm -rf conftest*
5131 eval "ac_cv_header_$ac_safe=yes"
5132 else
5133 echo "$ac_err" >&5
5134 echo "configure: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 rm -rf conftest*
5137 eval "ac_cv_header_$ac_safe=no"
5138 fi
5139 rm -f conftest*
5140 fi
5141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5142 echo "$ac_t""yes" 1>&6
5143 ac_cv_c_tkh=installed
5144 else
5145 echo "$ac_t""no" 1>&6
5146 ac_cv_c_tkh=""
5147 fi
5148
5149 fi
5150
5151 fi
5152
5153 if test x"${ac_cv_c_tkh}" != x ; then
5154 no_tk=""
5155 if test x"${ac_cv_c_tkh}" = x"installed" ; then
5156 echo "$ac_t""is installed" 1>&6
5157 TKHDIR=""
5158 else
5159 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
5160 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
5161 TKHDIR="-I${ac_cv_c_tkh}"
5162 fi
5163 else
5164 TKHDIR="# no Tk directory found"
5165 echo "configure: warning: Can't find Tk private headers" 1>&2
5166 no_tk=true
5167 fi
5168
5169
5170
5171
5172 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5173 echo "configure:5174: checking for Itcl private headers. srcdir=${srcdir}" >&5
5174 if test x"${ac_cv_c_itclh}" = x ; then
5175 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
5176 if test -f $i/src/itcl.h ; then
5177 ac_cv_c_itclh=`(cd $i/src; pwd)`
5178 break
5179 fi
5180 done
5181 fi
5182 if test x"${ac_cv_c_itclh}" = x ; then
5183 ITCLHDIR="# no Itcl private headers found"
5184 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
5185 fi
5186 if test x"${ac_cv_c_itclh}" != x ; then
5187 ITCLHDIR="-I${ac_cv_c_itclh}"
5188 fi
5189 # should always be here
5190 ITCLLIB="../itcl/src/libitcl.a"
5191
5192
5193
5194
5195 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5196 echo "configure:5197: checking for Tix private headers. srcdir=${srcdir}" >&5
5197 if test x"${ac_cv_c_tixh}" = x ; then
5198 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
5199 if test -f $i/generic/tix.h ; then
5200 ac_cv_c_tixh=`(cd $i/generic; pwd)`
5201 break
5202 fi
5203 done
5204 fi
5205 if test x"${ac_cv_c_tixh}" = x ; then
5206 TIXHDIR="# no Tix private headers found"
5207 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
5208 fi
5209 if test x"${ac_cv_c_tixh}" != x ; then
5210 TIXHDIR="-I${ac_cv_c_tixh}"
5211 fi
5212
5213
5214
5215 # now look for tix library stuff
5216 TIXVERSION=4.1.8.0
5217 . ${ac_cv_c_tclconfig}/tclConfig.sh
5218 case "${host}" in
5219 *-*-cygwin32*)
5220 tixdir=../tix/win/tcl8.0
5221 ;;
5222 *)
5223 tixdir=../tix/unix/tk8.0
5224 ;;
5225 esac
5226 if test "${TCL_SHARED_BUILD}" = "1"; then
5227 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
5228
5229 # Can't win them all: SunOS 4 (others?) appends a version
5230 # number after the ".so"
5231 case "${host}" in
5232 *-*-sunos4*)
5233 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
5234 esac
5235
5236 else
5237 TIX_LIB_EXT=".a"
5238 fi
5239
5240 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
5241 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
5242 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
5243 else
5244 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
5245 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
5246 fi
5247
5248 ENABLE_GDBTK=1
5249 ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
5250
5251 # Include some libraries that Tcl and Tk want.
5252 if test "${enable_ide}" = "yes"; then
5253 TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
5254 CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
5255 else
5256 TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
5257 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
5258 fi
5259 # Yes, the ordering seems wrong here. But it isn't.
5260 # TK_LIBS is the list of libraries that need to be linked
5261 # after Tcl/Tk. Note that this isn't put into LIBS. If it
5262 # were in LIBS then any link tests after this point would
5263 # try to include things like `$(LIBGUI)', which wouldn't work.
5264 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
5265 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o"
5266
5267 if test x$gdb_cv_os_cygwin32 = xyes; then
5268 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32"
5269 WIN32LDAPP="-Wl,--subsystem,console"
5270 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
5271 fi
5272 fi
5273 fi
5274 fi
5275
5276
5277
5278
5279
5280
5281
5282
5283 # end-sanitize-gdbtk
5284
5285 # If we find X, set shell vars x_includes and x_libraries to the
5286 # paths, otherwise set no_x=yes.
5287 # Uses ac_ vars as temps to allow command line to override cache and checks.
5288 # --without-x overrides everything else, but does not touch the cache.
5289 echo $ac_n "checking for X""... $ac_c" 1>&6
5290 echo "configure:5291: checking for X" >&5
5291
5292 # Check whether --with-x or --without-x was given.
5293 if test "${with_x+set}" = set; then
5294 withval="$with_x"
5295 :
5296 fi
5297
5298 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5299 if test "x$with_x" = xno; then
5300 # The user explicitly disabled X.
5301 have_x=disabled
5302 else
5303 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5304 # Both variables are already set.
5305 have_x=yes
5306 else
5307 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5308 echo $ac_n "(cached) $ac_c" 1>&6
5309 else
5310 # One or both of the vars are not set, and there is no cached value.
5311 ac_x_includes=NO ac_x_libraries=NO
5312 rm -fr conftestdir
5313 if mkdir conftestdir; then
5314 cd conftestdir
5315 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5316 cat > Imakefile <<'EOF'
5317 acfindx:
5318 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5319 EOF
5320 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5321 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5322 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5323 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5324 for ac_extension in a so sl; do
5325 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5326 test -f $ac_im_libdir/libX11.$ac_extension; then
5327 ac_im_usrlibdir=$ac_im_libdir; break
5328 fi
5329 done
5330 # Screen out bogus values from the imake configuration. They are
5331 # bogus both because they are the default anyway, and because
5332 # using them would break gcc on systems where it needs fixed includes.
5333 case "$ac_im_incroot" in
5334 /usr/include) ;;
5335 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5336 esac
5337 case "$ac_im_usrlibdir" in
5338 /usr/lib | /lib) ;;
5339 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5340 esac
5341 fi
5342 cd ..
5343 rm -fr conftestdir
5344 fi
5345
5346 if test "$ac_x_includes" = NO; then
5347 # Guess where to find include files, by looking for this one X11 .h file.
5348 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5349
5350 # First, try using that file with no special directory specified.
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354 #include <$x_direct_test_include>
5355 EOF
5356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5357 { (eval echo configure:5358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5359 if test -z "$ac_err"; then
5360 rm -rf conftest*
5361 # We can compile using X headers with no special include directory.
5362 ac_x_includes=
5363 else
5364 echo "$ac_err" >&5
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 rm -rf conftest*
5368 # Look for the header file in a standard set of common directories.
5369 # Check X11 before X11Rn because it is often a symlink to the current release.
5370 for ac_dir in \
5371 /usr/X11/include \
5372 /usr/X11R6/include \
5373 /usr/X11R5/include \
5374 /usr/X11R4/include \
5375 \
5376 /usr/include/X11 \
5377 /usr/include/X11R6 \
5378 /usr/include/X11R5 \
5379 /usr/include/X11R4 \
5380 \
5381 /usr/local/X11/include \
5382 /usr/local/X11R6/include \
5383 /usr/local/X11R5/include \
5384 /usr/local/X11R4/include \
5385 \
5386 /usr/local/include/X11 \
5387 /usr/local/include/X11R6 \
5388 /usr/local/include/X11R5 \
5389 /usr/local/include/X11R4 \
5390 \
5391 /usr/X386/include \
5392 /usr/x386/include \
5393 /usr/XFree86/include/X11 \
5394 \
5395 /usr/include \
5396 /usr/local/include \
5397 /usr/unsupported/include \
5398 /usr/athena/include \
5399 /usr/local/x11r5/include \
5400 /usr/lpp/Xamples/include \
5401 \
5402 /usr/openwin/include \
5403 /usr/openwin/share/include \
5404 ; \
5405 do
5406 if test -r "$ac_dir/$x_direct_test_include"; then
5407 ac_x_includes=$ac_dir
5408 break
5409 fi
5410 done
5411 fi
5412 rm -f conftest*
5413 fi # $ac_x_includes = NO
5414
5415 if test "$ac_x_libraries" = NO; then
5416 # Check for the libraries.
5417
5418 test -z "$x_direct_test_library" && x_direct_test_library=Xt
5419 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5420
5421 # See if we find them without any special options.
5422 # Don't add to $LIBS permanently.
5423 ac_save_LIBS="$LIBS"
5424 LIBS="-l$x_direct_test_library $LIBS"
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428
5429 int main() {
5430 ${x_direct_test_function}()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434 rm -rf conftest*
5435 LIBS="$ac_save_LIBS"
5436 # We can link X programs with no special library path.
5437 ac_x_libraries=
5438 else
5439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
5441 rm -rf conftest*
5442 LIBS="$ac_save_LIBS"
5443 # First see if replacing the include by lib works.
5444 # Check X11 before X11Rn because it is often a symlink to the current release.
5445 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5446 /usr/X11/lib \
5447 /usr/X11R6/lib \
5448 /usr/X11R5/lib \
5449 /usr/X11R4/lib \
5450 \
5451 /usr/lib/X11 \
5452 /usr/lib/X11R6 \
5453 /usr/lib/X11R5 \
5454 /usr/lib/X11R4 \
5455 \
5456 /usr/local/X11/lib \
5457 /usr/local/X11R6/lib \
5458 /usr/local/X11R5/lib \
5459 /usr/local/X11R4/lib \
5460 \
5461 /usr/local/lib/X11 \
5462 /usr/local/lib/X11R6 \
5463 /usr/local/lib/X11R5 \
5464 /usr/local/lib/X11R4 \
5465 \
5466 /usr/X386/lib \
5467 /usr/x386/lib \
5468 /usr/XFree86/lib/X11 \
5469 \
5470 /usr/lib \
5471 /usr/local/lib \
5472 /usr/unsupported/lib \
5473 /usr/athena/lib \
5474 /usr/local/x11r5/lib \
5475 /usr/lpp/Xamples/lib \
5476 /lib/usr/lib/X11 \
5477 \
5478 /usr/openwin/lib \
5479 /usr/openwin/share/lib \
5480 ; \
5481 do
5482 for ac_extension in a so sl; do
5483 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5484 ac_x_libraries=$ac_dir
5485 break 2
5486 fi
5487 done
5488 done
5489 fi
5490 rm -f conftest*
5491 fi # $ac_x_libraries = NO
5492
5493 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5494 # Didn't find X anywhere. Cache the known absence of X.
5495 ac_cv_have_x="have_x=no"
5496 else
5497 # Record where we found X for the cache.
5498 ac_cv_have_x="have_x=yes \
5499 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5500 fi
5501 fi
5502 fi
5503 eval "$ac_cv_have_x"
5504 fi # $with_x != no
5505
5506 if test "$have_x" != yes; then
5507 echo "$ac_t""$have_x" 1>&6
5508 no_x=yes
5509 else
5510 # If each of the values was on the command line, it overrides each guess.
5511 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5512 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5513 # Update the cache value to reflect the command line values.
5514 ac_cv_have_x="have_x=yes \
5515 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5516 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5517 fi
5518
5519 # start-sanitize-sky
5520 # Enable GPU2 library for MIPS simulator
5521 # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
5522 if test "${with_sim_gpu2+set}" = set; then
5523 withval="$with_sim_gpu2"
5524 case "${target}" in
5525 mips*-sky-*)
5526 if test -d "${withval}"
5527 then
5528 LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext"
5529 else
5530 echo "configure: warning: Directory ${withval} does not exist." 1>&2
5531 fi ;;
5532 *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
5533 esac
5534 fi
5535
5536 # Enable target accurate FP library
5537 # Check whether --with-sim-funit or --without-sim-funit was given.
5538 if test "${with_sim_funit+set}" = set; then
5539 withval="$with_sim_funit"
5540 case "${target}" in
5541 mips*-sky-*)
5542 if test -d "${withval}"
5543 then
5544 LIBS="${LIBS} -L${withval}/lib -lfunit"
5545 else
5546 echo "configure: warning: Directory ${withval} does not exist." 1>&2
5547 fi ;;
5548 *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
5549 esac
5550 fi
5551 # end-sanitize-sky
5552
5553 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
5554 echo "configure:5555: checking for wctype in -lw" >&5
5555 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5557 echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559 ac_save_LIBS="$LIBS"
5560 LIBS="-lw $LIBS"
5561 cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564 /* Override any gcc2 internal prototype to avoid an error. */
5565 /* We use char because int might match the return type of a gcc2
5566 builtin and then its argument prototype would still apply. */
5567 char wctype();
5568
5569 int main() {
5570 wctype()
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5574 rm -rf conftest*
5575 eval "ac_cv_lib_$ac_lib_var=yes"
5576 else
5577 echo "configure: failed program was:" >&5
5578 cat conftest.$ac_ext >&5
5579 rm -rf conftest*
5580 eval "ac_cv_lib_$ac_lib_var=no"
5581 fi
5582 rm -f conftest*
5583 LIBS="$ac_save_LIBS"
5584
5585 fi
5586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5587 echo "$ac_t""yes" 1>&6
5588 LIBS="$LIBS -lw"
5589 else
5590 echo "$ac_t""no" 1>&6
5591 fi
5592
5593
5594
5595
5596
5597
5598
5599
5600 # Begin stuff to support --enable-shared
5601 # Check whether --enable-shared or --disable-shared was given.
5602 if test "${enable_shared+set}" = set; then
5603 enableval="$enable_shared"
5604 case "${enableval}" in
5605 yes) shared=true ;;
5606 no) shared=false ;;
5607 *) shared=true ;;
5608 esac
5609 fi
5610
5611 HLDFLAGS=
5612 HLDENV=
5613 # If we have shared libraries, try to set rpath reasonably.
5614 if test "${shared}" = "true"; then
5615 case "${host}" in
5616 *-*-hpux*)
5617 HLDFLAGS='-Wl,+s,+b,$(libdir)'
5618 ;;
5619 *-*-irix5* | *-*-irix6*)
5620 HLDFLAGS='-Wl,-rpath,$(libdir)'
5621 ;;
5622 *-*-linux*aout*)
5623 ;;
5624 *-*-linux* | *-pc-linux-gnu)
5625 HLDFLAGS='-Wl,-rpath,$(libdir)'
5626 ;;
5627 *-*-solaris*)
5628 HLDFLAGS='-R $(libdir)'
5629 ;;
5630 *-*-sysv4*)
5631 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
5632 ;;
5633 esac
5634 fi
5635
5636 # On SunOS, if the linker supports the -rpath option, use it to
5637 # prevent ../bfd and ../opcodes from being included in the run time
5638 # search path.
5639 case "${host}" in
5640 *-*-sunos*)
5641 echo 'main () { }' > conftest.c
5642 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
5643 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
5644 :
5645 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
5646 :
5647 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
5648 :
5649 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
5650 :
5651 elif test "${shared}" = "true"; then
5652 HLDFLAGS='-Wl,-rpath=$(libdir)'
5653 else
5654 HLDFLAGS='-Wl,-rpath='
5655 fi
5656 rm -f conftest.t conftest.c conftest
5657 ;;
5658 esac
5659
5660
5661 # End stuff to support --enable-shared
5662
5663 # target_subdir is used by the testsuite to find the target libraries.
5664 target_subdir=
5665 if test "${host}" != "${target}"; then
5666 target_subdir="${target_alias}/"
5667 fi
5668
5669
5670 frags=
5671 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
5672 if test ! -f ${host_makefile_frag}; then
5673 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
5674 fi
5675 frags="$frags $host_makefile_frag"
5676
5677 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
5678 if test ! -f ${target_makefile_frag}; then
5679 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
5680 fi
5681 frags="$frags $target_makefile_frag"
5682
5683
5684
5685
5686
5687 hostfile=`sed -n '
5688 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5689 ' ${host_makefile_frag}`
5690
5691 targetfile=`sed -n '
5692 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5693 ' ${target_makefile_frag}`
5694
5695 # these really aren't orthogonal true/false values of the same condition,
5696 # but shells are slow enough that I like to reuse the test conditions
5697 # whenever possible
5698 if test "${target}" = "${host}"; then
5699 nativefile=`sed -n '
5700 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5701 ' ${host_makefile_frag}`
5702 # else
5703 # GDBserver is only useful in a "native" enviroment
5704 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
5705 fi
5706
5707
5708 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5709 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
5710 # corresponding links. But we have to remove the xm.h files and tm.h
5711 # files anyway, e.g. when switching from "configure host" to
5712 # "configure none".
5713
5714 files=
5715 links=
5716 rm -f xm.h
5717 if test "${hostfile}" != ""; then
5718 files="${files} config/${gdb_host_cpu}/${hostfile}"
5719 links="${links} xm.h"
5720 fi
5721 rm -f tm.h
5722 if test "${targetfile}" != ""; then
5723 files="${files} config/${gdb_target_cpu}/${targetfile}"
5724 links="${links} tm.h"
5725 fi
5726 rm -f nm.h
5727 if test "${nativefile}" != ""; then
5728 files="${files} config/${gdb_host_cpu}/${nativefile}"
5729 links="${links} nm.h"
5730 else
5731 # A cross-only configuration.
5732 files="${files} config/nm-empty.h"
5733 links="${links} nm.h"
5734 fi
5735 # start-sanitize-gdbtk
5736 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
5737 echo "configure:5738: checking whether ln -s works" >&5
5738 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
5739 echo $ac_n "(cached) $ac_c" 1>&6
5740 else
5741 rm -f conftestdata
5742 if ln -s X conftestdata 2>/dev/null
5743 then
5744 rm -f conftestdata
5745 ac_cv_prog_LN_S="ln -s"
5746 else
5747 ac_cv_prog_LN_S=ln
5748 fi
5749 fi
5750 LN_S="$ac_cv_prog_LN_S"
5751 if test "$ac_cv_prog_LN_S" = "ln -s"; then
5752 echo "$ac_t""yes" 1>&6
5753 else
5754 echo "$ac_t""no" 1>&6
5755 fi
5756
5757 # Make it possible to use the GUI without doing a full install
5758 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then
5759 if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
5760 echo linking $srcdir/gdbtcl to gdbtcl
5761 $LN_S $srcdir/gdbtcl gdbtcl
5762 else
5763 echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a
5764 echo " " make install before you are able to run the GUI.
5765 fi
5766 fi
5767 # end-sanitize-gdbtk
5768
5769
5770
5771 echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
5772 echo "configure:5773: checking for Cygwin32 environment" >&5
5773 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
5774 echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776 cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779
5780 int main() {
5781 return __CYGWIN32__;
5782 ; return 0; }
5783 EOF
5784 if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5785 rm -rf conftest*
5786 am_cv_cygwin32=yes
5787 else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
5791 am_cv_cygwin32=no
5792 fi
5793 rm -f conftest*
5794 rm -f conftest*
5795 fi
5796
5797 echo "$ac_t""$am_cv_cygwin32" 1>&6
5798 CYGWIN32=
5799 test "$am_cv_cygwin32" = yes && CYGWIN32=yes
5800 echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
5801 echo "configure:5802: checking for Mingw32 environment" >&5
5802 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
5803 echo $ac_n "(cached) $ac_c" 1>&6
5804 else
5805 cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808
5809 int main() {
5810 return __MINGW32__;
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5814 rm -rf conftest*
5815 am_cv_mingw32=yes
5816 else
5817 echo "configure: failed program was:" >&5
5818 cat conftest.$ac_ext >&5
5819 rm -rf conftest*
5820 am_cv_mingw32=no
5821 fi
5822 rm -f conftest*
5823 rm -f conftest*
5824 fi
5825
5826 echo "$ac_t""$am_cv_mingw32" 1>&6
5827 MINGW32=
5828 test "$am_cv_mingw32" = yes && MINGW32=yes
5829
5830
5831 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5832 echo "configure:5833: checking for executable suffix" >&5
5833 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
5834 echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
5837 am_cv_exeext=.exe
5838 else
5839 cat > am_c_test.c << 'EOF'
5840 int main() {
5841 /* Nothing needed here */
5842 }
5843 EOF
5844 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
5845 am_cv_exeext=
5846 for file in am_c_test.*; do
5847 case $file in
5848 *.c) ;;
5849 *.o) ;;
5850 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
5851 esac
5852 done
5853 rm -f am_c_test*
5854 fi
5855
5856 test x"${am_cv_exeext}" = x && am_cv_exeext=no
5857 fi
5858 EXEEXT=""
5859 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
5860 echo "$ac_t""${am_cv_exeext}" 1>&6
5861
5862
5863 subdirs="$configdirs"
5864
5865 trap '' 1 2 15
5866 cat > confcache <<\EOF
5867 # This file is a shell script that caches the results of configure
5868 # tests run on this system so they can be shared between configure
5869 # scripts and configure runs. It is not useful on other systems.
5870 # If it contains results you don't want to keep, you may remove or edit it.
5871 #
5872 # By default, configure uses ./config.cache as the cache file,
5873 # creating it if it does not exist already. You can give configure
5874 # the --cache-file=FILE option to use a different cache file; that is
5875 # what configure does when it calls configure scripts in
5876 # subdirectories, so they share the cache.
5877 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5878 # config.status only pays attention to the cache file if you give it the
5879 # --recheck option to rerun configure.
5880 #
5881 EOF
5882 # The following way of writing the cache mishandles newlines in values,
5883 # but we know of no workaround that is simple, portable, and efficient.
5884 # So, don't put newlines in cache variables' values.
5885 # Ultrix sh set writes to stderr and can't be redirected directly,
5886 # and sets the high bit in the cache file unless we assign to the vars.
5887 (set) 2>&1 |
5888 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
5889 *ac_space=\ *)
5890 # `set' does not quote correctly, so add quotes (double-quote substitution
5891 # turns \\\\ into \\, and sed turns \\ into \).
5892 sed -n \
5893 -e "s/'/'\\\\''/g" \
5894 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5895 ;;
5896 *)
5897 # `set' quotes correctly as required by POSIX, so do not add quotes.
5898 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5899 ;;
5900 esac >> confcache
5901 if cmp -s $cache_file confcache; then
5902 :
5903 else
5904 if test -w $cache_file; then
5905 echo "updating cache $cache_file"
5906 cat confcache > $cache_file
5907 else
5908 echo "not updating unwritable cache $cache_file"
5909 fi
5910 fi
5911 rm -f confcache
5912
5913 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5914
5915 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5916 # Let make expand exec_prefix.
5917 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5918
5919 # Any assignment to VPATH causes Sun make to only execute
5920 # the first set of double-colon rules, so remove it if not needed.
5921 # If there is a colon in the path, we need to keep it.
5922 if test "x$srcdir" = x.; then
5923 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5924 fi
5925
5926 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5927
5928 DEFS=-DHAVE_CONFIG_H
5929
5930 # Without the "./", some shells look in PATH for config.status.
5931 : ${CONFIG_STATUS=./config.status}
5932
5933 echo creating $CONFIG_STATUS
5934 rm -f $CONFIG_STATUS
5935 cat > $CONFIG_STATUS <<EOF
5936 #! /bin/sh
5937 # Generated automatically by configure.
5938 # Run this file to recreate the current configuration.
5939 # This directory was configured as follows,
5940 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5941 #
5942 # $0 $ac_configure_args
5943 #
5944 # Compiler output produced by configure, useful for debugging
5945 # configure, is in ./config.log if it exists.
5946
5947 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5948 for ac_option
5949 do
5950 case "\$ac_option" in
5951 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5952 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5953 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5954 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5955 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
5956 exit 0 ;;
5957 -help | --help | --hel | --he | --h)
5958 echo "\$ac_cs_usage"; exit 0 ;;
5959 *) echo "\$ac_cs_usage"; exit 1 ;;
5960 esac
5961 done
5962
5963 ac_given_srcdir=$srcdir
5964 ac_given_INSTALL="$INSTALL"
5965
5966 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5967 EOF
5968 cat >> $CONFIG_STATUS <<EOF
5969
5970 # Protect against being on the right side of a sed subst in config.status.
5971 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5972 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5973 $ac_vpsub
5974 $extrasub
5975 s%@SHELL@%$SHELL%g
5976 s%@CFLAGS@%$CFLAGS%g
5977 s%@CPPFLAGS@%$CPPFLAGS%g
5978 s%@CXXFLAGS@%$CXXFLAGS%g
5979 s%@DEFS@%$DEFS%g
5980 s%@LDFLAGS@%$LDFLAGS%g
5981 s%@LIBS@%$LIBS%g
5982 s%@exec_prefix@%$exec_prefix%g
5983 s%@prefix@%$prefix%g
5984 s%@program_transform_name@%$program_transform_name%g
5985 s%@bindir@%$bindir%g
5986 s%@sbindir@%$sbindir%g
5987 s%@libexecdir@%$libexecdir%g
5988 s%@datadir@%$datadir%g
5989 s%@sysconfdir@%$sysconfdir%g
5990 s%@sharedstatedir@%$sharedstatedir%g
5991 s%@localstatedir@%$localstatedir%g
5992 s%@libdir@%$libdir%g
5993 s%@includedir@%$includedir%g
5994 s%@oldincludedir@%$oldincludedir%g
5995 s%@infodir@%$infodir%g
5996 s%@mandir@%$mandir%g
5997 s%@CC@%$CC%g
5998 s%@CPP@%$CPP%g
5999 s%@DLLTOOL@%$DLLTOOL%g
6000 s%@host@%$host%g
6001 s%@host_alias@%$host_alias%g
6002 s%@host_cpu@%$host_cpu%g
6003 s%@host_vendor@%$host_vendor%g
6004 s%@host_os@%$host_os%g
6005 s%@target@%$target%g
6006 s%@target_alias@%$target_alias%g
6007 s%@target_cpu@%$target_cpu%g
6008 s%@target_vendor@%$target_vendor%g
6009 s%@target_os@%$target_os%g
6010 s%@build@%$build%g
6011 s%@build_alias@%$build_alias%g
6012 s%@build_cpu@%$build_cpu%g
6013 s%@build_vendor@%$build_vendor%g
6014 s%@build_os@%$build_os%g
6015 s%@SET_MAKE@%$SET_MAKE%g
6016 s%@RANLIB@%$RANLIB%g
6017 s%@ALLOCA@%$ALLOCA%g
6018 s%@USE_NLS@%$USE_NLS%g
6019 s%@MSGFMT@%$MSGFMT%g
6020 s%@GMSGFMT@%$GMSGFMT%g
6021 s%@XGETTEXT@%$XGETTEXT%g
6022 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6023 s%@CATALOGS@%$CATALOGS%g
6024 s%@CATOBJEXT@%$CATOBJEXT%g
6025 s%@DATADIRNAME@%$DATADIRNAME%g
6026 s%@GMOFILES@%$GMOFILES%g
6027 s%@INSTOBJEXT@%$INSTOBJEXT%g
6028 s%@INTLDEPS@%$INTLDEPS%g
6029 s%@INTLLIBS@%$INTLLIBS%g
6030 s%@INTLOBJS@%$INTLOBJS%g
6031 s%@POFILES@%$POFILES%g
6032 s%@POSUB@%$POSUB%g
6033 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6034 s%@GT_NO@%$GT_NO%g
6035 s%@GT_YES@%$GT_YES%g
6036 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6037 s%@l@%$l%g
6038 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6039 s%@INSTALL_DATA@%$INSTALL_DATA%g
6040 s%@AR@%$AR%g
6041 s%@YACC@%$YACC%g
6042 s%@AWK@%$AWK%g
6043 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
6044 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
6045 s%@MMALLOC@%$MMALLOC%g
6046 s%@ENABLE_IDE@%$ENABLE_IDE%g
6047 s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
6048 s%@LIBGUI@%$LIBGUI%g
6049 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
6050 s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
6051 s%@IDE_X@%$IDE_X%g
6052 s%@LIBIDETCL@%$LIBIDETCL%g
6053 s%@LIBIDE@%$LIBIDE%g
6054 s%@IDE_DEPS@%$IDE_DEPS%g
6055 s%@WIN32LIBS@%$WIN32LIBS%g
6056 s%@WIN32LDAPP@%$WIN32LDAPP%g
6057 s%@WINDRES@%$WINDRES%g
6058 s%@TCL_VERSION@%$TCL_VERSION%g
6059 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
6060 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
6061 s%@TCL_CC@%$TCL_CC%g
6062 s%@TCL_DEFS@%$TCL_DEFS%g
6063 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
6064 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6065 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
6066 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
6067 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
6068 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6069 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
6070 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
6071 s%@TCL_RANLIB@%$TCL_RANLIB%g
6072 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6073 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6074 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
6075 s%@TK_VERSION@%$TK_VERSION%g
6076 s%@TK_DEFS@%$TK_DEFS%g
6077 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
6078 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6079 s%@TK_XLIBSW@%$TK_XLIBSW%g
6080 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6081 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
6082 s%@TCLHDIR@%$TCLHDIR%g
6083 s%@TKHDIR@%$TKHDIR%g
6084 s%@ITCLHDIR@%$ITCLHDIR%g
6085 s%@ITCLLIB@%$ITCLLIB%g
6086 s%@TIXHDIR@%$TIXHDIR%g
6087 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
6088 s%@X_CFLAGS@%$X_CFLAGS%g
6089 s%@X_LDFLAGS@%$X_LDFLAGS%g
6090 s%@X_LIBS@%$X_LIBS%g
6091 s%@TIXLIB@%$TIXLIB%g
6092 s%@TIX_DEPS@%$TIX_DEPS%g
6093 s%@GDBTKLIBS@%$GDBTKLIBS%g
6094 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6095 s%@CONFIG_OBS@%$CONFIG_OBS%g
6096 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
6097 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
6098 s%@HLDFLAGS@%$HLDFLAGS%g
6099 s%@HLDENV@%$HLDENV%g
6100 s%@target_subdir@%$target_subdir%g
6101 /@host_makefile_frag@/r $host_makefile_frag
6102 s%@host_makefile_frag@%%g
6103 /@target_makefile_frag@/r $target_makefile_frag
6104 s%@target_makefile_frag@%%g
6105 s%@frags@%$frags%g
6106 s%@LN_S@%$LN_S%g
6107 s%@EXEEXT@%$EXEEXT%g
6108 s%@subdirs@%$subdirs%g
6109
6110 CEOF
6111 EOF
6112
6113 cat >> $CONFIG_STATUS <<\EOF
6114
6115 # Split the substitutions into bite-sized pieces for seds with
6116 # small command number limits, like on Digital OSF/1 and HP-UX.
6117 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6118 ac_file=1 # Number of current file.
6119 ac_beg=1 # First line for current file.
6120 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6121 ac_more_lines=:
6122 ac_sed_cmds=""
6123 while $ac_more_lines; do
6124 if test $ac_beg -gt 1; then
6125 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6126 else
6127 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6128 fi
6129 if test ! -s conftest.s$ac_file; then
6130 ac_more_lines=false
6131 rm -f conftest.s$ac_file
6132 else
6133 if test -z "$ac_sed_cmds"; then
6134 ac_sed_cmds="sed -f conftest.s$ac_file"
6135 else
6136 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6137 fi
6138 ac_file=`expr $ac_file + 1`
6139 ac_beg=$ac_end
6140 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6141 fi
6142 done
6143 if test -z "$ac_sed_cmds"; then
6144 ac_sed_cmds=cat
6145 fi
6146 EOF
6147
6148 cat >> $CONFIG_STATUS <<EOF
6149
6150 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
6151 EOF
6152 cat >> $CONFIG_STATUS <<\EOF
6153 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6154 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6155 case "$ac_file" in
6156 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6157 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6158 *) ac_file_in="${ac_file}.in" ;;
6159 esac
6160
6161 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6162
6163 # Remove last slash and all that follows it. Not all systems have dirname.
6164 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6165 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6166 # The file is in a subdirectory.
6167 test ! -d "$ac_dir" && mkdir "$ac_dir"
6168 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6169 # A "../" for each directory in $ac_dir_suffix.
6170 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6171 else
6172 ac_dir_suffix= ac_dots=
6173 fi
6174
6175 case "$ac_given_srcdir" in
6176 .) srcdir=.
6177 if test -z "$ac_dots"; then top_srcdir=.
6178 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6179 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6180 *) # Relative path.
6181 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6182 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6183 esac
6184
6185 case "$ac_given_INSTALL" in
6186 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6187 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6188 esac
6189
6190 echo creating "$ac_file"
6191 rm -f "$ac_file"
6192 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6193 case "$ac_file" in
6194 *Makefile*) ac_comsub="1i\\
6195 # $configure_input" ;;
6196 *) ac_comsub= ;;
6197 esac
6198
6199 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6200 sed -e "$ac_comsub
6201 s%@configure_input@%$configure_input%g
6202 s%@srcdir@%$srcdir%g
6203 s%@top_srcdir@%$top_srcdir%g
6204 s%@INSTALL@%$INSTALL%g
6205 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6206 fi; done
6207 rm -f conftest.s*
6208
6209 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6210 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6211 #
6212 # ac_d sets the value in "#define NAME VALUE" lines.
6213 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6214 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6215 ac_dC='\3'
6216 ac_dD='%g'
6217 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6218 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6219 ac_uB='\([ ]\)%\1#\2define\3'
6220 ac_uC=' '
6221 ac_uD='\4%g'
6222 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6223 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6224 ac_eB='$%\1#\2define\3'
6225 ac_eC=' '
6226 ac_eD='%g'
6227
6228 if test "${CONFIG_HEADERS+set}" != set; then
6229 EOF
6230 cat >> $CONFIG_STATUS <<EOF
6231 CONFIG_HEADERS="config.h:config.in"
6232 EOF
6233 cat >> $CONFIG_STATUS <<\EOF
6234 fi
6235 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6236 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6237 case "$ac_file" in
6238 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6239 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6240 *) ac_file_in="${ac_file}.in" ;;
6241 esac
6242
6243 echo creating $ac_file
6244
6245 rm -f conftest.frag conftest.in conftest.out
6246 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6247 cat $ac_file_inputs > conftest.in
6248
6249 EOF
6250
6251 # Transform confdefs.h into a sed script conftest.vals that substitutes
6252 # the proper values into config.h.in to produce config.h. And first:
6253 # Protect against being on the right side of a sed subst in config.status.
6254 # Protect against being in an unquoted here document in config.status.
6255 rm -f conftest.vals
6256 cat > conftest.hdr <<\EOF
6257 s/[\\&%]/\\&/g
6258 s%[\\$`]%\\&%g
6259 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6260 s%ac_d%ac_u%gp
6261 s%ac_u%ac_e%gp
6262 EOF
6263 sed -n -f conftest.hdr confdefs.h > conftest.vals
6264 rm -f conftest.hdr
6265
6266 # This sed command replaces #undef with comments. This is necessary, for
6267 # example, in the case of _POSIX_SOURCE, which is predefined and required
6268 # on some systems where configure will not decide to define it.
6269 cat >> conftest.vals <<\EOF
6270 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6271 EOF
6272
6273 # Break up conftest.vals because some shells have a limit on
6274 # the size of here documents, and old seds have small limits too.
6275
6276 rm -f conftest.tail
6277 while :
6278 do
6279 ac_lines=`grep -c . conftest.vals`
6280 # grep -c gives empty output for an empty file on some AIX systems.
6281 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6282 # Write a limited-size here document to conftest.frag.
6283 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6284 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6285 echo 'CEOF
6286 sed -f conftest.frag conftest.in > conftest.out
6287 rm -f conftest.in
6288 mv conftest.out conftest.in
6289 ' >> $CONFIG_STATUS
6290 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6291 rm -f conftest.vals
6292 mv conftest.tail conftest.vals
6293 done
6294 rm -f conftest.vals
6295
6296 cat >> $CONFIG_STATUS <<\EOF
6297 rm -f conftest.frag conftest.h
6298 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6299 cat conftest.in >> conftest.h
6300 rm -f conftest.in
6301 if cmp -s $ac_file conftest.h 2>/dev/null; then
6302 echo "$ac_file is unchanged"
6303 rm -f conftest.h
6304 else
6305 # Remove last slash and all that follows it. Not all systems have dirname.
6306 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6307 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6308 # The file is in a subdirectory.
6309 test ! -d "$ac_dir" && mkdir "$ac_dir"
6310 fi
6311 rm -f $ac_file
6312 mv conftest.h $ac_file
6313 fi
6314 fi; done
6315
6316 EOF
6317
6318 cat >> $CONFIG_STATUS <<EOF
6319 ac_sources="$files"
6320 ac_dests="$links"
6321 EOF
6322
6323 cat >> $CONFIG_STATUS <<\EOF
6324 srcdir=$ac_given_srcdir
6325 while test -n "$ac_sources"; do
6326 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6327 set $ac_sources; ac_source=$1; shift; ac_sources=$*
6328
6329 echo "linking $srcdir/$ac_source to $ac_dest"
6330
6331 if test ! -r $srcdir/$ac_source; then
6332 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6333 fi
6334 rm -f $ac_dest
6335
6336 # Make relative symlinks.
6337 # Remove last slash and all that follows it. Not all systems have dirname.
6338 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6339 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6340 # The dest file is in a subdirectory.
6341 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6342 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6343 # A "../" for each directory in $ac_dest_dir_suffix.
6344 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6345 else
6346 ac_dest_dir_suffix= ac_dots=
6347 fi
6348
6349 case "$srcdir" in
6350 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6351 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6352 esac
6353
6354 # Make a symlink if possible; otherwise try a hard link.
6355 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6356 ln $srcdir/$ac_source $ac_dest; then :
6357 else
6358 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6359 fi
6360 done
6361 EOF
6362 cat >> $CONFIG_STATUS <<EOF
6363
6364 gdb_host_cpu=$gdb_host_cpu
6365 gdb_target_cpu=$gdb_target_cpu
6366 nativefile=$nativefile
6367
6368 EOF
6369 cat >> $CONFIG_STATUS <<\EOF
6370
6371 if test "${nativefile}" = ""; then
6372 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
6373 < Makefile > Makefile.tem
6374 mv -f Makefile.tem Makefile
6375 fi
6376
6377 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
6378 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
6379 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
6380 mv -f Makefile.tmp Makefile
6381
6382 case x$CONFIG_HEADERS in
6383 xconfig.h:config.in)
6384 echo > stamp-h ;;
6385 esac
6386
6387 exit 0
6388 EOF
6389 chmod +x $CONFIG_STATUS
6390 rm -fr confdefs* $ac_clean_files
6391 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6392
6393 if test "$no_recursion" != yes; then
6394
6395 # Remove --cache-file and --srcdir arguments so they do not pile up.
6396 ac_sub_configure_args=
6397 ac_prev=
6398 for ac_arg in $ac_configure_args; do
6399 if test -n "$ac_prev"; then
6400 ac_prev=
6401 continue
6402 fi
6403 case "$ac_arg" in
6404 -cache-file | --cache-file | --cache-fil | --cache-fi \
6405 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6406 ac_prev=cache_file ;;
6407 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6408 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6409 ;;
6410 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6411 ac_prev=srcdir ;;
6412 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6413 ;;
6414 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
6415 esac
6416 done
6417
6418 for ac_config_dir in $configdirs; do
6419
6420 # Do not complain, so a configure script can configure whichever
6421 # parts of a large source tree are present.
6422 if test ! -d $srcdir/$ac_config_dir; then
6423 continue
6424 fi
6425
6426 echo configuring in $ac_config_dir
6427
6428 case "$srcdir" in
6429 .) ;;
6430 *)
6431 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
6432 else
6433 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
6434 fi
6435 ;;
6436 esac
6437
6438 ac_popdir=`pwd`
6439 cd $ac_config_dir
6440
6441 # A "../" for each directory in /$ac_config_dir.
6442 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
6443
6444 case "$srcdir" in
6445 .) # No --srcdir option. We are building in place.
6446 ac_sub_srcdir=$srcdir ;;
6447 /*) # Absolute path.
6448 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
6449 *) # Relative path.
6450 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
6451 esac
6452
6453 # Check for guested configure; otherwise get Cygnus style configure.
6454 if test -f $ac_sub_srcdir/configure; then
6455 ac_sub_configure=$ac_sub_srcdir/configure
6456 elif test -f $ac_sub_srcdir/configure.in; then
6457 ac_sub_configure=$ac_configure
6458 else
6459 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
6460 ac_sub_configure=
6461 fi
6462
6463 # The recursion is here.
6464 if test -n "$ac_sub_configure"; then
6465
6466 # Make the cache file name correct relative to the subdirectory.
6467 case "$cache_file" in
6468 /*) ac_sub_cache_file=$cache_file ;;
6469 *) # Relative path.
6470 ac_sub_cache_file="$ac_dots$cache_file" ;;
6471 esac
6472 case "$ac_given_INSTALL" in
6473 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6474 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6475 esac
6476
6477 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
6478 # The eval makes quoting arguments work.
6479 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
6480 then :
6481 else
6482 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
6483 fi
6484 fi
6485
6486 cd $ac_popdir
6487 done
6488 fi
6489
6490
6491 exit 0
6492