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