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