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