Changes to skip_prologue for PPC architecture.
[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=
e56ac5c3
AC
2787CONFIG_INSTALL=
2788CONFIG_UNINSTALL=
c906108c
SS
2789
2790configdirs="doc testsuite"
2791
96baa820
JM
2792# Check whether --enable-multi-ice or --disable-multi-ice was given.
2793if test "${enable_multi_ice+set}" = set; then
2794 enableval="$enable_multi_ice"
2795 case "${enableval}" in
2796 yes ) enable_multi_ice="yes" ;;
2797 no) enable_multi_ice="no" ;;
2798 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2799 esac
2800
2801fi
2802
2803
2804if test "${enable_multi_ice}" = "yes"; then
2805 configdirs="${configdirs} multi-ice"
2806fi
2807
c906108c
SS
2808
2809. ${srcdir}/configure.host
2810
2811. ${srcdir}/configure.tgt
2812
2813
0d06e24b 2814for ac_prog in mawk gawk nawk awk
7a292a7a
SS
2815do
2816# Extract the first word of "$ac_prog", so it can be a program name with args.
2817set dummy $ac_prog; ac_word=$2
2818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e56ac5c3 2819echo "configure:2820: checking for $ac_word" >&5
7a292a7a
SS
2820if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
2822else
2823 if test -n "$AWK"; then
2824 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2825else
2826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2827 ac_dummy="$PATH"
2828 for ac_dir in $ac_dummy; do
2829 test -z "$ac_dir" && ac_dir=.
2830 if test -f $ac_dir/$ac_word; then
2831 ac_cv_prog_AWK="$ac_prog"
2832 break
2833 fi
2834 done
2835 IFS="$ac_save_ifs"
2836fi
2837fi
2838AWK="$ac_cv_prog_AWK"
2839if test -n "$AWK"; then
2840 echo "$ac_t""$AWK" 1>&6
2841else
2842 echo "$ac_t""no" 1>&6
2843fi
2844
2845test -n "$AWK" && break
2846done
2847
c906108c
SS
2848# Find a good install program. We prefer a C program (faster),
2849# so one script is as good as another. But avoid the broken or
2850# incompatible versions:
2851# SysV /etc/install, /usr/sbin/install
2852# SunOS /usr/etc/install
2853# IRIX /sbin/install
2854# AIX /bin/install
2855# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2856# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2857# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2858# ./install, which can be erroneously created by make from ./install.sh.
2859echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
e56ac5c3 2860echo "configure:2861: checking for a BSD compatible install" >&5
c906108c
SS
2861if test -z "$INSTALL"; then
2862if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2863 echo $ac_n "(cached) $ac_c" 1>&6
2864else
2865 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2866 for ac_dir in $PATH; do
2867 # Account for people who put trailing slashes in PATH elements.
2868 case "$ac_dir/" in
2869 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2870 *)
2871 # OSF1 and SCO ODT 3.0 have their own names for install.
2872 # Don't use installbsd from OSF since it installs stuff as root
2873 # by default.
2874 for ac_prog in ginstall scoinst install; do
2875 if test -f $ac_dir/$ac_prog; then
2876 if test $ac_prog = install &&
2877 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2878 # AIX install. It has an incompatible calling convention.
2879 :
2880 else
2881 ac_cv_path_install="$ac_dir/$ac_prog -c"
2882 break 2
2883 fi
2884 fi
2885 done
2886 ;;
2887 esac
2888 done
2889 IFS="$ac_save_IFS"
2890
2891fi
2892 if test "${ac_cv_path_install+set}" = set; then
2893 INSTALL="$ac_cv_path_install"
2894 else
2895 # As a last resort, use the slow shell script. We don't cache a
2896 # path for INSTALL within a source directory, because that will
2897 # break other packages using the cache if that directory is
2898 # removed, or if the path is relative.
2899 INSTALL="$ac_install_sh"
2900 fi
2901fi
2902echo "$ac_t""$INSTALL" 1>&6
2903
2904# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2905# It thinks the first close brace ends the variable substitution.
2906test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2907
2908test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2909
2910test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2911
2912if test $host != $build; then
2913 ac_tool_prefix=${host_alias}-
2914else
2915 ac_tool_prefix=
2916fi
2917
2918# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2919set dummy ${ac_tool_prefix}ar; ac_word=$2
2920echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e56ac5c3 2921echo "configure:2922: checking for $ac_word" >&5
c906108c
SS
2922if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2923 echo $ac_n "(cached) $ac_c" 1>&6
2924else
2925 if test -n "$AR"; then
2926 ac_cv_prog_AR="$AR" # Let the user override the test.
2927else
2928 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2929 ac_dummy="$PATH"
2930 for ac_dir in $ac_dummy; do
2931 test -z "$ac_dir" && ac_dir=.
2932 if test -f $ac_dir/$ac_word; then
2933 ac_cv_prog_AR="${ac_tool_prefix}ar"
2934 break
2935 fi
2936 done
2937 IFS="$ac_save_ifs"
2938 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2939fi
2940fi
2941AR="$ac_cv_prog_AR"
2942if test -n "$AR"; then
2943 echo "$ac_t""$AR" 1>&6
2944else
2945 echo "$ac_t""no" 1>&6
2946fi
2947
2948
2949
2950# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2951set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2952echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e56ac5c3 2953echo "configure:2954: checking for $ac_word" >&5
c906108c
SS
2954if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2955 echo $ac_n "(cached) $ac_c" 1>&6
2956else
2957 if test -n "$RANLIB"; then
2958 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2959else
2960 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2961 ac_dummy="$PATH"
2962 for ac_dir in $ac_dummy; do
2963 test -z "$ac_dir" && ac_dir=.
2964 if test -f $ac_dir/$ac_word; then
2965 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2966 break
2967 fi
2968 done
2969 IFS="$ac_save_ifs"
2970fi
2971fi
2972RANLIB="$ac_cv_prog_RANLIB"
2973if test -n "$RANLIB"; then
2974 echo "$ac_t""$RANLIB" 1>&6
2975else
2976 echo "$ac_t""no" 1>&6
2977fi
2978
2979
2980if test -z "$ac_cv_prog_RANLIB"; then
2981if test -n "$ac_tool_prefix"; then
2982 # Extract the first word of "ranlib", so it can be a program name with args.
2983set dummy ranlib; ac_word=$2
2984echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e56ac5c3 2985echo "configure:2986: checking for $ac_word" >&5
c906108c
SS
2986if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
2988else
2989 if test -n "$RANLIB"; then
2990 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2991else
2992 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2993 ac_dummy="$PATH"
2994 for ac_dir in $ac_dummy; do
2995 test -z "$ac_dir" && ac_dir=.
2996 if test -f $ac_dir/$ac_word; then
2997 ac_cv_prog_RANLIB="ranlib"
2998 break
2999 fi
3000 done
3001 IFS="$ac_save_ifs"
3002 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3003fi
3004fi
3005RANLIB="$ac_cv_prog_RANLIB"
3006if test -n "$RANLIB"; then
3007 echo "$ac_t""$RANLIB" 1>&6
3008else
3009 echo "$ac_t""no" 1>&6
3010fi
3011
3012else
3013 RANLIB=":"
3014fi
3015fi
3016
3017for ac_prog in 'bison -y' byacc
3018do
3019# Extract the first word of "$ac_prog", so it can be a program name with args.
3020set dummy $ac_prog; ac_word=$2
3021echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e56ac5c3 3022echo "configure:3023: checking for $ac_word" >&5
c906108c
SS
3023if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3024 echo $ac_n "(cached) $ac_c" 1>&6
3025else
3026 if test -n "$YACC"; then
3027 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3028else
3029 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3030 ac_dummy="$PATH"
3031 for ac_dir in $ac_dummy; do
3032 test -z "$ac_dir" && ac_dir=.
3033 if test -f $ac_dir/$ac_word; then
3034 ac_cv_prog_YACC="$ac_prog"
3035 break
3036 fi
3037 done
3038 IFS="$ac_save_ifs"
3039fi
3040fi
3041YACC="$ac_cv_prog_YACC"
3042if test -n "$YACC"; then
3043 echo "$ac_t""$YACC" 1>&6
3044else
3045 echo "$ac_t""no" 1>&6
3046fi
3047
3048test -n "$YACC" && break
3049done
3050test -n "$YACC" || YACC="yacc"
3051
3052
3053if test "$program_transform_name" = s,x,x,; then
3054 program_transform_name=
3055else
3056 # Double any \ or $. echo might interpret backslashes.
3057 cat <<\EOF_SED > conftestsed
3058s,\\,\\\\,g; s,\$,$$,g
3059EOF_SED
3060 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3061 rm -f conftestsed
3062fi
3063test "$program_prefix" != NONE &&
3064 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3065# Use a double $ so make ignores it.
3066test "$program_suffix" != NONE &&
3067 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3068
3069# sed with no file args requires a program.
3070test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3071
3072
3073echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
e56ac5c3 3074echo "configure:3075: checking return type of signal handlers" >&5
c906108c
SS
3075if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3076 echo $ac_n "(cached) $ac_c" 1>&6
3077else
3078 cat > conftest.$ac_ext <<EOF
e56ac5c3 3079#line 3080 "configure"
c906108c
SS
3080#include "confdefs.h"
3081#include <sys/types.h>
3082#include <signal.h>
3083#ifdef signal
3084#undef signal
3085#endif
3086#ifdef __cplusplus
3087extern "C" void (*signal (int, void (*)(int)))(int);
3088#else
3089void (*signal ()) ();
3090#endif
3091
3092int main() {
3093int i;
3094; return 0; }
3095EOF
e56ac5c3 3096if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3097 rm -rf conftest*
3098 ac_cv_type_signal=void
3099else
3100 echo "configure: failed program was:" >&5
3101 cat conftest.$ac_ext >&5
3102 rm -rf conftest*
3103 ac_cv_type_signal=int
3104fi
3105rm -f conftest*
3106fi
3107
3108echo "$ac_t""$ac_cv_type_signal" 1>&6
3109cat >> confdefs.h <<EOF
3110#define RETSIGTYPE $ac_cv_type_signal
3111EOF
3112
3113
3114
3115echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
e56ac5c3 3116echo "configure:3117: checking for ANSI C header files" >&5
c906108c
SS
3117if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 cat > conftest.$ac_ext <<EOF
e56ac5c3 3121#line 3122 "configure"
c906108c
SS
3122#include "confdefs.h"
3123#include <stdlib.h>
3124#include <stdarg.h>
3125#include <string.h>
3126#include <float.h>
3127EOF
3128ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 3129{ (eval echo configure:3130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3130ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3131if test -z "$ac_err"; then
3132 rm -rf conftest*
3133 ac_cv_header_stdc=yes
3134else
3135 echo "$ac_err" >&5
3136 echo "configure: failed program was:" >&5
3137 cat conftest.$ac_ext >&5
3138 rm -rf conftest*
3139 ac_cv_header_stdc=no
3140fi
3141rm -f conftest*
3142
3143if test $ac_cv_header_stdc = yes; then
3144 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3145cat > conftest.$ac_ext <<EOF
e56ac5c3 3146#line 3147 "configure"
c906108c
SS
3147#include "confdefs.h"
3148#include <string.h>
3149EOF
3150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3151 egrep "memchr" >/dev/null 2>&1; then
3152 :
3153else
3154 rm -rf conftest*
3155 ac_cv_header_stdc=no
3156fi
3157rm -f conftest*
3158
3159fi
3160
3161if test $ac_cv_header_stdc = yes; then
3162 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3163cat > conftest.$ac_ext <<EOF
e56ac5c3 3164#line 3165 "configure"
c906108c
SS
3165#include "confdefs.h"
3166#include <stdlib.h>
3167EOF
3168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3169 egrep "free" >/dev/null 2>&1; then
3170 :
3171else
3172 rm -rf conftest*
3173 ac_cv_header_stdc=no
3174fi
3175rm -f conftest*
3176
3177fi
3178
3179if test $ac_cv_header_stdc = yes; then
3180 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3181if test "$cross_compiling" = yes; then
3182 :
3183else
3184 cat > conftest.$ac_ext <<EOF
e56ac5c3 3185#line 3186 "configure"
c906108c
SS
3186#include "confdefs.h"
3187#include <ctype.h>
3188#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3189#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3190#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3191int main () { int i; for (i = 0; i < 256; i++)
3192if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3193exit (0); }
3194
3195EOF
e56ac5c3 3196if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3197then
3198 :
3199else
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3202 rm -fr conftest*
3203 ac_cv_header_stdc=no
3204fi
3205rm -fr conftest*
3206fi
3207
3208fi
3209fi
3210
3211echo "$ac_t""$ac_cv_header_stdc" 1>&6
3212if test $ac_cv_header_stdc = yes; then
3213 cat >> confdefs.h <<\EOF
3214#define STDC_HEADERS 1
3215EOF
3216
3217fi
3218
3219
ed9a39eb 3220for ac_hdr in ctype.h curses.h endian.h link.h thread_db.h proc_service.h \
c906108c 3221 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
ed9a39eb 3222 string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
c906108c 3223 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
104c1213 3224 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
c2d11a7d 3225 time.h sys/ioctl.h
c906108c
SS
3226do
3227ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3228echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
e56ac5c3 3229echo "configure:3230: checking for $ac_hdr" >&5
c906108c
SS
3230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3231 echo $ac_n "(cached) $ac_c" 1>&6
3232else
3233 cat > conftest.$ac_ext <<EOF
e56ac5c3 3234#line 3235 "configure"
c906108c
SS
3235#include "confdefs.h"
3236#include <$ac_hdr>
3237EOF
3238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 3239{ (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241if test -z "$ac_err"; then
3242 rm -rf conftest*
3243 eval "ac_cv_header_$ac_safe=yes"
3244else
3245 echo "$ac_err" >&5
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3248 rm -rf conftest*
3249 eval "ac_cv_header_$ac_safe=no"
3250fi
3251rm -f conftest*
3252fi
3253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3254 echo "$ac_t""yes" 1>&6
3255 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3256 cat >> confdefs.h <<EOF
3257#define $ac_tr_hdr 1
3258EOF
3259
3260else
3261 echo "$ac_t""no" 1>&6
3262fi
3263done
3264
3265echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
e56ac5c3 3266echo "configure:3267: checking whether stat file-mode macros are broken" >&5
c906108c
SS
3267if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3268 echo $ac_n "(cached) $ac_c" 1>&6
3269else
3270 cat > conftest.$ac_ext <<EOF
e56ac5c3 3271#line 3272 "configure"
c906108c
SS
3272#include "confdefs.h"
3273#include <sys/types.h>
3274#include <sys/stat.h>
3275
3276#if defined(S_ISBLK) && defined(S_IFDIR)
3277# if S_ISBLK (S_IFDIR)
3278You lose.
3279# endif
3280#endif
3281
3282#if defined(S_ISBLK) && defined(S_IFCHR)
3283# if S_ISBLK (S_IFCHR)
3284You lose.
3285# endif
3286#endif
3287
3288#if defined(S_ISLNK) && defined(S_IFREG)
3289# if S_ISLNK (S_IFREG)
3290You lose.
3291# endif
3292#endif
3293
3294#if defined(S_ISSOCK) && defined(S_IFREG)
3295# if S_ISSOCK (S_IFREG)
3296You lose.
3297# endif
3298#endif
3299
3300EOF
3301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3302 egrep "You lose" >/dev/null 2>&1; then
3303 rm -rf conftest*
3304 ac_cv_header_stat_broken=yes
3305else
3306 rm -rf conftest*
3307 ac_cv_header_stat_broken=no
3308fi
3309rm -f conftest*
3310
3311fi
3312
3313echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3314if test $ac_cv_header_stat_broken = yes; then
3315 cat >> confdefs.h <<\EOF
3316#define STAT_MACROS_BROKEN 1
3317EOF
3318
3319fi
3320
3321
3322echo $ac_n "checking for working const""... $ac_c" 1>&6
e56ac5c3 3323echo "configure:3324: checking for working const" >&5
c906108c
SS
3324if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3325 echo $ac_n "(cached) $ac_c" 1>&6
3326else
3327 cat > conftest.$ac_ext <<EOF
e56ac5c3 3328#line 3329 "configure"
c906108c
SS
3329#include "confdefs.h"
3330
3331int main() {
3332
3333/* Ultrix mips cc rejects this. */
3334typedef int charset[2]; const charset x;
3335/* SunOS 4.1.1 cc rejects this. */
3336char const *const *ccp;
3337char **p;
3338/* NEC SVR4.0.2 mips cc rejects this. */
3339struct point {int x, y;};
3340static struct point const zero = {0,0};
3341/* AIX XL C 1.02.0.0 rejects this.
3342 It does not let you subtract one const X* pointer from another in an arm
3343 of an if-expression whose if-part is not a constant expression */
3344const char *g = "string";
3345ccp = &g + (g ? g-g : 0);
3346/* HPUX 7.0 cc rejects these. */
3347++ccp;
3348p = (char**) ccp;
3349ccp = (char const *const *) p;
3350{ /* SCO 3.2v4 cc rejects this. */
3351 char *t;
3352 char const *s = 0 ? (char *) 0 : (char const *) 0;
3353
3354 *t++ = 0;
3355}
3356{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3357 int x[] = {25, 17};
3358 const int *foo = &x[0];
3359 ++foo;
3360}
3361{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3362 typedef const int *iptr;
3363 iptr p = 0;
3364 ++p;
3365}
3366{ /* AIX XL C 1.02.0.0 rejects this saying
3367 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3368 struct s { int j; const int *ap[3]; };
3369 struct s *b; b->j = 5;
3370}
3371{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3372 const int foo = 10;
3373}
3374
3375; return 0; }
3376EOF
e56ac5c3 3377if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3378 rm -rf conftest*
3379 ac_cv_c_const=yes
3380else
3381 echo "configure: failed program was:" >&5
3382 cat conftest.$ac_ext >&5
3383 rm -rf conftest*
3384 ac_cv_c_const=no
3385fi
3386rm -f conftest*
3387fi
3388
3389echo "$ac_t""$ac_cv_c_const" 1>&6
3390if test $ac_cv_c_const = no; then
3391 cat >> confdefs.h <<\EOF
3392#define const
3393EOF
3394
3395fi
3396
3397
2acceee2 3398for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
c906108c
SS
3399do
3400echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e56ac5c3 3401echo "configure:3402: checking for $ac_func" >&5
c906108c
SS
3402if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 cat > conftest.$ac_ext <<EOF
e56ac5c3 3406#line 3407 "configure"
c906108c
SS
3407#include "confdefs.h"
3408/* System header to define __stub macros and hopefully few prototypes,
3409 which can conflict with char $ac_func(); below. */
3410#include <assert.h>
3411/* Override any gcc2 internal prototype to avoid an error. */
3412/* We use char because int might match the return type of a gcc2
3413 builtin and then its argument prototype would still apply. */
3414char $ac_func();
3415
3416int main() {
3417
3418/* The GNU C library defines this for functions which it implements
3419 to always fail with ENOSYS. Some functions are actually named
3420 something starting with __ and the normal name is an alias. */
3421#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3422choke me
3423#else
3424$ac_func();
3425#endif
3426
3427; return 0; }
3428EOF
e56ac5c3 3429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3430 rm -rf conftest*
3431 eval "ac_cv_func_$ac_func=yes"
3432else
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_func_$ac_func=no"
3437fi
3438rm -f conftest*
3439fi
3440
3441if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3442 echo "$ac_t""yes" 1>&6
3443 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3444 cat >> confdefs.h <<EOF
3445#define $ac_tr_func 1
3446EOF
3447
3448else
3449 echo "$ac_t""no" 1>&6
3450fi
3451done
3452
3453# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3454# for constant arguments. Useless!
3455echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
e56ac5c3 3456echo "configure:3457: checking for working alloca.h" >&5
c906108c
SS
3457if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3458 echo $ac_n "(cached) $ac_c" 1>&6
3459else
3460 cat > conftest.$ac_ext <<EOF
e56ac5c3 3461#line 3462 "configure"
c906108c
SS
3462#include "confdefs.h"
3463#include <alloca.h>
3464int main() {
3465char *p = alloca(2 * sizeof(int));
3466; return 0; }
3467EOF
e56ac5c3 3468if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3469 rm -rf conftest*
3470 ac_cv_header_alloca_h=yes
3471else
3472 echo "configure: failed program was:" >&5
3473 cat conftest.$ac_ext >&5
3474 rm -rf conftest*
3475 ac_cv_header_alloca_h=no
3476fi
3477rm -f conftest*
3478fi
3479
3480echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3481if test $ac_cv_header_alloca_h = yes; then
3482 cat >> confdefs.h <<\EOF
3483#define HAVE_ALLOCA_H 1
3484EOF
3485
3486fi
3487
3488echo $ac_n "checking for alloca""... $ac_c" 1>&6
e56ac5c3 3489echo "configure:3490: checking for alloca" >&5
c906108c
SS
3490if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492else
3493 cat > conftest.$ac_ext <<EOF
e56ac5c3 3494#line 3495 "configure"
c906108c
SS
3495#include "confdefs.h"
3496
3497#ifdef __GNUC__
3498# define alloca __builtin_alloca
3499#else
3500# ifdef _MSC_VER
3501# include <malloc.h>
3502# define alloca _alloca
3503# else
3504# if HAVE_ALLOCA_H
3505# include <alloca.h>
3506# else
3507# ifdef _AIX
3508 #pragma alloca
3509# else
3510# ifndef alloca /* predefined by HP cc +Olibcalls */
3511char *alloca ();
3512# endif
3513# endif
3514# endif
3515# endif
3516#endif
3517
3518int main() {
3519char *p = (char *) alloca(1);
3520; return 0; }
3521EOF
e56ac5c3 3522if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3523 rm -rf conftest*
3524 ac_cv_func_alloca_works=yes
3525else
3526 echo "configure: failed program was:" >&5
3527 cat conftest.$ac_ext >&5
3528 rm -rf conftest*
3529 ac_cv_func_alloca_works=no
3530fi
3531rm -f conftest*
3532fi
3533
3534echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3535if test $ac_cv_func_alloca_works = yes; then
3536 cat >> confdefs.h <<\EOF
3537#define HAVE_ALLOCA 1
3538EOF
3539
3540fi
3541
3542if test $ac_cv_func_alloca_works = no; then
3543 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3544 # that cause trouble. Some versions do not even contain alloca or
3545 # contain a buggy version. If you still want to use their alloca,
3546 # use ar to extract alloca.o from them instead of compiling alloca.c.
3547 ALLOCA=alloca.${ac_objext}
3548 cat >> confdefs.h <<\EOF
3549#define C_ALLOCA 1
3550EOF
3551
3552
3553echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
e56ac5c3 3554echo "configure:3555: checking whether alloca needs Cray hooks" >&5
c906108c
SS
3555if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3556 echo $ac_n "(cached) $ac_c" 1>&6
3557else
3558 cat > conftest.$ac_ext <<EOF
e56ac5c3 3559#line 3560 "configure"
c906108c
SS
3560#include "confdefs.h"
3561#if defined(CRAY) && ! defined(CRAY2)
3562webecray
3563#else
3564wenotbecray
3565#endif
3566
3567EOF
3568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3569 egrep "webecray" >/dev/null 2>&1; then
3570 rm -rf conftest*
3571 ac_cv_os_cray=yes
3572else
3573 rm -rf conftest*
3574 ac_cv_os_cray=no
3575fi
3576rm -f conftest*
3577
3578fi
3579
3580echo "$ac_t""$ac_cv_os_cray" 1>&6
3581if test $ac_cv_os_cray = yes; then
3582for ac_func in _getb67 GETB67 getb67; do
3583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e56ac5c3 3584echo "configure:3585: checking for $ac_func" >&5
c906108c
SS
3585if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3586 echo $ac_n "(cached) $ac_c" 1>&6
3587else
3588 cat > conftest.$ac_ext <<EOF
e56ac5c3 3589#line 3590 "configure"
c906108c
SS
3590#include "confdefs.h"
3591/* System header to define __stub macros and hopefully few prototypes,
3592 which can conflict with char $ac_func(); below. */
3593#include <assert.h>
3594/* Override any gcc2 internal prototype to avoid an error. */
3595/* We use char because int might match the return type of a gcc2
3596 builtin and then its argument prototype would still apply. */
3597char $ac_func();
3598
3599int main() {
3600
3601/* The GNU C library defines this for functions which it implements
3602 to always fail with ENOSYS. Some functions are actually named
3603 something starting with __ and the normal name is an alias. */
3604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3605choke me
3606#else
3607$ac_func();
3608#endif
3609
3610; return 0; }
3611EOF
e56ac5c3 3612if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3613 rm -rf conftest*
3614 eval "ac_cv_func_$ac_func=yes"
3615else
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3618 rm -rf conftest*
3619 eval "ac_cv_func_$ac_func=no"
3620fi
3621rm -f conftest*
3622fi
3623
3624if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3625 echo "$ac_t""yes" 1>&6
3626 cat >> confdefs.h <<EOF
3627#define CRAY_STACKSEG_END $ac_func
3628EOF
3629
3630 break
3631else
3632 echo "$ac_t""no" 1>&6
3633fi
3634
3635done
3636fi
3637
3638echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
e56ac5c3 3639echo "configure:3640: checking stack direction for C alloca" >&5
c906108c
SS
3640if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3641 echo $ac_n "(cached) $ac_c" 1>&6
3642else
3643 if test "$cross_compiling" = yes; then
3644 ac_cv_c_stack_direction=0
3645else
3646 cat > conftest.$ac_ext <<EOF
e56ac5c3 3647#line 3648 "configure"
c906108c
SS
3648#include "confdefs.h"
3649find_stack_direction ()
3650{
3651 static char *addr = 0;
3652 auto char dummy;
3653 if (addr == 0)
3654 {
3655 addr = &dummy;
3656 return find_stack_direction ();
3657 }
3658 else
3659 return (&dummy > addr) ? 1 : -1;
3660}
3661main ()
3662{
3663 exit (find_stack_direction() < 0);
3664}
3665EOF
e56ac5c3 3666if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3667then
3668 ac_cv_c_stack_direction=1
3669else
3670 echo "configure: failed program was:" >&5
3671 cat conftest.$ac_ext >&5
3672 rm -fr conftest*
3673 ac_cv_c_stack_direction=-1
3674fi
3675rm -fr conftest*
3676fi
3677
3678fi
3679
3680echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3681cat >> confdefs.h <<EOF
3682#define STACK_DIRECTION $ac_cv_c_stack_direction
3683EOF
3684
3685fi
3686
3687
5c44784c 3688echo $ac_n "checking for PTRACE_GETXFPREGS""... $ac_c" 1>&6
e56ac5c3 3689echo "configure:3690: checking for PTRACE_GETXFPREGS" >&5
5c44784c
JM
3690if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getxfpregs'+set}'`\" = set"; then
3691 echo $ac_n "(cached) $ac_c" 1>&6
3692else
3693 cat > conftest.$ac_ext <<EOF
e56ac5c3 3694#line 3695 "configure"
5c44784c
JM
3695#include "confdefs.h"
3696#include <sys/ptrace.h>
3697int main() {
3698PTRACE_GETXFPREGS;
3699; return 0; }
3700EOF
e56ac5c3 3701if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c44784c
JM
3702 rm -rf conftest*
3703 gdb_cv_have_ptrace_getxfpregs=yes
3704else
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3707 rm -rf conftest*
3708 gdb_cv_have_ptrace_getxfpregs=no
3709fi
3710rm -f conftest*
3711fi
3712
3713echo "$ac_t""$gdb_cv_have_ptrace_getxfpregs" 1>&6
3714if test $gdb_cv_have_ptrace_getxfpregs = yes; then
3715 cat >> confdefs.h <<\EOF
3716#define HAVE_PTRACE_GETXFPREGS 1
3717EOF
3718
3719fi
3720
7be570e7 3721echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
e56ac5c3 3722echo "configure:3723: checking for socketpair in -lsocket" >&5
7be570e7
JM
3723ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
3724if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3725 echo $ac_n "(cached) $ac_c" 1>&6
3726else
3727 ac_save_LIBS="$LIBS"
3728LIBS="-lsocket $LIBS"
3729cat > conftest.$ac_ext <<EOF
e56ac5c3 3730#line 3731 "configure"
7be570e7
JM
3731#include "confdefs.h"
3732/* Override any gcc2 internal prototype to avoid an error. */
3733/* We use char because int might match the return type of a gcc2
3734 builtin and then its argument prototype would still apply. */
3735char socketpair();
3736
3737int main() {
3738socketpair()
3739; return 0; }
3740EOF
e56ac5c3 3741if { (eval echo configure:3742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
3742 rm -rf conftest*
3743 eval "ac_cv_lib_$ac_lib_var=yes"
3744else
3745 echo "configure: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3747 rm -rf conftest*
3748 eval "ac_cv_lib_$ac_lib_var=no"
3749fi
3750rm -f conftest*
3751LIBS="$ac_save_LIBS"
3752
3753fi
3754if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3755 echo "$ac_t""yes" 1>&6
3756 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3757 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3758 cat >> confdefs.h <<EOF
3759#define $ac_tr_lib 1
3760EOF
3761
3762 LIBS="-lsocket $LIBS"
3763
3764else
3765 echo "$ac_t""no" 1>&6
3766fi
3767
3768for ac_func in socketpair
3769do
3770echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e56ac5c3 3771echo "configure:3772: checking for $ac_func" >&5
7be570e7
JM
3772if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3774else
3775 cat > conftest.$ac_ext <<EOF
e56ac5c3 3776#line 3777 "configure"
7be570e7
JM
3777#include "confdefs.h"
3778/* System header to define __stub macros and hopefully few prototypes,
3779 which can conflict with char $ac_func(); below. */
3780#include <assert.h>
3781/* Override any gcc2 internal prototype to avoid an error. */
3782/* We use char because int might match the return type of a gcc2
3783 builtin and then its argument prototype would still apply. */
3784char $ac_func();
3785
3786int main() {
3787
3788/* The GNU C library defines this for functions which it implements
3789 to always fail with ENOSYS. Some functions are actually named
3790 something starting with __ and the normal name is an alias. */
3791#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3792choke me
3793#else
3794$ac_func();
3795#endif
3796
3797; return 0; }
3798EOF
e56ac5c3 3799if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
3800 rm -rf conftest*
3801 eval "ac_cv_func_$ac_func=yes"
3802else
3803 echo "configure: failed program was:" >&5
3804 cat conftest.$ac_ext >&5
3805 rm -rf conftest*
3806 eval "ac_cv_func_$ac_func=no"
3807fi
3808rm -f conftest*
3809fi
3810
3811if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3812 echo "$ac_t""yes" 1>&6
3813 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3814 cat >> confdefs.h <<EOF
3815#define $ac_tr_func 1
3816EOF
3817
3818else
3819 echo "$ac_t""no" 1>&6
3820fi
3821done
3822
3823
3824
c906108c 3825echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
e56ac5c3 3826echo "configure:3827: checking whether malloc must be declared" >&5
c906108c
SS
3827if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3828 echo $ac_n "(cached) $ac_c" 1>&6
3829else
3830 cat > conftest.$ac_ext <<EOF
e56ac5c3 3831#line 3832 "configure"
c906108c
SS
3832#include "confdefs.h"
3833
3834#include <stdio.h>
3835#ifdef HAVE_STRING_H
3836#include <string.h>
3837#else
3838#ifdef HAVE_STRINGS_H
3839#include <strings.h>
3840#endif
3841#endif
3842#ifdef HAVE_STDLIB_H
3843#include <stdlib.h>
3844#endif
3845#ifdef HAVE_UNISTD_H
3846#include <unistd.h>
3847#endif
3848int main() {
3849char *(*pfn) = (char *(*)) malloc
3850; return 0; }
3851EOF
e56ac5c3 3852if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3853 rm -rf conftest*
3854 bfd_cv_decl_needed_malloc=no
3855else
3856 echo "configure: failed program was:" >&5
3857 cat conftest.$ac_ext >&5
3858 rm -rf conftest*
3859 bfd_cv_decl_needed_malloc=yes
3860fi
3861rm -f conftest*
3862fi
3863
3864echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3865if test $bfd_cv_decl_needed_malloc = yes; then
3866 cat >> confdefs.h <<\EOF
3867#define NEED_DECLARATION_MALLOC 1
3868EOF
3869
3870fi
3871
3872echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
e56ac5c3 3873echo "configure:3874: checking whether realloc must be declared" >&5
c906108c
SS
3874if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3875 echo $ac_n "(cached) $ac_c" 1>&6
3876else
3877 cat > conftest.$ac_ext <<EOF
e56ac5c3 3878#line 3879 "configure"
c906108c
SS
3879#include "confdefs.h"
3880
3881#include <stdio.h>
3882#ifdef HAVE_STRING_H
3883#include <string.h>
3884#else
3885#ifdef HAVE_STRINGS_H
3886#include <strings.h>
3887#endif
3888#endif
3889#ifdef HAVE_STDLIB_H
3890#include <stdlib.h>
3891#endif
3892#ifdef HAVE_UNISTD_H
3893#include <unistd.h>
3894#endif
3895int main() {
3896char *(*pfn) = (char *(*)) realloc
3897; return 0; }
3898EOF
e56ac5c3 3899if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3900 rm -rf conftest*
3901 bfd_cv_decl_needed_realloc=no
3902else
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905 rm -rf conftest*
3906 bfd_cv_decl_needed_realloc=yes
3907fi
3908rm -f conftest*
3909fi
3910
3911echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3912if test $bfd_cv_decl_needed_realloc = yes; then
3913 cat >> confdefs.h <<\EOF
3914#define NEED_DECLARATION_REALLOC 1
3915EOF
3916
3917fi
3918
3919echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
e56ac5c3 3920echo "configure:3921: checking whether free must be declared" >&5
c906108c
SS
3921if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3922 echo $ac_n "(cached) $ac_c" 1>&6
3923else
3924 cat > conftest.$ac_ext <<EOF
e56ac5c3 3925#line 3926 "configure"
c906108c
SS
3926#include "confdefs.h"
3927
3928#include <stdio.h>
3929#ifdef HAVE_STRING_H
3930#include <string.h>
3931#else
3932#ifdef HAVE_STRINGS_H
3933#include <strings.h>
3934#endif
3935#endif
3936#ifdef HAVE_STDLIB_H
3937#include <stdlib.h>
3938#endif
3939#ifdef HAVE_UNISTD_H
3940#include <unistd.h>
3941#endif
3942int main() {
3943char *(*pfn) = (char *(*)) free
3944; return 0; }
3945EOF
e56ac5c3 3946if { (eval echo configure:3947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3947 rm -rf conftest*
3948 bfd_cv_decl_needed_free=no
3949else
3950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -rf conftest*
3953 bfd_cv_decl_needed_free=yes
3954fi
3955rm -f conftest*
3956fi
3957
3958echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
3959if test $bfd_cv_decl_needed_free = yes; then
3960 cat >> confdefs.h <<\EOF
3961#define NEED_DECLARATION_FREE 1
3962EOF
3963
3964fi
3965
3966echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
e56ac5c3 3967echo "configure:3968: checking whether strerror must be declared" >&5
c906108c
SS
3968if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
3969 echo $ac_n "(cached) $ac_c" 1>&6
3970else
3971 cat > conftest.$ac_ext <<EOF
e56ac5c3 3972#line 3973 "configure"
c906108c
SS
3973#include "confdefs.h"
3974
3975#include <stdio.h>
3976#ifdef HAVE_STRING_H
3977#include <string.h>
3978#else
3979#ifdef HAVE_STRINGS_H
3980#include <strings.h>
3981#endif
3982#endif
3983#ifdef HAVE_STDLIB_H
3984#include <stdlib.h>
3985#endif
3986#ifdef HAVE_UNISTD_H
3987#include <unistd.h>
3988#endif
3989int main() {
3990char *(*pfn) = (char *(*)) strerror
3991; return 0; }
3992EOF
e56ac5c3 3993if { (eval echo configure:3994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3994 rm -rf conftest*
3995 bfd_cv_decl_needed_strerror=no
3996else
3997 echo "configure: failed program was:" >&5
3998 cat conftest.$ac_ext >&5
3999 rm -rf conftest*
4000 bfd_cv_decl_needed_strerror=yes
4001fi
4002rm -f conftest*
4003fi
4004
4005echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4006if test $bfd_cv_decl_needed_strerror = yes; then
4007 cat >> confdefs.h <<\EOF
4008#define NEED_DECLARATION_STRERROR 1
4009EOF
4010
4011fi
4012
4013echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
e56ac5c3 4014echo "configure:4015: checking whether strdup must be declared" >&5
c906108c
SS
4015if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4016 echo $ac_n "(cached) $ac_c" 1>&6
4017else
4018 cat > conftest.$ac_ext <<EOF
e56ac5c3 4019#line 4020 "configure"
c906108c
SS
4020#include "confdefs.h"
4021
4022#include <stdio.h>
4023#ifdef HAVE_STRING_H
4024#include <string.h>
4025#else
4026#ifdef HAVE_STRINGS_H
4027#include <strings.h>
4028#endif
4029#endif
4030#ifdef HAVE_STDLIB_H
4031#include <stdlib.h>
4032#endif
4033#ifdef HAVE_UNISTD_H
4034#include <unistd.h>
4035#endif
4036int main() {
4037char *(*pfn) = (char *(*)) strdup
4038; return 0; }
4039EOF
e56ac5c3 4040if { (eval echo configure:4041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4041 rm -rf conftest*
4042 bfd_cv_decl_needed_strdup=no
4043else
4044 echo "configure: failed program was:" >&5
4045 cat conftest.$ac_ext >&5
4046 rm -rf conftest*
4047 bfd_cv_decl_needed_strdup=yes
4048fi
4049rm -f conftest*
4050fi
4051
4052echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4053if test $bfd_cv_decl_needed_strdup = yes; then
4054 cat >> confdefs.h <<\EOF
4055#define NEED_DECLARATION_STRDUP 1
4056EOF
4057
4058fi
4059
b83266a0 4060echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
e56ac5c3 4061echo "configure:4062: checking whether strstr must be declared" >&5
b83266a0
SS
4062if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4063 echo $ac_n "(cached) $ac_c" 1>&6
4064else
4065 cat > conftest.$ac_ext <<EOF
e56ac5c3 4066#line 4067 "configure"
b83266a0
SS
4067#include "confdefs.h"
4068
4069#include <stdio.h>
4070#ifdef HAVE_STRING_H
4071#include <string.h>
4072#else
4073#ifdef HAVE_STRINGS_H
4074#include <strings.h>
4075#endif
4076#endif
4077#ifdef HAVE_STDLIB_H
4078#include <stdlib.h>
4079#endif
4080#ifdef HAVE_UNISTD_H
4081#include <unistd.h>
4082#endif
4083int main() {
4084char *(*pfn) = (char *(*)) strstr
4085; return 0; }
4086EOF
e56ac5c3 4087if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0
SS
4088 rm -rf conftest*
4089 bfd_cv_decl_needed_strstr=no
4090else
4091 echo "configure: failed program was:" >&5
4092 cat conftest.$ac_ext >&5
4093 rm -rf conftest*
4094 bfd_cv_decl_needed_strstr=yes
4095fi
4096rm -f conftest*
4097fi
4098
4099echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4100if test $bfd_cv_decl_needed_strstr = yes; then
4101 cat >> confdefs.h <<\EOF
4102#define NEED_DECLARATION_STRSTR 1
4103EOF
4104
4105fi
4106
c906108c
SS
4107
4108
4109# The following save_state_t checkery is only necessary for HPUX
4110# versions earlier than 10.20. When those fade from memory, this
4111# could be expunged. --jsm 1999-03-22
4112
4113echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
e56ac5c3 4114echo "configure:4115: checking for HPUX save_state structure" >&5
c906108c 4115cat > conftest.$ac_ext <<EOF
e56ac5c3 4116#line 4117 "configure"
c906108c
SS
4117#include "confdefs.h"
4118#include <machine/save_state.h>
4119EOF
4120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4121 egrep "save_state_t" >/dev/null 2>&1; then
4122 rm -rf conftest*
4123 gdb_cv_hpux_savestate=yes
4124else
4125 rm -rf conftest*
4126 gdb_cv_hpux_savestate=no
4127fi
4128rm -f conftest*
4129
4130cat > conftest.$ac_ext <<EOF
e56ac5c3 4131#line 4132 "configure"
c906108c
SS
4132#include "confdefs.h"
4133#include <machine/save_state.h>
4134EOF
4135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4136 egrep "ss_wide" >/dev/null 2>&1; then
4137 rm -rf conftest*
4138 gdb_cv_hpux_sswide=yes
4139else
4140 rm -rf conftest*
4141 gdb_cv_hpux_sswide=no
4142fi
4143rm -f conftest*
4144
4145if test $gdb_cv_hpux_savestate = yes
4146then
4147 cat >> confdefs.h <<\EOF
4148#define HAVE_STRUCT_SAVE_STATE_T 1
4149EOF
4150
4151fi
4152if test $gdb_cv_hpux_sswide = yes
4153then
4154 cat >> confdefs.h <<\EOF
4155#define HAVE_STRUCT_MEMBER_SS_WIDE 1
4156EOF
4157
4158fi
4159echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4160
4161
4162# If we are configured native on GNU/Linux, work around problems with
4163# sys/procfs.h
c3f6f71d 4164# Also detect which type of /proc is in use, such as for Unixware or Solaris.
c906108c
SS
4165
4166if test "${target}" = "${host}"; then
4167 case "${host}" in
4168 i[3456]86-*-linux*)
4169 cat >> confdefs.h <<\EOF
4170#define START_INFERIOR_TRAPS_EXPECTED 2
4171EOF
4172
4173 cat >> confdefs.h <<\EOF
4174#define sys_quotactl 1
4175EOF
4176
4177 ;;
c5394b80 4178 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
c3f6f71d
JM
4179 cat >> confdefs.h <<\EOF
4180#define NEW_PROC_API 1
c906108c
SS
4181EOF
4182
c3f6f71d
JM
4183 ;;
4184 # FIXME: we would like to define NEW_PROC_API for all versions of
4185 # Solaris from 2.6 on... but it isn't quite working yet. Seems
4186 # to work on sparc 2.6, so let's try it out there.
4187 sparc-sun-solaris2.6)
4188 cat >> confdefs.h <<\EOF
4189#define NEW_PROC_API 1
4190EOF
4191
4192 ;;
4193 esac
c906108c
SS
4194fi
4195
4196if test "$ac_cv_header_sys_procfs_h" = yes; then
4197 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4198echo "configure:4199: checking for pstatus_t in sys/procfs.h" >&5
c906108c
SS
4199 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4201else
4202 cat > conftest.$ac_ext <<EOF
e56ac5c3 4203#line 4204 "configure"
c906108c
SS
4204#include "confdefs.h"
4205#include <sys/procfs.h>
4206int main() {
4207pstatus_t avar
4208; return 0; }
4209EOF
e56ac5c3 4210if { (eval echo configure:4211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4211 rm -rf conftest*
4212 bfd_cv_have_sys_procfs_type_pstatus_t=yes
4213else
4214 echo "configure: failed program was:" >&5
4215 cat conftest.$ac_ext >&5
4216 rm -rf conftest*
4217 bfd_cv_have_sys_procfs_type_pstatus_t=no
4218
4219fi
4220rm -f conftest*
4221fi
4222
4223 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4224 cat >> confdefs.h <<\EOF
4225#define HAVE_PSTATUS_T 1
4226EOF
4227
4228 fi
4229 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4230
4231 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4232echo "configure:4233: checking for prrun_t in sys/procfs.h" >&5
c906108c
SS
4233 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
4234 echo $ac_n "(cached) $ac_c" 1>&6
4235else
4236 cat > conftest.$ac_ext <<EOF
e56ac5c3 4237#line 4238 "configure"
c906108c
SS
4238#include "confdefs.h"
4239#include <sys/procfs.h>
4240int main() {
4241prrun_t avar
4242; return 0; }
4243EOF
e56ac5c3 4244if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4245 rm -rf conftest*
4246 bfd_cv_have_sys_procfs_type_prrun_t=yes
4247else
4248 echo "configure: failed program was:" >&5
4249 cat conftest.$ac_ext >&5
4250 rm -rf conftest*
4251 bfd_cv_have_sys_procfs_type_prrun_t=no
4252
4253fi
4254rm -f conftest*
4255fi
4256
4257 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
4258 cat >> confdefs.h <<\EOF
4259#define HAVE_PRRUN_T 1
4260EOF
4261
4262 fi
4263 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
4264
4265 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4266echo "configure:4267: checking for gregset_t in sys/procfs.h" >&5
c906108c
SS
4267 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
4268 echo $ac_n "(cached) $ac_c" 1>&6
4269else
4270 cat > conftest.$ac_ext <<EOF
e56ac5c3 4271#line 4272 "configure"
c906108c
SS
4272#include "confdefs.h"
4273#include <sys/procfs.h>
4274int main() {
4275gregset_t avar
4276; return 0; }
4277EOF
e56ac5c3 4278if { (eval echo configure:4279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4279 rm -rf conftest*
4280 bfd_cv_have_sys_procfs_type_gregset_t=yes
4281else
4282 echo "configure: failed program was:" >&5
4283 cat conftest.$ac_ext >&5
4284 rm -rf conftest*
4285 bfd_cv_have_sys_procfs_type_gregset_t=no
4286
4287fi
4288rm -f conftest*
4289fi
4290
4291 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
4292 cat >> confdefs.h <<\EOF
4293#define HAVE_GREGSET_T 1
4294EOF
4295
4296 fi
4297 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
4298
4299 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4300echo "configure:4301: checking for fpregset_t in sys/procfs.h" >&5
c906108c
SS
4301 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
4302 echo $ac_n "(cached) $ac_c" 1>&6
4303else
4304 cat > conftest.$ac_ext <<EOF
e56ac5c3 4305#line 4306 "configure"
c906108c
SS
4306#include "confdefs.h"
4307#include <sys/procfs.h>
4308int main() {
4309fpregset_t avar
4310; return 0; }
4311EOF
e56ac5c3 4312if { (eval echo configure:4313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4313 rm -rf conftest*
4314 bfd_cv_have_sys_procfs_type_fpregset_t=yes
4315else
4316 echo "configure: failed program was:" >&5
4317 cat conftest.$ac_ext >&5
4318 rm -rf conftest*
4319 bfd_cv_have_sys_procfs_type_fpregset_t=no
4320
4321fi
4322rm -f conftest*
4323fi
4324
4325 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
4326 cat >> confdefs.h <<\EOF
4327#define HAVE_FPREGSET_T 1
4328EOF
4329
4330 fi
4331 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
4332
3862412b 4333 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4334echo "configure:4335: checking for prgregset_t in sys/procfs.h" >&5
3862412b
MK
4335 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
4336 echo $ac_n "(cached) $ac_c" 1>&6
4337else
4338 cat > conftest.$ac_ext <<EOF
e56ac5c3 4339#line 4340 "configure"
3862412b
MK
4340#include "confdefs.h"
4341#include <sys/procfs.h>
4342int main() {
4343prgregset_t avar
4344; return 0; }
4345EOF
e56ac5c3 4346if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4347 rm -rf conftest*
4348 bfd_cv_have_sys_procfs_type_prgregset_t=yes
4349else
4350 echo "configure: failed program was:" >&5
4351 cat conftest.$ac_ext >&5
4352 rm -rf conftest*
4353 bfd_cv_have_sys_procfs_type_prgregset_t=no
4354
4355fi
4356rm -f conftest*
4357fi
4358
4359 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
4360 cat >> confdefs.h <<\EOF
4361#define HAVE_PRGREGSET_T 1
4362EOF
4363
4364 fi
4365 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
4366
4367 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4368echo "configure:4369: checking for prfpregset_t in sys/procfs.h" >&5
3862412b
MK
4369 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
4370 echo $ac_n "(cached) $ac_c" 1>&6
4371else
4372 cat > conftest.$ac_ext <<EOF
e56ac5c3 4373#line 4374 "configure"
3862412b
MK
4374#include "confdefs.h"
4375#include <sys/procfs.h>
4376int main() {
4377prfpregset_t avar
4378; return 0; }
4379EOF
e56ac5c3 4380if { (eval echo configure:4381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4381 rm -rf conftest*
4382 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
4383else
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4386 rm -rf conftest*
4387 bfd_cv_have_sys_procfs_type_prfpregset_t=no
4388
4389fi
4390rm -f conftest*
4391fi
4392
4393 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
4394 cat >> confdefs.h <<\EOF
4395#define HAVE_PRFPREGSET_T 1
4396EOF
4397
4398 fi
4399 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
4400
4401 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4402echo "configure:4403: checking for lwpid_t in sys/procfs.h" >&5
3862412b
MK
4403 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
4404 echo $ac_n "(cached) $ac_c" 1>&6
4405else
4406 cat > conftest.$ac_ext <<EOF
e56ac5c3 4407#line 4408 "configure"
3862412b
MK
4408#include "confdefs.h"
4409#include <sys/procfs.h>
4410int main() {
4411lwpid_t avar
4412; return 0; }
4413EOF
e56ac5c3 4414if { (eval echo configure:4415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4415 rm -rf conftest*
4416 bfd_cv_have_sys_procfs_type_lwpid_t=yes
4417else
4418 echo "configure: failed program was:" >&5
4419 cat conftest.$ac_ext >&5
4420 rm -rf conftest*
4421 bfd_cv_have_sys_procfs_type_lwpid_t=no
4422
4423fi
4424rm -f conftest*
4425fi
4426
4427 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
4428 cat >> confdefs.h <<\EOF
4429#define HAVE_LWPID_T 1
4430EOF
4431
4432 fi
4433 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
4434
4435 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4436echo "configure:4437: checking for psaddr_t in sys/procfs.h" >&5
3862412b
MK
4437 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
4438 echo $ac_n "(cached) $ac_c" 1>&6
4439else
4440 cat > conftest.$ac_ext <<EOF
e56ac5c3 4441#line 4442 "configure"
3862412b
MK
4442#include "confdefs.h"
4443#include <sys/procfs.h>
4444int main() {
4445psaddr_t avar
4446; return 0; }
4447EOF
e56ac5c3 4448if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4449 rm -rf conftest*
4450 bfd_cv_have_sys_procfs_type_psaddr_t=yes
4451else
4452 echo "configure: failed program was:" >&5
4453 cat conftest.$ac_ext >&5
4454 rm -rf conftest*
4455 bfd_cv_have_sys_procfs_type_psaddr_t=no
4456
4457fi
4458rm -f conftest*
4459fi
4460
4461 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
4462 cat >> confdefs.h <<\EOF
4463#define HAVE_PSADDR_T 1
4464EOF
4465
4466 fi
4467 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
4468
c906108c
SS
4469
4470
4471 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
e56ac5c3 4472echo "configure:4473: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
c906108c
SS
4473 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
4474 echo $ac_n "(cached) $ac_c" 1>&6
4475else
4476 cat > conftest.$ac_ext <<EOF
e56ac5c3 4477#line 4478 "configure"
c906108c
SS
4478#include "confdefs.h"
4479#include <unistd.h>
4480#include <sys/types.h>
4481#include <sys/procfs.h>
4482
4483int main() {
4484
4485 int dummy;;
4486 dummy = ioctl(0, PIOCSET, &dummy);
4487
4488; return 0; }
4489EOF
e56ac5c3 4490if { (eval echo configure:4491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4491 rm -rf conftest*
4492 gdb_cv_have_procfs_piocset=yes
4493else
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4496 rm -rf conftest*
4497 gdb_cv_have_procfs_piocset=no
4498fi
4499rm -f conftest*
4500fi
4501
4502 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
4503 if test $gdb_cv_have_procfs_piocset = yes; then
4504 cat >> confdefs.h <<\EOF
4505#define HAVE_PROCFS_PIOCSET 1
4506EOF
4507
4508 fi
4509fi
4510
4511echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
e56ac5c3 4512echo "configure:4513: checking for main in -lm" >&5
c906108c
SS
4513ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
4514if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4515 echo $ac_n "(cached) $ac_c" 1>&6
4516else
4517 ac_save_LIBS="$LIBS"
4518LIBS="-lm $LIBS"
4519cat > conftest.$ac_ext <<EOF
e56ac5c3 4520#line 4521 "configure"
c906108c
SS
4521#include "confdefs.h"
4522
4523int main() {
4524main()
4525; return 0; }
4526EOF
e56ac5c3 4527if { (eval echo configure:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4528 rm -rf conftest*
4529 eval "ac_cv_lib_$ac_lib_var=yes"
4530else
4531 echo "configure: failed program was:" >&5
4532 cat conftest.$ac_ext >&5
4533 rm -rf conftest*
4534 eval "ac_cv_lib_$ac_lib_var=no"
4535fi
4536rm -f conftest*
4537LIBS="$ac_save_LIBS"
4538
4539fi
4540if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4541 echo "$ac_t""yes" 1>&6
4542 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4543 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4544 cat >> confdefs.h <<EOF
4545#define $ac_tr_lib 1
4546EOF
4547
4548 LIBS="-lm $LIBS"
4549
4550else
4551 echo "$ac_t""no" 1>&6
4552fi
4553
4554
4555echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
e56ac5c3 4556echo "configure:4557: checking for wctype in -lc" >&5
c906108c
SS
4557ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
4558if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4560else
4561 ac_save_LIBS="$LIBS"
4562LIBS="-lc $LIBS"
4563cat > conftest.$ac_ext <<EOF
e56ac5c3 4564#line 4565 "configure"
c906108c
SS
4565#include "confdefs.h"
4566/* Override any gcc2 internal prototype to avoid an error. */
4567/* We use char because int might match the return type of a gcc2
4568 builtin and then its argument prototype would still apply. */
4569char wctype();
4570
4571int main() {
4572wctype()
4573; return 0; }
4574EOF
e56ac5c3 4575if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4576 rm -rf conftest*
4577 eval "ac_cv_lib_$ac_lib_var=yes"
4578else
4579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4581 rm -rf conftest*
4582 eval "ac_cv_lib_$ac_lib_var=no"
4583fi
4584rm -f conftest*
4585LIBS="$ac_save_LIBS"
4586
4587fi
4588if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4589 echo "$ac_t""yes" 1>&6
4590 :
4591else
4592 echo "$ac_t""no" 1>&6
4593echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
e56ac5c3 4594echo "configure:4595: checking for wctype in -lw" >&5
c906108c
SS
4595ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
4596if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4597 echo $ac_n "(cached) $ac_c" 1>&6
4598else
4599 ac_save_LIBS="$LIBS"
4600LIBS="-lw $LIBS"
4601cat > conftest.$ac_ext <<EOF
e56ac5c3 4602#line 4603 "configure"
c906108c
SS
4603#include "confdefs.h"
4604/* Override any gcc2 internal prototype to avoid an error. */
4605/* We use char because int might match the return type of a gcc2
4606 builtin and then its argument prototype would still apply. */
4607char wctype();
4608
4609int main() {
4610wctype()
4611; return 0; }
4612EOF
e56ac5c3 4613if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4614 rm -rf conftest*
4615 eval "ac_cv_lib_$ac_lib_var=yes"
4616else
4617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4619 rm -rf conftest*
4620 eval "ac_cv_lib_$ac_lib_var=no"
4621fi
4622rm -f conftest*
4623LIBS="$ac_save_LIBS"
4624
4625fi
4626if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4627 echo "$ac_t""yes" 1>&6
4628 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
4629 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4630 cat >> confdefs.h <<EOF
4631#define $ac_tr_lib 1
4632EOF
4633
4634 LIBS="-lw $LIBS"
4635
4636else
4637 echo "$ac_t""no" 1>&6
4638fi
4639
4640fi
4641
4642
4643
4644echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
e56ac5c3 4645echo "configure:4646: checking for long long support in compiler" >&5
c906108c
SS
4646if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
4648else
4649 cat > conftest.$ac_ext <<EOF
e56ac5c3 4650#line 4651 "configure"
c906108c
SS
4651#include "confdefs.h"
4652
4653int main() {
4654
4655 extern long long foo;
4656 switch (foo & 2) { case 0: return 1; }
4657
4658; return 0; }
4659EOF
e56ac5c3 4660if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4661 rm -rf conftest*
4662 gdb_cv_c_long_long=yes
4663else
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -rf conftest*
4667 gdb_cv_c_long_long=no
4668fi
4669rm -f conftest*
4670fi
4671
4672echo "$ac_t""$gdb_cv_c_long_long" 1>&6
4673if test $gdb_cv_c_long_long = yes; then
4674 cat >> confdefs.h <<\EOF
4675#define CC_HAS_LONG_LONG 1
4676EOF
4677
4678fi
4679
4680
4681echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
e56ac5c3 4682echo "configure:4683: checking for long long support in printf" >&5
c906108c
SS
4683if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685else
4686 if test "$cross_compiling" = yes; then
4687 gdb_cv_printf_has_long_long=no
4688else
4689 cat > conftest.$ac_ext <<EOF
e56ac5c3 4690#line 4691 "configure"
c906108c
SS
4691#include "confdefs.h"
4692
4693int main () {
4694 char buf[32];
4695 long long l = 0;
4696 l = (l << 16) + 0x0123;
4697 l = (l << 16) + 0x4567;
4698 l = (l << 16) + 0x89ab;
4699 l = (l << 16) + 0xcdef;
4700 sprintf (buf, "0x%016llx", l);
4701 return (strcmp ("0x0123456789abcdef", buf));
4702}
4703EOF
e56ac5c3 4704if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
4705then
4706 gdb_cv_printf_has_long_long=yes
4707else
4708 echo "configure: failed program was:" >&5
4709 cat conftest.$ac_ext >&5
4710 rm -fr conftest*
4711 gdb_cv_printf_has_long_long=no
4712fi
4713rm -fr conftest*
4714fi
4715
4716fi
4717
4718if test $gdb_cv_printf_has_long_long = yes; then
4719 cat >> confdefs.h <<\EOF
4720#define PRINTF_HAS_LONG_LONG 1
4721EOF
4722
4723fi
4724echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
4725
4726
4727echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
e56ac5c3 4728echo "configure:4729: checking for long double support in compiler" >&5
c906108c
SS
4729if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
4730 echo $ac_n "(cached) $ac_c" 1>&6
4731else
4732 cat > conftest.$ac_ext <<EOF
e56ac5c3 4733#line 4734 "configure"
c906108c
SS
4734#include "confdefs.h"
4735
4736int main() {
4737long double foo;
4738; return 0; }
4739EOF
e56ac5c3 4740if { (eval echo configure:4741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4741 rm -rf conftest*
4742 ac_cv_c_long_double=yes
4743else
4744 echo "configure: failed program was:" >&5
4745 cat conftest.$ac_ext >&5
4746 rm -rf conftest*
4747 ac_cv_c_long_double=no
4748fi
4749rm -f conftest*
4750fi
4751
4752echo "$ac_t""$ac_cv_c_long_double" 1>&6
4753if test $ac_cv_c_long_double = yes; then
4754 cat >> confdefs.h <<\EOF
4755#define HAVE_LONG_DOUBLE 1
4756EOF
4757
4758fi
4759
4760
4761echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
e56ac5c3 4762echo "configure:4763: checking for long double support in printf" >&5
c906108c
SS
4763if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
4764 echo $ac_n "(cached) $ac_c" 1>&6
4765else
4766 if test "$cross_compiling" = yes; then
4767 gdb_cv_printf_has_long_double=no
4768else
4769 cat > conftest.$ac_ext <<EOF
e56ac5c3 4770#line 4771 "configure"
c906108c
SS
4771#include "confdefs.h"
4772
4773int main () {
4774 char buf[16];
4775 long double f = 3.141592653;
4776 sprintf (buf, "%Lg", f);
4777 return (strncmp ("3.14159", buf, 7));
4778}
4779EOF
e56ac5c3 4780if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
4781then
4782 gdb_cv_printf_has_long_double=yes
4783else
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4786 rm -fr conftest*
4787 gdb_cv_printf_has_long_double=no
4788fi
4789rm -fr conftest*
4790fi
4791
4792fi
4793
4794if test $gdb_cv_printf_has_long_double = yes; then
4795 cat >> confdefs.h <<\EOF
4796#define PRINTF_HAS_LONG_DOUBLE 1
4797EOF
4798
4799fi
4800echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
4801
4802
4803echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
e56ac5c3 4804echo "configure:4805: checking for long double support in scanf" >&5
c906108c
SS
4805if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4807else
4808 if test "$cross_compiling" = yes; then
4809 gdb_cv_scanf_has_long_double=no
4810else
4811 cat > conftest.$ac_ext <<EOF
e56ac5c3 4812#line 4813 "configure"
c906108c
SS
4813#include "confdefs.h"
4814
4815int main () {
4816 char *buf = "3.141592653";
4817 long double f = 0;
4818 sscanf (buf, "%Lg", &f);
4819 return !(f > 3.14159 && f < 3.14160);
4820}
4821EOF
e56ac5c3 4822if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
4823then
4824 gdb_cv_scanf_has_long_double=yes
4825else
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -fr conftest*
4829 gdb_cv_scanf_has_long_double=no
4830fi
4831rm -fr conftest*
4832fi
4833
4834fi
4835
4836if test $gdb_cv_scanf_has_long_double = yes; then
4837 cat >> confdefs.h <<\EOF
4838#define SCANF_HAS_LONG_DOUBLE 1
4839EOF
4840
4841fi
4842echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
4843
4844for ac_hdr in unistd.h
4845do
4846ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4847echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
e56ac5c3 4848echo "configure:4849: checking for $ac_hdr" >&5
c906108c
SS
4849if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4850 echo $ac_n "(cached) $ac_c" 1>&6
4851else
4852 cat > conftest.$ac_ext <<EOF
e56ac5c3 4853#line 4854 "configure"
c906108c
SS
4854#include "confdefs.h"
4855#include <$ac_hdr>
4856EOF
4857ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 4858{ (eval echo configure:4859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
4859ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4860if test -z "$ac_err"; then
4861 rm -rf conftest*
4862 eval "ac_cv_header_$ac_safe=yes"
4863else
4864 echo "$ac_err" >&5
4865 echo "configure: failed program was:" >&5
4866 cat conftest.$ac_ext >&5
4867 rm -rf conftest*
4868 eval "ac_cv_header_$ac_safe=no"
4869fi
4870rm -f conftest*
4871fi
4872if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4873 echo "$ac_t""yes" 1>&6
4874 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4875 cat >> confdefs.h <<EOF
4876#define $ac_tr_hdr 1
4877EOF
4878
4879else
4880 echo "$ac_t""no" 1>&6
4881fi
4882done
4883
4884for ac_func in getpagesize
4885do
4886echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e56ac5c3 4887echo "configure:4888: checking for $ac_func" >&5
c906108c
SS
4888if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4889 echo $ac_n "(cached) $ac_c" 1>&6
4890else
4891 cat > conftest.$ac_ext <<EOF
e56ac5c3 4892#line 4893 "configure"
c906108c
SS
4893#include "confdefs.h"
4894/* System header to define __stub macros and hopefully few prototypes,
4895 which can conflict with char $ac_func(); below. */
4896#include <assert.h>
4897/* Override any gcc2 internal prototype to avoid an error. */
4898/* We use char because int might match the return type of a gcc2
4899 builtin and then its argument prototype would still apply. */
4900char $ac_func();
4901
4902int main() {
4903
4904/* The GNU C library defines this for functions which it implements
4905 to always fail with ENOSYS. Some functions are actually named
4906 something starting with __ and the normal name is an alias. */
4907#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4908choke me
4909#else
4910$ac_func();
4911#endif
4912
4913; return 0; }
4914EOF
e56ac5c3 4915if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4916 rm -rf conftest*
4917 eval "ac_cv_func_$ac_func=yes"
4918else
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -rf conftest*
4922 eval "ac_cv_func_$ac_func=no"
4923fi
4924rm -f conftest*
4925fi
4926
4927if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4928 echo "$ac_t""yes" 1>&6
4929 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4930 cat >> confdefs.h <<EOF
4931#define $ac_tr_func 1
4932EOF
4933
4934else
4935 echo "$ac_t""no" 1>&6
4936fi
4937done
4938
4939echo $ac_n "checking for working mmap""... $ac_c" 1>&6
e56ac5c3 4940echo "configure:4941: checking for working mmap" >&5
c906108c
SS
4941if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4942 echo $ac_n "(cached) $ac_c" 1>&6
4943else
4944 if test "$cross_compiling" = yes; then
4945 ac_cv_func_mmap_fixed_mapped=no
4946else
4947 cat > conftest.$ac_ext <<EOF
e56ac5c3 4948#line 4949 "configure"
c906108c
SS
4949#include "confdefs.h"
4950
4951/* Thanks to Mike Haertel and Jim Avera for this test.
4952 Here is a matrix of mmap possibilities:
4953 mmap private not fixed
4954 mmap private fixed at somewhere currently unmapped
4955 mmap private fixed at somewhere already mapped
4956 mmap shared not fixed
4957 mmap shared fixed at somewhere currently unmapped
4958 mmap shared fixed at somewhere already mapped
4959 For private mappings, we should verify that changes cannot be read()
4960 back from the file, nor mmap's back from the file at a different
4961 address. (There have been systems where private was not correctly
4962 implemented like the infamous i386 svr4.0, and systems where the
4963 VM page cache was not coherent with the filesystem buffer cache
4964 like early versions of FreeBSD and possibly contemporary NetBSD.)
4965 For shared mappings, we should conversely verify that changes get
4966 propogated back to all the places they're supposed to be.
4967
4968 Grep wants private fixed already mapped.
4969 The main things grep needs to know about mmap are:
4970 * does it exist and is it safe to write into the mmap'd area
4971 * how to use it (BSD variants) */
4972#include <sys/types.h>
4973#include <fcntl.h>
4974#include <sys/mman.h>
4975
4976/* This mess was copied from the GNU getpagesize.h. */
4977#ifndef HAVE_GETPAGESIZE
4978# ifdef HAVE_UNISTD_H
4979# include <unistd.h>
4980# endif
4981
4982/* Assume that all systems that can run configure have sys/param.h. */
4983# ifndef HAVE_SYS_PARAM_H
4984# define HAVE_SYS_PARAM_H 1
4985# endif
4986
4987# ifdef _SC_PAGESIZE
4988# define getpagesize() sysconf(_SC_PAGESIZE)
4989# else /* no _SC_PAGESIZE */
4990# ifdef HAVE_SYS_PARAM_H
4991# include <sys/param.h>
4992# ifdef EXEC_PAGESIZE
4993# define getpagesize() EXEC_PAGESIZE
4994# else /* no EXEC_PAGESIZE */
4995# ifdef NBPG
4996# define getpagesize() NBPG * CLSIZE
4997# ifndef CLSIZE
4998# define CLSIZE 1
4999# endif /* no CLSIZE */
5000# else /* no NBPG */
5001# ifdef NBPC
5002# define getpagesize() NBPC
5003# else /* no NBPC */
5004# ifdef PAGESIZE
5005# define getpagesize() PAGESIZE
5006# endif /* PAGESIZE */
5007# endif /* no NBPC */
5008# endif /* no NBPG */
5009# endif /* no EXEC_PAGESIZE */
5010# else /* no HAVE_SYS_PARAM_H */
5011# define getpagesize() 8192 /* punt totally */
5012# endif /* no HAVE_SYS_PARAM_H */
5013# endif /* no _SC_PAGESIZE */
5014
5015#endif /* no HAVE_GETPAGESIZE */
5016
5017#ifdef __cplusplus
5018extern "C" { void *malloc(unsigned); }
5019#else
5020char *malloc();
5021#endif
5022
5023int
5024main()
5025{
5026 char *data, *data2, *data3;
5027 int i, pagesize;
5028 int fd;
5029
5030 pagesize = getpagesize();
5031
5032 /*
5033 * First, make a file with some known garbage in it.
5034 */
5035 data = malloc(pagesize);
5036 if (!data)
5037 exit(1);
5038 for (i = 0; i < pagesize; ++i)
5039 *(data + i) = rand();
5040 umask(0);
5041 fd = creat("conftestmmap", 0600);
5042 if (fd < 0)
5043 exit(1);
5044 if (write(fd, data, pagesize) != pagesize)
5045 exit(1);
5046 close(fd);
5047
5048 /*
5049 * Next, try to mmap the file at a fixed address which
5050 * already has something else allocated at it. If we can,
5051 * also make sure that we see the same garbage.
5052 */
5053 fd = open("conftestmmap", O_RDWR);
5054 if (fd < 0)
5055 exit(1);
5056 data2 = malloc(2 * pagesize);
5057 if (!data2)
5058 exit(1);
5059 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5060 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5061 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5062 exit(1);
5063 for (i = 0; i < pagesize; ++i)
5064 if (*(data + i) != *(data2 + i))
5065 exit(1);
5066
5067 /*
5068 * Finally, make sure that changes to the mapped area
5069 * do not percolate back to the file as seen by read().
5070 * (This is a bug on some variants of i386 svr4.0.)
5071 */
5072 for (i = 0; i < pagesize; ++i)
5073 *(data2 + i) = *(data2 + i) + 1;
5074 data3 = malloc(pagesize);
5075 if (!data3)
5076 exit(1);
5077 if (read(fd, data3, pagesize) != pagesize)
5078 exit(1);
5079 for (i = 0; i < pagesize; ++i)
5080 if (*(data + i) != *(data3 + i))
5081 exit(1);
5082 close(fd);
5083 unlink("conftestmmap");
5084 exit(0);
5085}
5086
5087EOF
e56ac5c3 5088if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5089then
5090 ac_cv_func_mmap_fixed_mapped=yes
5091else
5092 echo "configure: failed program was:" >&5
5093 cat conftest.$ac_ext >&5
5094 rm -fr conftest*
5095 ac_cv_func_mmap_fixed_mapped=no
5096fi
5097rm -fr conftest*
5098fi
5099
5100fi
5101
5102echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5103if test $ac_cv_func_mmap_fixed_mapped = yes; then
5104 cat >> confdefs.h <<\EOF
5105#define HAVE_MMAP 1
5106EOF
5107
5108fi
5109
5110
5111
5112
5113if test ${build} = ${host} -a ${host} = ${target} ; then
5114 case ${host_os} in
5115 hpux*)
5116 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
e56ac5c3 5117echo "configure:5118: checking for HPUX/OSF thread support" >&5
c906108c
SS
5118 if test -f /usr/include/dce/cma_config.h ; then
5119 if test "$GCC" = "yes" ; then
5120 echo "$ac_t""yes" 1>&6
5121 cat >> confdefs.h <<\EOF
5122#define HAVE_HPUX_THREAD_SUPPORT 1
5123EOF
5124
5125 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
5126 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
dfcd3bfb 5127 CONFIG_INITS="${CONFIG_INITS} hpux-thread.c"
c906108c
SS
5128 else
5129 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
5130 fi
5131 else
5132 echo "$ac_t""no" 1>&6
5133 fi
5134 ;;
5135 solaris*)
5136 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
e56ac5c3 5137echo "configure:5138: checking for Solaris thread debugging library" >&5
c906108c
SS
5138 if test -f /usr/lib/libthread_db.so.1 ; then
5139 echo "$ac_t""yes" 1>&6
5140 cat >> confdefs.h <<\EOF
5141#define HAVE_THREAD_DB_LIB 1
5142EOF
5143
5144 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
5145 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
5146 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
e56ac5c3 5147echo "configure:5148: checking for dlopen in -ldl" >&5
c906108c
SS
5148ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5149if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5150 echo $ac_n "(cached) $ac_c" 1>&6
5151else
5152 ac_save_LIBS="$LIBS"
5153LIBS="-ldl $LIBS"
5154cat > conftest.$ac_ext <<EOF
e56ac5c3 5155#line 5156 "configure"
c906108c
SS
5156#include "confdefs.h"
5157/* Override any gcc2 internal prototype to avoid an error. */
5158/* We use char because int might match the return type of a gcc2
5159 builtin and then its argument prototype would still apply. */
5160char dlopen();
5161
5162int main() {
5163dlopen()
5164; return 0; }
5165EOF
e56ac5c3 5166if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5167 rm -rf conftest*
5168 eval "ac_cv_lib_$ac_lib_var=yes"
5169else
5170 echo "configure: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 rm -rf conftest*
5173 eval "ac_cv_lib_$ac_lib_var=no"
5174fi
5175rm -f conftest*
5176LIBS="$ac_save_LIBS"
5177
5178fi
5179if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5180 echo "$ac_t""yes" 1>&6
5181 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5182 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5183 cat >> confdefs.h <<EOF
5184#define $ac_tr_lib 1
5185EOF
5186
5187 LIBS="-ldl $LIBS"
5188
5189else
5190 echo "$ac_t""no" 1>&6
5191fi
5192
5193 if test "$GCC" = "yes" ; then
5194 # The GNU linker requires the -export-dynamic option to make
5195 # all symbols visible in the dynamic symbol table.
5196 hold_ldflags=$LDFLAGS
5197 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
e56ac5c3 5198echo "configure:5199: checking for the ld -export-dynamic flag" >&5
c906108c
SS
5199 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
5200 cat > conftest.$ac_ext <<EOF
e56ac5c3 5201#line 5202 "configure"
c906108c
SS
5202#include "confdefs.h"
5203
5204int main() {
5205int i;
5206; return 0; }
5207EOF
e56ac5c3 5208if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5209 rm -rf conftest*
5210 found=yes
5211else
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214 rm -rf conftest*
5215 found=no
5216fi
5217rm -f conftest*
5218 LDFLAGS=$hold_ldflags
5219 echo "$ac_t""$found" 1>&6
5220 if test $found = yes; then
5221 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
5222 fi
5223 fi
5224 # Sun randomly tweaked the prototypes in <proc_service.h>
5225 # at one point.
5226 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
e56ac5c3 5227echo "configure:5228: checking if <proc_service.h> is old" >&5
c906108c
SS
5228 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
5229 echo $ac_n "(cached) $ac_c" 1>&6
5230else
5231
5232 cat > conftest.$ac_ext <<EOF
e56ac5c3 5233#line 5234 "configure"
c906108c
SS
5234#include "confdefs.h"
5235
5236 #include <proc_service.h>
5237 ps_err_e ps_pdwrite
5238 (struct ps_prochandle*, psaddr_t, const void*, size_t);
5239
5240int main() {
5241
5242; return 0; }
5243EOF
e56ac5c3 5244if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5245 rm -rf conftest*
5246 gdb_cv_proc_service_is_old=no
5247else
5248 echo "configure: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 rm -rf conftest*
5251 gdb_cv_proc_service_is_old=yes
5252fi
5253rm -f conftest*
5254
5255fi
5256
5257 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
5258 if test $gdb_cv_proc_service_is_old = yes; then
5259 cat >> confdefs.h <<\EOF
5260#define PROC_SERVICE_IS_OLD 1
5261EOF
5262
5263 fi
5264 else
5265 echo "$ac_t""no" 1>&6
5266 fi
5267 ;;
5268 esac
5269
5270fi
5271
fb40c209
AC
5272
5273# Check whether --enable-gdbmi or --disable-gdbmi was given.
5274if test "${enable_gdbmi+set}" = set; then
5275 enableval="$enable_gdbmi"
5276
5277 case "${enable_gdbmi}" in
5278 yes | no) ;;
5279 "") enable_gdbmi=yes ;;
5280 *)
5281 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
5282 ;;
5283 esac
5284
5285fi
5286
5287case ${enable_gdbmi} in
5288 "yes" )
5289 if test -d "${srcdir}/mi" ; then
5290 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
5291 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
5292 CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)"
5293 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 5294 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
e56ac5c3
AC
5295 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
5296 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
5297 fi
5298 ;;
5299esac
c906108c
SS
5300
5301# Check whether --enable-tui or --disable-tui was given.
5302if test "${enable_tui+set}" = set; then
5303 enableval="$enable_tui"
5304
5305 case "${enable_tui}" in
5306 yes | no) ;;
5307 "") enable_tui=yes ;;
5308 *)
5309 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
5310 ;;
5311 esac
5312
5313fi
5314
5315case ${enable_tui} in
5316 "yes" )
5317 cat >> confdefs.h <<\EOF
5318#define TUI 1
5319EOF
5320
5321 BUILD_TUI=all-tui
5322 TUI_LIBRARY=tui/libtui.a
5323 ;;
5324 * )
5325 BUILD_TUI=
5326 TUI_LIBRARY=
5327 ;;
5328esac
5329
5330
5331
5332# Check whether --enable-netrom or --disable-netrom was given.
5333if test "${enable_netrom+set}" = set; then
5334 enableval="$enable_netrom"
5335 case "${enableval}" in
5336yes) enable_netrom=yes ;;
5337no) enable_netrom=no ;;
5338*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
5339esac
5340fi
5341
5342
5343if test "${enable_netrom}" = "yes"; then
5344 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
5345 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
dfcd3bfb 5346 CONFIG_INITS="${CONFIG_INITS} remote-nrom.c"
c906108c
SS
5347fi
5348
5349# Check whether --enable-build-warnings or --disable-build-warnings was given.
5350if test "${enable_build_warnings+set}" = set; then
5351 enableval="$enable_build_warnings"
b0b1b869
AC
5352
5353# not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
5354build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith"
c906108c
SS
5355case "${enableval}" in
5356 yes) ;;
5357 no) build_warnings="-w";;
5358 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
5359 build_warnings="${build_warnings} ${t}";;
5360 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
5361 build_warnings="${t} ${build_warnings}";;
5362 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
5363esac
d4f3574e
SS
5364if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
5365 echo "Setting warning flags = $build_warnings" 6>&1
c906108c 5366fi
104c1213
JM
5367WARN_CFLAGS=""
5368WERROR_CFLAGS=""
c906108c
SS
5369if test "x${build_warnings}" != x -a "x$GCC" = xyes
5370then
104c1213
JM
5371 # Separate out the -Werror flag as some files just cannot be
5372 # compiled with it enabled.
5373 for w in ${build_warnings}; do
5374 case $w in
5375 -Werr*) WERROR_CFLAGS=-Werror ;;
5376 *) WARN_CFLAGS="${WARN_CFLAGS} $w"
5377 esac
5378 done
c906108c 5379fi
d4f3574e
SS
5380else
5381 build_warnings=""
5382fi
5383
c906108c
SS
5384
5385
104c1213 5386
c906108c
SS
5387MMALLOC_CFLAGS=
5388MMALLOC=
5389
5390
5391
5392# Check whether --with-mmalloc or --without-mmalloc was given.
5393if test "${with_mmalloc+set}" = set; then
5394 withval="$with_mmalloc"
5395 case "${withval}" in
5396 yes) want_mmalloc=true ;;
5397 no) want_mmalloc=false;;
5398 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
5399esac
5400else
5401 want_mmalloc=false
5402fi
5403
5404if test x$want_mmalloc = xtrue; then
5405 cat >> confdefs.h <<\EOF
5406#define USE_MMALLOC 1
5407EOF
5408
5409 cat >> confdefs.h <<\EOF
5410#define MMCHECK_FORCE 1
5411EOF
5412
5413 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
5414 MMALLOC='../mmalloc/libmmalloc.a'
5415fi
5416
7a292a7a
SS
5417
5418# In the Cygwin environment, we need some additional flags.
5419echo $ac_n "checking for cygwin""... $ac_c" 1>&6
e56ac5c3 5420echo "configure:5421: checking for cygwin" >&5
7a292a7a
SS
5421if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
5423else
5424 cat > conftest.$ac_ext <<EOF
e56ac5c3 5425#line 5426 "configure"
7a292a7a
SS
5426#include "confdefs.h"
5427
5428#if defined (__CYGWIN__) || defined (__CYGWIN32__)
5429lose
5430#endif
5431EOF
5432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5433 egrep "lose" >/dev/null 2>&1; then
5434 rm -rf conftest*
5435 gdb_cv_os_cygwin=yes
5436else
5437 rm -rf conftest*
5438 gdb_cv_os_cygwin=no
5439fi
5440rm -f conftest*
5441
5442fi
5443
5444echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
5445
5446DLLTOOL=${DLLTOOL-dlltool}
5447WINDRES=${WINDRES-windres}
5448
5449
5450
b83266a0
SS
5451if test x$gdb_host = xgo32; then
5452 TERM_LIB=
5453else
c906108c
SS
5454if test x$gdb_cv_os_cygwin = xyes; then
5455 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
5456else
5457 TERM_LIB=
5458 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
e56ac5c3 5459echo "configure:5460: checking for tgetent in -lncurses" >&5
c906108c
SS
5460ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
5461if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5462 echo $ac_n "(cached) $ac_c" 1>&6
5463else
5464 ac_save_LIBS="$LIBS"
5465LIBS="-lncurses $LIBS"
5466cat > conftest.$ac_ext <<EOF
e56ac5c3 5467#line 5468 "configure"
c906108c
SS
5468#include "confdefs.h"
5469/* Override any gcc2 internal prototype to avoid an error. */
5470/* We use char because int might match the return type of a gcc2
5471 builtin and then its argument prototype would still apply. */
5472char tgetent();
5473
5474int main() {
5475tgetent()
5476; return 0; }
5477EOF
e56ac5c3 5478if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5479 rm -rf conftest*
5480 eval "ac_cv_lib_$ac_lib_var=yes"
5481else
5482 echo "configure: failed program was:" >&5
5483 cat conftest.$ac_ext >&5
5484 rm -rf conftest*
5485 eval "ac_cv_lib_$ac_lib_var=no"
5486fi
5487rm -f conftest*
5488LIBS="$ac_save_LIBS"
5489
5490fi
5491if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5492 echo "$ac_t""yes" 1>&6
5493 TERM_LIB=-lncurses
5494else
5495 echo "$ac_t""no" 1>&6
5496echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
e56ac5c3 5497echo "configure:5498: checking for tgetent in -lHcurses" >&5
c906108c
SS
5498ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
5499if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501else
5502 ac_save_LIBS="$LIBS"
5503LIBS="-lHcurses $LIBS"
5504cat > conftest.$ac_ext <<EOF
e56ac5c3 5505#line 5506 "configure"
c906108c
SS
5506#include "confdefs.h"
5507/* Override any gcc2 internal prototype to avoid an error. */
5508/* We use char because int might match the return type of a gcc2
5509 builtin and then its argument prototype would still apply. */
5510char tgetent();
5511
5512int main() {
5513tgetent()
5514; return 0; }
5515EOF
e56ac5c3 5516if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5517 rm -rf conftest*
5518 eval "ac_cv_lib_$ac_lib_var=yes"
5519else
5520 echo "configure: failed program was:" >&5
5521 cat conftest.$ac_ext >&5
5522 rm -rf conftest*
5523 eval "ac_cv_lib_$ac_lib_var=no"
5524fi
5525rm -f conftest*
5526LIBS="$ac_save_LIBS"
5527
5528fi
5529if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5530 echo "$ac_t""yes" 1>&6
5531 TERM_LIB=-lHcurses
5532else
5533 echo "$ac_t""no" 1>&6
5534echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
e56ac5c3 5535echo "configure:5536: checking for tgetent in -ltermlib" >&5
c906108c
SS
5536ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
5537if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5539else
5540 ac_save_LIBS="$LIBS"
5541LIBS="-ltermlib $LIBS"
5542cat > conftest.$ac_ext <<EOF
e56ac5c3 5543#line 5544 "configure"
c906108c
SS
5544#include "confdefs.h"
5545/* Override any gcc2 internal prototype to avoid an error. */
5546/* We use char because int might match the return type of a gcc2
5547 builtin and then its argument prototype would still apply. */
5548char tgetent();
5549
5550int main() {
5551tgetent()
5552; return 0; }
5553EOF
e56ac5c3 5554if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5555 rm -rf conftest*
5556 eval "ac_cv_lib_$ac_lib_var=yes"
5557else
5558 echo "configure: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
5560 rm -rf conftest*
5561 eval "ac_cv_lib_$ac_lib_var=no"
5562fi
5563rm -f conftest*
5564LIBS="$ac_save_LIBS"
5565
5566fi
5567if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5568 echo "$ac_t""yes" 1>&6
5569 TERM_LIB=-ltermlib
5570else
5571 echo "$ac_t""no" 1>&6
5572echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
e56ac5c3 5573echo "configure:5574: checking for tgetent in -ltermcap" >&5
c906108c
SS
5574ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
5575if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577else
5578 ac_save_LIBS="$LIBS"
5579LIBS="-ltermcap $LIBS"
5580cat > conftest.$ac_ext <<EOF
e56ac5c3 5581#line 5582 "configure"
c906108c
SS
5582#include "confdefs.h"
5583/* Override any gcc2 internal prototype to avoid an error. */
5584/* We use char because int might match the return type of a gcc2
5585 builtin and then its argument prototype would still apply. */
5586char tgetent();
5587
5588int main() {
5589tgetent()
5590; return 0; }
5591EOF
e56ac5c3 5592if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5593 rm -rf conftest*
5594 eval "ac_cv_lib_$ac_lib_var=yes"
5595else
5596 echo "configure: failed program was:" >&5
5597 cat conftest.$ac_ext >&5
5598 rm -rf conftest*
5599 eval "ac_cv_lib_$ac_lib_var=no"
5600fi
5601rm -f conftest*
5602LIBS="$ac_save_LIBS"
5603
5604fi
5605if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5606 echo "$ac_t""yes" 1>&6
5607 TERM_LIB=-ltermcap
5608else
5609 echo "$ac_t""no" 1>&6
5610echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
e56ac5c3 5611echo "configure:5612: checking for tgetent in -lcurses" >&5
c906108c
SS
5612ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
5613if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5614 echo $ac_n "(cached) $ac_c" 1>&6
5615else
5616 ac_save_LIBS="$LIBS"
5617LIBS="-lcurses $LIBS"
5618cat > conftest.$ac_ext <<EOF
e56ac5c3 5619#line 5620 "configure"
c906108c
SS
5620#include "confdefs.h"
5621/* Override any gcc2 internal prototype to avoid an error. */
5622/* We use char because int might match the return type of a gcc2
5623 builtin and then its argument prototype would still apply. */
5624char tgetent();
5625
5626int main() {
5627tgetent()
5628; return 0; }
5629EOF
e56ac5c3 5630if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5631 rm -rf conftest*
5632 eval "ac_cv_lib_$ac_lib_var=yes"
5633else
5634 echo "configure: failed program was:" >&5
5635 cat conftest.$ac_ext >&5
5636 rm -rf conftest*
5637 eval "ac_cv_lib_$ac_lib_var=no"
5638fi
5639rm -f conftest*
5640LIBS="$ac_save_LIBS"
5641
5642fi
5643if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5644 echo "$ac_t""yes" 1>&6
5645 TERM_LIB=-lcurses
5646else
5647 echo "$ac_t""no" 1>&6
5648echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
e56ac5c3 5649echo "configure:5650: checking for tgetent in -lterminfo" >&5
c906108c
SS
5650ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
5651if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5652 echo $ac_n "(cached) $ac_c" 1>&6
5653else
5654 ac_save_LIBS="$LIBS"
5655LIBS="-lterminfo $LIBS"
5656cat > conftest.$ac_ext <<EOF
e56ac5c3 5657#line 5658 "configure"
c906108c
SS
5658#include "confdefs.h"
5659/* Override any gcc2 internal prototype to avoid an error. */
5660/* We use char because int might match the return type of a gcc2
5661 builtin and then its argument prototype would still apply. */
5662char tgetent();
5663
5664int main() {
5665tgetent()
5666; return 0; }
5667EOF
e56ac5c3 5668if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5669 rm -rf conftest*
5670 eval "ac_cv_lib_$ac_lib_var=yes"
5671else
5672 echo "configure: failed program was:" >&5
5673 cat conftest.$ac_ext >&5
5674 rm -rf conftest*
5675 eval "ac_cv_lib_$ac_lib_var=no"
5676fi
5677rm -f conftest*
5678LIBS="$ac_save_LIBS"
5679
5680fi
5681if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5682 echo "$ac_t""yes" 1>&6
5683 TERM_LIB=-lterminfo
5684else
5685 echo "$ac_t""no" 1>&6
5686fi
5687
5688fi
5689
5690fi
5691
5692fi
5693
5694fi
5695
5696fi
5697
5698
5699 if test "x$TERM_LIB" = x
5700 then
5701 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
5702 fi
5703fi
b83266a0 5704fi
c906108c
SS
5705
5706
cd0fc7c3
SS
5707# libreadline needs libuser32.a in a cygwin environment
5708WIN32LIBS=
5709if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
5710 WIN32LIBS="-luser32"
5711 case "${target}" in
5712 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
5713 ;;
5714 esac
cd0fc7c3 5715fi
c906108c 5716
7a292a7a 5717
3fc11d3e
JM
5718LIBGUI="../libgui/src/libgui.a"
5719GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
5720
5721
7a292a7a 5722
8b93c638
JM
5723# Check whether --with-cpu or --without-cpu was given.
5724if test "${with_cpu+set}" = set; then
5725 withval="$with_cpu"
5726 case "${target}" in
5727 powerpc-* | powerpcle-* )
5728 ## It would be nice to keep this table in sync with the one in
5729 ## gcc/configure.
5730 case "${with_cpu}" in
5731 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
5732 | 604 | 750 )
5733 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
5734 ;;
5735 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
5736 ## These are all RS6000 variants, as far as GDB is concerned.
5737 with_cpu=rs6000
5738 ;;
5739 603e | ec603e )
5740 with_cpu=603
5741 ;;
5742 604e )
5743 with_cpu=604
5744 ;;
5745 * )
5746 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
5747 with_cpu=ppc-uisa
5748 ;;
5749 esac
5750 ;;
5751 * )
5752 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
5753 ;;
5754esac
5755cat >> confdefs.h <<EOF
5756#define TARGET_CPU_DEFAULT "${with_cpu}"
5757EOF
5758
5759
5760fi
5761
5762
5763
3fc11d3e
JM
5764ENABLE_GDBTK=
5765
5766# Check whether --enable-gdbtk or --disable-gdbtk was given.
5767if test "${enable_gdbtk+set}" = set; then
5768 enableval="$enable_gdbtk"
5769 case "${enableval}" in
5770 yes)
5771 case "$host" in
5772 *go32*)
5773 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5774 enable_gdbtk=no ;;
5775 *windows*)
5776 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5777 enable_gdbtk=no ;;
5778 *)
5779 enable_gdbtk=yes ;;
5780 esac ;;
5781 no)
5782 enable_gdbtk=no ;;
5783 *)
5784 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5785esac
5786else
5787
5788# Default is on for everything but go32 and Cygwin
5789case "$host" in
5790 *go32* | *windows*)
5791 ;;
5792 *)
5793 enable_gdbtk=yes ;;
5794 esac
5795
5796fi
5797
5798
5799WIN32LDAPP=
5800
5801
5802
5803configdir="unix"
5804
5805GDBTKLIBS=
5806if test "${enable_gdbtk}" = "yes"; then
5807
5808
5809#
5810# Ok, lets find the tcl configuration
5811# First, look for one uninstalled.
5812# the alternative search directory is invoked by --with-tclconfig
5813#
5814
5815if test x"${no_tcl}" = x ; then
5816 # we reset no_tcl in case something fails here
5817 no_tcl=true
5818 # Check whether --with-tclconfig or --without-tclconfig was given.
5819if test "${with_tclconfig+set}" = set; then
5820 withval="$with_tclconfig"
5821 with_tclconfig=${withval}
5822fi
5823
5824 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
e56ac5c3 5825echo "configure:5826: checking for Tcl configuration" >&5
3fc11d3e
JM
5826 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5827 echo $ac_n "(cached) $ac_c" 1>&6
5828else
5829
5830
5831 # First check to see if --with-tclconfig was specified.
5832 if test x"${with_tclconfig}" != x ; then
5833 if test -f "${with_tclconfig}/tclConfig.sh" ; then
5834 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
5835 else
5836 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5837 fi
5838 fi
5839
5840 # then check for a private Tcl installation
5841 if test x"${ac_cv_c_tclconfig}" = x ; then
5842 for i in \
5843 ../tcl \
5844 `ls -dr ../tcl[7-9]* 2>/dev/null` \
5845 ../../tcl \
5846 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
5847 ../../../tcl \
5848 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
5849 if test -f "$i/${configdir}/tclConfig.sh" ; then
5850 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5851 break
5852 fi
5853 done
5854 fi
5855 # check in a few common install locations
5856 if test x"${ac_cv_c_tclconfig}" = x ; then
5857 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5858 if test -f "$i/tclConfig.sh" ; then
5859 ac_cv_c_tclconfig=`(cd $i; pwd)`
5860 break
5861 fi
5862 done
5863 fi
5864 # check in a few other private locations
5865 if test x"${ac_cv_c_tclconfig}" = x ; then
5866 for i in \
5867 ${srcdir}/../tcl \
5868 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
5869 if test -f "$i/${configdir}/tclConfig.sh" ; then
5870 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5871 break
5872 fi
5873 done
5874 fi
5875
5876fi
5877
5878 if test x"${ac_cv_c_tclconfig}" = x ; then
5879 TCLCONFIG="# no Tcl configs found"
5880 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
5881 else
5882 no_tcl=
5883 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
5884 echo "$ac_t""found $TCLCONFIG" 1>&6
5885 fi
5886fi
5887
5888 if test -z "${no_tcl}"; then
5889
5890 . $TCLCONFIG
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917#
5918# Ok, lets find the tk configuration
5919# First, look for one uninstalled.
5920# the alternative search directory is invoked by --with-tkconfig
5921#
5922
5923if test x"${no_tk}" = x ; then
5924 # we reset no_tk in case something fails here
5925 no_tk=true
5926 # Check whether --with-tkconfig or --without-tkconfig was given.
5927if test "${with_tkconfig+set}" = set; then
5928 withval="$with_tkconfig"
5929 with_tkconfig=${withval}
5930fi
5931
5932 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
e56ac5c3 5933echo "configure:5934: checking for Tk configuration" >&5
3fc11d3e
JM
5934 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5935 echo $ac_n "(cached) $ac_c" 1>&6
5936else
5937
5938
5939 # First check to see if --with-tkconfig was specified.
5940 if test x"${with_tkconfig}" != x ; then
5941 if test -f "${with_tkconfig}/tkConfig.sh" ; then
5942 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
5943 else
5944 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5945 fi
5946 fi
5947
5948 # then check for a private Tk library
5949 if test x"${ac_cv_c_tkconfig}" = x ; then
5950 for i in \
5951 ../tk \
5952 `ls -dr ../tk[4-9]* 2>/dev/null` \
5953 ../../tk \
5954 `ls -dr ../../tk[4-9]* 2>/dev/null` \
5955 ../../../tk \
5956 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
5957 if test -f "$i/${configdir}/tkConfig.sh" ; then
5958 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5959 break
5960 fi
5961 done
5962 fi
5963 # check in a few common install locations
5964 if test x"${ac_cv_c_tkconfig}" = x ; then
5965 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5966 if test -f "$i/tkConfig.sh" ; then
5967 ac_cv_c_tkconfig=`(cd $i; pwd)`
5968 break
5969 fi
5970 done
5971 fi
5972 # check in a few other private locations
5973 if test x"${ac_cv_c_tkconfig}" = x ; then
5974 for i in \
5975 ${srcdir}/../tk \
5976 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
5977 if test -f "$i/${configdir}/tkConfig.sh" ; then
5978 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5979 break
5980 fi
5981 done
5982 fi
5983
5984fi
5985
5986 if test x"${ac_cv_c_tkconfig}" = x ; then
5987 TKCONFIG="# no Tk configs found"
5988 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
5989 else
5990 no_tk=
5991 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
5992 echo "$ac_t""found $TKCONFIG" 1>&6
5993 fi
5994fi
5995
5996
5997
5998 # If $no_tk is nonempty, then we can't do Tk, and there is no
5999 # point to doing Tcl.
6000 if test -z "${no_tk}"; then
6001
6002 if test -f "$TKCONFIG" ; then
6003 . $TKCONFIG
6004 fi
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019#
6020# Ok, lets find the tcl source trees so we can use the headers
6021# Warning: transition of version 9 to 10 will break this algorithm
6022# because 10 sorts before 9. We also look for just tcl. We have to
6023# be careful that we don't match stuff like tclX by accident.
6024# the alternative search directory is involked by --with-tclinclude
6025#
6026
6027no_tcl=true
6028echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
e56ac5c3 6029echo "configure:6030: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
6030# Check whether --with-tclinclude or --without-tclinclude was given.
6031if test "${with_tclinclude+set}" = set; then
6032 withval="$with_tclinclude"
6033 with_tclinclude=${withval}
6034fi
6035
6036if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
6037 echo $ac_n "(cached) $ac_c" 1>&6
6038else
6039
6040# first check to see if --with-tclinclude was specified
6041if test x"${with_tclinclude}" != x ; then
6042 if test -f ${with_tclinclude}/tclInt.h ; then
6043 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
6044 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
6045 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
6046 else
6047 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
6048 fi
6049fi
6050
6051# next check if it came with Tcl configuration file
6052if test x"${ac_cv_c_tclconfig}" = x ; then
6053 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
6054 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
6055 fi
6056fi
6057
6058# next check in private source directory
6059#
6060# since ls returns lowest version numbers first, reverse its output
6061if test x"${ac_cv_c_tclh}" = x ; then
6062 for i in \
6063 ${srcdir}/../tcl \
6064 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
6065 ${srcdir}/../../tcl \
6066 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
6067 ${srcdir}/../../../tcl \
6068 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
6069 if test -f $i/generic/tclInt.h ; then
6070 ac_cv_c_tclh=`(cd $i/generic; pwd)`
6071 break
6072 fi
6073 done
6074fi
6075# finally check in a few common install locations
6076#
6077# since ls returns lowest version numbers first, reverse its output
6078if test x"${ac_cv_c_tclh}" = x ; then
6079 for i in \
6080 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
6081 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
6082 /usr/local/src/tcl \
6083 /usr/local/lib/tcl \
6084 ${prefix}/include ; do
6085 if test -f $i/generic/tclInt.h ; then
6086 ac_cv_c_tclh=`(cd $i/generic; pwd)`
6087 break
6088 fi
6089 done
6090fi
6091# see if one is installed
6092if test x"${ac_cv_c_tclh}" = x ; then
6093 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
6094echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
e56ac5c3 6095echo "configure:6096: checking for tclInt.h" >&5
3fc11d3e
JM
6096if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6097 echo $ac_n "(cached) $ac_c" 1>&6
6098else
6099 cat > conftest.$ac_ext <<EOF
e56ac5c3 6100#line 6101 "configure"
3fc11d3e
JM
6101#include "confdefs.h"
6102#include <tclInt.h>
6103EOF
6104ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 6105{ (eval echo configure:6106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
6106ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6107if test -z "$ac_err"; then
6108 rm -rf conftest*
6109 eval "ac_cv_header_$ac_safe=yes"
6110else
6111 echo "$ac_err" >&5
6112 echo "configure: failed program was:" >&5
6113 cat conftest.$ac_ext >&5
6114 rm -rf conftest*
6115 eval "ac_cv_header_$ac_safe=no"
6116fi
6117rm -f conftest*
6118fi
6119if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6120 echo "$ac_t""yes" 1>&6
6121 ac_cv_c_tclh=installed
6122else
6123 echo "$ac_t""no" 1>&6
6124ac_cv_c_tclh=""
6125fi
6126
6127fi
6128
6129fi
6130
6131if test x"${ac_cv_c_tclh}" = x ; then
6132 TCLHDIR="# no Tcl private headers found"
6133 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
6134fi
6135if test x"${ac_cv_c_tclh}" != x ; then
6136 no_tcl=""
6137 if test x"${ac_cv_c_tclh}" = x"installed" ; then
6138 echo "$ac_t""is installed" 1>&6
6139 TCLHDIR=""
6140 else
6141 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
6142 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
6143 TCLHDIR="-I${ac_cv_c_tclh}"
6144 fi
6145fi
6146
6147
6148
6149
6150#
6151# Ok, lets find the tk source trees so we can use the headers
6152# If the directory (presumably symlink) named "tk" exists, use that one
6153# in preference to any others. Same logic is used when choosing library
6154# and again with Tcl. The search order is the best place to look first, then in
6155# decreasing significance. The loop breaks if the trigger file is found.
6156# Note the gross little conversion here of srcdir by cd'ing to the found
6157# directory. This converts the path from a relative to an absolute, so
6158# recursive cache variables for the path will work right. We check all
6159# the possible paths in one loop rather than many seperate loops to speed
6160# things up.
6161# the alternative search directory is involked by --with-tkinclude
6162#
6163no_tk=true
6164echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
e56ac5c3 6165echo "configure:6166: checking for Tk private headers" >&5
3fc11d3e
JM
6166# Check whether --with-tkinclude or --without-tkinclude was given.
6167if test "${with_tkinclude+set}" = set; then
6168 withval="$with_tkinclude"
6169 with_tkinclude=${withval}
6170fi
6171
6172if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
6173 echo $ac_n "(cached) $ac_c" 1>&6
6174else
6175
6176# first check to see if --with-tkinclude was specified
6177if test x"${with_tkinclude}" != x ; then
6178 if test -f ${with_tkinclude}/tk.h ; then
6179 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
6180 elif test -f ${with_tkinclude}/generic/tk.h ; then
6181 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
6182 else
6183 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
6184 fi
6185fi
6186
6187# next check if it came with Tk configuration file
6188if test x"${ac_cv_c_tkconfig}" = x ; then
6189 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
6190 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
6191 fi
6192fi
6193
6194# next check in private source directory
6195#
6196# since ls returns lowest version numbers first, reverse its output
6197if test x"${ac_cv_c_tkh}" = x ; then
6198 for i in \
6199 ${srcdir}/../tk \
6200 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
6201 ${srcdir}/../../tk \
6202 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
6203 ${srcdir}/../../../tk \
6204 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
6205 if test -f $i/generic/tk.h ; then
6206 ac_cv_c_tkh=`(cd $i/generic; pwd)`
6207 break
6208 fi
6209 done
6210fi
6211# finally check in a few common install locations
6212#
6213# since ls returns lowest version numbers first, reverse its output
6214if test x"${ac_cv_c_tkh}" = x ; then
6215 for i in \
6216 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
6217 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
6218 /usr/local/src/tk \
6219 /usr/local/lib/tk \
6220 ${prefix}/include ; do
6221 if test -f $i/generic/tk.h ; then
6222 ac_cv_c_tkh=`(cd $i/generic; pwd)`
6223 break
6224 fi
6225 done
6226fi
6227# see if one is installed
6228if test x"${ac_cv_c_tkh}" = x ; then
6229 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
6230echo $ac_n "checking for tk.h""... $ac_c" 1>&6
e56ac5c3 6231echo "configure:6232: checking for tk.h" >&5
3fc11d3e
JM
6232if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6233 echo $ac_n "(cached) $ac_c" 1>&6
6234else
6235 cat > conftest.$ac_ext <<EOF
e56ac5c3 6236#line 6237 "configure"
3fc11d3e
JM
6237#include "confdefs.h"
6238#include <tk.h>
6239EOF
6240ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 6241{ (eval echo configure:6242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
6242ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6243if test -z "$ac_err"; then
6244 rm -rf conftest*
6245 eval "ac_cv_header_$ac_safe=yes"
6246else
6247 echo "$ac_err" >&5
6248 echo "configure: failed program was:" >&5
6249 cat conftest.$ac_ext >&5
6250 rm -rf conftest*
6251 eval "ac_cv_header_$ac_safe=no"
6252fi
6253rm -f conftest*
6254fi
6255if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6256 echo "$ac_t""yes" 1>&6
6257 ac_cv_c_tkh=installed
6258else
6259 echo "$ac_t""no" 1>&6
6260ac_cv_c_tkh=""
6261fi
6262
6263fi
6264
6265fi
6266
6267if test x"${ac_cv_c_tkh}" != x ; then
6268 no_tk=""
6269 if test x"${ac_cv_c_tkh}" = x"installed" ; then
6270 echo "$ac_t""is installed" 1>&6
6271 TKHDIR=""
6272 else
6273 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
6274 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
6275 TKHDIR="-I${ac_cv_c_tkh}"
6276 fi
6277else
6278 TKHDIR="# no Tk directory found"
6279 echo "configure: warning: Can't find Tk private headers" 1>&2
6280 no_tk=true
6281fi
6282
6283
6284
6285
6286echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
e56ac5c3 6287echo "configure:6288: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6288if test x"${ac_cv_c_itclh}" = x ; then
6289 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
6290 if test -f $i/generic/itcl.h ; then
6291 ac_cv_c_itclh=`(cd $i/generic; pwd)`
6292 break
6293 fi
6294 done
6295fi
6296if test x"${ac_cv_c_itclh}" = x ; then
6297 ITCLHDIR="# no Itcl private headers found"
6298 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
6299fi
6300if test x"${ac_cv_c_itclh}" != x ; then
6301 ITCLHDIR="-I${ac_cv_c_itclh}"
6302fi
6303# should always be here
6304# ITCLLIB="../itcl/itcl/unix/libitcl.a"
6305
6306#AC_SUBST(ITCLLIB)
6307
6308
6309echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
e56ac5c3 6310echo "configure:6311: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6311if test x"${ac_cv_c_itkh}" = x ; then
6312 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
6313 if test -f $i/generic/itk.h ; then
6314 ac_cv_c_itkh=`(cd $i/generic; pwd)`
6315 break
6316 fi
6317 done
6318fi
6319if test x"${ac_cv_c_itkh}" = x ; then
6320 ITKHDIR="# no Itk private headers found"
6321 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
6322fi
6323if test x"${ac_cv_c_itkh}" != x ; then
6324 ITKHDIR="-I${ac_cv_c_itkh}"
6325fi
6326# should always be here
6327# ITKLIB="../itcl/itk/unix/libitk.a"
6328
6329#AC_SUBST(ITKLIB)
6330
6331
6332echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
e56ac5c3 6333echo "configure:6334: checking for Tix private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6334if test x"${ac_cv_c_tixh}" = x ; then
6335 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
6336 if test -f $i/generic/tix.h ; then
6337 ac_cv_c_tixh=`(cd $i/generic; pwd)`
6338 break
6339 fi
6340 done
6341fi
6342if test x"${ac_cv_c_tixh}" = x ; then
6343 TIXHDIR="# no Tix private headers found"
6344 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
6345fi
6346if test x"${ac_cv_c_tixh}" != x ; then
6347 TIXHDIR="-I${ac_cv_c_tixh}"
6348fi
6349
6350
6351
6352 # now look for Itcl library stuff
6353
6354
6355#
6356# Ok, lets find the itcl configuration
6357# First, look for one uninstalled.
6358# the alternative search directory is invoked by --with-itclconfig
6359#
6360
6361if test x"${no_itcl}" = x ; then
6362 # we reset no_itcl in case something fails here
6363 no_itcl=true
6364 # Check whether --with-itclconfig or --without-itclconfig was given.
6365if test "${with_itclconfig+set}" = set; then
6366 withval="$with_itclconfig"
6367 with_itclconfig=${withval}
6368fi
6369
6370 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
e56ac5c3 6371echo "configure:6372: checking for Itcl configuration" >&5
3fc11d3e
JM
6372 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
6373 echo $ac_n "(cached) $ac_c" 1>&6
6374else
6375
6376
6377 # First check to see if --with-itclconfig was specified.
6378 if test x"${with_itclconfig}" != x ; then
6379 if test -f "${with_itclconfig}/itclConfig.sh" ; then
6380 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
6381 else
6382 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
6383 fi
6384 fi
6385
6386 # then check for a private Itcl library
6387 if test x"${ac_cv_c_itclconfig}" = x ; then
6388 for i in \
6389 ../itcl/itcl \
6390 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
6391 ../../itcl \
6392 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
6393 ../../../itcl \
6394 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
6395 if test -f "$i/itclConfig.sh" ; then
6396 ac_cv_c_itclconfig=`(cd $i; pwd)`
6397 break
6398 fi
6399 done
6400 fi
6401 # check in a few common install locations
6402 if test x"${ac_cv_c_itclconfig}" = x ; then
6403 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6404 if test -f "$i/itclConfig.sh" ; then
6405 ac_cv_c_itclconfig=`(cd $i; pwd)`
6406 break
6407 fi
6408 done
6409 fi
6410 # check in a few other private locations
6411 if test x"${ac_cv_c_itclconfig}" = x ; then
6412 for i in \
6413 ${srcdir}/../itcl/itcl \
6414 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
6415 if test -f "$i/itclConfig.sh" ; then
6416 ac_cv_c_itclconfig=`(cd $i; pwd)`
6417 break
6418 fi
6419 done
6420 fi
6421
6422fi
6423
6424 if test x"${ac_cv_c_itclconfig}" = x ; then
6425 ITCLCONFIG="# no Itcl configs found"
6426 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
6427 else
6428 no_itcl=
6429 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
6430 echo "$ac_t""found $ITCLCONFIG" 1>&6
6431 fi
6432fi
6433
6434 if test -z "${no_itcl}"; then
6435
6436 if test -f "$ITCLCONFIG" ; then
6437 . $ITCLCONFIG
6438 fi
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450 case "${host}" in
6451 *-*-cygwin*)
6452 itcldir=../itcl/itcl/win/
6453 ;;
6454 *)
6455 itcldir=../itcl/itcl/unix/
6456 ;;
6457 esac
6458
6459
6460 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
6461 ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
6462 fi
6463
6464
6465 # now look for Itk library stuff
6466
6467#
6468# Ok, lets find the itk configuration
6469# First, look for one uninstalled.
6470# the alternative search directory is invoked by --with-itkconfig
6471#
6472
6473if test x"${no_itk}" = x ; then
6474 # we reset no_itk in case something fails here
6475 no_itk=true
6476 # Check whether --with-itkconfig or --without-itkconfig was given.
6477if test "${with_itkconfig+set}" = set; then
6478 withval="$with_itkconfig"
6479 with_itkconfig=${withval}
6480fi
6481
6482 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
e56ac5c3 6483echo "configure:6484: checking for Itk configuration" >&5
3fc11d3e
JM
6484 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
6485 echo $ac_n "(cached) $ac_c" 1>&6
6486else
6487
6488
6489 # First check to see if --with-itkconfig was specified.
6490 if test x"${with_itkconfig}" != x ; then
6491 if test -f "${with_itkconfig}/itkConfig.sh" ; then
6492 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
6493 else
6494 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
6495 fi
6496 fi
6497
6498 # then check for a private Itk library
6499 if test x"${ac_cv_c_itkconfig}" = x ; then
6500 for i in \
6501 ../itcl/itk \
6502 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
6503 ../../itk \
6504 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
6505 ../../../itk \
6506 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
6507 if test -f "$i/itkConfig.sh" ; then
6508 ac_cv_c_itkconfig=`(cd $i; pwd)`
6509 break
6510 fi
6511 done
6512 fi
6513 # check in a few common install locations
6514 if test x"${ac_cv_c_itkconfig}" = x ; then
6515 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6516 if test -f "$i/itkConfig.sh" ; then
6517 ac_cv_c_itkconfig=`(cd $i; pwd)`
6518 break
6519 fi
6520 done
6521 fi
6522 # check in a few other private locations
6523 if test x"${ac_cv_c_itkconfig}" = x ; then
6524 for i in \
6525 ${srcdir}/../itcl/itk \
6526 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
6527 if test -f "$i/itkConfig.sh" ; then
6528 ac_cv_c_itkconfig=`(cd $i; pwd)`
6529 break
6530 fi
6531 done
6532 fi
6533
6534fi
6535
6536 if test x"${ac_cv_c_itkconfig}" = x ; then
6537 ITKCONFIG="# no Itk configs found"
6538 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
6539 else
6540 no_itk=
6541 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
6542 echo "$ac_t""found $ITKCONFIG" 1>&6
6543 fi
6544fi
6545
6546
6547 if test -z "${no_itcl}"; then
6548
6549 if test -f "$ITKCONFIG" ; then
6550 . $ITKCONFIG
6551 fi
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564 case "${host}" in
6565 *-*-cygwin*)
6566 itkdir=../itcl/itk/win/
6567 ;;
6568 *)
6569 itkdir=../itcl/itk/unix/
6570 ;;
6571 esac
6572
6573 ITKLIB="${ITK_BUILD_LIB_SPEC}"
6574 ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
6575 fi
6576
6577 # now look for Tix library stuff
6578
6579#
6580# Ok, lets find the tix configuration
6581# First, look for one uninstalled.
6582# the alternative search directory is invoked by --with-itkconfig
6583#
6584
6585if test x"${no_tix}" = x ; then
6586 # we reset no_tix in case something fails here
6587 no_tix=true
6588 # Check whether --with-tixconfig or --without-tixconfig was given.
6589if test "${with_tixconfig+set}" = set; then
6590 withval="$with_tixconfig"
6591 with_tixconfig=${withval}
6592fi
6593
6594 echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
e56ac5c3 6595echo "configure:6596: checking for Tix configuration" >&5
3fc11d3e
JM
6596 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
6597 echo $ac_n "(cached) $ac_c" 1>&6
6598else
6599
6600
6601 # First check to see if --with-tixconfig was specified.
6602 if test x"${with_tixconfig}" != x ; then
6603 if test -f "${with_tixconfig}/tixConfig.sh" ; then
6604 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
6605 else
6606 { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
6607 fi
6608 fi
6609
6610 # then check for a private Tix library
6611 if test x"${ac_cv_c_tixconfig}" = x ; then
6612 for i in \
6613 ../tix \
6614 `ls -dr ../tix 2>/dev/null` \
6615 ../../tix \
6616 `ls -dr ../../tix 2>/dev/null` \
6617 ../../../tix \
6618 `ls -dr ../../../tix 2>/dev/null` ; do
6619 echo "**** Looking at $i - with ${configdir}"
6620 if test -f "$i/tixConfig.sh" ; then
6621 ac_cv_c_tixconfig=`(cd $i; pwd)`
6622 break
6623 fi
6624 done
6625 fi
6626 # check in a few common install locations
6627 if test x"${ac_cv_c_tixconfig}" = x ; then
6628 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6629 echo "**** Looking at $i"
6630 if test -f "$i/tixConfig.sh" ; then
6631 ac_cv_c_tixconfig=`(cd $i; pwd)`
6632 break
6633 fi
6634 done
6635 fi
6636 # check in a few other private locations
6637 echo "**** Other private locations"
6638 if test x"${ac_cv_c_tixconfig}" = x ; then
6639 for i in \
6640 ${srcdir}/../tix \
6641 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
6642 echo "**** Looking at $i - with ${configdir}"
6643 if test -f "$i/${configdir}/tixConfig.sh" ; then
6644 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
6645 break
6646 fi
6647 done
6648 fi
6649
6650fi
6651
6652 if test x"${ac_cv_c_tixconfig}" = x ; then
6653 TIXCONFIG="# no Tix configs found"
6654 echo "configure: warning: Can't find Tix configuration definitions" 1>&2
6655 else
6656 no_tix=
6657 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
6658 echo "$ac_t""found $TIXCONFIG" 1>&6
6659 fi
6660fi
6661
6662
6663 if test -z "${no_tix}"; then
6664
6665 if test -f "$TIXCONFIG" ; then
6666 . $TIXCONFIG
6667 fi
6668
6669
6670
6671
6672
6673
6674
6675
6676 TIXLIB="${TIX_BUILD_LIB_SPEC}"
6677 TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
6678 fi
6679
6680 ENABLE_GDBTK=1
6681 ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK"
6682 # Tcl/Tk 8.1 require -fwritable strings. I don't
6683 # know whether 8.2 will or not, but I bet it will.
6684 # I don't have to worry about 7.x since we don't support it.
6685 GDBTK_CFLAGS=""
6686 if test "$GCC" = "yes"; then
6687 if test "$TCL_VERSION" != "8.0" ; then
6688 GDBTK_CFLAGS="-fwritable-strings"
6689 fi
6690 fi
6691
6692 # Include some libraries that Tcl and Tk want.
6693 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6694 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
6695 # Yes, the ordering seems wrong here. But it isn't.
6696 # TK_LIBS is the list of libraries that need to be linked
6697 # after Tcl/Tk. Note that this isn't put into LIBS. If it
6698 # were in LIBS then any link tests after this point would
6699 # try to include things like `$(LIBGUI)', which wouldn't work.
6700 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
d45b9300
FN
6701 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"
6702 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o"
6703 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"
e56ac5c3
AC
6704 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
6705 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
6706
6707 if test x$gdb_cv_os_cygwin = xyes; then
6708 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
6709 WIN32LDAPP="-Wl,--subsystem,console"
6710 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
6711 fi
6712 fi
6713 fi
6714fi
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
8b93c638 6728
c906108c
SS
6729# If we find X, set shell vars x_includes and x_libraries to the
6730# paths, otherwise set no_x=yes.
6731# Uses ac_ vars as temps to allow command line to override cache and checks.
6732# --without-x overrides everything else, but does not touch the cache.
6733echo $ac_n "checking for X""... $ac_c" 1>&6
e56ac5c3 6734echo "configure:6735: checking for X" >&5
c906108c
SS
6735
6736# Check whether --with-x or --without-x was given.
6737if test "${with_x+set}" = set; then
6738 withval="$with_x"
6739 :
6740fi
6741
6742# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6743if test "x$with_x" = xno; then
6744 # The user explicitly disabled X.
6745 have_x=disabled
6746else
6747 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6748 # Both variables are already set.
6749 have_x=yes
6750 else
6751if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6752 echo $ac_n "(cached) $ac_c" 1>&6
6753else
6754 # One or both of the vars are not set, and there is no cached value.
6755ac_x_includes=NO ac_x_libraries=NO
6756rm -fr conftestdir
6757if mkdir conftestdir; then
6758 cd conftestdir
6759 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6760 cat > Imakefile <<'EOF'
6761acfindx:
6762 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6763EOF
6764 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6765 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6766 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6767 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6768 for ac_extension in a so sl; do
6769 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6770 test -f $ac_im_libdir/libX11.$ac_extension; then
6771 ac_im_usrlibdir=$ac_im_libdir; break
6772 fi
6773 done
6774 # Screen out bogus values from the imake configuration. They are
6775 # bogus both because they are the default anyway, and because
6776 # using them would break gcc on systems where it needs fixed includes.
6777 case "$ac_im_incroot" in
6778 /usr/include) ;;
6779 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6780 esac
6781 case "$ac_im_usrlibdir" in
6782 /usr/lib | /lib) ;;
6783 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6784 esac
6785 fi
6786 cd ..
6787 rm -fr conftestdir
6788fi
6789
6790if test "$ac_x_includes" = NO; then
6791 # Guess where to find include files, by looking for this one X11 .h file.
6792 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6793
6794 # First, try using that file with no special directory specified.
6795cat > conftest.$ac_ext <<EOF
e56ac5c3 6796#line 6797 "configure"
c906108c
SS
6797#include "confdefs.h"
6798#include <$x_direct_test_include>
6799EOF
6800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e56ac5c3 6801{ (eval echo configure:6802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
6802ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6803if test -z "$ac_err"; then
6804 rm -rf conftest*
6805 # We can compile using X headers with no special include directory.
6806ac_x_includes=
6807else
6808 echo "$ac_err" >&5
6809 echo "configure: failed program was:" >&5
6810 cat conftest.$ac_ext >&5
6811 rm -rf conftest*
6812 # Look for the header file in a standard set of common directories.
6813# Check X11 before X11Rn because it is often a symlink to the current release.
6814 for ac_dir in \
6815 /usr/X11/include \
6816 /usr/X11R6/include \
6817 /usr/X11R5/include \
6818 /usr/X11R4/include \
6819 \
6820 /usr/include/X11 \
6821 /usr/include/X11R6 \
6822 /usr/include/X11R5 \
6823 /usr/include/X11R4 \
6824 \
6825 /usr/local/X11/include \
6826 /usr/local/X11R6/include \
6827 /usr/local/X11R5/include \
6828 /usr/local/X11R4/include \
6829 \
6830 /usr/local/include/X11 \
6831 /usr/local/include/X11R6 \
6832 /usr/local/include/X11R5 \
6833 /usr/local/include/X11R4 \
6834 \
6835 /usr/X386/include \
6836 /usr/x386/include \
6837 /usr/XFree86/include/X11 \
6838 \
6839 /usr/include \
6840 /usr/local/include \
6841 /usr/unsupported/include \
6842 /usr/athena/include \
6843 /usr/local/x11r5/include \
6844 /usr/lpp/Xamples/include \
6845 \
6846 /usr/openwin/include \
6847 /usr/openwin/share/include \
6848 ; \
6849 do
6850 if test -r "$ac_dir/$x_direct_test_include"; then
6851 ac_x_includes=$ac_dir
6852 break
6853 fi
6854 done
6855fi
6856rm -f conftest*
6857fi # $ac_x_includes = NO
6858
6859if test "$ac_x_libraries" = NO; then
6860 # Check for the libraries.
6861
6862 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6863 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6864
6865 # See if we find them without any special options.
6866 # Don't add to $LIBS permanently.
6867 ac_save_LIBS="$LIBS"
6868 LIBS="-l$x_direct_test_library $LIBS"
6869cat > conftest.$ac_ext <<EOF
e56ac5c3 6870#line 6871 "configure"
c906108c
SS
6871#include "confdefs.h"
6872
6873int main() {
6874${x_direct_test_function}()
6875; return 0; }
6876EOF
e56ac5c3 6877if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6878 rm -rf conftest*
6879 LIBS="$ac_save_LIBS"
6880# We can link X programs with no special library path.
6881ac_x_libraries=
6882else
6883 echo "configure: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6885 rm -rf conftest*
6886 LIBS="$ac_save_LIBS"
6887# First see if replacing the include by lib works.
6888# Check X11 before X11Rn because it is often a symlink to the current release.
6889for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6890 /usr/X11/lib \
6891 /usr/X11R6/lib \
6892 /usr/X11R5/lib \
6893 /usr/X11R4/lib \
6894 \
6895 /usr/lib/X11 \
6896 /usr/lib/X11R6 \
6897 /usr/lib/X11R5 \
6898 /usr/lib/X11R4 \
6899 \
6900 /usr/local/X11/lib \
6901 /usr/local/X11R6/lib \
6902 /usr/local/X11R5/lib \
6903 /usr/local/X11R4/lib \
6904 \
6905 /usr/local/lib/X11 \
6906 /usr/local/lib/X11R6 \
6907 /usr/local/lib/X11R5 \
6908 /usr/local/lib/X11R4 \
6909 \
6910 /usr/X386/lib \
6911 /usr/x386/lib \
6912 /usr/XFree86/lib/X11 \
6913 \
6914 /usr/lib \
6915 /usr/local/lib \
6916 /usr/unsupported/lib \
6917 /usr/athena/lib \
6918 /usr/local/x11r5/lib \
6919 /usr/lpp/Xamples/lib \
6920 /lib/usr/lib/X11 \
6921 \
6922 /usr/openwin/lib \
6923 /usr/openwin/share/lib \
6924 ; \
6925do
6926 for ac_extension in a so sl; do
6927 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6928 ac_x_libraries=$ac_dir
6929 break 2
6930 fi
6931 done
6932done
6933fi
6934rm -f conftest*
6935fi # $ac_x_libraries = NO
6936
6937if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6938 # Didn't find X anywhere. Cache the known absence of X.
6939 ac_cv_have_x="have_x=no"
6940else
6941 # Record where we found X for the cache.
6942 ac_cv_have_x="have_x=yes \
6943 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6944fi
6945fi
6946 fi
6947 eval "$ac_cv_have_x"
6948fi # $with_x != no
6949
6950if test "$have_x" != yes; then
6951 echo "$ac_t""$have_x" 1>&6
6952 no_x=yes
6953else
6954 # If each of the values was on the command line, it overrides each guess.
6955 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6956 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6957 # Update the cache value to reflect the command line values.
6958 ac_cv_have_x="have_x=yes \
6959 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6960 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6961fi
6962
6963
7a292a7a
SS
6964
6965# Unlike the sim directory, whether a simulator is linked is controlled by
6966# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
6967# This code just checks for a few cases where we'd like to ignore those
6968# definitions, even when they're present in the '.mt' file. These cases
6969# are when --disable-sim is specified, or if the simulator directory is
6970# not part of the soruce tree.
6971#
6972# Check whether --enable-sim or --disable-sim was given.
6973if test "${enable_sim+set}" = set; then
6974 enableval="$enable_sim"
6975 echo "enable_sim = $enable_sim";
6976 echo "enableval = ${enableval}";
6977 case "${enableval}" in
6978 yes) ignore_sim=false ;;
6979 no) ignore_sim=true ;;
6980 *) ignore_sim=false ;;
6981 esac
6982else
6983 ignore_sim=false
6984fi
6985
6986
6987if test ! -d "${srcdir}/../sim"; then
6988 ignore_sim=true
6989fi
6990
6991if test "${ignore_sim}" = "true"; then
6992 IGNORE_SIM="SIM="
6993 IGNORE_SIM_OBS="SIM_OBS="
6994else
6995 IGNORE_SIM=""
6996 IGNORE_SIM_OBS=""
6997 cat >> confdefs.h <<\EOF
6998#define WITH_SIM 1
6999EOF
7000
7001fi
7002
7003
7004
c906108c
SS
7005
7006
7007
7008
7009
7010
dfcd3bfb 7011
e56ac5c3
AC
7012
7013
c906108c
SS
7014# Begin stuff to support --enable-shared
7015# Check whether --enable-shared or --disable-shared was given.
7016if test "${enable_shared+set}" = set; then
7017 enableval="$enable_shared"
7018 case "${enableval}" in
7019 yes) shared=true ;;
7020 no) shared=false ;;
7021 *) shared=true ;;
7022esac
7023fi
7024
7025HLDFLAGS=
7026HLDENV=
7027# If we have shared libraries, try to set rpath reasonably.
7028if test "${shared}" = "true"; then
7029 case "${host}" in
7030 *-*-hpux*)
7031 HLDFLAGS='-Wl,+s,+b,$(libdir)'
7032 ;;
7033 *-*-irix5* | *-*-irix6*)
7034 HLDFLAGS='-Wl,-rpath,$(libdir)'
7035 ;;
7036 *-*-linux*aout*)
7037 ;;
7038 *-*-linux* | *-pc-linux-gnu)
7039 HLDFLAGS='-Wl,-rpath,$(libdir)'
7040 ;;
7041 *-*-solaris*)
7042 HLDFLAGS='-R $(libdir)'
7043 ;;
7044 *-*-sysv4*)
7045 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;'
7046 ;;
7047 esac
7048fi
7049
7050# On SunOS, if the linker supports the -rpath option, use it to
7051# prevent ../bfd and ../opcodes from being included in the run time
7052# search path.
7053case "${host}" in
7054 *-*-sunos*)
7055 echo 'main () { }' > conftest.c
7056 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
7057 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
7058 :
7059 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
7060 :
7061 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
7062 :
7063 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
7064 :
7065 elif test "${shared}" = "true"; then
7066 HLDFLAGS='-Wl,-rpath=$(libdir)'
7067 else
7068 HLDFLAGS='-Wl,-rpath='
7069 fi
7070 rm -f conftest.t conftest.c conftest
7071 ;;
7072esac
7073
7074
7075# End stuff to support --enable-shared
7076
7077# target_subdir is used by the testsuite to find the target libraries.
7078target_subdir=
7079if test "${host}" != "${target}"; then
7080 target_subdir="${target_alias}/"
7081fi
7082
7083
7084frags=
7085host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
7086if test ! -f ${host_makefile_frag}; then
7087{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
7088fi
7089frags="$frags $host_makefile_frag"
7090
7091target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
7092if test ! -f ${target_makefile_frag}; then
7093{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
7094fi
7095frags="$frags $target_makefile_frag"
7096
7097
7098
7099
7100
7101hostfile=`sed -n '
7102s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7103' ${host_makefile_frag}`
7104
7105targetfile=`sed -n '
7106s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7107' ${target_makefile_frag}`
7108
7109# these really aren't orthogonal true/false values of the same condition,
7110# but shells are slow enough that I like to reuse the test conditions
7111# whenever possible
7112if test "${target}" = "${host}"; then
7113nativefile=`sed -n '
7114s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7115' ${host_makefile_frag}`
7116# else
7117# GDBserver is only useful in a "native" enviroment
7118# configdirs=`echo $configdirs | sed 's/gdbserver//'`
7119fi
7120
7121
96baa820
JM
7122SUBDIRS="doc testsuite nlm"
7123if test "${enable_multi_ice}" = "yes"; then
7124 SUBDIRS="${SUBDIRS} multi-ice"
7125fi
7126
7127
7128
c906108c
SS
7129# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
7130# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
7131# corresponding links. But we have to remove the xm.h files and tm.h
7132# files anyway, e.g. when switching from "configure host" to
7133# "configure none".
7134
7135files=
7136links=
7137rm -f xm.h
7138if test "${hostfile}" != ""; then
7139files="${files} config/${gdb_host_cpu}/${hostfile}"
7140links="${links} xm.h"
7141fi
7142rm -f tm.h
7143if test "${targetfile}" != ""; then
7144files="${files} config/${gdb_target_cpu}/${targetfile}"
7145links="${links} tm.h"
7146fi
7147rm -f nm.h
7148if test "${nativefile}" != ""; then
7149files="${files} config/${gdb_host_cpu}/${nativefile}"
7150links="${links} nm.h"
7151else
7152# A cross-only configuration.
7153files="${files} config/nm-empty.h"
7154links="${links} nm.h"
7155fi
3fc11d3e 7156echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
e56ac5c3 7157echo "configure:7158: checking whether ln -s works" >&5
3fc11d3e
JM
7158if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
7159 echo $ac_n "(cached) $ac_c" 1>&6
7160else
7161 rm -f conftestdata
7162if ln -s X conftestdata 2>/dev/null
7163then
7164 rm -f conftestdata
7165 ac_cv_prog_LN_S="ln -s"
7166else
7167 ac_cv_prog_LN_S=ln
7168fi
7169fi
7170LN_S="$ac_cv_prog_LN_S"
7171if test "$ac_cv_prog_LN_S" = "ln -s"; then
7172 echo "$ac_t""yes" 1>&6
7173else
7174 echo "$ac_t""no" 1>&6
7175fi
7176
7177# Make it possible to use the GUI without doing a full install
7178if test "${enable_gdbtk}" = "yes" ; then
7179 if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
7180 echo linking $srcdir/gdbtk/library to gdbtcl
7181 $LN_S $srcdir/gdbtk/library gdbtcl
7182 else
7183 echo Warning: Unable to link $srcdir/gdbtk/library to gdbtcl. You will need to do a
7184 echo " " make install before you are able to run the GUI.
7185 fi
7186fi
c906108c
SS
7187
7188
7189
7190echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
e56ac5c3 7191echo "configure:7192: checking for Cygwin environment" >&5
c906108c
SS
7192if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
7193 echo $ac_n "(cached) $ac_c" 1>&6
7194else
7195 cat > conftest.$ac_ext <<EOF
e56ac5c3 7196#line 7197 "configure"
c906108c
SS
7197#include "confdefs.h"
7198
7199int main() {
7200
7201#ifndef __CYGWIN__
7202#define __CYGWIN__ __CYGWIN32__
7203#endif
7204return __CYGWIN__;
7205; return 0; }
7206EOF
e56ac5c3 7207if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
7208 rm -rf conftest*
7209 ac_cv_cygwin=yes
7210else
7211 echo "configure: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7213 rm -rf conftest*
7214 ac_cv_cygwin=no
7215fi
7216rm -f conftest*
7217rm -f conftest*
7218fi
7219
7220echo "$ac_t""$ac_cv_cygwin" 1>&6
7221CYGWIN=
7222test "$ac_cv_cygwin" = yes && CYGWIN=yes
7223echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
e56ac5c3 7224echo "configure:7225: checking for mingw32 environment" >&5
c906108c
SS
7225if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
7226 echo $ac_n "(cached) $ac_c" 1>&6
7227else
7228 cat > conftest.$ac_ext <<EOF
e56ac5c3 7229#line 7230 "configure"
c906108c
SS
7230#include "confdefs.h"
7231
7232int main() {
7233return __MINGW32__;
7234; return 0; }
7235EOF
e56ac5c3 7236if { (eval echo configure:7237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
7237 rm -rf conftest*
7238 ac_cv_mingw32=yes
7239else
7240 echo "configure: failed program was:" >&5
7241 cat conftest.$ac_ext >&5
7242 rm -rf conftest*
7243 ac_cv_mingw32=no
7244fi
7245rm -f conftest*
7246rm -f conftest*
7247fi
7248
7249echo "$ac_t""$ac_cv_mingw32" 1>&6
7250MINGW32=
7251test "$ac_cv_mingw32" = yes && MINGW32=yes
7252
7253
7254echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
e56ac5c3 7255echo "configure:7256: checking for executable suffix" >&5
c906108c
SS
7256if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
7257 echo $ac_n "(cached) $ac_c" 1>&6
7258else
7259 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
7260 ac_cv_exeext=.exe
7261else
7262 rm -f conftest*
7263 echo 'int main () { return 0; }' > conftest.$ac_ext
7264 ac_cv_exeext=
e56ac5c3 7265 if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
7266 for file in conftest.*; do
7267 case $file in
fb40c209 7268 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
7269 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7270 esac
7271 done
7272 else
7273 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7274 fi
7275 rm -f conftest*
7276 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7277fi
7278fi
7279
7280EXEEXT=""
7281test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7282echo "$ac_t""${ac_cv_exeext}" 1>&6
7283ac_exeext=$EXEEXT
7284
7285
7286subdirs="$configdirs"
7287
7288trap '' 1 2 15
7289cat > confcache <<\EOF
7290# This file is a shell script that caches the results of configure
7291# tests run on this system so they can be shared between configure
7292# scripts and configure runs. It is not useful on other systems.
7293# If it contains results you don't want to keep, you may remove or edit it.
7294#
7295# By default, configure uses ./config.cache as the cache file,
7296# creating it if it does not exist already. You can give configure
7297# the --cache-file=FILE option to use a different cache file; that is
7298# what configure does when it calls configure scripts in
7299# subdirectories, so they share the cache.
7300# Giving --cache-file=/dev/null disables caching, for debugging configure.
7301# config.status only pays attention to the cache file if you give it the
7302# --recheck option to rerun configure.
7303#
7304EOF
7305# The following way of writing the cache mishandles newlines in values,
7306# but we know of no workaround that is simple, portable, and efficient.
7307# So, don't put newlines in cache variables' values.
7308# Ultrix sh set writes to stderr and can't be redirected directly,
7309# and sets the high bit in the cache file unless we assign to the vars.
7310(set) 2>&1 |
7311 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7312 *ac_space=\ *)
7313 # `set' does not quote correctly, so add quotes (double-quote substitution
7314 # turns \\\\ into \\, and sed turns \\ into \).
7315 sed -n \
7316 -e "s/'/'\\\\''/g" \
7317 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7318 ;;
7319 *)
7320 # `set' quotes correctly as required by POSIX, so do not add quotes.
7321 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7322 ;;
7323 esac >> confcache
7324if cmp -s $cache_file confcache; then
7325 :
7326else
7327 if test -w $cache_file; then
7328 echo "updating cache $cache_file"
7329 cat confcache > $cache_file
7330 else
7331 echo "not updating unwritable cache $cache_file"
7332 fi
7333fi
7334rm -f confcache
7335
7336trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7337
7338test "x$prefix" = xNONE && prefix=$ac_default_prefix
7339# Let make expand exec_prefix.
7340test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7341
7342# Any assignment to VPATH causes Sun make to only execute
7343# the first set of double-colon rules, so remove it if not needed.
7344# If there is a colon in the path, we need to keep it.
7345if test "x$srcdir" = x.; then
7346 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7347fi
7348
7349trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7350
7351DEFS=-DHAVE_CONFIG_H
7352
7353# Without the "./", some shells look in PATH for config.status.
7354: ${CONFIG_STATUS=./config.status}
7355
7356echo creating $CONFIG_STATUS
7357rm -f $CONFIG_STATUS
7358cat > $CONFIG_STATUS <<EOF
7359#! /bin/sh
7360# Generated automatically by configure.
7361# Run this file to recreate the current configuration.
7362# This directory was configured as follows,
7363# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7364#
7365# $0 $ac_configure_args
7366#
7367# Compiler output produced by configure, useful for debugging
7368# configure, is in ./config.log if it exists.
7369
7370ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7371for ac_option
7372do
7373 case "\$ac_option" in
7374 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7375 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7376 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7377 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7378 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7379 exit 0 ;;
7380 -help | --help | --hel | --he | --h)
7381 echo "\$ac_cs_usage"; exit 0 ;;
7382 *) echo "\$ac_cs_usage"; exit 1 ;;
7383 esac
7384done
7385
7386ac_given_srcdir=$srcdir
7387ac_given_INSTALL="$INSTALL"
7388
7389trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7390EOF
7391cat >> $CONFIG_STATUS <<EOF
7392
7393# Protect against being on the right side of a sed subst in config.status.
7394sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7395 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7396$ac_vpsub
7397$extrasub
7398s%@SHELL@%$SHELL%g
7399s%@CFLAGS@%$CFLAGS%g
7400s%@CPPFLAGS@%$CPPFLAGS%g
7401s%@CXXFLAGS@%$CXXFLAGS%g
7402s%@FFLAGS@%$FFLAGS%g
7403s%@DEFS@%$DEFS%g
7404s%@LDFLAGS@%$LDFLAGS%g
7405s%@LIBS@%$LIBS%g
7406s%@exec_prefix@%$exec_prefix%g
7407s%@prefix@%$prefix%g
7408s%@program_transform_name@%$program_transform_name%g
7409s%@bindir@%$bindir%g
7410s%@sbindir@%$sbindir%g
7411s%@libexecdir@%$libexecdir%g
7412s%@datadir@%$datadir%g
7413s%@sysconfdir@%$sysconfdir%g
7414s%@sharedstatedir@%$sharedstatedir%g
7415s%@localstatedir@%$localstatedir%g
7416s%@libdir@%$libdir%g
7417s%@includedir@%$includedir%g
7418s%@oldincludedir@%$oldincludedir%g
7419s%@infodir@%$infodir%g
7420s%@mandir@%$mandir%g
7421s%@CC@%$CC%g
7422s%@CPP@%$CPP%g
7423s%@host@%$host%g
7424s%@host_alias@%$host_alias%g
7425s%@host_cpu@%$host_cpu%g
7426s%@host_vendor@%$host_vendor%g
7427s%@host_os@%$host_os%g
7428s%@target@%$target%g
7429s%@target_alias@%$target_alias%g
7430s%@target_cpu@%$target_cpu%g
7431s%@target_vendor@%$target_vendor%g
7432s%@target_os@%$target_os%g
7433s%@build@%$build%g
7434s%@build_alias@%$build_alias%g
7435s%@build_cpu@%$build_cpu%g
7436s%@build_vendor@%$build_vendor%g
7437s%@build_os@%$build_os%g
7438s%@SET_MAKE@%$SET_MAKE%g
7439s%@RANLIB@%$RANLIB%g
7440s%@ALLOCA@%$ALLOCA%g
7441s%@USE_NLS@%$USE_NLS%g
7442s%@MSGFMT@%$MSGFMT%g
7443s%@GMSGFMT@%$GMSGFMT%g
7444s%@XGETTEXT@%$XGETTEXT%g
7445s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7446s%@CATALOGS@%$CATALOGS%g
7447s%@CATOBJEXT@%$CATOBJEXT%g
7448s%@DATADIRNAME@%$DATADIRNAME%g
7449s%@GMOFILES@%$GMOFILES%g
7450s%@INSTOBJEXT@%$INSTOBJEXT%g
7451s%@INTLDEPS@%$INTLDEPS%g
7452s%@INTLLIBS@%$INTLLIBS%g
7453s%@INTLOBJS@%$INTLOBJS%g
7454s%@POFILES@%$POFILES%g
7455s%@POSUB@%$POSUB%g
7456s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7457s%@GT_NO@%$GT_NO%g
7458s%@GT_YES@%$GT_YES%g
7459s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7460s%@l@%$l%g
7a292a7a 7461s%@AWK@%$AWK%g
c906108c
SS
7462s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7463s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7464s%@INSTALL_DATA@%$INSTALL_DATA%g
7465s%@AR@%$AR%g
7466s%@YACC@%$YACC%g
7467s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
7468s%@BUILD_TUI@%$BUILD_TUI%g
7469s%@TUI_LIBRARY@%$TUI_LIBRARY%g
7470s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 7471s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
7472s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
7473s%@MMALLOC@%$MMALLOC%g
7a292a7a
SS
7474s%@DLLTOOL@%$DLLTOOL%g
7475s%@WINDRES@%$WINDRES%g
c906108c 7476s%@TERM_LIB@%$TERM_LIB%g
cd0fc7c3 7477s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
7478s%@LIBGUI@%$LIBGUI%g
7479s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
7480s%@WIN32LDAPP@%$WIN32LDAPP%g
7481s%@TCL_VERSION@%$TCL_VERSION%g
7482s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
7483s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
7484s%@TCL_CC@%$TCL_CC%g
7485s%@TCL_DEFS@%$TCL_DEFS%g
7486s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
7487s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
7488s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
7489s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
7490s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
7491s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
7492s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
7493s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
7494s%@TCL_RANLIB@%$TCL_RANLIB%g
7495s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
7496s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
7497s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
7498s%@TK_VERSION@%$TK_VERSION%g
7499s%@TK_DEFS@%$TK_DEFS%g
7500s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
7501s%@TK_XINCLUDES@%$TK_XINCLUDES%g
7502s%@TK_XLIBSW@%$TK_XLIBSW%g
7503s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
7504s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
7505s%@TCLHDIR@%$TCLHDIR%g
7506s%@TKHDIR@%$TKHDIR%g
7507s%@ITCLHDIR@%$ITCLHDIR%g
7508s%@ITKHDIR@%$ITKHDIR%g
7509s%@TIXHDIR@%$TIXHDIR%g
7510s%@ITCL_VERSION@%$ITCL_VERSION%g
7511s%@ITCL_DEFS@%$ITCL_DEFS%g
7512s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
7513s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
7514s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
7515s%@ITK_VERSION@%$ITK_VERSION%g
7516s%@ITK_DEFS@%$ITK_DEFS%g
7517s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
7518s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
7519s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7520s%@TIX_VERSION@%$TIX_VERSION%g
7521s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
7522s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
7523s%@X_CFLAGS@%$X_CFLAGS%g
7524s%@X_LDFLAGS@%$X_LDFLAGS%g
7525s%@X_LIBS@%$X_LIBS%g
7526s%@ITCLLIB@%$ITCLLIB%g
7527s%@ITCL_DEPS@%$ITCL_DEPS%g
7528s%@ITKLIB@%$ITKLIB%g
7529s%@ITK_DEPS@%$ITK_DEPS%g
7530s%@TIXLIB@%$TIXLIB%g
7531s%@TIX_DEPS@%$TIX_DEPS%g
7532s%@GDBTKLIBS@%$GDBTKLIBS%g
7533s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
7534s%@IGNORE_SIM@%$IGNORE_SIM%g
7535s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
7536s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
7537s%@CONFIG_OBS@%$CONFIG_OBS%g
7538s%@CONFIG_DEPS@%$CONFIG_DEPS%g
7539s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 7540s%@CONFIG_INITS@%$CONFIG_INITS%g
e56ac5c3
AC
7541s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
7542s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
7543s%@HLDFLAGS@%$HLDFLAGS%g
7544s%@HLDENV@%$HLDENV%g
7545s%@target_subdir@%$target_subdir%g
7546/@host_makefile_frag@/r $host_makefile_frag
7547s%@host_makefile_frag@%%g
7548/@target_makefile_frag@/r $target_makefile_frag
7549s%@target_makefile_frag@%%g
7550s%@frags@%$frags%g
96baa820 7551s%@SUBDIRS@%$SUBDIRS%g
7a292a7a 7552s%@LN_S@%$LN_S%g
c906108c
SS
7553s%@EXEEXT@%$EXEEXT%g
7554s%@subdirs@%$subdirs%g
7555
7556CEOF
7557EOF
7558
7559cat >> $CONFIG_STATUS <<\EOF
7560
7561# Split the substitutions into bite-sized pieces for seds with
7562# small command number limits, like on Digital OSF/1 and HP-UX.
7563ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7564ac_file=1 # Number of current file.
7565ac_beg=1 # First line for current file.
7566ac_end=$ac_max_sed_cmds # Line after last line for current file.
7567ac_more_lines=:
7568ac_sed_cmds=""
7569while $ac_more_lines; do
7570 if test $ac_beg -gt 1; then
7571 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7572 else
7573 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7574 fi
7575 if test ! -s conftest.s$ac_file; then
7576 ac_more_lines=false
7577 rm -f conftest.s$ac_file
7578 else
7579 if test -z "$ac_sed_cmds"; then
7580 ac_sed_cmds="sed -f conftest.s$ac_file"
7581 else
7582 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7583 fi
7584 ac_file=`expr $ac_file + 1`
7585 ac_beg=$ac_end
7586 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7587 fi
7588done
7589if test -z "$ac_sed_cmds"; then
7590 ac_sed_cmds=cat
7591fi
7592EOF
7593
7594cat >> $CONFIG_STATUS <<EOF
7595
7596CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"}
7597EOF
7598cat >> $CONFIG_STATUS <<\EOF
7599for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7600 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7601 case "$ac_file" in
7602 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7603 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7604 *) ac_file_in="${ac_file}.in" ;;
7605 esac
7606
7607 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7608
7609 # Remove last slash and all that follows it. Not all systems have dirname.
7610 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7611 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7612 # The file is in a subdirectory.
7613 test ! -d "$ac_dir" && mkdir "$ac_dir"
7614 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7615 # A "../" for each directory in $ac_dir_suffix.
7616 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7617 else
7618 ac_dir_suffix= ac_dots=
7619 fi
7620
7621 case "$ac_given_srcdir" in
7622 .) srcdir=.
7623 if test -z "$ac_dots"; then top_srcdir=.
7624 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7625 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7626 *) # Relative path.
7627 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7628 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7629 esac
7630
7631 case "$ac_given_INSTALL" in
7632 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7633 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7634 esac
7635
7636 echo creating "$ac_file"
7637 rm -f "$ac_file"
7638 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7639 case "$ac_file" in
7640 *Makefile*) ac_comsub="1i\\
7641# $configure_input" ;;
7642 *) ac_comsub= ;;
7643 esac
7644
7645 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7646 sed -e "$ac_comsub
7647s%@configure_input@%$configure_input%g
7648s%@srcdir@%$srcdir%g
7649s%@top_srcdir@%$top_srcdir%g
7650s%@INSTALL@%$INSTALL%g
7651" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7652fi; done
7653rm -f conftest.s*
7654
7655# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7656# NAME is the cpp macro being defined and VALUE is the value it is being given.
7657#
7658# ac_d sets the value in "#define NAME VALUE" lines.
7659ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7660ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7661ac_dC='\3'
7662ac_dD='%g'
7663# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7664ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7665ac_uB='\([ ]\)%\1#\2define\3'
7666ac_uC=' '
7667ac_uD='\4%g'
7668# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7669ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7670ac_eB='$%\1#\2define\3'
7671ac_eC=' '
7672ac_eD='%g'
7673
7674if test "${CONFIG_HEADERS+set}" != set; then
7675EOF
7676cat >> $CONFIG_STATUS <<EOF
7677 CONFIG_HEADERS="config.h:config.in"
7678EOF
7679cat >> $CONFIG_STATUS <<\EOF
7680fi
7681for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7682 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7683 case "$ac_file" in
7684 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7685 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7686 *) ac_file_in="${ac_file}.in" ;;
7687 esac
7688
7689 echo creating $ac_file
7690
7691 rm -f conftest.frag conftest.in conftest.out
7692 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7693 cat $ac_file_inputs > conftest.in
7694
7695EOF
7696
7697# Transform confdefs.h into a sed script conftest.vals that substitutes
7698# the proper values into config.h.in to produce config.h. And first:
7699# Protect against being on the right side of a sed subst in config.status.
7700# Protect against being in an unquoted here document in config.status.
7701rm -f conftest.vals
7702cat > conftest.hdr <<\EOF
7703s/[\\&%]/\\&/g
7704s%[\\$`]%\\&%g
7705s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7706s%ac_d%ac_u%gp
7707s%ac_u%ac_e%gp
7708EOF
7709sed -n -f conftest.hdr confdefs.h > conftest.vals
7710rm -f conftest.hdr
7711
7712# This sed command replaces #undef with comments. This is necessary, for
7713# example, in the case of _POSIX_SOURCE, which is predefined and required
7714# on some systems where configure will not decide to define it.
7715cat >> conftest.vals <<\EOF
7716s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7717EOF
7718
7719# Break up conftest.vals because some shells have a limit on
7720# the size of here documents, and old seds have small limits too.
7721
7722rm -f conftest.tail
7723while :
7724do
7725 ac_lines=`grep -c . conftest.vals`
7726 # grep -c gives empty output for an empty file on some AIX systems.
7727 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7728 # Write a limited-size here document to conftest.frag.
7729 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7730 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7731 echo 'CEOF
7732 sed -f conftest.frag conftest.in > conftest.out
7733 rm -f conftest.in
7734 mv conftest.out conftest.in
7735' >> $CONFIG_STATUS
7736 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7737 rm -f conftest.vals
7738 mv conftest.tail conftest.vals
7739done
7740rm -f conftest.vals
7741
7742cat >> $CONFIG_STATUS <<\EOF
7743 rm -f conftest.frag conftest.h
7744 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7745 cat conftest.in >> conftest.h
7746 rm -f conftest.in
7747 if cmp -s $ac_file conftest.h 2>/dev/null; then
7748 echo "$ac_file is unchanged"
7749 rm -f conftest.h
7750 else
7751 # Remove last slash and all that follows it. Not all systems have dirname.
7752 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7753 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7754 # The file is in a subdirectory.
7755 test ! -d "$ac_dir" && mkdir "$ac_dir"
7756 fi
7757 rm -f $ac_file
7758 mv conftest.h $ac_file
7759 fi
7760fi; done
7761
7762EOF
7763
7764cat >> $CONFIG_STATUS <<EOF
7765ac_sources="$files"
7766ac_dests="$links"
7767EOF
7768
7769cat >> $CONFIG_STATUS <<\EOF
7770srcdir=$ac_given_srcdir
7771while test -n "$ac_sources"; do
7772 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7773 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7774
7775 echo "linking $srcdir/$ac_source to $ac_dest"
7776
7777 if test ! -r $srcdir/$ac_source; then
7778 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7779 fi
7780 rm -f $ac_dest
7781
7782 # Make relative symlinks.
7783 # Remove last slash and all that follows it. Not all systems have dirname.
7784 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7785 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7786 # The dest file is in a subdirectory.
7787 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7788 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7789 # A "../" for each directory in $ac_dest_dir_suffix.
7790 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7791 else
7792 ac_dest_dir_suffix= ac_dots=
7793 fi
7794
7795 case "$srcdir" in
7796 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7797 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7798 esac
7799
7800 # Make a symlink if possible; otherwise try a hard link.
7801 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7802 ln $srcdir/$ac_source $ac_dest; then :
7803 else
7804 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7805 fi
7806done
7807EOF
7808cat >> $CONFIG_STATUS <<EOF
7809
7810gdb_host_cpu=$gdb_host_cpu
7811gdb_target_cpu=$gdb_target_cpu
7812nativefile=$nativefile
7813
7814EOF
7815cat >> $CONFIG_STATUS <<\EOF
7816
7817if test "${nativefile}" = ""; then
7818sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
7819 < Makefile > Makefile.tem
7820mv -f Makefile.tem Makefile
7821fi
7822
7823sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
7824/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
7825/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
7826mv -f Makefile.tmp Makefile
7827
2acceee2 7828
c906108c
SS
7829case x$CONFIG_HEADERS in
7830xconfig.h:config.in)
7831echo > stamp-h ;;
7832esac
7833
7834exit 0
7835EOF
7836chmod +x $CONFIG_STATUS
7837rm -fr confdefs* $ac_clean_files
7838test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7839
7840if test "$no_recursion" != yes; then
7841
7842 # Remove --cache-file and --srcdir arguments so they do not pile up.
7843 ac_sub_configure_args=
7844 ac_prev=
7845 for ac_arg in $ac_configure_args; do
7846 if test -n "$ac_prev"; then
7847 ac_prev=
7848 continue
7849 fi
7850 case "$ac_arg" in
7851 -cache-file | --cache-file | --cache-fil | --cache-fi \
7852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7853 ac_prev=cache_file ;;
7854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7856 ;;
7857 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7858 ac_prev=srcdir ;;
7859 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7860 ;;
7861 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7862 esac
7863 done
7864
7865 for ac_config_dir in $configdirs; do
7866
7867 # Do not complain, so a configure script can configure whichever
7868 # parts of a large source tree are present.
7869 if test ! -d $srcdir/$ac_config_dir; then
7870 continue
7871 fi
7872
7873 echo configuring in $ac_config_dir
7874
7875 case "$srcdir" in
7876 .) ;;
7877 *)
7878 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7879 else
7880 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7881 fi
7882 ;;
7883 esac
7884
7885 ac_popdir=`pwd`
7886 cd $ac_config_dir
7887
7888 # A "../" for each directory in /$ac_config_dir.
7889 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7890
7891 case "$srcdir" in
7892 .) # No --srcdir option. We are building in place.
7893 ac_sub_srcdir=$srcdir ;;
7894 /*) # Absolute path.
7895 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7896 *) # Relative path.
7897 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7898 esac
7899
7900 # Check for guested configure; otherwise get Cygnus style configure.
7901 if test -f $ac_sub_srcdir/configure; then
7902 ac_sub_configure=$ac_sub_srcdir/configure
7903 elif test -f $ac_sub_srcdir/configure.in; then
7904 ac_sub_configure=$ac_configure
7905 else
7906 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7907 ac_sub_configure=
7908 fi
7909
7910 # The recursion is here.
7911 if test -n "$ac_sub_configure"; then
7912
7913 # Make the cache file name correct relative to the subdirectory.
7914 case "$cache_file" in
7915 /*) ac_sub_cache_file=$cache_file ;;
7916 *) # Relative path.
7917 ac_sub_cache_file="$ac_dots$cache_file" ;;
7918 esac
7919 case "$ac_given_INSTALL" in
7920 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7921 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7922 esac
7923
7924 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7925 # The eval makes quoting arguments work.
7926 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7927 then :
7928 else
7929 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7930 fi
7931 fi
7932
7933 cd $ac_popdir
7934 done
7935fi
7936
7937
7938exit 0
This page took 0.361052 seconds and 4 git commands to generate.