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