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