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