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