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