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