Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
f7b8c9ce | 4 | # Generated automatically using autoconf version 2.12 |
bc859e63 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
5436fc65 C |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --enable-netrom " | |
2476848a MH |
16 | ac_help="$ac_help |
17 | --enable-ide Enable IDE support" | |
5436fc65 C |
18 | ac_help="$ac_help |
19 | --enable-gdbtk " | |
20 | ac_help="$ac_help | |
047465fd | 21 | --with-tclconfig directory containing tcl configuration (tclConfig.sh)" |
4e327047 | 22 | ac_help="$ac_help |
047465fd | 23 | --with-tkconfig directory containing tk configuration (tkConfig.sh)" |
4e327047 | 24 | ac_help="$ac_help |
047465fd | 25 | --with-tclinclude directory where tcl private headers are" |
4e327047 | 26 | ac_help="$ac_help |
047465fd | 27 | --with-tkinclude directory where tk private headers are" |
1d5eb137 FF |
28 | ac_help="$ac_help |
29 | --enable-shared use shared libraries" | |
5436fc65 C |
30 | |
31 | # Initialize some variables set by options. | |
32 | # The variables have the same names as the options, with | |
33 | # dashes changed to underlines. | |
34 | build=NONE | |
35 | cache_file=./config.cache | |
36 | exec_prefix=NONE | |
37 | host=NONE | |
38 | no_create= | |
39 | nonopt=NONE | |
40 | no_recursion= | |
41 | prefix=NONE | |
42 | program_prefix=NONE | |
43 | program_suffix=NONE | |
44 | program_transform_name=s,x,x, | |
45 | silent= | |
46 | site= | |
47 | srcdir= | |
48 | target=NONE | |
49 | verbose= | |
50 | x_includes=NONE | |
51 | x_libraries=NONE | |
1a7b4b7c DE |
52 | bindir='${exec_prefix}/bin' |
53 | sbindir='${exec_prefix}/sbin' | |
54 | libexecdir='${exec_prefix}/libexec' | |
55 | datadir='${prefix}/share' | |
56 | sysconfdir='${prefix}/etc' | |
57 | sharedstatedir='${prefix}/com' | |
58 | localstatedir='${prefix}/var' | |
59 | libdir='${exec_prefix}/lib' | |
60 | includedir='${prefix}/include' | |
61 | oldincludedir='/usr/include' | |
62 | infodir='${prefix}/info' | |
63 | mandir='${prefix}/man' | |
5436fc65 C |
64 | |
65 | # Initialize some other variables. | |
66 | subdirs= | |
1a7b4b7c | 67 | MFLAGS= MAKEFLAGS= |
bfde4a67 SG |
68 | # Maximum number of lines to put in a shell here document. |
69 | ac_max_here_lines=12 | |
5436fc65 C |
70 | |
71 | ac_prev= | |
72 | for ac_option | |
73 | do | |
74 | ||
75 | # If the previous option needs an argument, assign it. | |
76 | if test -n "$ac_prev"; then | |
77 | eval "$ac_prev=\$ac_option" | |
78 | ac_prev= | |
79 | continue | |
80 | fi | |
81 | ||
82 | case "$ac_option" in | |
83 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
84 | *) ac_optarg= ;; | |
85 | esac | |
86 | ||
87 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
88 | ||
89 | case "$ac_option" in | |
90 | ||
1a7b4b7c DE |
91 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
92 | ac_prev=bindir ;; | |
93 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
94 | bindir="$ac_optarg" ;; | |
95 | ||
96 | -build | --build | --buil | --bui | --bu) | |
5436fc65 | 97 | ac_prev=build ;; |
1a7b4b7c | 98 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
5436fc65 C |
99 | build="$ac_optarg" ;; |
100 | ||
101 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
102 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
103 | ac_prev=cache_file ;; | |
104 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
105 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
106 | cache_file="$ac_optarg" ;; | |
107 | ||
1a7b4b7c DE |
108 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
109 | ac_prev=datadir ;; | |
110 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
111 | | --da=*) | |
112 | datadir="$ac_optarg" ;; | |
113 | ||
5436fc65 C |
114 | -disable-* | --disable-*) |
115 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
116 | # Reject names that are not valid shell variable names. | |
117 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
118 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
119 | fi | |
120 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
121 | eval "enable_${ac_feature}=no" ;; | |
122 | ||
123 | -enable-* | --enable-*) | |
124 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
125 | # Reject names that are not valid shell variable names. | |
126 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
127 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
128 | fi | |
129 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
130 | case "$ac_option" in | |
131 | *=*) ;; | |
132 | *) ac_optarg=yes ;; | |
133 | esac | |
134 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
135 | ||
136 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
137 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
138 | | --exec | --exe | --ex) | |
139 | ac_prev=exec_prefix ;; | |
140 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
141 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
142 | | --exec=* | --exe=* | --ex=*) | |
143 | exec_prefix="$ac_optarg" ;; | |
144 | ||
145 | -gas | --gas | --ga | --g) | |
146 | # Obsolete; use --with-gas. | |
147 | with_gas=yes ;; | |
148 | ||
149 | -help | --help | --hel | --he) | |
150 | # Omit some internal or obsolete options to make the list less imposing. | |
151 | # This message is too long to be a string in the A/UX 3.1 sh. | |
152 | cat << EOF | |
153 | Usage: configure [options] [host] | |
154 | Options: [defaults in brackets after descriptions] | |
155 | Configuration: | |
156 | --cache-file=FILE cache test results in FILE | |
157 | --help print this message | |
158 | --no-create do not create output files | |
159 | --quiet, --silent do not print \`checking...' messages | |
160 | --version print the version of autoconf that created configure | |
161 | Directory and file names: | |
162 | --prefix=PREFIX install architecture-independent files in PREFIX | |
163 | [$ac_default_prefix] | |
1a7b4b7c | 164 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5436fc65 | 165 | [same as prefix] |
1a7b4b7c DE |
166 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
167 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
168 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
169 | --datadir=DIR read-only architecture-independent data in DIR | |
170 | [PREFIX/share] | |
171 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
172 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
173 | [PREFIX/com] | |
174 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
175 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
176 | --includedir=DIR C header files in DIR [PREFIX/include] | |
177 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
178 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
179 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
5436fc65 C |
180 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
181 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
182 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1a7b4b7c DE |
183 | --program-transform-name=PROGRAM |
184 | run sed PROGRAM on installed program names | |
185 | EOF | |
186 | cat << EOF | |
5436fc65 C |
187 | Host type: |
188 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
189 | --host=HOST configure for HOST [guessed] | |
190 | --target=TARGET configure for TARGET [TARGET=HOST] | |
191 | Features and packages: | |
192 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
193 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
194 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
195 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
196 | --x-includes=DIR X include files are in DIR | |
197 | --x-libraries=DIR X library files are in DIR | |
5436fc65 | 198 | EOF |
1a7b4b7c DE |
199 | if test -n "$ac_help"; then |
200 | echo "--enable and --with options recognized:$ac_help" | |
201 | fi | |
5436fc65 C |
202 | exit 0 ;; |
203 | ||
204 | -host | --host | --hos | --ho) | |
205 | ac_prev=host ;; | |
206 | -host=* | --host=* | --hos=* | --ho=*) | |
207 | host="$ac_optarg" ;; | |
208 | ||
1a7b4b7c DE |
209 | -includedir | --includedir | --includedi | --included | --include \ |
210 | | --includ | --inclu | --incl | --inc) | |
211 | ac_prev=includedir ;; | |
212 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
213 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
214 | includedir="$ac_optarg" ;; | |
215 | ||
216 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
217 | ac_prev=infodir ;; | |
218 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
219 | infodir="$ac_optarg" ;; | |
220 | ||
221 | -libdir | --libdir | --libdi | --libd) | |
222 | ac_prev=libdir ;; | |
223 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
224 | libdir="$ac_optarg" ;; | |
225 | ||
226 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
227 | | --libexe | --libex | --libe) | |
228 | ac_prev=libexecdir ;; | |
229 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
230 | | --libexe=* | --libex=* | --libe=*) | |
231 | libexecdir="$ac_optarg" ;; | |
232 | ||
233 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
234 | | --localstate | --localstat | --localsta | --localst \ | |
235 | | --locals | --local | --loca | --loc | --lo) | |
236 | ac_prev=localstatedir ;; | |
237 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
238 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
239 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
240 | localstatedir="$ac_optarg" ;; | |
241 | ||
242 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
243 | ac_prev=mandir ;; | |
244 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
245 | mandir="$ac_optarg" ;; | |
246 | ||
5436fc65 C |
247 | -nfp | --nfp | --nf) |
248 | # Obsolete; use --without-fp. | |
249 | with_fp=no ;; | |
250 | ||
251 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
252 | | --no-cr | --no-c) | |
253 | no_create=yes ;; | |
254 | ||
255 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
256 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
257 | no_recursion=yes ;; | |
258 | ||
1a7b4b7c DE |
259 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
260 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
261 | | --oldin | --oldi | --old | --ol | --o) | |
262 | ac_prev=oldincludedir ;; | |
263 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
264 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
265 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
266 | oldincludedir="$ac_optarg" ;; | |
267 | ||
5436fc65 C |
268 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
269 | ac_prev=prefix ;; | |
270 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
271 | prefix="$ac_optarg" ;; | |
272 | ||
273 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
274 | | --program-pre | --program-pr | --program-p) | |
275 | ac_prev=program_prefix ;; | |
276 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
277 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
278 | program_prefix="$ac_optarg" ;; | |
279 | ||
280 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
281 | | --program-suf | --program-su | --program-s) | |
282 | ac_prev=program_suffix ;; | |
283 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
284 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
285 | program_suffix="$ac_optarg" ;; | |
286 | ||
287 | -program-transform-name | --program-transform-name \ | |
288 | | --program-transform-nam | --program-transform-na \ | |
289 | | --program-transform-n | --program-transform- \ | |
290 | | --program-transform | --program-transfor \ | |
291 | | --program-transfo | --program-transf \ | |
292 | | --program-trans | --program-tran \ | |
293 | | --progr-tra | --program-tr | --program-t) | |
294 | ac_prev=program_transform_name ;; | |
295 | -program-transform-name=* | --program-transform-name=* \ | |
296 | | --program-transform-nam=* | --program-transform-na=* \ | |
297 | | --program-transform-n=* | --program-transform-=* \ | |
298 | | --program-transform=* | --program-transfor=* \ | |
299 | | --program-transfo=* | --program-transf=* \ | |
300 | | --program-trans=* | --program-tran=* \ | |
301 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
302 | program_transform_name="$ac_optarg" ;; | |
303 | ||
304 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
305 | | -silent | --silent | --silen | --sile | --sil) | |
306 | silent=yes ;; | |
307 | ||
1a7b4b7c DE |
308 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
309 | ac_prev=sbindir ;; | |
310 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
311 | | --sbi=* | --sb=*) | |
312 | sbindir="$ac_optarg" ;; | |
313 | ||
314 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
315 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
316 | | --sharedst | --shareds | --shared | --share | --shar \ | |
317 | | --sha | --sh) | |
318 | ac_prev=sharedstatedir ;; | |
319 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
320 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
321 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
322 | | --sha=* | --sh=*) | |
323 | sharedstatedir="$ac_optarg" ;; | |
324 | ||
5436fc65 C |
325 | -site | --site | --sit) |
326 | ac_prev=site ;; | |
327 | -site=* | --site=* | --sit=*) | |
328 | site="$ac_optarg" ;; | |
329 | ||
330 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
331 | ac_prev=srcdir ;; | |
332 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
333 | srcdir="$ac_optarg" ;; | |
334 | ||
1a7b4b7c DE |
335 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
336 | | --syscon | --sysco | --sysc | --sys | --sy) | |
337 | ac_prev=sysconfdir ;; | |
338 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
339 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
340 | sysconfdir="$ac_optarg" ;; | |
341 | ||
5436fc65 C |
342 | -target | --target | --targe | --targ | --tar | --ta | --t) |
343 | ac_prev=target ;; | |
344 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
345 | target="$ac_optarg" ;; | |
346 | ||
347 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
348 | verbose=yes ;; | |
349 | ||
350 | -version | --version | --versio | --versi | --vers) | |
f7b8c9ce | 351 | echo "configure generated by autoconf version 2.12" |
5436fc65 C |
352 | exit 0 ;; |
353 | ||
354 | -with-* | --with-*) | |
355 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
356 | # Reject names that are not valid shell variable names. | |
357 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
358 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
359 | fi | |
360 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
361 | case "$ac_option" in | |
362 | *=*) ;; | |
363 | *) ac_optarg=yes ;; | |
364 | esac | |
365 | eval "with_${ac_package}='$ac_optarg'" ;; | |
366 | ||
367 | -without-* | --without-*) | |
368 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
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 | eval "with_${ac_package}=no" ;; | |
375 | ||
376 | --x) | |
377 | # Obsolete; use --with-x. | |
378 | with_x=yes ;; | |
379 | ||
380 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
381 | | --x-incl | --x-inc | --x-in | --x-i) | |
382 | ac_prev=x_includes ;; | |
383 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
384 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
385 | x_includes="$ac_optarg" ;; | |
386 | ||
387 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
388 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
389 | ac_prev=x_libraries ;; | |
390 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
391 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
392 | x_libraries="$ac_optarg" ;; | |
393 | ||
394 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
395 | ;; | |
396 | ||
1a7b4b7c | 397 | *) |
5436fc65 C |
398 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
399 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
400 | fi | |
401 | if test "x$nonopt" != xNONE; then | |
402 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
403 | fi | |
404 | nonopt="$ac_option" | |
405 | ;; | |
406 | ||
407 | esac | |
408 | done | |
409 | ||
410 | if test -n "$ac_prev"; then | |
411 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
412 | fi | |
413 | ||
414 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
415 | ||
416 | # File descriptor usage: | |
417 | # 0 standard input | |
418 | # 1 file creation | |
419 | # 2 errors and warnings | |
420 | # 3 some systems may open it to /dev/tty | |
421 | # 4 used on the Kubota Titan | |
422 | # 6 checking for... messages and results | |
423 | # 5 compiler messages saved in config.log | |
424 | if test "$silent" = yes; then | |
425 | exec 6>/dev/null | |
426 | else | |
427 | exec 6>&1 | |
428 | fi | |
429 | exec 5>./config.log | |
430 | ||
431 | echo "\ | |
432 | This file contains any messages produced by compilers while | |
433 | running configure, to aid debugging if configure makes a mistake. | |
434 | " 1>&5 | |
435 | ||
436 | # Strip out --no-create and --no-recursion so they do not pile up. | |
437 | # Also quote any args containing shell metacharacters. | |
438 | ac_configure_args= | |
439 | for ac_arg | |
440 | do | |
441 | case "$ac_arg" in | |
442 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
443 | | --no-cr | --no-c) ;; | |
444 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
445 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
446 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
447 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
448 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
449 | esac | |
450 | done | |
451 | ||
452 | # NLS nuisances. | |
bfde4a67 SG |
453 | # Only set these to C if already set. These must not be set unconditionally |
454 | # because not all systems understand e.g. LANG=C (notably SCO). | |
455 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
456 | # Non-C LC_CTYPE values break the ctype check. | |
ef6c51d1 | 457 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
bfde4a67 SG |
458 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
459 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
460 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
5436fc65 C |
461 | |
462 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
463 | rm -rf conftest* confdefs.h | |
464 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
465 | echo > confdefs.h | |
466 | ||
467 | # A filename unique to this package, relative to the directory that | |
468 | # configure is in, which we can look for to find out if srcdir is correct. | |
469 | ac_unique_file=main.c | |
470 | ||
471 | # Find the source files, if location was not specified. | |
472 | if test -z "$srcdir"; then | |
473 | ac_srcdir_defaulted=yes | |
474 | # Try the directory containing this script, then its parent. | |
475 | ac_prog=$0 | |
476 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
477 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
478 | srcdir=$ac_confdir | |
479 | if test ! -r $srcdir/$ac_unique_file; then | |
480 | srcdir=.. | |
481 | fi | |
482 | else | |
483 | ac_srcdir_defaulted=no | |
484 | fi | |
485 | if test ! -r $srcdir/$ac_unique_file; then | |
486 | if test "$ac_srcdir_defaulted" = yes; then | |
487 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
488 | else | |
489 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
490 | fi | |
491 | fi | |
492 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
493 | ||
494 | # Prefer explicitly selected file to automatically selected ones. | |
495 | if test -z "$CONFIG_SITE"; then | |
496 | if test "x$prefix" != xNONE; then | |
497 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
498 | else | |
499 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
500 | fi | |
501 | fi | |
502 | for ac_site_file in $CONFIG_SITE; do | |
503 | if test -r "$ac_site_file"; then | |
504 | echo "loading site script $ac_site_file" | |
505 | . "$ac_site_file" | |
506 | fi | |
507 | done | |
508 | ||
509 | if test -r "$cache_file"; then | |
510 | echo "loading cache $cache_file" | |
511 | . $cache_file | |
512 | else | |
513 | echo "creating cache $cache_file" | |
514 | > $cache_file | |
515 | fi | |
516 | ||
517 | ac_ext=c | |
518 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3dedc867 | 519 | ac_cpp='$CPP $CPPFLAGS' |
1a7b4b7c DE |
520 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
521 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
bfde4a67 | 522 | cross_compiling=$ac_cv_prog_cc_cross |
5436fc65 C |
523 | |
524 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
525 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
526 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
527 | ac_n= ac_c=' | |
528 | ' ac_t=' ' | |
529 | else | |
530 | ac_n=-n ac_c= ac_t= | |
531 | fi | |
532 | else | |
533 | ac_n= ac_c='\c' ac_t= | |
534 | fi | |
535 | ||
536 | ||
537 | ||
db210d08 | 538 | |
5436fc65 C |
539 | # Extract the first word of "gcc", so it can be a program name with args. |
540 | set dummy gcc; ac_word=$2 | |
541 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 542 | echo "configure:543: checking for $ac_word" >&5 |
5436fc65 C |
543 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
545 | else | |
546 | if test -n "$CC"; then | |
547 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
548 | else | |
549 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 550 | for ac_dir in $PATH; do |
5436fc65 C |
551 | test -z "$ac_dir" && ac_dir=. |
552 | if test -f $ac_dir/$ac_word; then | |
553 | ac_cv_prog_CC="gcc" | |
554 | break | |
555 | fi | |
556 | done | |
557 | IFS="$ac_save_ifs" | |
5436fc65 C |
558 | fi |
559 | fi | |
560 | CC="$ac_cv_prog_CC" | |
561 | if test -n "$CC"; then | |
562 | echo "$ac_t""$CC" 1>&6 | |
563 | else | |
564 | echo "$ac_t""no" 1>&6 | |
565 | fi | |
566 | ||
1a7b4b7c DE |
567 | if test -z "$CC"; then |
568 | # Extract the first word of "cc", so it can be a program name with args. | |
569 | set dummy cc; ac_word=$2 | |
570 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 571 | echo "configure:572: checking for $ac_word" >&5 |
1a7b4b7c DE |
572 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
574 | else | |
575 | if test -n "$CC"; then | |
576 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
577 | else | |
578 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
579 | ac_prog_rejected=no | |
580 | for ac_dir in $PATH; do | |
581 | test -z "$ac_dir" && ac_dir=. | |
582 | if test -f $ac_dir/$ac_word; then | |
583 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
584 | ac_prog_rejected=yes | |
585 | continue | |
586 | fi | |
587 | ac_cv_prog_CC="cc" | |
588 | break | |
589 | fi | |
590 | done | |
591 | IFS="$ac_save_ifs" | |
592 | if test $ac_prog_rejected = yes; then | |
593 | # We found a bogon in the path, so make sure we never use it. | |
594 | set dummy $ac_cv_prog_CC | |
595 | shift | |
596 | if test $# -gt 0; then | |
597 | # We chose a different compiler from the bogus one. | |
598 | # However, it has the same basename, so the bogon will be chosen | |
599 | # first if we set CC to just the basename; use the full file name. | |
600 | shift | |
601 | set dummy "$ac_dir/$ac_word" "$@" | |
602 | shift | |
603 | ac_cv_prog_CC="$@" | |
604 | fi | |
605 | fi | |
606 | fi | |
607 | fi | |
608 | CC="$ac_cv_prog_CC" | |
609 | if test -n "$CC"; then | |
610 | echo "$ac_t""$CC" 1>&6 | |
611 | else | |
612 | echo "$ac_t""no" 1>&6 | |
613 | fi | |
614 | ||
615 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
616 | fi | |
5436fc65 | 617 | |
bfde4a67 | 618 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
f7b8c9ce | 619 | echo "configure:620: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
bfde4a67 SG |
620 | |
621 | ac_ext=c | |
622 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
623 | ac_cpp='$CPP $CPPFLAGS' | |
624 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
625 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
626 | cross_compiling=$ac_cv_prog_cc_cross | |
627 | ||
628 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 629 | #line 630 "configure" |
bfde4a67 SG |
630 | #include "confdefs.h" |
631 | main(){return(0);} | |
632 | EOF | |
f7b8c9ce | 633 | if { (eval echo configure:634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
bfde4a67 SG |
634 | ac_cv_prog_cc_works=yes |
635 | # If we can't run a trivial program, we are probably using a cross compiler. | |
636 | if (./conftest; exit) 2>/dev/null; then | |
637 | ac_cv_prog_cc_cross=no | |
638 | else | |
639 | ac_cv_prog_cc_cross=yes | |
640 | fi | |
641 | else | |
642 | echo "configure: failed program was:" >&5 | |
643 | cat conftest.$ac_ext >&5 | |
644 | ac_cv_prog_cc_works=no | |
645 | fi | |
646 | rm -fr conftest* | |
647 | ||
648 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
649 | if test $ac_cv_prog_cc_works = no; then | |
650 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
651 | fi | |
652 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
f7b8c9ce | 653 | echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
bfde4a67 SG |
654 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
655 | cross_compiling=$ac_cv_prog_cc_cross | |
656 | ||
5436fc65 | 657 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
f7b8c9ce | 658 | echo "configure:659: checking whether we are using GNU C" >&5 |
5436fc65 C |
659 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
661 | else | |
662 | cat > conftest.c <<EOF | |
663 | #ifdef __GNUC__ | |
664 | yes; | |
665 | #endif | |
666 | EOF | |
f7b8c9ce | 667 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
5436fc65 C |
668 | ac_cv_prog_gcc=yes |
669 | else | |
670 | ac_cv_prog_gcc=no | |
671 | fi | |
672 | fi | |
1a7b4b7c | 673 | |
5436fc65 | 674 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
bfde4a67 | 675 | |
5436fc65 C |
676 | if test $ac_cv_prog_gcc = yes; then |
677 | GCC=yes | |
bfde4a67 SG |
678 | ac_test_CFLAGS="${CFLAGS+set}" |
679 | ac_save_CFLAGS="$CFLAGS" | |
680 | CFLAGS= | |
681 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
f7b8c9ce | 682 | echo "configure:683: checking whether ${CC-cc} accepts -g" >&5 |
bfde4a67 | 683 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
5436fc65 C |
684 | echo $ac_n "(cached) $ac_c" 1>&6 |
685 | else | |
686 | echo 'void f(){}' > conftest.c | |
687 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
bfde4a67 | 688 | ac_cv_prog_cc_g=yes |
5436fc65 | 689 | else |
bfde4a67 | 690 | ac_cv_prog_cc_g=no |
5436fc65 C |
691 | fi |
692 | rm -f conftest* | |
693 | ||
694 | fi | |
1a7b4b7c | 695 | |
bfde4a67 SG |
696 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
697 | if test "$ac_test_CFLAGS" = set; then | |
698 | CFLAGS="$ac_save_CFLAGS" | |
699 | elif test $ac_cv_prog_cc_g = yes; then | |
700 | CFLAGS="-g -O2" | |
701 | else | |
702 | CFLAGS="-O2" | |
5436fc65 C |
703 | fi |
704 | else | |
705 | GCC= | |
706 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
707 | fi | |
708 | ||
709 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
f7b8c9ce | 710 | echo "configure:711: checking how to run the C preprocessor" >&5 |
5436fc65 C |
711 | # On Suns, sometimes $CPP names a directory. |
712 | if test -n "$CPP" && test -d "$CPP"; then | |
713 | CPP= | |
714 | fi | |
715 | if test -z "$CPP"; then | |
716 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
717 | echo $ac_n "(cached) $ac_c" 1>&6 | |
718 | else | |
719 | # This must be in double quotes, not single quotes, because CPP may get | |
720 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
721 | CPP="${CC-cc} -E" | |
722 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
723 | # not just through cpp. | |
724 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 725 | #line 726 "configure" |
5436fc65 C |
726 | #include "confdefs.h" |
727 | #include <assert.h> | |
728 | Syntax Error | |
729 | EOF | |
1a7b4b7c | 730 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 731 | { (eval echo configure:732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
732 | ac_err=`grep -v '^ *+' conftest.out` |
733 | if test -z "$ac_err"; then | |
734 | : | |
735 | else | |
736 | echo "$ac_err" >&5 | |
bfde4a67 SG |
737 | echo "configure: failed program was:" >&5 |
738 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
739 | rm -rf conftest* |
740 | CPP="${CC-cc} -E -traditional-cpp" | |
741 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 742 | #line 743 "configure" |
5436fc65 C |
743 | #include "confdefs.h" |
744 | #include <assert.h> | |
745 | Syntax Error | |
746 | EOF | |
1a7b4b7c | 747 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 748 | { (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
749 | ac_err=`grep -v '^ *+' conftest.out` |
750 | if test -z "$ac_err"; then | |
751 | : | |
752 | else | |
753 | echo "$ac_err" >&5 | |
bfde4a67 SG |
754 | echo "configure: failed program was:" >&5 |
755 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
756 | rm -rf conftest* |
757 | CPP=/lib/cpp | |
758 | fi | |
759 | rm -f conftest* | |
760 | fi | |
761 | rm -f conftest* | |
762 | ac_cv_prog_CPP="$CPP" | |
763 | fi | |
dedcc91d SC |
764 | CPP="$ac_cv_prog_CPP" |
765 | else | |
766 | ac_cv_prog_CPP="$CPP" | |
5436fc65 | 767 | fi |
5436fc65 C |
768 | echo "$ac_t""$CPP" 1>&6 |
769 | ||
770 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
f7b8c9ce | 771 | echo "configure:772: checking for AIX" >&5 |
5436fc65 | 772 | cat > conftest.$ac_ext <<EOF |
f7b8c9ce | 773 | #line 774 "configure" |
5436fc65 C |
774 | #include "confdefs.h" |
775 | #ifdef _AIX | |
776 | yes | |
777 | #endif | |
778 | ||
779 | EOF | |
780 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
781 | egrep "yes" >/dev/null 2>&1; then | |
782 | rm -rf conftest* | |
783 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
784 | #define _ALL_SOURCE 1 | |
785 | EOF | |
786 | ||
787 | else | |
788 | rm -rf conftest* | |
789 | echo "$ac_t""no" 1>&6 | |
790 | fi | |
791 | rm -f conftest* | |
792 | ||
793 | ||
bfde4a67 | 794 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
5436fc65 | 795 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
f7b8c9ce | 796 | echo "configure:797: checking for minix/config.h" >&5 |
5436fc65 C |
797 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
799 | else | |
800 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 801 | #line 802 "configure" |
5436fc65 C |
802 | #include "confdefs.h" |
803 | #include <minix/config.h> | |
804 | EOF | |
1a7b4b7c | 805 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 806 | { (eval echo configure:807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
807 | ac_err=`grep -v '^ *+' conftest.out` |
808 | if test -z "$ac_err"; then | |
809 | rm -rf conftest* | |
810 | eval "ac_cv_header_$ac_safe=yes" | |
811 | else | |
812 | echo "$ac_err" >&5 | |
bfde4a67 SG |
813 | echo "configure: failed program was:" >&5 |
814 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
815 | rm -rf conftest* |
816 | eval "ac_cv_header_$ac_safe=no" | |
817 | fi | |
818 | rm -f conftest* | |
819 | fi | |
820 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
821 | echo "$ac_t""yes" 1>&6 | |
822 | MINIX=yes | |
823 | else | |
824 | echo "$ac_t""no" 1>&6 | |
825 | MINIX= | |
826 | fi | |
827 | ||
828 | if test "$MINIX" = yes; then | |
829 | cat >> confdefs.h <<\EOF | |
830 | #define _POSIX_SOURCE 1 | |
831 | EOF | |
832 | ||
833 | cat >> confdefs.h <<\EOF | |
834 | #define _POSIX_1_SOURCE 2 | |
835 | EOF | |
836 | ||
837 | cat >> confdefs.h <<\EOF | |
838 | #define _MINIX 1 | |
839 | EOF | |
840 | ||
841 | fi | |
842 | ||
843 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
f7b8c9ce | 844 | echo "configure:845: checking for POSIXized ISC" >&5 |
5436fc65 C |
845 | if test -d /etc/conf/kconfig.d && |
846 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
847 | then | |
848 | echo "$ac_t""yes" 1>&6 | |
849 | ISC=yes # If later tests want to check for ISC. | |
850 | cat >> confdefs.h <<\EOF | |
851 | #define _POSIX_SOURCE 1 | |
852 | EOF | |
853 | ||
854 | if test "$GCC" = yes; then | |
855 | CC="$CC -posix" | |
856 | else | |
857 | CC="$CC -Xp" | |
858 | fi | |
859 | else | |
860 | echo "$ac_t""no" 1>&6 | |
861 | ISC= | |
862 | fi | |
863 | ||
864 | ||
35ce4f08 GN |
865 | DLLTOOL=${DLLTOOL-dlltool} |
866 | ||
867 | ||
5436fc65 | 868 | ac_aux_dir= |
f02156cf | 869 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do |
5436fc65 C |
870 | if test -f $ac_dir/install-sh; then |
871 | ac_aux_dir=$ac_dir | |
872 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
873 | break | |
874 | elif test -f $ac_dir/install.sh; then | |
875 | ac_aux_dir=$ac_dir | |
876 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
877 | break | |
878 | fi | |
879 | done | |
880 | if test -z "$ac_aux_dir"; then | |
f02156cf | 881 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } |
5436fc65 C |
882 | fi |
883 | ac_config_guess=$ac_aux_dir/config.guess | |
884 | ac_config_sub=$ac_aux_dir/config.sub | |
885 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
886 | ||
0579b53d GN |
887 | |
888 | # Do some error checking and defaulting for the host and target type. | |
889 | # The inputs are: | |
890 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
891 | # | |
892 | # The rules are: | |
893 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
894 | # same time. | |
895 | # 2. Host defaults to nonopt. | |
896 | # 3. If nonopt is not specified, then host defaults to the current host, | |
897 | # as determined by config.guess. | |
898 | # 4. Target and build default to nonopt. | |
899 | # 5. If nonopt is not specified, then target and build default to host. | |
900 | ||
901 | # The aliases save the names the user supplied, while $host etc. | |
902 | # will get canonicalized. | |
903 | case $host---$target---$nonopt in | |
904 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
905 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
906 | esac | |
907 | ||
908 | ||
909 | # Make sure we can run config.sub. | |
f7b8c9ce | 910 | if $ac_config_sub sun4 >/dev/null 2>&1; then : |
0579b53d GN |
911 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
912 | fi | |
913 | ||
914 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
f7b8c9ce | 915 | echo "configure:916: checking host system type" >&5 |
0579b53d GN |
916 | |
917 | host_alias=$host | |
918 | case "$host_alias" in | |
919 | NONE) | |
920 | case $nonopt in | |
921 | NONE) | |
f7b8c9ce | 922 | if host_alias=`$ac_config_guess`; then : |
0579b53d GN |
923 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
924 | fi ;; | |
925 | *) host_alias=$nonopt ;; | |
926 | esac ;; | |
927 | esac | |
928 | ||
f7b8c9ce | 929 | host=`$ac_config_sub $host_alias` |
bfde4a67 SG |
930 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
931 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
932 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
933 | echo "$ac_t""$host" 1>&6 |
934 | ||
935 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
f7b8c9ce | 936 | echo "configure:937: checking target system type" >&5 |
0579b53d GN |
937 | |
938 | target_alias=$target | |
939 | case "$target_alias" in | |
940 | NONE) | |
941 | case $nonopt in | |
942 | NONE) target_alias=$host_alias ;; | |
943 | *) target_alias=$nonopt ;; | |
944 | esac ;; | |
945 | esac | |
946 | ||
f7b8c9ce | 947 | target=`$ac_config_sub $target_alias` |
bfde4a67 SG |
948 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
949 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
950 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
951 | echo "$ac_t""$target" 1>&6 |
952 | ||
953 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
f7b8c9ce | 954 | echo "configure:955: checking build system type" >&5 |
0579b53d GN |
955 | |
956 | build_alias=$build | |
957 | case "$build_alias" in | |
958 | NONE) | |
959 | case $nonopt in | |
960 | NONE) build_alias=$host_alias ;; | |
961 | *) build_alias=$nonopt ;; | |
962 | esac ;; | |
963 | esac | |
964 | ||
f7b8c9ce | 965 | build=`$ac_config_sub $build_alias` |
bfde4a67 SG |
966 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
967 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
968 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
969 | echo "$ac_t""$build" 1>&6 |
970 | ||
971 | test "$host_alias" != "$target_alias" && | |
972 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
973 | NONENONEs,x,x, && | |
974 | program_prefix=${target_alias}- | |
975 | ||
976 | ||
bfde4a67 SG |
977 | |
978 | CONFIG_OBS= | |
979 | ||
980 | configdirs="doc testsuite" | |
981 | ||
982 | ||
983 | . ${srcdir}/configure.host | |
984 | ||
985 | . ${srcdir}/configure.tgt | |
986 | ||
987 | ||
5436fc65 C |
988 | # Find a good install program. We prefer a C program (faster), |
989 | # so one script is as good as another. But avoid the broken or | |
990 | # incompatible versions: | |
991 | # SysV /etc/install, /usr/sbin/install | |
992 | # SunOS /usr/etc/install | |
993 | # IRIX /sbin/install | |
994 | # AIX /bin/install | |
995 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
996 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
997 | # ./install, which can be erroneously created by make from ./install.sh. | |
998 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
f7b8c9ce | 999 | echo "configure:1000: checking for a BSD compatible install" >&5 |
5436fc65 C |
1000 | if test -z "$INSTALL"; then |
1001 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1002 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1003 | else | |
bfde4a67 | 1004 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
5436fc65 C |
1005 | for ac_dir in $PATH; do |
1006 | # Account for people who put trailing slashes in PATH elements. | |
1007 | case "$ac_dir/" in | |
1008 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1009 | *) | |
1010 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
f7b8c9ce | 1011 | for ac_prog in ginstall installbsd scoinst install; do |
5436fc65 C |
1012 | if test -f $ac_dir/$ac_prog; then |
1013 | if test $ac_prog = install && | |
1014 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1015 | # AIX install. It has an incompatible calling convention. | |
f7b8c9ce | 1016 | # OSF/1 installbsd also uses dspmsg, but is usable. |
5436fc65 C |
1017 | : |
1018 | else | |
1019 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1020 | break 2 | |
1021 | fi | |
1022 | fi | |
1023 | done | |
1024 | ;; | |
1025 | esac | |
1026 | done | |
bfde4a67 | 1027 | IFS="$ac_save_IFS" |
1a7b4b7c | 1028 | |
5436fc65 | 1029 | fi |
1a7b4b7c DE |
1030 | if test "${ac_cv_path_install+set}" = set; then |
1031 | INSTALL="$ac_cv_path_install" | |
1032 | else | |
1033 | # As a last resort, use the slow shell script. We don't cache a | |
1034 | # path for INSTALL within a source directory, because that will | |
1035 | # break other packages using the cache if that directory is | |
1036 | # removed, or if the path is relative. | |
1037 | INSTALL="$ac_install_sh" | |
1038 | fi | |
5436fc65 C |
1039 | fi |
1040 | echo "$ac_t""$INSTALL" 1>&6 | |
1041 | ||
1042 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1043 | # It thinks the first close brace ends the variable substitution. | |
1044 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1045 | ||
1046 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1047 | ||
d8efbc66 FF |
1048 | if test $host != $build; then |
1049 | ac_tool_prefix=${host_alias}- | |
1050 | else | |
1051 | ac_tool_prefix= | |
1052 | fi | |
1053 | ||
1054 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1055 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1056 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 1057 | echo "configure:1058: checking for $ac_word" >&5 |
d8efbc66 FF |
1058 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1059 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1060 | else | |
1061 | if test -n "$AR"; then | |
1062 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1063 | else | |
1064 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1065 | for ac_dir in $PATH; do | |
1066 | test -z "$ac_dir" && ac_dir=. | |
1067 | if test -f $ac_dir/$ac_word; then | |
1068 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1069 | break | |
1070 | fi | |
1071 | done | |
1072 | IFS="$ac_save_ifs" | |
1073 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1074 | fi | |
1075 | fi | |
1076 | AR="$ac_cv_prog_AR" | |
1077 | if test -n "$AR"; then | |
1078 | echo "$ac_t""$AR" 1>&6 | |
1079 | else | |
1080 | echo "$ac_t""no" 1>&6 | |
1081 | fi | |
1082 | ||
1083 | ||
1084 | ||
1085 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1086 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1087 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 1088 | echo "configure:1089: checking for $ac_word" >&5 |
d8efbc66 FF |
1089 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1091 | else | |
1092 | if test -n "$RANLIB"; then | |
1093 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1094 | else | |
1095 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1096 | for ac_dir in $PATH; do | |
1097 | test -z "$ac_dir" && ac_dir=. | |
1098 | if test -f $ac_dir/$ac_word; then | |
1099 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1100 | break | |
1101 | fi | |
1102 | done | |
1103 | IFS="$ac_save_ifs" | |
1104 | fi | |
1105 | fi | |
1106 | RANLIB="$ac_cv_prog_RANLIB" | |
1107 | if test -n "$RANLIB"; then | |
1108 | echo "$ac_t""$RANLIB" 1>&6 | |
1109 | else | |
1110 | echo "$ac_t""no" 1>&6 | |
1111 | fi | |
1112 | ||
1113 | ||
1114 | if test -z "$ac_cv_prog_RANLIB"; then | |
1115 | if test -n "$ac_tool_prefix"; then | |
1116 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
1117 | set dummy ranlib; ac_word=$2 |
1118 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 1119 | echo "configure:1120: checking for $ac_word" >&5 |
5436fc65 C |
1120 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1122 | else | |
1123 | if test -n "$RANLIB"; then | |
1124 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1125 | else | |
1126 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 1127 | for ac_dir in $PATH; do |
5436fc65 C |
1128 | test -z "$ac_dir" && ac_dir=. |
1129 | if test -f $ac_dir/$ac_word; then | |
1130 | ac_cv_prog_RANLIB="ranlib" | |
1131 | break | |
1132 | fi | |
1133 | done | |
1134 | IFS="$ac_save_ifs" | |
1135 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1136 | fi | |
1137 | fi | |
1138 | RANLIB="$ac_cv_prog_RANLIB" | |
1139 | if test -n "$RANLIB"; then | |
1140 | echo "$ac_t""$RANLIB" 1>&6 | |
1141 | else | |
1142 | echo "$ac_t""no" 1>&6 | |
1143 | fi | |
1144 | ||
d8efbc66 FF |
1145 | else |
1146 | RANLIB=":" | |
1147 | fi | |
1148 | fi | |
1149 | ||
204c8825 FF |
1150 | for ac_prog in 'bison -y' byacc |
1151 | do | |
1152 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1153 | set dummy $ac_prog; ac_word=$2 | |
1154 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 1155 | echo "configure:1156: checking for $ac_word" >&5 |
204c8825 FF |
1156 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
1157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1158 | else | |
1159 | if test -n "$YACC"; then | |
1160 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
1161 | else | |
1162 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1163 | for ac_dir in $PATH; do | |
1164 | test -z "$ac_dir" && ac_dir=. | |
1165 | if test -f $ac_dir/$ac_word; then | |
1166 | ac_cv_prog_YACC="$ac_prog" | |
1167 | break | |
1168 | fi | |
1169 | done | |
1170 | IFS="$ac_save_ifs" | |
1171 | fi | |
1172 | fi | |
1173 | YACC="$ac_cv_prog_YACC" | |
1174 | if test -n "$YACC"; then | |
1175 | echo "$ac_t""$YACC" 1>&6 | |
1176 | else | |
1177 | echo "$ac_t""no" 1>&6 | |
1178 | fi | |
1179 | ||
1180 | test -n "$YACC" && break | |
1181 | done | |
1182 | test -n "$YACC" || YACC="yacc" | |
1183 | ||
d8efbc66 FF |
1184 | for ac_prog in mawk gawk nawk awk |
1185 | do | |
1186 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1187 | set dummy $ac_prog; ac_word=$2 | |
1188 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f7b8c9ce | 1189 | echo "configure:1190: checking for $ac_word" >&5 |
d8efbc66 FF |
1190 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
1191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1192 | else | |
1193 | if test -n "$AWK"; then | |
1194 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
1195 | else | |
1196 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1197 | for ac_dir in $PATH; do | |
1198 | test -z "$ac_dir" && ac_dir=. | |
1199 | if test -f $ac_dir/$ac_word; then | |
1200 | ac_cv_prog_AWK="$ac_prog" | |
1201 | break | |
1202 | fi | |
1203 | done | |
1204 | IFS="$ac_save_ifs" | |
1205 | fi | |
1206 | fi | |
1207 | AWK="$ac_cv_prog_AWK" | |
1208 | if test -n "$AWK"; then | |
1209 | echo "$ac_t""$AWK" 1>&6 | |
1210 | else | |
1211 | echo "$ac_t""no" 1>&6 | |
1212 | fi | |
1213 | ||
1214 | test -n "$AWK" && break | |
1215 | done | |
1216 | ||
5436fc65 | 1217 | |
5436fc65 C |
1218 | if test "$program_transform_name" = s,x,x,; then |
1219 | program_transform_name= | |
1220 | else | |
1a7b4b7c DE |
1221 | # Double any \ or $. echo might interpret backslashes. |
1222 | cat <<\EOF_SED > conftestsed | |
1223 | s,\\,\\\\,g; s,\$,$$,g | |
1224 | EOF_SED | |
5436fc65 C |
1225 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
1226 | rm -f conftestsed | |
1227 | fi | |
1228 | test "$program_prefix" != NONE && | |
1229 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1230 | # Use a double $ so make ignores it. | |
1231 | test "$program_suffix" != NONE && | |
1232 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1233 | ||
1234 | # sed with no file args requires a program. | |
1235 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1236 | ||
1237 | ||
c14cabba | 1238 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
f7b8c9ce | 1239 | echo "configure:1240: checking return type of signal handlers" >&5 |
c14cabba AC |
1240 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
1241 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1242 | else | |
1243 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1244 | #line 1245 "configure" |
c14cabba AC |
1245 | #include "confdefs.h" |
1246 | #include <sys/types.h> | |
1247 | #include <signal.h> | |
1248 | #ifdef signal | |
1249 | #undef signal | |
1250 | #endif | |
1251 | #ifdef __cplusplus | |
1252 | extern "C" void (*signal (int, void (*)(int)))(int); | |
1253 | #else | |
1254 | void (*signal ()) (); | |
1255 | #endif | |
1256 | ||
1257 | int main() { | |
1258 | int i; | |
1259 | ; return 0; } | |
1260 | EOF | |
f7b8c9ce | 1261 | if { (eval echo configure:1262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c14cabba AC |
1262 | rm -rf conftest* |
1263 | ac_cv_type_signal=void | |
1264 | else | |
1265 | echo "configure: failed program was:" >&5 | |
1266 | cat conftest.$ac_ext >&5 | |
1267 | rm -rf conftest* | |
1268 | ac_cv_type_signal=int | |
1269 | fi | |
1270 | rm -f conftest* | |
1271 | fi | |
1272 | ||
1273 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
1274 | cat >> confdefs.h <<EOF | |
1275 | #define RETSIGTYPE $ac_cv_type_signal | |
1276 | EOF | |
1277 | ||
1278 | ||
1279 | ||
2b576293 | 1280 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
f7b8c9ce | 1281 | echo "configure:1282: checking for ANSI C header files" >&5 |
2b576293 C |
1282 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1283 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1284 | else | |
1285 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1286 | #line 1287 "configure" |
2b576293 C |
1287 | #include "confdefs.h" |
1288 | #include <stdlib.h> | |
1289 | #include <stdarg.h> | |
1290 | #include <string.h> | |
1291 | #include <float.h> | |
1292 | EOF | |
1a7b4b7c | 1293 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 1294 | { (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2b576293 C |
1295 | ac_err=`grep -v '^ *+' conftest.out` |
1296 | if test -z "$ac_err"; then | |
1297 | rm -rf conftest* | |
1298 | ac_cv_header_stdc=yes | |
1299 | else | |
1300 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1301 | echo "configure: failed program was:" >&5 |
1302 | cat conftest.$ac_ext >&5 | |
2b576293 C |
1303 | rm -rf conftest* |
1304 | ac_cv_header_stdc=no | |
1305 | fi | |
1306 | rm -f conftest* | |
1307 | ||
1308 | if test $ac_cv_header_stdc = yes; then | |
1309 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1310 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1311 | #line 1312 "configure" |
2b576293 C |
1312 | #include "confdefs.h" |
1313 | #include <string.h> | |
1314 | EOF | |
1315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1316 | egrep "memchr" >/dev/null 2>&1; then | |
1317 | : | |
1318 | else | |
1319 | rm -rf conftest* | |
1320 | ac_cv_header_stdc=no | |
1321 | fi | |
1322 | rm -f conftest* | |
1323 | ||
1324 | fi | |
1325 | ||
1326 | if test $ac_cv_header_stdc = yes; then | |
1327 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1328 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1329 | #line 1330 "configure" |
2b576293 C |
1330 | #include "confdefs.h" |
1331 | #include <stdlib.h> | |
1332 | EOF | |
1333 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1334 | egrep "free" >/dev/null 2>&1; then | |
1335 | : | |
1336 | else | |
1337 | rm -rf conftest* | |
1338 | ac_cv_header_stdc=no | |
1339 | fi | |
1340 | rm -f conftest* | |
1341 | ||
1342 | fi | |
1343 | ||
1344 | if test $ac_cv_header_stdc = yes; then | |
1345 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1346 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 1347 | : |
2b576293 | 1348 | else |
bfde4a67 | 1349 | cat > conftest.$ac_ext <<EOF |
f7b8c9ce | 1350 | #line 1351 "configure" |
2b576293 C |
1351 | #include "confdefs.h" |
1352 | #include <ctype.h> | |
1353 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1354 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1355 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1356 | int main () { int i; for (i = 0; i < 256; i++) | |
1357 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1358 | exit (0); } | |
1359 | ||
1360 | EOF | |
f7b8c9ce | 1361 | if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1362 | then |
2b576293 C |
1363 | : |
1364 | else | |
bfde4a67 SG |
1365 | echo "configure: failed program was:" >&5 |
1366 | cat conftest.$ac_ext >&5 | |
1367 | rm -fr conftest* | |
2b576293 C |
1368 | ac_cv_header_stdc=no |
1369 | fi | |
ef6c51d1 | 1370 | rm -fr conftest* |
bfde4a67 SG |
1371 | fi |
1372 | ||
2b576293 C |
1373 | fi |
1374 | fi | |
1a7b4b7c | 1375 | |
2b576293 C |
1376 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
1377 | if test $ac_cv_header_stdc = yes; then | |
1378 | cat >> confdefs.h <<\EOF | |
1379 | #define STDC_HEADERS 1 | |
1380 | EOF | |
1381 | ||
1382 | fi | |
1383 | ||
0db3fe94 | 1384 | 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 |
1a494973 | 1385 | do |
bfde4a67 | 1386 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 1387 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
f7b8c9ce | 1388 | echo "configure:1389: checking for $ac_hdr" >&5 |
1a494973 C |
1389 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1391 | else | |
1392 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1393 | #line 1394 "configure" |
1a494973 C |
1394 | #include "confdefs.h" |
1395 | #include <$ac_hdr> | |
1396 | EOF | |
1a7b4b7c | 1397 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 1398 | { (eval echo configure:1399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1a494973 C |
1399 | ac_err=`grep -v '^ *+' conftest.out` |
1400 | if test -z "$ac_err"; then | |
1401 | rm -rf conftest* | |
1402 | eval "ac_cv_header_$ac_safe=yes" | |
1403 | else | |
1404 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1405 | echo "configure: failed program was:" >&5 |
1406 | cat conftest.$ac_ext >&5 | |
1a494973 C |
1407 | rm -rf conftest* |
1408 | eval "ac_cv_header_$ac_safe=no" | |
1409 | fi | |
1410 | rm -f conftest* | |
1411 | fi | |
1412 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1413 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 1414 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
1415 | cat >> confdefs.h <<EOF |
1416 | #define $ac_tr_hdr 1 | |
1417 | EOF | |
1418 | ||
1419 | else | |
1420 | echo "$ac_t""no" 1>&6 | |
1421 | fi | |
1422 | done | |
1423 | ||
2b576293 | 1424 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
f7b8c9ce | 1425 | echo "configure:1426: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
1426 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
1427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1428 | else | |
1429 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1430 | #line 1431 "configure" |
2b576293 C |
1431 | #include "confdefs.h" |
1432 | #include <sys/types.h> | |
1433 | #include <sys/stat.h> | |
1434 | ||
1435 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
1436 | # if S_ISBLK (S_IFDIR) | |
1437 | You lose. | |
1438 | # endif | |
1439 | #endif | |
1440 | ||
1441 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
1442 | # if S_ISBLK (S_IFCHR) | |
1443 | You lose. | |
1444 | # endif | |
1445 | #endif | |
1446 | ||
1447 | #if defined(S_ISLNK) && defined(S_IFREG) | |
1448 | # if S_ISLNK (S_IFREG) | |
1449 | You lose. | |
1450 | # endif | |
1451 | #endif | |
1452 | ||
1453 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
1454 | # if S_ISSOCK (S_IFREG) | |
1455 | You lose. | |
1456 | # endif | |
1457 | #endif | |
1458 | ||
1459 | EOF | |
1460 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1461 | egrep "You lose" >/dev/null 2>&1; then | |
1462 | rm -rf conftest* | |
1463 | ac_cv_header_stat_broken=yes | |
1464 | else | |
1465 | rm -rf conftest* | |
1466 | ac_cv_header_stat_broken=no | |
1467 | fi | |
1468 | rm -f conftest* | |
1469 | ||
1470 | fi | |
1a7b4b7c | 1471 | |
2b576293 C |
1472 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
1473 | if test $ac_cv_header_stat_broken = yes; then | |
1474 | cat >> confdefs.h <<\EOF | |
1475 | #define STAT_MACROS_BROKEN 1 | |
1476 | EOF | |
1477 | ||
1478 | fi | |
1479 | ||
1480 | ||
8501c742 | 1481 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
f7b8c9ce | 1482 | echo "configure:1483: checking for working const" >&5 |
8501c742 SG |
1483 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1485 | else | |
1486 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1487 | #line 1488 "configure" |
8501c742 SG |
1488 | #include "confdefs.h" |
1489 | ||
bfde4a67 | 1490 | int main() { |
8501c742 SG |
1491 | |
1492 | /* Ultrix mips cc rejects this. */ | |
1493 | typedef int charset[2]; const charset x; | |
1494 | /* SunOS 4.1.1 cc rejects this. */ | |
1495 | char const *const *ccp; | |
1496 | char **p; | |
1497 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1498 | struct point {int x, y;}; | |
1499 | static struct point const zero = {0,0}; | |
1500 | /* AIX XL C 1.02.0.0 rejects this. | |
1501 | It does not let you subtract one const X* pointer from another in an arm | |
1502 | of an if-expression whose if-part is not a constant expression */ | |
1503 | const char *g = "string"; | |
1504 | ccp = &g + (g ? g-g : 0); | |
1505 | /* HPUX 7.0 cc rejects these. */ | |
1506 | ++ccp; | |
1507 | p = (char**) ccp; | |
1508 | ccp = (char const *const *) p; | |
1509 | { /* SCO 3.2v4 cc rejects this. */ | |
1510 | char *t; | |
1511 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1512 | ||
1513 | *t++ = 0; | |
1514 | } | |
1515 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1516 | int x[] = {25, 17}; | |
1517 | const int *foo = &x[0]; | |
1518 | ++foo; | |
1519 | } | |
1520 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1521 | typedef const int *iptr; | |
1522 | iptr p = 0; | |
1523 | ++p; | |
1524 | } | |
1525 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1526 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1527 | struct s { int j; const int *ap[3]; }; | |
1528 | struct s *b; b->j = 5; | |
1529 | } | |
1530 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1531 | const int foo = 10; | |
1532 | } | |
1533 | ||
1534 | ; return 0; } | |
1535 | EOF | |
f7b8c9ce | 1536 | if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
1537 | rm -rf conftest* |
1538 | ac_cv_c_const=yes | |
1539 | else | |
bfde4a67 SG |
1540 | echo "configure: failed program was:" >&5 |
1541 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
1542 | rm -rf conftest* |
1543 | ac_cv_c_const=no | |
1544 | fi | |
1545 | rm -f conftest* | |
8501c742 SG |
1546 | fi |
1547 | ||
1548 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1549 | if test $ac_cv_c_const = no; then | |
1550 | cat >> confdefs.h <<\EOF | |
1551 | #define const | |
1552 | EOF | |
1553 | ||
1554 | fi | |
1555 | ||
1556 | ||
5d394f70 | 1557 | for ac_func in setpgid sbrk select poll |
72ae15f6 FF |
1558 | do |
1559 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
f7b8c9ce | 1560 | echo "configure:1561: checking for $ac_func" >&5 |
72ae15f6 FF |
1561 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1563 | else | |
1564 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1565 | #line 1566 "configure" |
72ae15f6 FF |
1566 | #include "confdefs.h" |
1567 | /* System header to define __stub macros and hopefully few prototypes, | |
1568 | which can conflict with char $ac_func(); below. */ | |
1569 | #include <assert.h> | |
1570 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1571 | /* We use char because int might match the return type of a gcc2 |
1572 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 1573 | char $ac_func(); |
72ae15f6 | 1574 | |
bfde4a67 | 1575 | int main() { |
72ae15f6 FF |
1576 | |
1577 | /* The GNU C library defines this for functions which it implements | |
1578 | to always fail with ENOSYS. Some functions are actually named | |
1579 | something starting with __ and the normal name is an alias. */ | |
1580 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1581 | choke me | |
1582 | #else | |
1583 | $ac_func(); | |
1584 | #endif | |
1585 | ||
1586 | ; return 0; } | |
1587 | EOF | |
f7b8c9ce | 1588 | if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
72ae15f6 FF |
1589 | rm -rf conftest* |
1590 | eval "ac_cv_func_$ac_func=yes" | |
1591 | else | |
bfde4a67 SG |
1592 | echo "configure: failed program was:" >&5 |
1593 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
1594 | rm -rf conftest* |
1595 | eval "ac_cv_func_$ac_func=no" | |
1596 | fi | |
1597 | rm -f conftest* | |
ef6c51d1 | 1598 | fi |
bfde4a67 | 1599 | |
72ae15f6 FF |
1600 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1601 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 1602 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
1603 | cat >> confdefs.h <<EOF |
1604 | #define $ac_tr_func 1 | |
1605 | EOF | |
1606 | ||
1607 | else | |
1608 | echo "$ac_t""no" 1>&6 | |
1609 | fi | |
1610 | done | |
1611 | ||
1612 | ||
0d4c1152 FF |
1613 | # If we are configured native on Linux, work around problems with sys/procfs.h |
1614 | if test "${target}" = "${host}"; then | |
1615 | case "${host}" in | |
1616 | i345686-*-linux*) | |
1617 | cat >> confdefs.h <<\EOF | |
1618 | #define START_INFERIOR_TRAPS_EXPECTED "2" | |
1619 | EOF | |
1620 | ||
1621 | cat >> confdefs.h <<\EOF | |
1622 | #define sys_quotactl 1 | |
1623 | EOF | |
1624 | ||
1625 | ;; | |
1626 | esac | |
1627 | fi | |
1628 | ||
4708ac65 | 1629 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
f7b8c9ce | 1630 | echo "configure:1631: checking for gregset_t type" >&5 |
07b77f5c | 1631 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1632 | echo $ac_n "(cached) $ac_c" 1>&6 |
1633 | else | |
1634 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1635 | #line 1636 "configure" |
4708ac65 FF |
1636 | #include "confdefs.h" |
1637 | #include <sys/procfs.h> | |
bfde4a67 | 1638 | int main() { |
4708ac65 FF |
1639 | gregset_t *gregsetp = 0 |
1640 | ; return 0; } | |
1641 | EOF | |
f7b8c9ce | 1642 | if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1643 | rm -rf conftest* |
07b77f5c | 1644 | gdb_cv_have_gregset_t=yes |
4708ac65 | 1645 | else |
bfde4a67 SG |
1646 | echo "configure: failed program was:" >&5 |
1647 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1648 | rm -rf conftest* |
07b77f5c | 1649 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
1650 | fi |
1651 | rm -f conftest* | |
4708ac65 FF |
1652 | fi |
1653 | ||
07b77f5c FF |
1654 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
1655 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
1656 | cat >> confdefs.h <<\EOF |
1657 | #define HAVE_GREGSET_T 1 | |
1658 | EOF | |
1659 | ||
1660 | fi | |
1661 | ||
1662 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
f7b8c9ce | 1663 | echo "configure:1664: checking for fpregset_t type" >&5 |
07b77f5c | 1664 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1665 | echo $ac_n "(cached) $ac_c" 1>&6 |
1666 | else | |
1667 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1668 | #line 1669 "configure" |
4708ac65 FF |
1669 | #include "confdefs.h" |
1670 | #include <sys/procfs.h> | |
bfde4a67 | 1671 | int main() { |
4708ac65 FF |
1672 | fpregset_t *fpregsetp = 0 |
1673 | ; return 0; } | |
1674 | EOF | |
f7b8c9ce | 1675 | if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1676 | rm -rf conftest* |
07b77f5c | 1677 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 1678 | else |
bfde4a67 SG |
1679 | echo "configure: failed program was:" >&5 |
1680 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1681 | rm -rf conftest* |
07b77f5c | 1682 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
1683 | fi |
1684 | rm -f conftest* | |
4708ac65 FF |
1685 | fi |
1686 | ||
07b77f5c FF |
1687 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
1688 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
1689 | cat >> confdefs.h <<\EOF |
1690 | #define HAVE_FPREGSET_T 1 | |
1691 | EOF | |
1692 | ||
1693 | fi | |
1694 | ||
bfde4a67 | 1695 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
f7b8c9ce | 1696 | echo "configure:1697: checking for main in -lm" >&5 |
bfde4a67 | 1697 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
1698 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1700 | else | |
1701 | ac_save_LIBS="$LIBS" | |
1702 | LIBS="-lm $LIBS" | |
1703 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1704 | #line 1705 "configure" |
ef6c51d1 SG |
1705 | #include "confdefs.h" |
1706 | ||
bfde4a67 | 1707 | int main() { |
ef6c51d1 SG |
1708 | main() |
1709 | ; return 0; } | |
1710 | EOF | |
f7b8c9ce | 1711 | if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
ef6c51d1 SG |
1712 | rm -rf conftest* |
1713 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1714 | else | |
bfde4a67 SG |
1715 | echo "configure: failed program was:" >&5 |
1716 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
1717 | rm -rf conftest* |
1718 | eval "ac_cv_lib_$ac_lib_var=no" | |
1719 | fi | |
1720 | rm -f conftest* | |
1721 | LIBS="$ac_save_LIBS" | |
1722 | ||
1723 | fi | |
1724 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1725 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
1726 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
1727 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
1728 | cat >> confdefs.h <<EOF |
1729 | #define $ac_tr_lib 1 | |
1730 | EOF | |
1731 | ||
1732 | LIBS="-lm $LIBS" | |
1733 | ||
1734 | else | |
1735 | echo "$ac_t""no" 1>&6 | |
1736 | fi | |
1737 | ||
1738 | ||
aa220473 | 1739 | |
3f550b59 | 1740 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
f7b8c9ce | 1741 | echo "configure:1742: checking for long long support in compiler" >&5 |
3f550b59 FF |
1742 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
1743 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1744 | else | |
1745 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1746 | #line 1747 "configure" |
3f550b59 FF |
1747 | #include "confdefs.h" |
1748 | ||
bfde4a67 | 1749 | int main() { |
80f600a4 | 1750 | |
d538f9cf FF |
1751 | extern long long foo; |
1752 | switch (foo & 2) { case 0: return 1; } | |
1753 | ||
3f550b59 FF |
1754 | ; return 0; } |
1755 | EOF | |
f7b8c9ce | 1756 | if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
1757 | rm -rf conftest* |
1758 | gdb_cv_c_long_long=yes | |
1759 | else | |
bfde4a67 SG |
1760 | echo "configure: failed program was:" >&5 |
1761 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
1762 | rm -rf conftest* |
1763 | gdb_cv_c_long_long=no | |
1764 | fi | |
1765 | rm -f conftest* | |
3f550b59 FF |
1766 | fi |
1767 | ||
1768 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
1769 | if test $gdb_cv_c_long_long = yes; then | |
1770 | cat >> confdefs.h <<\EOF | |
1771 | #define CC_HAS_LONG_LONG 1 | |
1772 | EOF | |
1773 | ||
1774 | fi | |
1775 | ||
1776 | ||
1777 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
f7b8c9ce | 1778 | echo "configure:1779: checking for long long support in printf" >&5 |
3f550b59 FF |
1779 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
1780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1781 | else | |
1782 | if test "$cross_compiling" = yes; then | |
1783 | gdb_cv_printf_has_long_long=no | |
1784 | else | |
bfde4a67 | 1785 | cat > conftest.$ac_ext <<EOF |
f7b8c9ce | 1786 | #line 1787 "configure" |
3f550b59 FF |
1787 | #include "confdefs.h" |
1788 | ||
1789 | int main () { | |
f7b8c9ce AC |
1790 | char buf[32]; |
1791 | long long l = 0; | |
1792 | l = (l << 16) + 0x0123; | |
1793 | l = (l << 16) + 0x4567; | |
1794 | l = (l << 16) + 0x89ab; | |
1795 | l = (l << 16) + 0xcdef; | |
1796 | sprintf (buf, "0x%016llx", l); | |
1797 | return (strcmp ("0x0123456789abcdef", buf)); | |
3f550b59 FF |
1798 | } |
1799 | EOF | |
f7b8c9ce | 1800 | if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1801 | then |
3f550b59 FF |
1802 | gdb_cv_printf_has_long_long=yes |
1803 | else | |
bfde4a67 SG |
1804 | echo "configure: failed program was:" >&5 |
1805 | cat conftest.$ac_ext >&5 | |
1806 | rm -fr conftest* | |
3f550b59 FF |
1807 | gdb_cv_printf_has_long_long=no |
1808 | fi | |
ef6c51d1 | 1809 | rm -fr conftest* |
8b701284 ILT |
1810 | fi |
1811 | ||
bfde4a67 SG |
1812 | fi |
1813 | ||
3f550b59 FF |
1814 | if test $gdb_cv_printf_has_long_long = yes; then |
1815 | cat >> confdefs.h <<\EOF | |
1816 | #define PRINTF_HAS_LONG_LONG 1 | |
1817 | EOF | |
1818 | ||
1819 | fi | |
1820 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
1821 | ||
1822 | ||
07b77f5c | 1823 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
f7b8c9ce | 1824 | echo "configure:1825: checking for long double support in compiler" >&5 |
aa220473 SG |
1825 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
1826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1827 | else | |
1828 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1829 | #line 1830 "configure" |
aa220473 SG |
1830 | #include "confdefs.h" |
1831 | ||
bfde4a67 | 1832 | int main() { |
aa220473 SG |
1833 | long double foo; |
1834 | ; return 0; } | |
1835 | EOF | |
f7b8c9ce | 1836 | if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
1837 | rm -rf conftest* |
1838 | ac_cv_c_long_double=yes | |
1839 | else | |
bfde4a67 SG |
1840 | echo "configure: failed program was:" >&5 |
1841 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
1842 | rm -rf conftest* |
1843 | ac_cv_c_long_double=no | |
1844 | fi | |
1845 | rm -f conftest* | |
aa220473 SG |
1846 | fi |
1847 | ||
1848 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
1849 | if test $ac_cv_c_long_double = yes; then | |
1850 | cat >> confdefs.h <<\EOF | |
1851 | #define HAVE_LONG_DOUBLE 1 | |
1852 | EOF | |
1853 | ||
1854 | fi | |
1855 | ||
07b77f5c FF |
1856 | |
1857 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
f7b8c9ce | 1858 | echo "configure:1859: checking for long double support in printf" >&5 |
07b77f5c FF |
1859 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
1860 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1861 | else | |
1862 | if test "$cross_compiling" = yes; then | |
1863 | gdb_cv_printf_has_long_double=no | |
1864 | else | |
bfde4a67 | 1865 | cat > conftest.$ac_ext <<EOF |
f7b8c9ce | 1866 | #line 1867 "configure" |
07b77f5c FF |
1867 | #include "confdefs.h" |
1868 | ||
1869 | int main () { | |
1870 | char buf[16]; | |
1871 | long double f = 3.141592653; | |
1872 | sprintf (buf, "%Lg", f); | |
1873 | return (strncmp ("3.14159", buf, 7)); | |
1874 | } | |
1875 | EOF | |
f7b8c9ce | 1876 | if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1877 | then |
07b77f5c FF |
1878 | gdb_cv_printf_has_long_double=yes |
1879 | else | |
bfde4a67 SG |
1880 | echo "configure: failed program was:" >&5 |
1881 | cat conftest.$ac_ext >&5 | |
1882 | rm -fr conftest* | |
07b77f5c FF |
1883 | gdb_cv_printf_has_long_double=no |
1884 | fi | |
ef6c51d1 | 1885 | rm -fr conftest* |
8b701284 ILT |
1886 | fi |
1887 | ||
bfde4a67 SG |
1888 | fi |
1889 | ||
07b77f5c FF |
1890 | if test $gdb_cv_printf_has_long_double = yes; then |
1891 | cat >> confdefs.h <<\EOF | |
1892 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
1893 | EOF | |
1894 | ||
1895 | fi | |
1896 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
1897 | ||
f7b8c9ce AC |
1898 | |
1899 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
1900 | echo "configure:1901: checking for long double support in scanf" >&5 | |
1901 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then | |
1902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1903 | else | |
1904 | if test "$cross_compiling" = yes; then | |
1905 | gdb_cv_scanf_has_long_double=no | |
1906 | else | |
1907 | cat > conftest.$ac_ext <<EOF | |
1908 | #line 1909 "configure" | |
1909 | #include "confdefs.h" | |
1910 | ||
1911 | int main () { | |
1912 | char *buf = "3.141592653"; | |
1913 | long double f = 0; | |
1914 | sscanf (buf, "%Lg", &f); | |
1915 | return !(f > 3.14159 && f < 3.14160); | |
1916 | } | |
1917 | EOF | |
1918 | if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
1919 | then | |
1920 | gdb_cv_scanf_has_long_double=yes | |
1921 | else | |
1922 | echo "configure: failed program was:" >&5 | |
1923 | cat conftest.$ac_ext >&5 | |
1924 | rm -fr conftest* | |
1925 | gdb_cv_scanf_has_long_double=no | |
1926 | fi | |
1927 | rm -fr conftest* | |
1928 | fi | |
1929 | ||
1930 | fi | |
1931 | ||
1932 | if test $gdb_cv_scanf_has_long_double = yes; then | |
1933 | cat >> confdefs.h <<\EOF | |
1934 | #define SCANF_HAS_LONG_DOUBLE 1 | |
1935 | EOF | |
1936 | ||
1937 | fi | |
1938 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
1939 | ||
bfde4a67 SG |
1940 | for ac_hdr in unistd.h |
1941 | do | |
1942 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1943 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
f7b8c9ce | 1944 | echo "configure:1945: checking for $ac_hdr" >&5 |
bfde4a67 SG |
1945 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1946 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1947 | else | |
1948 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1949 | #line 1950 "configure" |
bfde4a67 SG |
1950 | #include "confdefs.h" |
1951 | #include <$ac_hdr> | |
1952 | EOF | |
1953 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
f7b8c9ce | 1954 | { (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bfde4a67 SG |
1955 | ac_err=`grep -v '^ *+' conftest.out` |
1956 | if test -z "$ac_err"; then | |
1957 | rm -rf conftest* | |
1958 | eval "ac_cv_header_$ac_safe=yes" | |
1959 | else | |
1960 | echo "$ac_err" >&5 | |
1961 | echo "configure: failed program was:" >&5 | |
1962 | cat conftest.$ac_ext >&5 | |
1963 | rm -rf conftest* | |
1964 | eval "ac_cv_header_$ac_safe=no" | |
1965 | fi | |
1966 | rm -f conftest* | |
1967 | fi | |
1968 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1969 | echo "$ac_t""yes" 1>&6 | |
1970 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1971 | cat >> confdefs.h <<EOF | |
1972 | #define $ac_tr_hdr 1 | |
1973 | EOF | |
1974 | ||
1975 | else | |
1976 | echo "$ac_t""no" 1>&6 | |
1977 | fi | |
1978 | done | |
1979 | ||
1980 | for ac_func in getpagesize | |
1a7b4b7c DE |
1981 | do |
1982 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
f7b8c9ce | 1983 | echo "configure:1984: checking for $ac_func" >&5 |
1a7b4b7c DE |
1984 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1985 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1986 | else | |
1987 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 1988 | #line 1989 "configure" |
1a7b4b7c DE |
1989 | #include "confdefs.h" |
1990 | /* System header to define __stub macros and hopefully few prototypes, | |
1991 | which can conflict with char $ac_func(); below. */ | |
1992 | #include <assert.h> | |
1993 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1994 | /* We use char because int might match the return type of a gcc2 |
1995 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
1996 | char $ac_func(); |
1997 | ||
bfde4a67 | 1998 | int main() { |
1a7b4b7c DE |
1999 | |
2000 | /* The GNU C library defines this for functions which it implements | |
2001 | to always fail with ENOSYS. Some functions are actually named | |
2002 | something starting with __ and the normal name is an alias. */ | |
2003 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2004 | choke me | |
2005 | #else | |
2006 | $ac_func(); | |
2007 | #endif | |
2008 | ||
2009 | ; return 0; } | |
2010 | EOF | |
f7b8c9ce | 2011 | if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1a7b4b7c DE |
2012 | rm -rf conftest* |
2013 | eval "ac_cv_func_$ac_func=yes" | |
2014 | else | |
bfde4a67 SG |
2015 | echo "configure: failed program was:" >&5 |
2016 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
2017 | rm -rf conftest* |
2018 | eval "ac_cv_func_$ac_func=no" | |
2019 | fi | |
2020 | rm -f conftest* | |
ef6c51d1 | 2021 | fi |
bfde4a67 | 2022 | |
1a7b4b7c DE |
2023 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2024 | echo "$ac_t""yes" 1>&6 | |
2025 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2026 | cat >> confdefs.h <<EOF | |
2027 | #define $ac_tr_func 1 | |
2028 | EOF | |
2029 | ||
2030 | else | |
2031 | echo "$ac_t""no" 1>&6 | |
2032 | fi | |
2033 | done | |
2034 | ||
2b576293 | 2035 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
f7b8c9ce | 2036 | echo "configure:2037: checking for working mmap" >&5 |
bfde4a67 | 2037 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
2038 | echo $ac_n "(cached) $ac_c" 1>&6 |
2039 | else | |
2040 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 2041 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 2042 | else |
bfde4a67 | 2043 | cat > conftest.$ac_ext <<EOF |
f7b8c9ce | 2044 | #line 2045 "configure" |
2b576293 C |
2045 | #include "confdefs.h" |
2046 | ||
bfde4a67 SG |
2047 | /* Thanks to Mike Haertel and Jim Avera for this test. |
2048 | Here is a matrix of mmap possibilities: | |
2049 | mmap private not fixed | |
2050 | mmap private fixed at somewhere currently unmapped | |
2051 | mmap private fixed at somewhere already mapped | |
2052 | mmap shared not fixed | |
2053 | mmap shared fixed at somewhere currently unmapped | |
2054 | mmap shared fixed at somewhere already mapped | |
2055 | For private mappings, we should verify that changes cannot be read() | |
2056 | back from the file, nor mmap's back from the file at a different | |
2057 | address. (There have been systems where private was not correctly | |
2058 | implemented like the infamous i386 svr4.0, and systems where the | |
2059 | VM page cache was not coherent with the filesystem buffer cache | |
2060 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
2061 | For shared mappings, we should conversely verify that changes get | |
2062 | propogated back to all the places they're supposed to be. | |
2063 | ||
2064 | Grep wants private fixed already mapped. | |
2065 | The main things grep needs to know about mmap are: | |
2066 | * does it exist and is it safe to write into the mmap'd area | |
2067 | * how to use it (BSD variants) */ | |
2b576293 C |
2068 | #include <sys/types.h> |
2069 | #include <fcntl.h> | |
2070 | #include <sys/mman.h> | |
2071 | ||
bfde4a67 | 2072 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 2073 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
2074 | # ifdef HAVE_UNISTD_H |
2075 | # include <unistd.h> | |
8b701284 ILT |
2076 | # endif |
2077 | ||
bfde4a67 SG |
2078 | /* Assume that all systems that can run configure have sys/param.h. */ |
2079 | # ifndef HAVE_SYS_PARAM_H | |
2080 | # define HAVE_SYS_PARAM_H 1 | |
2081 | # endif | |
2082 | ||
2083 | # ifdef _SC_PAGESIZE | |
2084 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
2085 | # else /* no _SC_PAGESIZE */ | |
2086 | # ifdef HAVE_SYS_PARAM_H | |
2087 | # include <sys/param.h> | |
2088 | # ifdef EXEC_PAGESIZE | |
2089 | # define getpagesize() EXEC_PAGESIZE | |
2090 | # else /* no EXEC_PAGESIZE */ | |
2091 | # ifdef NBPG | |
2092 | # define getpagesize() NBPG * CLSIZE | |
2093 | # ifndef CLSIZE | |
2094 | # define CLSIZE 1 | |
2095 | # endif /* no CLSIZE */ | |
2096 | # else /* no NBPG */ | |
2097 | # ifdef NBPC | |
2098 | # define getpagesize() NBPC | |
2099 | # else /* no NBPC */ | |
2100 | # ifdef PAGESIZE | |
2101 | # define getpagesize() PAGESIZE | |
2102 | # endif /* PAGESIZE */ | |
2103 | # endif /* no NBPC */ | |
2104 | # endif /* no NBPG */ | |
2105 | # endif /* no EXEC_PAGESIZE */ | |
2106 | # else /* no HAVE_SYS_PARAM_H */ | |
2107 | # define getpagesize() 8192 /* punt totally */ | |
2108 | # endif /* no HAVE_SYS_PARAM_H */ | |
2109 | # endif /* no _SC_PAGESIZE */ | |
2110 | ||
2111 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
2112 | |
2113 | #ifdef __cplusplus | |
bfde4a67 | 2114 | extern "C" { void *malloc(unsigned); } |
2b576293 | 2115 | #else |
bfde4a67 | 2116 | char *malloc(); |
2b576293 C |
2117 | #endif |
2118 | ||
2119 | int | |
2120 | main() | |
2121 | { | |
bfde4a67 SG |
2122 | char *data, *data2, *data3; |
2123 | int i, pagesize; | |
2124 | int fd; | |
2125 | ||
2126 | pagesize = getpagesize(); | |
2127 | ||
2128 | /* | |
2129 | * First, make a file with some known garbage in it. | |
2130 | */ | |
2131 | data = malloc(pagesize); | |
2132 | if (!data) | |
2133 | exit(1); | |
2134 | for (i = 0; i < pagesize; ++i) | |
2135 | *(data + i) = rand(); | |
2136 | umask(0); | |
2137 | fd = creat("conftestmmap", 0600); | |
2138 | if (fd < 0) | |
2139 | exit(1); | |
2140 | if (write(fd, data, pagesize) != pagesize) | |
2141 | exit(1); | |
2142 | close(fd); | |
2143 | ||
2144 | /* | |
2145 | * Next, try to mmap the file at a fixed address which | |
2146 | * already has something else allocated at it. If we can, | |
2147 | * also make sure that we see the same garbage. | |
2148 | */ | |
2149 | fd = open("conftestmmap", O_RDWR); | |
2150 | if (fd < 0) | |
2151 | exit(1); | |
2152 | data2 = malloc(2 * pagesize); | |
2153 | if (!data2) | |
2154 | exit(1); | |
2155 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2156 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2157 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2158 | exit(1); | |
2159 | for (i = 0; i < pagesize; ++i) | |
2160 | if (*(data + i) != *(data2 + i)) | |
2161 | exit(1); | |
2162 | ||
2163 | /* | |
2164 | * Finally, make sure that changes to the mapped area | |
2165 | * do not percolate back to the file as seen by read(). | |
2166 | * (This is a bug on some variants of i386 svr4.0.) | |
2167 | */ | |
2168 | for (i = 0; i < pagesize; ++i) | |
2169 | *(data2 + i) = *(data2 + i) + 1; | |
2170 | data3 = malloc(pagesize); | |
2171 | if (!data3) | |
2172 | exit(1); | |
2173 | if (read(fd, data3, pagesize) != pagesize) | |
2174 | exit(1); | |
2175 | for (i = 0; i < pagesize; ++i) | |
2176 | if (*(data + i) != *(data3 + i)) | |
2177 | exit(1); | |
2178 | close(fd); | |
2179 | unlink("conftestmmap"); | |
2180 | exit(0); | |
2b576293 C |
2181 | } |
2182 | ||
2183 | EOF | |
f7b8c9ce | 2184 | if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
2185 | then |
2186 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 2187 | else |
bfde4a67 SG |
2188 | echo "configure: failed program was:" >&5 |
2189 | cat conftest.$ac_ext >&5 | |
2190 | rm -fr conftest* | |
2191 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 2192 | fi |
ef6c51d1 | 2193 | rm -fr conftest* |
8b701284 ILT |
2194 | fi |
2195 | ||
bfde4a67 SG |
2196 | fi |
2197 | ||
2198 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2199 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
2200 | cat >> confdefs.h <<\EOF |
2201 | #define HAVE_MMAP 1 | |
2202 | EOF | |
2203 | ||
2204 | fi | |
2205 | ||
5436fc65 | 2206 | |
5819f35d | 2207 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
f7b8c9ce | 2208 | echo "configure:2209: checking whether malloc must be declared" >&5 |
5819f35d SG |
2209 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
2210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2211 | else | |
2212 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2213 | #line 2214 "configure" |
5819f35d SG |
2214 | #include "confdefs.h" |
2215 | ||
2216 | #include <stdio.h> | |
2217 | #ifdef HAVE_STRING_H | |
2218 | #include <string.h> | |
2219 | #else | |
2220 | #ifdef HAVE_STRINGS_H | |
2221 | #include <strings.h> | |
2222 | #endif | |
2223 | #endif | |
2224 | #ifdef HAVE_STDLIB_H | |
2225 | #include <stdlib.h> | |
2226 | #endif | |
2227 | #ifdef HAVE_UNISTD_H | |
2228 | #include <unistd.h> | |
2229 | #endif | |
bfde4a67 | 2230 | int main() { |
5819f35d SG |
2231 | char *(*pfn) = (char *(*)) malloc |
2232 | ; return 0; } | |
2233 | EOF | |
f7b8c9ce | 2234 | if { (eval echo configure:2235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2235 | rm -rf conftest* |
2236 | bfd_cv_decl_needed_malloc=no | |
2237 | else | |
bfde4a67 SG |
2238 | echo "configure: failed program was:" >&5 |
2239 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2240 | rm -rf conftest* |
2241 | bfd_cv_decl_needed_malloc=yes | |
2242 | fi | |
2243 | rm -f conftest* | |
5819f35d SG |
2244 | fi |
2245 | ||
2246 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
2247 | if test $bfd_cv_decl_needed_malloc = yes; then | |
2248 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2249 | cat >> confdefs.h <<EOF | |
2250 | #define $bfd_tr_decl 1 | |
2251 | EOF | |
2252 | ||
2253 | fi | |
2254 | ||
2255 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
f7b8c9ce | 2256 | echo "configure:2257: checking whether realloc must be declared" >&5 |
5819f35d SG |
2257 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
2258 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2259 | else | |
2260 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2261 | #line 2262 "configure" |
5819f35d SG |
2262 | #include "confdefs.h" |
2263 | ||
2264 | #include <stdio.h> | |
2265 | #ifdef HAVE_STRING_H | |
2266 | #include <string.h> | |
2267 | #else | |
2268 | #ifdef HAVE_STRINGS_H | |
2269 | #include <strings.h> | |
2270 | #endif | |
2271 | #endif | |
2272 | #ifdef HAVE_STDLIB_H | |
2273 | #include <stdlib.h> | |
2274 | #endif | |
2275 | #ifdef HAVE_UNISTD_H | |
2276 | #include <unistd.h> | |
2277 | #endif | |
bfde4a67 | 2278 | int main() { |
5819f35d SG |
2279 | char *(*pfn) = (char *(*)) realloc |
2280 | ; return 0; } | |
2281 | EOF | |
f7b8c9ce | 2282 | if { (eval echo configure:2283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2283 | rm -rf conftest* |
2284 | bfd_cv_decl_needed_realloc=no | |
2285 | else | |
bfde4a67 SG |
2286 | echo "configure: failed program was:" >&5 |
2287 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2288 | rm -rf conftest* |
2289 | bfd_cv_decl_needed_realloc=yes | |
2290 | fi | |
2291 | rm -f conftest* | |
5819f35d SG |
2292 | fi |
2293 | ||
2294 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
2295 | if test $bfd_cv_decl_needed_realloc = yes; then | |
2296 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2297 | cat >> confdefs.h <<EOF | |
2298 | #define $bfd_tr_decl 1 | |
2299 | EOF | |
2300 | ||
2301 | fi | |
2302 | ||
2303 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
f7b8c9ce | 2304 | echo "configure:2305: checking whether free must be declared" >&5 |
5819f35d SG |
2305 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
2306 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2307 | else | |
2308 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2309 | #line 2310 "configure" |
5819f35d SG |
2310 | #include "confdefs.h" |
2311 | ||
2312 | #include <stdio.h> | |
2313 | #ifdef HAVE_STRING_H | |
2314 | #include <string.h> | |
2315 | #else | |
2316 | #ifdef HAVE_STRINGS_H | |
2317 | #include <strings.h> | |
2318 | #endif | |
2319 | #endif | |
2320 | #ifdef HAVE_STDLIB_H | |
2321 | #include <stdlib.h> | |
2322 | #endif | |
2323 | #ifdef HAVE_UNISTD_H | |
2324 | #include <unistd.h> | |
2325 | #endif | |
bfde4a67 | 2326 | int main() { |
5819f35d SG |
2327 | char *(*pfn) = (char *(*)) free |
2328 | ; return 0; } | |
2329 | EOF | |
f7b8c9ce | 2330 | if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2331 | rm -rf conftest* |
2332 | bfd_cv_decl_needed_free=no | |
2333 | else | |
bfde4a67 SG |
2334 | echo "configure: failed program was:" >&5 |
2335 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2336 | rm -rf conftest* |
2337 | bfd_cv_decl_needed_free=yes | |
2338 | fi | |
2339 | rm -f conftest* | |
5819f35d SG |
2340 | fi |
2341 | ||
2342 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
2343 | if test $bfd_cv_decl_needed_free = yes; then | |
2344 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2345 | cat >> confdefs.h <<EOF | |
2346 | #define $bfd_tr_decl 1 | |
2347 | EOF | |
2348 | ||
2349 | fi | |
2350 | ||
fef1696f | 2351 | |
47ef0da5 | 2352 | |
89e673a4 SG |
2353 | |
2354 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5d394f70 SG |
2355 | case ${host_os} in |
2356 | hpux*) | |
2357 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
f7b8c9ce | 2358 | echo "configure:2359: checking for HPUX/OSF thread support" >&5 |
5d394f70 | 2359 | if test -f /usr/include/dce/cma_config.h ; then |
c4c9112a SG |
2360 | if test "$GCC" = "yes" ; then |
2361 | echo "$ac_t""yes" 1>&6 | |
2362 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
2363 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
2364 | EOF | |
2365 | ||
c4c9112a SG |
2366 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
2367 | else | |
2368 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
2369 | fi | |
6c310da8 SG |
2370 | else |
2371 | echo "$ac_t""no" 1>&6 | |
2372 | fi | |
2373 | ;; | |
2374 | solaris*) | |
2375 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
f7b8c9ce | 2376 | echo "configure:2377: checking for Solaris thread debugging library" >&5 |
6c310da8 SG |
2377 | if test -f /usr/lib/libthread_db.so.1 ; then |
2378 | echo "$ac_t""yes" 1>&6 | |
2379 | cat >> confdefs.h <<\EOF | |
2380 | #define HAVE_THREAD_DB_LIB 1 | |
2381 | EOF | |
2382 | ||
2383 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
bfde4a67 | 2384 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
f7b8c9ce | 2385 | echo "configure:2386: checking for dlopen in -ldl" >&5 |
bfde4a67 | 2386 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
2387 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2389 | else | |
2390 | ac_save_LIBS="$LIBS" | |
2391 | LIBS="-ldl $LIBS" | |
2392 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2393 | #line 2394 "configure" |
95b47547 SG |
2394 | #include "confdefs.h" |
2395 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2396 | /* We use char because int might match the return type of a gcc2 | |
2397 | builtin and then its argument prototype would still apply. */ | |
2398 | char dlopen(); | |
2399 | ||
bfde4a67 | 2400 | int main() { |
95b47547 SG |
2401 | dlopen() |
2402 | ; return 0; } | |
2403 | EOF | |
f7b8c9ce | 2404 | if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
95b47547 SG |
2405 | rm -rf conftest* |
2406 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2407 | else | |
bfde4a67 SG |
2408 | echo "configure: failed program was:" >&5 |
2409 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
2410 | rm -rf conftest* |
2411 | eval "ac_cv_lib_$ac_lib_var=no" | |
2412 | fi | |
2413 | rm -f conftest* | |
2414 | LIBS="$ac_save_LIBS" | |
2415 | ||
2416 | fi | |
2417 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2418 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
2419 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
2420 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
2421 | cat >> confdefs.h <<EOF |
2422 | #define $ac_tr_lib 1 | |
2423 | EOF | |
2424 | ||
2425 | LIBS="-ldl $LIBS" | |
2426 | ||
2427 | else | |
2428 | echo "$ac_t""no" 1>&6 | |
2429 | fi | |
2430 | ||
ef6c51d1 SG |
2431 | if test "$GCC" = "yes" ; then |
2432 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic" | |
2433 | fi | |
5d394f70 SG |
2434 | else |
2435 | echo "$ac_t""no" 1>&6 | |
2436 | fi | |
2437 | ;; | |
2438 | esac | |
4915acad | 2439 | |
89e673a4 | 2440 | fi |
47ef0da5 | 2441 | |
5436fc65 | 2442 | ENABLE_CFLAGS= |
5436fc65 C |
2443 | |
2444 | # Check whether --enable-netrom or --disable-netrom was given. | |
1a7b4b7c DE |
2445 | if test "${enable_netrom+set}" = set; then |
2446 | enableval="$enable_netrom" | |
5436fc65 C |
2447 | case "${enableval}" in |
2448 | yes) enable_netrom=yes ;; | |
2449 | no) enable_netrom=no ;; | |
2450 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
2451 | esac | |
2452 | fi | |
2453 | ||
2454 | ||
2455 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 2456 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
5436fc65 C |
2457 | fi |
2458 | ||
2459 | # start-sanitize-gdbtk | |
2476848a MH |
2460 | ENABLE_IDE= |
2461 | # Check whether --enable-ide or --disable-ide was given. | |
2462 | if test "${enable_ide+set}" = set; then | |
2463 | enableval="$enable_ide" | |
2464 | : | |
2465 | fi | |
2466 | ||
2467 | if test "$enable_ide" = yes; then | |
2468 | enable_ide=yes | |
2469 | ENABLE_IDE=1 | |
2470 | else | |
2471 | enable_ide=no | |
2472 | fi | |
2473 | ||
2474 | ||
5436fc65 C |
2475 | ENABLE_GDBTK= |
2476 | ||
2477 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
2478 | if test "${enable_gdbtk+set}" = set; then |
2479 | enableval="$enable_gdbtk" | |
5436fc65 | 2480 | case "${enableval}" in |
0fe1522a SG |
2481 | yes) |
2482 | case "$host" in | |
2483 | *go32*) | |
2484 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
2485 | enable_gdbtk=no ;; | |
8a19b35a | 2486 | *windows*) |
b613bfbf GN |
2487 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
2488 | enable_gdbtk=no ;; | |
0fe1522a SG |
2489 | *) |
2490 | enable_gdbtk=yes ;; | |
2491 | esac ;; | |
2492 | no) | |
2493 | enable_gdbtk=no ;; | |
2494 | *) | |
2495 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 2496 | esac |
0fe1522a SG |
2497 | else |
2498 | ||
b613bfbf | 2499 | # Default is on for everything but go32 and cygwin32 |
0fe1522a | 2500 | case "$host" in |
8a19b35a | 2501 | *go32* | *windows*) |
b613bfbf | 2502 | ;; |
0fe1522a SG |
2503 | *) |
2504 | enable_gdbtk=yes ;; | |
2505 | esac | |
2506 | ||
5436fc65 C |
2507 | fi |
2508 | ||
2509 | ||
9b119644 ILT |
2510 | # In the cygwin32 environment, we need some additional flags. |
2511 | echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 | |
f7b8c9ce | 2512 | echo "configure:2513: checking for cygwin32" >&5 |
9b119644 ILT |
2513 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then |
2514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2515 | else | |
2516 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2517 | #line 2518 "configure" |
9b119644 ILT |
2518 | #include "confdefs.h" |
2519 | ||
2520 | #ifdef __CYGWIN32__ | |
2521 | lose | |
2522 | #endif | |
2523 | EOF | |
2524 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2525 | egrep "lose" >/dev/null 2>&1; then | |
2526 | rm -rf conftest* | |
2527 | gdb_cv_os_cygwin32=yes | |
2528 | else | |
2529 | rm -rf conftest* | |
2530 | gdb_cv_os_cygwin32=no | |
2531 | fi | |
2532 | rm -f conftest* | |
2533 | ||
2534 | fi | |
2535 | ||
2536 | echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6 | |
2537 | ||
2538 | WIN32LIBS= | |
2539 | WIN32LDAPP= | |
2540 | ||
2541 | ||
2542 | ||
2543 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
2544 | if test x$enable_ide = xyes; then | |
2545 | WIN32LIBS="-ladvapi32" | |
2546 | fi | |
2547 | fi | |
2548 | ||
2549 | configdir="unix" | |
8a19b35a | 2550 | |
5436fc65 | 2551 | if test "${enable_gdbtk}" = "yes"; then |
0fe1522a | 2552 | |
047465fd TT |
2553 | |
2554 | # | |
2555 | # Ok, lets find the tcl configuration | |
2556 | # First, look for one uninstalled. | |
2557 | # the alternative search directory is invoked by --with-tclconfig | |
2558 | # | |
5436fc65 | 2559 | |
047465fd TT |
2560 | if test x"${no_tcl}" = x ; then |
2561 | # we reset no_tcl in case something fails here | |
2562 | no_tcl=true | |
2563 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
2564 | if test "${with_tclconfig+set}" = set; then | |
2565 | withval="$with_tclconfig" | |
2566 | with_tclconfig=${withval} | |
5436fc65 C |
2567 | fi |
2568 | ||
047465fd | 2569 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
f7b8c9ce | 2570 | echo "configure:2571: checking for Tcl configuration" >&5 |
047465fd | 2571 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
2572 | echo $ac_n "(cached) $ac_c" 1>&6 |
2573 | else | |
047465fd | 2574 | |
1a7b4b7c | 2575 | |
047465fd TT |
2576 | # First check to see if --with-tclconfig was specified. |
2577 | if test x"${with_tclconfig}" != x ; then | |
2578 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
2579 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
2580 | else | |
2581 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2582 | fi |
047465fd | 2583 | fi |
5436fc65 | 2584 | |
047465fd TT |
2585 | # then check for a private Tcl installation |
2586 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2587 | for i in \ | |
2588 | ../tcl \ | |
2589 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
2590 | ../../tcl \ | |
2591 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
2592 | ../../../tcl \ | |
2593 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2594 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
2595 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2596 | break |
2597 | fi | |
2598 | done | |
2599 | fi | |
2600 | # check in a few common install locations | |
2601 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2602 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2603 | if test -f "$i/tclConfig.sh" ; then | |
2604 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
2605 | break | |
2606 | fi | |
2607 | done | |
2608 | fi | |
2609 | # check in a few other private locations | |
2610 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2611 | for i in \ | |
2612 | ${srcdir}/../tcl \ | |
2613 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2614 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
2615 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2616 | break |
2617 | fi | |
2618 | done | |
2619 | fi | |
2620 | ||
5436fc65 | 2621 | fi |
1a7b4b7c | 2622 | |
047465fd TT |
2623 | if test x"${ac_cv_c_tclconfig}" = x ; then |
2624 | TCLCONFIG="# no Tcl configs found" | |
2625 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
2626 | else | |
2627 | no_tcl= | |
2628 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
2629 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 2630 | fi |
5436fc65 C |
2631 | fi |
2632 | ||
0cf433d9 ILT |
2633 | if test -z "${no_tcl}"; then |
2634 | ||
047465fd | 2635 | . $TCLCONFIG |
5436fc65 | 2636 | |
047465fd TT |
2637 | |
2638 | ||
2639 | ||
2640 | ||
2641 | ||
5436fc65 | 2642 | |
5436fc65 | 2643 | |
5436fc65 | 2644 | |
5436fc65 | 2645 | |
047465fd TT |
2646 | |
2647 | ||
2648 | ||
2649 | ||
2650 | ||
2651 | ||
2652 | ||
2653 | ||
2654 | ||
2655 | ||
2656 | ||
2657 | ||
5436fc65 | 2658 | |
5436fc65 | 2659 | |
5436fc65 | 2660 | |
0cf433d9 | 2661 | |
047465fd TT |
2662 | # |
2663 | # Ok, lets find the tk configuration | |
2664 | # First, look for one uninstalled. | |
2665 | # the alternative search directory is invoked by --with-tkconfig | |
2666 | # | |
5436fc65 | 2667 | |
047465fd TT |
2668 | if test x"${no_tk}" = x ; then |
2669 | # we reset no_tk in case something fails here | |
2670 | no_tk=true | |
2671 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
2672 | if test "${with_tkconfig+set}" = set; then | |
2673 | withval="$with_tkconfig" | |
2674 | with_tkconfig=${withval} | |
5436fc65 C |
2675 | fi |
2676 | ||
047465fd | 2677 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
f7b8c9ce | 2678 | echo "configure:2679: checking for Tk configuration" >&5 |
047465fd | 2679 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
2680 | echo $ac_n "(cached) $ac_c" 1>&6 |
2681 | else | |
047465fd | 2682 | |
5436fc65 | 2683 | |
047465fd TT |
2684 | # First check to see if --with-tkconfig was specified. |
2685 | if test x"${with_tkconfig}" != x ; then | |
2686 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
2687 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
2688 | else | |
2689 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2690 | fi |
047465fd | 2691 | fi |
5436fc65 | 2692 | |
047465fd TT |
2693 | # then check for a private Tk library |
2694 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2695 | for i in \ | |
2696 | ../tk \ | |
2697 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
2698 | ../../tk \ | |
2699 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
2700 | ../../../tk \ | |
2701 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2702 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
2703 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2704 | break |
2705 | fi | |
2706 | done | |
2707 | fi | |
2708 | # check in a few common install locations | |
2709 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2710 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2711 | if test -f "$i/tkConfig.sh" ; then | |
2712 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
2713 | break | |
2714 | fi | |
2715 | done | |
2716 | fi | |
2717 | # check in a few other private locations | |
2718 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2719 | for i in \ | |
2720 | ${srcdir}/../tk \ | |
2721 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2722 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
2723 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2724 | break |
2725 | fi | |
2726 | done | |
2727 | fi | |
2728 | ||
5436fc65 | 2729 | fi |
5436fc65 | 2730 | |
047465fd TT |
2731 | if test x"${ac_cv_c_tkconfig}" = x ; then |
2732 | TKCONFIG="# no Tk configs found" | |
2733 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
2734 | else | |
2735 | no_tk= | |
2736 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
2737 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
2738 | fi | |
5436fc65 C |
2739 | fi |
2740 | ||
2741 | ||
5436fc65 | 2742 | |
0cf433d9 ILT |
2743 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
2744 | # point to doing Tcl. | |
2745 | if test -z "${no_tk}"; then | |
2746 | ||
047465fd TT |
2747 | if test -f "$TKCONFIG" ; then |
2748 | . $TKCONFIG | |
2749 | fi | |
5436fc65 | 2750 | |
047465fd TT |
2751 | |
2752 | ||
5436fc65 | 2753 | |
047465fd | 2754 | |
5436fc65 C |
2755 | |
2756 | ||
a2b63bbd | 2757 | |
047465fd TT |
2758 | |
2759 | ||
2760 | ||
9b119644 | 2761 | |
047465fd | 2762 | |
0cf433d9 | 2763 | |
5436fc65 | 2764 | # |
4e327047 TT |
2765 | # Ok, lets find the tcl source trees so we can use the headers |
2766 | # Warning: transition of version 9 to 10 will break this algorithm | |
2767 | # because 10 sorts before 9. We also look for just tcl. We have to | |
2768 | # be careful that we don't match stuff like tclX by accident. | |
2769 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 2770 | # |
8a19b35a | 2771 | |
4e327047 | 2772 | no_tcl=true |
8a19b35a | 2773 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 |
f7b8c9ce | 2774 | echo "configure:2775: checking for Tcl private headers. dir=${configdir}" >&5 |
4e327047 | 2775 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
2776 | if test "${with_tclinclude+set}" = set; then |
2777 | withval="$with_tclinclude" | |
4e327047 TT |
2778 | with_tclinclude=${withval} |
2779 | fi | |
2780 | ||
2781 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
2782 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2783 | else | |
2784 | ||
2785 | # first check to see if --with-tclinclude was specified | |
2786 | if test x"${with_tclinclude}" != x ; then | |
2787 | if test -f ${with_tclinclude}/tclInt.h ; then | |
2788 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
2789 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
2790 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 2791 | else |
4e327047 TT |
2792 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2793 | fi | |
2794 | fi | |
047465fd TT |
2795 | |
2796 | # next check if it came with Tcl configuration file | |
2797 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2798 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
2799 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
2800 | fi | |
2801 | fi | |
2802 | ||
4e327047 TT |
2803 | # next check in private source directory |
2804 | # | |
2805 | # since ls returns lowest version numbers first, reverse its output | |
2806 | if test x"${ac_cv_c_tclh}" = x ; then | |
2807 | for i in \ | |
2808 | ${srcdir}/../tcl \ | |
047465fd | 2809 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2810 | ${srcdir}/../../tcl \ |
047465fd | 2811 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2812 | ${srcdir}/../../../tcl \ |
047465fd | 2813 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 2814 | if test -f $i/generic/tclInt.h ; then |
047465fd | 2815 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 2816 | break |
4e327047 TT |
2817 | fi |
2818 | done | |
2819 | fi | |
2820 | # finally check in a few common install locations | |
2821 | # | |
2822 | # since ls returns lowest version numbers first, reverse its output | |
2823 | if test x"${ac_cv_c_tclh}" = x ; then | |
2824 | for i in \ | |
047465fd TT |
2825 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
2826 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
2827 | /usr/local/src/tcl \ |
2828 | /usr/local/lib/tcl \ | |
2829 | ${prefix}/include ; do | |
047465fd TT |
2830 | if test -f $i/generic/tclInt.h ; then |
2831 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2832 | break |
2833 | fi | |
2834 | done | |
2835 | fi | |
2836 | # see if one is installed | |
2837 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 2838 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2839 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
f7b8c9ce | 2840 | echo "configure:2841: checking for tclInt.h" >&5 |
5436fc65 C |
2841 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2842 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2843 | else | |
2844 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2845 | #line 2846 "configure" |
5436fc65 | 2846 | #include "confdefs.h" |
4e327047 | 2847 | #include <tclInt.h> |
5436fc65 | 2848 | EOF |
1a7b4b7c | 2849 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 2850 | { (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2851 | ac_err=`grep -v '^ *+' conftest.out` |
2852 | if test -z "$ac_err"; then | |
2853 | rm -rf conftest* | |
2854 | eval "ac_cv_header_$ac_safe=yes" | |
2855 | else | |
2856 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2857 | echo "configure: failed program was:" >&5 |
2858 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2859 | rm -rf conftest* |
2860 | eval "ac_cv_header_$ac_safe=no" | |
2861 | fi | |
2862 | rm -f conftest* | |
2863 | fi | |
2864 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2865 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 2866 | ac_cv_c_tclh=installed |
5436fc65 C |
2867 | else |
2868 | echo "$ac_t""no" 1>&6 | |
4e327047 | 2869 | ac_cv_c_tclh="" |
5436fc65 C |
2870 | fi |
2871 | ||
4e327047 TT |
2872 | fi |
2873 | ||
2874 | fi | |
2875 | ||
2876 | if test x"${ac_cv_c_tclh}" = x ; then | |
2877 | TCLHDIR="# no Tcl private headers found" | |
2878 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
2879 | fi | |
2880 | if test x"${ac_cv_c_tclh}" != x ; then | |
2881 | no_tcl="" | |
1a7b4b7c | 2882 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
2883 | echo "$ac_t""is installed" 1>&6 |
2884 | TCLHDIR="" | |
2885 | else | |
2886 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
2887 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
2888 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 2889 | fi |
5436fc65 | 2890 | fi |
4e327047 | 2891 | |
4e327047 | 2892 | |
5436fc65 | 2893 | |
0cf433d9 | 2894 | |
5436fc65 | 2895 | # |
4e327047 TT |
2896 | # Ok, lets find the tk source trees so we can use the headers |
2897 | # If the directory (presumably symlink) named "tk" exists, use that one | |
2898 | # in preference to any others. Same logic is used when choosing library | |
2899 | # and again with Tcl. The search order is the best place to look first, then in | |
2900 | # decreasing significance. The loop breaks if the trigger file is found. | |
2901 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
2902 | # directory. This converts the path from a relative to an absolute, so | |
2903 | # recursive cache variables for the path will work right. We check all | |
2904 | # the possible paths in one loop rather than many seperate loops to speed | |
2905 | # things up. | |
047465fd | 2906 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 2907 | # |
047465fd | 2908 | no_tk=true |
4e327047 | 2909 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
f7b8c9ce | 2910 | echo "configure:2911: checking for Tk private headers" >&5 |
4e327047 | 2911 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
2912 | if test "${with_tkinclude+set}" = set; then |
2913 | withval="$with_tkinclude" | |
4e327047 TT |
2914 | with_tkinclude=${withval} |
2915 | fi | |
2916 | ||
4e327047 TT |
2917 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
2918 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2919 | else | |
2920 | ||
2921 | # first check to see if --with-tkinclude was specified | |
2922 | if test x"${with_tkinclude}" != x ; then | |
2923 | if test -f ${with_tkinclude}/tk.h ; then | |
2924 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
2925 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
2926 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 2927 | else |
4e327047 TT |
2928 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2929 | fi | |
2930 | fi | |
047465fd TT |
2931 | |
2932 | # next check if it came with Tk configuration file | |
2933 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2934 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
2935 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
2936 | fi | |
2937 | fi | |
2938 | ||
4e327047 TT |
2939 | # next check in private source directory |
2940 | # | |
047465fd | 2941 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2942 | if test x"${ac_cv_c_tkh}" = x ; then |
2943 | for i in \ | |
2944 | ${srcdir}/../tk \ | |
047465fd | 2945 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2946 | ${srcdir}/../../tk \ |
047465fd | 2947 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2948 | ${srcdir}/../../../tk \ |
047465fd TT |
2949 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
2950 | if test -f $i/generic/tk.h ; then | |
2951 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2952 | break |
2953 | fi | |
4e327047 TT |
2954 | done |
2955 | fi | |
2956 | # finally check in a few common install locations | |
2957 | # | |
047465fd | 2958 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2959 | if test x"${ac_cv_c_tkh}" = x ; then |
2960 | for i in \ | |
047465fd TT |
2961 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
2962 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
2963 | /usr/local/src/tk \ |
2964 | /usr/local/lib/tk \ | |
2965 | ${prefix}/include ; do | |
047465fd TT |
2966 | if test -f $i/generic/tk.h ; then |
2967 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2968 | break |
2969 | fi | |
2970 | done | |
2971 | fi | |
2972 | # see if one is installed | |
2973 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 2974 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2975 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
f7b8c9ce | 2976 | echo "configure:2977: checking for tk.h" >&5 |
5436fc65 C |
2977 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2979 | else | |
2980 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 2981 | #line 2982 "configure" |
5436fc65 | 2982 | #include "confdefs.h" |
4e327047 | 2983 | #include <tk.h> |
5436fc65 | 2984 | EOF |
1a7b4b7c | 2985 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f7b8c9ce | 2986 | { (eval echo configure:2987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2987 | ac_err=`grep -v '^ *+' conftest.out` |
2988 | if test -z "$ac_err"; then | |
2989 | rm -rf conftest* | |
2990 | eval "ac_cv_header_$ac_safe=yes" | |
2991 | else | |
2992 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2993 | echo "configure: failed program was:" >&5 |
2994 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2995 | rm -rf conftest* |
2996 | eval "ac_cv_header_$ac_safe=no" | |
2997 | fi | |
2998 | rm -f conftest* | |
2999 | fi | |
3000 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3001 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 3002 | ac_cv_c_tkh=installed |
5436fc65 C |
3003 | else |
3004 | echo "$ac_t""no" 1>&6 | |
047465fd | 3005 | ac_cv_c_tkh="" |
5436fc65 C |
3006 | fi |
3007 | ||
4e327047 TT |
3008 | fi |
3009 | ||
3010 | fi | |
3011 | ||
3012 | if test x"${ac_cv_c_tkh}" != x ; then | |
3013 | no_tk="" | |
3014 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
3015 | echo "$ac_t""is installed" 1>&6 | |
3016 | TKHDIR="" | |
3017 | else | |
047465fd | 3018 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
3019 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
3020 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
3021 | fi |
3022 | else | |
4e327047 TT |
3023 | TKHDIR="# no Tk directory found" |
3024 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
3025 | no_tk=true | |
5436fc65 C |
3026 | fi |
3027 | ||
5436fc65 C |
3028 | |
3029 | ||
2476848a MH |
3030 | |
3031 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
f7b8c9ce | 3032 | echo "configure:3033: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
3033 | if test x"${ac_cv_c_itclh}" = x ; then |
3034 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do | |
3035 | if test -f $i/src/itcl.h ; then | |
3036 | ac_cv_c_itclh=`(cd $i/src; pwd)` | |
3037 | break | |
3038 | fi | |
3039 | done | |
3040 | fi | |
3041 | if test x"${ac_cv_c_itclh}" = x ; then | |
3042 | ITCLHDIR="# no Itcl private headers found" | |
3043 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
3044 | fi | |
3045 | if test x"${ac_cv_c_itclh}" != x ; then | |
3046 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
3047 | fi | |
3048 | # should always be here | |
3049 | ITCLLIB="../itcl/src/libitcl.a" | |
3050 | ||
3051 | ||
3052 | ||
3053 | ||
3054 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
f7b8c9ce | 3055 | echo "configure:3056: checking for Tix private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
3056 | if test x"${ac_cv_c_tixh}" = x ; then |
3057 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
3058 | if test -f $i/generic/tix.h ; then | |
3059 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
3060 | break | |
3061 | fi | |
3062 | done | |
3063 | fi | |
3064 | if test x"${ac_cv_c_tixh}" = x ; then | |
3065 | TIXHDIR="# no Tix private headers found" | |
3066 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
3067 | fi | |
3068 | if test x"${ac_cv_c_tixh}" != x ; then | |
3069 | TIXHDIR="-I${ac_cv_c_tixh}" | |
3070 | fi | |
2476848a MH |
3071 | |
3072 | ||
3073 | ||
6bc5b2fa | 3074 | # now look for tix library stuff |
1154b47a | 3075 | TIXVERSION=4.1.8.0 |
6bc5b2fa MH |
3076 | . ${ac_cv_c_tclconfig}/tclConfig.sh |
3077 | case "${host}" in | |
3078 | *-*-cygwin32*) | |
f1f6dd9c | 3079 | tixdir=../tix/win/tcl8.0 |
6bc5b2fa MH |
3080 | ;; |
3081 | *) | |
1154b47a | 3082 | tixdir=../tix/unix/tk8.0 |
6bc5b2fa MH |
3083 | ;; |
3084 | esac | |
3085 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then | |
3086 | TIXLIB="-L${tixdir} -ltix${TIXVERSION}" | |
3087 | else | |
3088 | TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`" | |
3089 | fi | |
5436fc65 | 3090 | |
0cf433d9 | 3091 | ENABLE_GDBTK=1 |
5436fc65 | 3092 | |
6c310da8 | 3093 | # Include some libraries that Tcl and Tk want. |
2476848a MH |
3094 | if test "${enable_ide}" = "yes"; then |
3095 | TCL_LIBS='$(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
3096 | else | |
3097 | TCL_LIBS='$(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
3098 | fi | |
46964086 TT |
3099 | # Yes, the ordering seems wrong here. But it isn't. |
3100 | # TK_LIBS is the list of libraries that need to be linked | |
3101 | # after Tcl/Tk. | |
3102 | LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}" | |
6c310da8 | 3103 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o" |
9b119644 ILT |
3104 | |
3105 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
3106 | WIN32LIBS="${WIN32LIBS} -luser32" | |
3107 | WIN32LDAPP="-Wl,--subsystem,windows" | |
3108 | fi | |
0cf433d9 | 3109 | fi |
1a57cd09 | 3110 | fi |
a2b63bbd | 3111 | fi |
66efdff9 | 3112 | |
66efdff9 | 3113 | |
5436fc65 | 3114 | |
66efdff9 JM |
3115 | |
3116 | ||
6bc5b2fa | 3117 | |
5436fc65 C |
3118 | # end-sanitize-gdbtk |
3119 | ||
3120 | ||
3121 | ||
3122 | ||
3123 | ||
1d5eb137 FF |
3124 | # Begin stuff to support --enable-shared |
3125 | # Check whether --enable-shared or --disable-shared was given. | |
3126 | if test "${enable_shared+set}" = set; then | |
3127 | enableval="$enable_shared" | |
3128 | case "${enableval}" in | |
3129 | yes) shared=true ;; | |
3130 | no) shared=false ;; | |
3131 | *) shared=true ;; | |
3132 | esac | |
3133 | fi | |
3134 | ||
3135 | HLDFLAGS= | |
3136 | HLDENV= | |
3137 | # If we have shared libraries, try to set rpath reasonably. | |
3138 | if test "${shared}" = "true"; then | |
3139 | case "${host}" in | |
3140 | *-*-hpux*) | |
3141 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
3142 | ;; | |
3143 | *-*-irix5* | *-*-irix6*) | |
3144 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
3145 | ;; | |
3146 | *-*-linux*aout*) | |
3147 | ;; | |
8ddf07a2 | 3148 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
3149 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
3150 | ;; | |
3151 | *-*-solaris*) | |
3152 | HLDFLAGS='-R $(libdir)' | |
3153 | ;; | |
3154 | *-*-sysv4*) | |
3155 | 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;' | |
3156 | ;; | |
3157 | esac | |
3158 | fi | |
3159 | ||
3160 | # On SunOS, if the linker supports the -rpath option, use it to | |
3161 | # prevent ../bfd and ../opcodes from being included in the run time | |
3162 | # search path. | |
3163 | case "${host}" in | |
3164 | *-*-sunos*) | |
3165 | echo 'main () { }' > conftest.c | |
3166 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
3167 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
3168 | : | |
3169 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
3170 | : | |
3171 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
3172 | : | |
074d813d PS |
3173 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
3174 | : | |
1d5eb137 FF |
3175 | elif test "${shared}" = "true"; then |
3176 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
3177 | else | |
3178 | HLDFLAGS='-Wl,-rpath=' | |
3179 | fi | |
3180 | rm -f conftest.t conftest.c conftest | |
3181 | ;; | |
3182 | esac | |
3183 | ||
3184 | ||
3185 | # End stuff to support --enable-shared | |
3186 | ||
7c40dd08 DE |
3187 | # target_subdir is used by the testsuite to find the target libraries. |
3188 | target_subdir= | |
3189 | if test "${host}" != "${target}"; then | |
3190 | target_subdir="${target_alias}/" | |
3191 | fi | |
3192 | ||
5436fc65 | 3193 | |
5f107900 | 3194 | frags= |
5436fc65 C |
3195 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
3196 | if test ! -f ${host_makefile_frag}; then | |
3197 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
3198 | fi | |
5f107900 | 3199 | frags="$frags $host_makefile_frag" |
5436fc65 C |
3200 | |
3201 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
3202 | if test ! -f ${target_makefile_frag}; then | |
3203 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
3204 | fi | |
5f107900 | 3205 | frags="$frags $target_makefile_frag" |
5436fc65 C |
3206 | |
3207 | ||
3208 | ||
3209 | ||
3210 | ||
094fd4ae C |
3211 | hostfile=`sed -n ' |
3212 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3213 | ' ${host_makefile_frag}` | |
5436fc65 | 3214 | |
094fd4ae C |
3215 | targetfile=`sed -n ' |
3216 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3217 | ' ${target_makefile_frag}` | |
5436fc65 C |
3218 | |
3219 | # these really aren't orthogonal true/false values of the same condition, | |
3220 | # but shells are slow enough that I like to reuse the test conditions | |
3221 | # whenever possible | |
3222 | if test "${target}" = "${host}"; then | |
094fd4ae C |
3223 | nativefile=`sed -n ' |
3224 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3225 | ' ${host_makefile_frag}` | |
33ef0f93 | 3226 | # else |
5436fc65 | 3227 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 3228 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
3229 | fi |
3230 | ||
094fd4ae | 3231 | |
5436fc65 C |
3232 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
3233 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
3234 | # corresponding links. But we have to remove the xm.h files and tm.h | |
3235 | # files anyway, e.g. when switching from "configure host" to | |
3236 | # "configure none". | |
3237 | ||
3238 | files= | |
3239 | links= | |
3240 | rm -f xm.h | |
3241 | if test "${hostfile}" != ""; then | |
3242 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
3243 | links="${links} xm.h" | |
3244 | fi | |
3245 | rm -f tm.h | |
3246 | if test "${targetfile}" != ""; then | |
3247 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
3248 | links="${links} tm.h" | |
3249 | fi | |
3250 | rm -f nm.h | |
3251 | if test "${nativefile}" != ""; then | |
3252 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
3253 | links="${links} nm.h" | |
3254 | else | |
3255 | # A cross-only configuration. | |
3256 | files="${files} config/nm-empty.h" | |
3257 | links="${links} nm.h" | |
3258 | fi | |
3259 | # start-sanitize-gdbtk | |
99174711 | 3260 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
f7b8c9ce | 3261 | echo "configure:3262: checking whether ln -s works" >&5 |
99174711 JM |
3262 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3264 | else | |
3265 | rm -f conftestdata | |
3266 | if ln -s X conftestdata 2>/dev/null | |
3267 | then | |
3268 | rm -f conftestdata | |
3269 | ac_cv_prog_LN_S="ln -s" | |
3270 | else | |
3271 | ac_cv_prog_LN_S=ln | |
3272 | fi | |
3273 | fi | |
3274 | LN_S="$ac_cv_prog_LN_S" | |
3275 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3276 | echo "$ac_t""yes" 1>&6 | |
3277 | else | |
3278 | echo "$ac_t""no" 1>&6 | |
3279 | fi | |
5436fc65 C |
3280 | |
3281 | # Make it possible to use the GUI without doing a full install | |
99174711 JM |
3282 | if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then |
3283 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then | |
3284 | echo linking $srcdir/gdbtcl to gdbtcl | |
3285 | $LN_S $srcdir/gdbtcl gdbtcl | |
3286 | else | |
3287 | echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a | |
3288 | echo " " make install before you are able to run the GUI. | |
3289 | fi | |
5436fc65 C |
3290 | fi |
3291 | # end-sanitize-gdbtk | |
3292 | ||
3293 | ||
3294 | ||
3fbb8cde | 3295 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 |
f7b8c9ce | 3296 | echo "configure:3297: checking for Cygwin32 environment" >&5 |
3fbb8cde ILT |
3297 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
3298 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3299 | else | |
3300 | cat > conftest.$ac_ext <<EOF | |
f7b8c9ce | 3301 | #line 3302 "configure" |
3fbb8cde ILT |
3302 | #include "confdefs.h" |
3303 | ||
3304 | int main() { | |
3305 | int main () { return __CYGWIN32__; } | |
3306 | ; return 0; } | |
3307 | EOF | |
f7b8c9ce | 3308 | if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3fbb8cde ILT |
3309 | rm -rf conftest* |
3310 | am_cv_cygwin32=yes | |
3311 | else | |
3312 | echo "configure: failed program was:" >&5 | |
3313 | cat conftest.$ac_ext >&5 | |
3314 | rm -rf conftest* | |
3315 | am_cv_cygwin32=no | |
3316 | fi | |
3317 | rm -f conftest* | |
3318 | rm -f conftest* | |
3319 | fi | |
3320 | ||
3321 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
3322 | CYGWIN32= | |
3323 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
98fa4ade GN |
3324 | |
3325 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
f7b8c9ce | 3326 | echo "configure:3327: checking for executable suffix" >&5 |
98fa4ade GN |
3327 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
3328 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3329 | else | |
3330 | if test "$CYGWIN32" = yes; then | |
3331 | am_cv_exeext=.exe | |
3332 | else | |
3333 | cat > am_c_test.c << 'EOF' | |
3334 | int main() { | |
3335 | /* Nothing needed here */ | |
3336 | } | |
3337 | EOF | |
3338 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
3339 | am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` | |
3340 | rm -f am_c_test* | |
3341 | fi | |
3342 | ||
3343 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
3344 | fi | |
3345 | EXEEXT="" | |
3346 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
3347 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
3348 | ||
3349 | ||
5436fc65 C |
3350 | subdirs="$configdirs" |
3351 | ||
3352 | trap '' 1 2 15 | |
3353 | cat > confcache <<\EOF | |
3354 | # This file is a shell script that caches the results of configure | |
3355 | # tests run on this system so they can be shared between configure | |
3356 | # scripts and configure runs. It is not useful on other systems. | |
3357 | # If it contains results you don't want to keep, you may remove or edit it. | |
3358 | # | |
3359 | # By default, configure uses ./config.cache as the cache file, | |
3360 | # creating it if it does not exist already. You can give configure | |
3361 | # the --cache-file=FILE option to use a different cache file; that is | |
3362 | # what configure does when it calls configure scripts in | |
3363 | # subdirectories, so they share the cache. | |
3364 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3365 | # config.status only pays attention to the cache file if you give it the | |
3366 | # --recheck option to rerun configure. | |
3367 | # | |
3368 | EOF | |
bfde4a67 SG |
3369 | # The following way of writing the cache mishandles newlines in values, |
3370 | # but we know of no workaround that is simple, portable, and efficient. | |
3371 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
3372 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3373 | # and sets the high bit in the cache file unless we assign to the vars. | |
3374 | (set) 2>&1 | | |
f7b8c9ce | 3375 | case `(ac_space=' '; set) 2>&1` in |
bfde4a67 SG |
3376 | *ac_space=\ *) |
3377 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3378 | # turns \\\\ into \\, and sed turns \\ into \). | |
3379 | sed -n \ | |
3380 | -e "s/'/'\\\\''/g" \ | |
3381 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3382 | ;; | |
3383 | *) | |
3384 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3385 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3386 | ;; | |
3387 | esac >> confcache | |
5436fc65 C |
3388 | if cmp -s $cache_file confcache; then |
3389 | : | |
3390 | else | |
3391 | if test -w $cache_file; then | |
3392 | echo "updating cache $cache_file" | |
3393 | cat confcache > $cache_file | |
3394 | else | |
3395 | echo "not updating unwritable cache $cache_file" | |
3396 | fi | |
3397 | fi | |
3398 | rm -f confcache | |
3399 | ||
3400 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3401 | ||
3402 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3403 | # Let make expand exec_prefix. | |
3404 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3405 | ||
3406 | # Any assignment to VPATH causes Sun make to only execute | |
3407 | # the first set of double-colon rules, so remove it if not needed. | |
3408 | # If there is a colon in the path, we need to keep it. | |
3409 | if test "x$srcdir" = x.; then | |
3410 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3411 | fi | |
3412 | ||
3413 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3414 | ||
db210d08 | 3415 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
3416 | |
3417 | # Without the "./", some shells look in PATH for config.status. | |
3418 | : ${CONFIG_STATUS=./config.status} | |
3419 | ||
3420 | echo creating $CONFIG_STATUS | |
3421 | rm -f $CONFIG_STATUS | |
3422 | cat > $CONFIG_STATUS <<EOF | |
3423 | #! /bin/sh | |
3424 | # Generated automatically by configure. | |
3425 | # Run this file to recreate the current configuration. | |
3426 | # This directory was configured as follows, | |
3427 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3428 | # | |
3429 | # $0 $ac_configure_args | |
3430 | # | |
3431 | # Compiler output produced by configure, useful for debugging | |
3432 | # configure, is in ./config.log if it exists. | |
3433 | ||
3434 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3435 | for ac_option | |
3436 | do | |
3437 | case "\$ac_option" in | |
3438 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3439 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3440 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3441 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
f7b8c9ce | 3442 | echo "$CONFIG_STATUS generated by autoconf version 2.12" |
5436fc65 C |
3443 | exit 0 ;; |
3444 | -help | --help | --hel | --he | --h) | |
3445 | echo "\$ac_cs_usage"; exit 0 ;; | |
3446 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3447 | esac | |
3448 | done | |
3449 | ||
3450 | ac_given_srcdir=$srcdir | |
3451 | ac_given_INSTALL="$INSTALL" | |
3452 | ||
0cb7d01d | 3453 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
3454 | EOF |
3455 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3456 | |
1a7b4b7c DE |
3457 | # Protect against being on the right side of a sed subst in config.status. |
3458 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3459 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
3460 | $ac_vpsub |
3461 | $extrasub | |
3462 | s%@CFLAGS@%$CFLAGS%g | |
3463 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3464 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3465 | s%@DEFS@%$DEFS%g | |
3466 | s%@LDFLAGS@%$LDFLAGS%g | |
3467 | s%@LIBS@%$LIBS%g | |
3468 | s%@exec_prefix@%$exec_prefix%g | |
3469 | s%@prefix@%$prefix%g | |
3470 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
3471 | s%@bindir@%$bindir%g |
3472 | s%@sbindir@%$sbindir%g | |
3473 | s%@libexecdir@%$libexecdir%g | |
3474 | s%@datadir@%$datadir%g | |
3475 | s%@sysconfdir@%$sysconfdir%g | |
3476 | s%@sharedstatedir@%$sharedstatedir%g | |
3477 | s%@localstatedir@%$localstatedir%g | |
3478 | s%@libdir@%$libdir%g | |
3479 | s%@includedir@%$includedir%g | |
3480 | s%@oldincludedir@%$oldincludedir%g | |
3481 | s%@infodir@%$infodir%g | |
3482 | s%@mandir@%$mandir%g | |
5436fc65 C |
3483 | s%@CC@%$CC%g |
3484 | s%@CPP@%$CPP%g | |
35ce4f08 | 3485 | s%@DLLTOOL@%$DLLTOOL%g |
5436fc65 C |
3486 | s%@host@%$host%g |
3487 | s%@host_alias@%$host_alias%g | |
3488 | s%@host_cpu@%$host_cpu%g | |
3489 | s%@host_vendor@%$host_vendor%g | |
3490 | s%@host_os@%$host_os%g | |
0579b53d GN |
3491 | s%@target@%$target%g |
3492 | s%@target_alias@%$target_alias%g | |
3493 | s%@target_cpu@%$target_cpu%g | |
3494 | s%@target_vendor@%$target_vendor%g | |
3495 | s%@target_os@%$target_os%g | |
5436fc65 C |
3496 | s%@build@%$build%g |
3497 | s%@build_alias@%$build_alias%g | |
3498 | s%@build_cpu@%$build_cpu%g | |
3499 | s%@build_vendor@%$build_vendor%g | |
3500 | s%@build_os@%$build_os%g | |
0579b53d GN |
3501 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3502 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
d8efbc66 FF |
3503 | s%@AR@%$AR%g |
3504 | s%@RANLIB@%$RANLIB%g | |
3505 | s%@YACC@%$YACC%g | |
3506 | s%@AWK@%$AWK%g | |
4915acad | 3507 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
2476848a | 3508 | s%@ENABLE_IDE@%$ENABLE_IDE%g |
9b119644 ILT |
3509 | s%@WIN32LIBS@%$WIN32LIBS%g |
3510 | s%@WIN32LDAPP@%$WIN32LDAPP%g | |
047465fd TT |
3511 | s%@TCL_VERSION@%$TCL_VERSION%g |
3512 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
3513 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
3514 | s%@TCL_CC@%$TCL_CC%g | |
3515 | s%@TCL_DEFS@%$TCL_DEFS%g | |
3516 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
3517 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
3518 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
3519 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
3520 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
3521 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
3522 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
3523 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
3524 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
3525 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
3526 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
3527 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
3528 | s%@TK_VERSION@%$TK_VERSION%g | |
3529 | s%@TK_DEFS@%$TK_DEFS%g | |
9b119644 | 3530 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g |
047465fd TT |
3531 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g |
3532 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
3533 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
3534 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 3535 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 3536 | s%@TKHDIR@%$TKHDIR%g |
2476848a MH |
3537 | s%@ITCLHDIR@%$ITCLHDIR%g |
3538 | s%@ITCLLIB@%$ITCLLIB%g | |
3539 | s%@TIXHDIR@%$TIXHDIR%g | |
5436fc65 | 3540 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 3541 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 3542 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 3543 | s%@X_LIBS@%$X_LIBS%g |
6bc5b2fa | 3544 | s%@TIXLIB@%$TIXLIB%g |
5436fc65 | 3545 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 3546 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
1d5eb137 FF |
3547 | s%@HLDFLAGS@%$HLDFLAGS%g |
3548 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 3549 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
3550 | /@host_makefile_frag@/r $host_makefile_frag |
3551 | s%@host_makefile_frag@%%g | |
3552 | /@target_makefile_frag@/r $target_makefile_frag | |
3553 | s%@target_makefile_frag@%%g | |
5f107900 | 3554 | s%@frags@%$frags%g |
99174711 | 3555 | s%@LN_S@%$LN_S%g |
3fbb8cde | 3556 | s%@EXEEXT@%$EXEEXT%g |
5436fc65 C |
3557 | s%@subdirs@%$subdirs%g |
3558 | ||
3559 | CEOF | |
3560 | EOF | |
bfde4a67 SG |
3561 | |
3562 | cat >> $CONFIG_STATUS <<\EOF | |
3563 | ||
3564 | # Split the substitutions into bite-sized pieces for seds with | |
3565 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3566 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3567 | ac_file=1 # Number of current file. | |
3568 | ac_beg=1 # First line for current file. | |
3569 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3570 | ac_more_lines=: | |
3571 | ac_sed_cmds="" | |
3572 | while $ac_more_lines; do | |
3573 | if test $ac_beg -gt 1; then | |
3574 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3575 | else | |
3576 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3577 | fi | |
3578 | if test ! -s conftest.s$ac_file; then | |
3579 | ac_more_lines=false | |
3580 | rm -f conftest.s$ac_file | |
3581 | else | |
3582 | if test -z "$ac_sed_cmds"; then | |
3583 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3584 | else | |
3585 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3586 | fi | |
3587 | ac_file=`expr $ac_file + 1` | |
3588 | ac_beg=$ac_end | |
3589 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3590 | fi | |
3591 | done | |
3592 | if test -z "$ac_sed_cmds"; then | |
3593 | ac_sed_cmds=cat | |
3594 | fi | |
3595 | EOF | |
3596 | ||
5436fc65 C |
3597 | cat >> $CONFIG_STATUS <<EOF |
3598 | ||
0cb7d01d | 3599 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
5436fc65 C |
3600 | EOF |
3601 | cat >> $CONFIG_STATUS <<\EOF | |
3602 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 3603 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 3604 | case "$ac_file" in |
bfde4a67 | 3605 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
3606 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3607 | *) ac_file_in="${ac_file}.in" ;; | |
3608 | esac | |
3609 | ||
bfde4a67 | 3610 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
3611 | |
3612 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3613 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3614 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3615 | # The file is in a subdirectory. | |
3616 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3617 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3618 | # A "../" for each directory in $ac_dir_suffix. | |
3619 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3620 | else | |
3621 | ac_dir_suffix= ac_dots= | |
3622 | fi | |
3623 | ||
3624 | case "$ac_given_srcdir" in | |
3625 | .) srcdir=. | |
3626 | if test -z "$ac_dots"; then top_srcdir=. | |
3627 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3628 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3629 | *) # Relative path. | |
3630 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3631 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3632 | esac | |
3633 | ||
3634 | case "$ac_given_INSTALL" in | |
3635 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3636 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3637 | esac | |
bfde4a67 | 3638 | |
5436fc65 C |
3639 | echo creating "$ac_file" |
3640 | rm -f "$ac_file" | |
3641 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3642 | case "$ac_file" in | |
3643 | *Makefile*) ac_comsub="1i\\ | |
3644 | # $configure_input" ;; | |
3645 | *) ac_comsub= ;; | |
3646 | esac | |
bfde4a67 SG |
3647 | |
3648 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
3649 | sed -e "$ac_comsub |
3650 | s%@configure_input@%$configure_input%g | |
3651 | s%@srcdir@%$srcdir%g | |
3652 | s%@top_srcdir@%$top_srcdir%g | |
3653 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 3654 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 3655 | fi; done |
bfde4a67 | 3656 | rm -f conftest.s* |
5436fc65 | 3657 | |
db210d08 FF |
3658 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3659 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3660 | # | |
3661 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3662 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3663 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3664 | ac_dC='\3' | |
3665 | ac_dD='%g' | |
3666 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3667 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3668 | ac_uB='\([ ]\)%\1#\2define\3' | |
3669 | ac_uC=' ' | |
3670 | ac_uD='\4%g' | |
3671 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3672 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3673 | ac_eB='$%\1#\2define\3' | |
3674 | ac_eC=' ' | |
3675 | ac_eD='%g' | |
3676 | ||
bfde4a67 SG |
3677 | if test "${CONFIG_HEADERS+set}" != set; then |
3678 | EOF | |
3679 | cat >> $CONFIG_STATUS <<EOF | |
3680 | CONFIG_HEADERS="config.h:config.in" | |
3681 | EOF | |
3682 | cat >> $CONFIG_STATUS <<\EOF | |
3683 | fi | |
db210d08 | 3684 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 3685 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 3686 | case "$ac_file" in |
bfde4a67 | 3687 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
3688 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3689 | *) ac_file_in="${ac_file}.in" ;; | |
3690 | esac | |
3691 | ||
3692 | echo creating $ac_file | |
3693 | ||
3694 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
3695 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
3696 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
3697 | |
3698 | EOF | |
3699 | ||
3700 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
3701 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 3702 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
3703 | # Protect against being in an unquoted here document in config.status. |
3704 | rm -f conftest.vals | |
3705 | cat > conftest.hdr <<\EOF | |
3706 | s/[\\&%]/\\&/g | |
3707 | s%[\\$`]%\\&%g | |
bc859e63 | 3708 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
3709 | s%ac_d%ac_u%gp |
3710 | s%ac_u%ac_e%gp | |
3711 | EOF | |
3712 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3713 | rm -f conftest.hdr | |
3714 | ||
3715 | # This sed command replaces #undef with comments. This is necessary, for | |
3716 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3717 | # on some systems where configure will not decide to define it. | |
3718 | cat >> conftest.vals <<\EOF | |
3719 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3720 | EOF | |
3721 | ||
3722 | # Break up conftest.vals because some shells have a limit on | |
3723 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
3724 | |
3725 | rm -f conftest.tail | |
3726 | while : | |
3727 | do | |
3728 | ac_lines=`grep -c . conftest.vals` | |
3729 | # grep -c gives empty output for an empty file on some AIX systems. | |
3730 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3731 | # Write a limited-size here document to conftest.frag. | |
3732 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3733 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3734 | echo 'CEOF | |
3735 | sed -f conftest.frag conftest.in > conftest.out | |
3736 | rm -f conftest.in | |
3737 | mv conftest.out conftest.in | |
3738 | ' >> $CONFIG_STATUS | |
3739 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3740 | rm -f conftest.vals | |
3741 | mv conftest.tail conftest.vals | |
3742 | done | |
3743 | rm -f conftest.vals | |
3744 | ||
3745 | cat >> $CONFIG_STATUS <<\EOF | |
3746 | rm -f conftest.frag conftest.h | |
3747 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3748 | cat conftest.in >> conftest.h | |
3749 | rm -f conftest.in | |
3750 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3751 | echo "$ac_file is unchanged" | |
3752 | rm -f conftest.h | |
3753 | else | |
bc859e63 SG |
3754 | # Remove last slash and all that follows it. Not all systems have dirname. |
3755 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3756 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3757 | # The file is in a subdirectory. | |
3758 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3759 | fi | |
db210d08 FF |
3760 | rm -f $ac_file |
3761 | mv conftest.h $ac_file | |
3762 | fi | |
3763 | fi; done | |
3764 | ||
5436fc65 C |
3765 | EOF |
3766 | ||
3767 | cat >> $CONFIG_STATUS <<EOF | |
3768 | ac_sources="$files" | |
3769 | ac_dests="$links" | |
3770 | EOF | |
3771 | ||
3772 | cat >> $CONFIG_STATUS <<\EOF | |
3773 | srcdir=$ac_given_srcdir | |
3774 | while test -n "$ac_sources"; do | |
3775 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
3776 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
3777 | ||
3778 | echo "linking $srcdir/$ac_source to $ac_dest" | |
3779 | ||
3780 | if test ! -r $srcdir/$ac_source; then | |
3781 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
3782 | fi | |
3783 | rm -f $ac_dest | |
3784 | ||
3785 | # Make relative symlinks. | |
3786 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3787 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
3788 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
3789 | # The dest file is in a subdirectory. | |
3790 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
3791 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
3792 | # A "../" for each directory in $ac_dest_dir_suffix. | |
3793 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
3794 | else | |
3795 | ac_dest_dir_suffix= ac_dots= | |
3796 | fi | |
3797 | ||
3798 | case "$srcdir" in | |
3799 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
3800 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
3801 | esac | |
3802 | ||
3803 | # Make a symlink if possible; otherwise try a hard link. | |
3804 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
3805 | ln $srcdir/$ac_source $ac_dest; then : | |
3806 | else | |
3807 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
3808 | fi | |
3809 | done | |
0a5a1821 C |
3810 | EOF |
3811 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3812 | |
0a5a1821 C |
3813 | gdb_host_cpu=$gdb_host_cpu |
3814 | gdb_target_cpu=$gdb_target_cpu | |
3815 | nativefile=$nativefile | |
3816 | ||
3817 | EOF | |
3818 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
3819 | |
3820 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 3821 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
3822 | < Makefile > Makefile.tem |
3823 | mv -f Makefile.tem Makefile | |
3824 | fi | |
3825 | ||
3826 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
3827 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
3828 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
3829 | mv -f Makefile.tmp Makefile | |
3830 | ||
31520669 | 3831 | case x$CONFIG_HEADERS in |
18ea4416 | 3832 | xconfig.h:config.in) |
31520669 FF |
3833 | echo > stamp-h ;; |
3834 | esac | |
3835 | ||
5436fc65 C |
3836 | exit 0 |
3837 | EOF | |
3838 | chmod +x $CONFIG_STATUS | |
3839 | rm -fr confdefs* $ac_clean_files | |
3840 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3841 | ||
3842 | if test "$no_recursion" != yes; then | |
3843 | ||
3844 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
3845 | ac_sub_configure_args= | |
3846 | ac_prev= | |
3847 | for ac_arg in $ac_configure_args; do | |
3848 | if test -n "$ac_prev"; then | |
3849 | ac_prev= | |
3850 | continue | |
3851 | fi | |
3852 | case "$ac_arg" in | |
3853 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
3854 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
3855 | ac_prev=cache_file ;; | |
3856 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
3857 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
3858 | ;; | |
3859 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
3860 | ac_prev=srcdir ;; | |
3861 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
3862 | ;; | |
3863 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
3864 | esac | |
3865 | done | |
3866 | ||
3867 | for ac_config_dir in $configdirs; do | |
3868 | ||
3869 | # Do not complain, so a configure script can configure whichever | |
3870 | # parts of a large source tree are present. | |
3871 | if test ! -d $srcdir/$ac_config_dir; then | |
3872 | continue | |
3873 | fi | |
3874 | ||
3875 | echo configuring in $ac_config_dir | |
3876 | ||
3877 | case "$srcdir" in | |
3878 | .) ;; | |
3879 | *) | |
3880 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
3881 | else | |
3882 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
3883 | fi | |
3884 | ;; | |
3885 | esac | |
3886 | ||
3887 | ac_popdir=`pwd` | |
3888 | cd $ac_config_dir | |
3889 | ||
bfde4a67 SG |
3890 | # A "../" for each directory in /$ac_config_dir. |
3891 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
3892 | ||
5436fc65 C |
3893 | case "$srcdir" in |
3894 | .) # No --srcdir option. We are building in place. | |
3895 | ac_sub_srcdir=$srcdir ;; | |
3896 | /*) # Absolute path. | |
3897 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
3898 | *) # Relative path. | |
bfde4a67 | 3899 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
3900 | esac |
3901 | ||
3902 | # Check for guested configure; otherwise get Cygnus style configure. | |
3903 | if test -f $ac_sub_srcdir/configure; then | |
3904 | ac_sub_configure=$ac_sub_srcdir/configure | |
3905 | elif test -f $ac_sub_srcdir/configure.in; then | |
3906 | ac_sub_configure=$ac_configure | |
3907 | else | |
3908 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
3909 | ac_sub_configure= | |
3910 | fi | |
3911 | ||
3912 | # The recursion is here. | |
3913 | if test -n "$ac_sub_configure"; then | |
3914 | ||
3915 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
3916 | case "$cache_file" in |
3917 | /*) ac_sub_cache_file=$cache_file ;; | |
3918 | *) # Relative path. | |
3919 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
3920 | esac | |
3921 | case "$ac_given_INSTALL" in | |
3922 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3923 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3924 | esac | |
3925 | ||
3926 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
3927 | # The eval makes quoting arguments work. | |
3928 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
3929 | then : | |
3930 | else | |
3931 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
3932 | fi | |
3933 | fi | |
3934 | ||
3935 | cd $ac_popdir | |
3936 | done | |
3937 | fi | |
3938 | ||
5e711e7f PS |
3939 | |
3940 | exit 0 | |
b7f3b6d5 | 3941 |