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