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