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