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