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