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