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