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