Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
b2b1c5da | 4 | # Generated automatically using autoconf version 2.12.1 |
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) | |
b2b1c5da | 351 | echo "configure generated by autoconf version 2.12.1" |
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. | |
b2b1c5da | 910 | if ${CONFIG_SHELL-/bin/sh} $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) | |
b2b1c5da | 922 | if host_alias=`${CONFIG_SHELL-/bin/sh} $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 | ||
b2b1c5da | 929 | host=`${CONFIG_SHELL-/bin/sh} $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 | ||
b2b1c5da | 947 | target=`${CONFIG_SHELL-/bin/sh} $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 | ||
b2b1c5da | 965 | build=`${CONFIG_SHELL-/bin/sh} $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= | |
018d76dd | 979 | CONFIG_DEPS= |
bfde4a67 SG |
980 | |
981 | configdirs="doc testsuite" | |
982 | ||
983 | ||
984 | . ${srcdir}/configure.host | |
985 | ||
986 | . ${srcdir}/configure.tgt | |
987 | ||
988 | ||
5436fc65 C |
989 | # Find a good install program. We prefer a C program (faster), |
990 | # so one script is as good as another. But avoid the broken or | |
991 | # incompatible versions: | |
992 | # SysV /etc/install, /usr/sbin/install | |
993 | # SunOS /usr/etc/install | |
994 | # IRIX /sbin/install | |
995 | # AIX /bin/install | |
996 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
997 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
998 | # ./install, which can be erroneously created by make from ./install.sh. | |
999 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
018d76dd | 1000 | echo "configure:1001: checking for a BSD compatible install" >&5 |
5436fc65 C |
1001 | if test -z "$INSTALL"; then |
1002 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1003 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1004 | else | |
bfde4a67 | 1005 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
5436fc65 C |
1006 | for ac_dir in $PATH; do |
1007 | # Account for people who put trailing slashes in PATH elements. | |
1008 | case "$ac_dir/" in | |
1009 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1010 | *) | |
1011 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
f7b8c9ce | 1012 | for ac_prog in ginstall installbsd scoinst install; do |
5436fc65 C |
1013 | if test -f $ac_dir/$ac_prog; then |
1014 | if test $ac_prog = install && | |
1015 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1016 | # AIX install. It has an incompatible calling convention. | |
f7b8c9ce | 1017 | # OSF/1 installbsd also uses dspmsg, but is usable. |
5436fc65 C |
1018 | : |
1019 | else | |
1020 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1021 | break 2 | |
1022 | fi | |
1023 | fi | |
1024 | done | |
1025 | ;; | |
1026 | esac | |
1027 | done | |
bfde4a67 | 1028 | IFS="$ac_save_IFS" |
1a7b4b7c | 1029 | |
5436fc65 | 1030 | fi |
1a7b4b7c DE |
1031 | if test "${ac_cv_path_install+set}" = set; then |
1032 | INSTALL="$ac_cv_path_install" | |
1033 | else | |
1034 | # As a last resort, use the slow shell script. We don't cache a | |
1035 | # path for INSTALL within a source directory, because that will | |
1036 | # break other packages using the cache if that directory is | |
1037 | # removed, or if the path is relative. | |
1038 | INSTALL="$ac_install_sh" | |
1039 | fi | |
5436fc65 C |
1040 | fi |
1041 | echo "$ac_t""$INSTALL" 1>&6 | |
1042 | ||
1043 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1044 | # It thinks the first close brace ends the variable substitution. | |
1045 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1046 | ||
1047 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1048 | ||
d8efbc66 FF |
1049 | if test $host != $build; then |
1050 | ac_tool_prefix=${host_alias}- | |
1051 | else | |
1052 | ac_tool_prefix= | |
1053 | fi | |
1054 | ||
1055 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1056 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1057 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
018d76dd | 1058 | echo "configure:1059: checking for $ac_word" >&5 |
d8efbc66 FF |
1059 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1061 | else | |
1062 | if test -n "$AR"; then | |
1063 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1064 | else | |
1065 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1066 | for ac_dir in $PATH; do | |
1067 | test -z "$ac_dir" && ac_dir=. | |
1068 | if test -f $ac_dir/$ac_word; then | |
1069 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1070 | break | |
1071 | fi | |
1072 | done | |
1073 | IFS="$ac_save_ifs" | |
1074 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1075 | fi | |
1076 | fi | |
1077 | AR="$ac_cv_prog_AR" | |
1078 | if test -n "$AR"; then | |
1079 | echo "$ac_t""$AR" 1>&6 | |
1080 | else | |
1081 | echo "$ac_t""no" 1>&6 | |
1082 | fi | |
1083 | ||
1084 | ||
1085 | ||
1086 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1087 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1088 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
018d76dd | 1089 | echo "configure:1090: checking for $ac_word" >&5 |
d8efbc66 FF |
1090 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1091 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1092 | else | |
1093 | if test -n "$RANLIB"; then | |
1094 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1095 | else | |
1096 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1097 | for ac_dir in $PATH; do | |
1098 | test -z "$ac_dir" && ac_dir=. | |
1099 | if test -f $ac_dir/$ac_word; then | |
1100 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1101 | break | |
1102 | fi | |
1103 | done | |
1104 | IFS="$ac_save_ifs" | |
1105 | fi | |
1106 | fi | |
1107 | RANLIB="$ac_cv_prog_RANLIB" | |
1108 | if test -n "$RANLIB"; then | |
1109 | echo "$ac_t""$RANLIB" 1>&6 | |
1110 | else | |
1111 | echo "$ac_t""no" 1>&6 | |
1112 | fi | |
1113 | ||
1114 | ||
1115 | if test -z "$ac_cv_prog_RANLIB"; then | |
1116 | if test -n "$ac_tool_prefix"; then | |
1117 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
1118 | set dummy ranlib; ac_word=$2 |
1119 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
018d76dd | 1120 | echo "configure:1121: checking for $ac_word" >&5 |
5436fc65 C |
1121 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1123 | else | |
1124 | if test -n "$RANLIB"; then | |
1125 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1126 | else | |
1127 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 1128 | for ac_dir in $PATH; do |
5436fc65 C |
1129 | test -z "$ac_dir" && ac_dir=. |
1130 | if test -f $ac_dir/$ac_word; then | |
1131 | ac_cv_prog_RANLIB="ranlib" | |
1132 | break | |
1133 | fi | |
1134 | done | |
1135 | IFS="$ac_save_ifs" | |
1136 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1137 | fi | |
1138 | fi | |
1139 | RANLIB="$ac_cv_prog_RANLIB" | |
1140 | if test -n "$RANLIB"; then | |
1141 | echo "$ac_t""$RANLIB" 1>&6 | |
1142 | else | |
1143 | echo "$ac_t""no" 1>&6 | |
1144 | fi | |
1145 | ||
d8efbc66 FF |
1146 | else |
1147 | RANLIB=":" | |
1148 | fi | |
1149 | fi | |
1150 | ||
204c8825 FF |
1151 | for ac_prog in 'bison -y' byacc |
1152 | do | |
1153 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1154 | set dummy $ac_prog; ac_word=$2 | |
1155 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
018d76dd | 1156 | echo "configure:1157: checking for $ac_word" >&5 |
204c8825 FF |
1157 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
1158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1159 | else | |
1160 | if test -n "$YACC"; then | |
1161 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
1162 | else | |
1163 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1164 | for ac_dir in $PATH; do | |
1165 | test -z "$ac_dir" && ac_dir=. | |
1166 | if test -f $ac_dir/$ac_word; then | |
1167 | ac_cv_prog_YACC="$ac_prog" | |
1168 | break | |
1169 | fi | |
1170 | done | |
1171 | IFS="$ac_save_ifs" | |
1172 | fi | |
1173 | fi | |
1174 | YACC="$ac_cv_prog_YACC" | |
1175 | if test -n "$YACC"; then | |
1176 | echo "$ac_t""$YACC" 1>&6 | |
1177 | else | |
1178 | echo "$ac_t""no" 1>&6 | |
1179 | fi | |
1180 | ||
1181 | test -n "$YACC" && break | |
1182 | done | |
1183 | test -n "$YACC" || YACC="yacc" | |
1184 | ||
d8efbc66 FF |
1185 | for ac_prog in mawk gawk nawk awk |
1186 | do | |
1187 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1188 | set dummy $ac_prog; ac_word=$2 | |
1189 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
018d76dd | 1190 | echo "configure:1191: checking for $ac_word" >&5 |
d8efbc66 FF |
1191 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
1192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1193 | else | |
1194 | if test -n "$AWK"; then | |
1195 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
1196 | else | |
1197 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1198 | for ac_dir in $PATH; do | |
1199 | test -z "$ac_dir" && ac_dir=. | |
1200 | if test -f $ac_dir/$ac_word; then | |
1201 | ac_cv_prog_AWK="$ac_prog" | |
1202 | break | |
1203 | fi | |
1204 | done | |
1205 | IFS="$ac_save_ifs" | |
1206 | fi | |
1207 | fi | |
1208 | AWK="$ac_cv_prog_AWK" | |
1209 | if test -n "$AWK"; then | |
1210 | echo "$ac_t""$AWK" 1>&6 | |
1211 | else | |
1212 | echo "$ac_t""no" 1>&6 | |
1213 | fi | |
1214 | ||
1215 | test -n "$AWK" && break | |
1216 | done | |
1217 | ||
5436fc65 | 1218 | |
5436fc65 C |
1219 | if test "$program_transform_name" = s,x,x,; then |
1220 | program_transform_name= | |
1221 | else | |
1a7b4b7c DE |
1222 | # Double any \ or $. echo might interpret backslashes. |
1223 | cat <<\EOF_SED > conftestsed | |
1224 | s,\\,\\\\,g; s,\$,$$,g | |
1225 | EOF_SED | |
5436fc65 C |
1226 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
1227 | rm -f conftestsed | |
1228 | fi | |
1229 | test "$program_prefix" != NONE && | |
1230 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1231 | # Use a double $ so make ignores it. | |
1232 | test "$program_suffix" != NONE && | |
1233 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1234 | ||
1235 | # sed with no file args requires a program. | |
1236 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1237 | ||
1238 | ||
c14cabba | 1239 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
018d76dd | 1240 | echo "configure:1241: checking return type of signal handlers" >&5 |
c14cabba AC |
1241 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
1242 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1243 | else | |
1244 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1245 | #line 1246 "configure" |
c14cabba AC |
1246 | #include "confdefs.h" |
1247 | #include <sys/types.h> | |
1248 | #include <signal.h> | |
1249 | #ifdef signal | |
1250 | #undef signal | |
1251 | #endif | |
1252 | #ifdef __cplusplus | |
1253 | extern "C" void (*signal (int, void (*)(int)))(int); | |
1254 | #else | |
1255 | void (*signal ()) (); | |
1256 | #endif | |
1257 | ||
1258 | int main() { | |
1259 | int i; | |
1260 | ; return 0; } | |
1261 | EOF | |
018d76dd | 1262 | if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c14cabba AC |
1263 | rm -rf conftest* |
1264 | ac_cv_type_signal=void | |
1265 | else | |
1266 | echo "configure: failed program was:" >&5 | |
1267 | cat conftest.$ac_ext >&5 | |
1268 | rm -rf conftest* | |
1269 | ac_cv_type_signal=int | |
1270 | fi | |
1271 | rm -f conftest* | |
1272 | fi | |
1273 | ||
1274 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
1275 | cat >> confdefs.h <<EOF | |
1276 | #define RETSIGTYPE $ac_cv_type_signal | |
1277 | EOF | |
1278 | ||
1279 | ||
1280 | ||
2b576293 | 1281 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
018d76dd | 1282 | echo "configure:1283: checking for ANSI C header files" >&5 |
2b576293 C |
1283 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1285 | else | |
1286 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1287 | #line 1288 "configure" |
2b576293 C |
1288 | #include "confdefs.h" |
1289 | #include <stdlib.h> | |
1290 | #include <stdarg.h> | |
1291 | #include <string.h> | |
1292 | #include <float.h> | |
1293 | EOF | |
1a7b4b7c | 1294 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
018d76dd | 1295 | { (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2b576293 C |
1296 | ac_err=`grep -v '^ *+' conftest.out` |
1297 | if test -z "$ac_err"; then | |
1298 | rm -rf conftest* | |
1299 | ac_cv_header_stdc=yes | |
1300 | else | |
1301 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1302 | echo "configure: failed program was:" >&5 |
1303 | cat conftest.$ac_ext >&5 | |
2b576293 C |
1304 | rm -rf conftest* |
1305 | ac_cv_header_stdc=no | |
1306 | fi | |
1307 | rm -f conftest* | |
1308 | ||
1309 | if test $ac_cv_header_stdc = yes; then | |
1310 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1311 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1312 | #line 1313 "configure" |
2b576293 C |
1313 | #include "confdefs.h" |
1314 | #include <string.h> | |
1315 | EOF | |
1316 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1317 | egrep "memchr" >/dev/null 2>&1; then | |
1318 | : | |
1319 | else | |
1320 | rm -rf conftest* | |
1321 | ac_cv_header_stdc=no | |
1322 | fi | |
1323 | rm -f conftest* | |
1324 | ||
1325 | fi | |
1326 | ||
1327 | if test $ac_cv_header_stdc = yes; then | |
1328 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1329 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1330 | #line 1331 "configure" |
2b576293 C |
1331 | #include "confdefs.h" |
1332 | #include <stdlib.h> | |
1333 | EOF | |
1334 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1335 | egrep "free" >/dev/null 2>&1; then | |
1336 | : | |
1337 | else | |
1338 | rm -rf conftest* | |
1339 | ac_cv_header_stdc=no | |
1340 | fi | |
1341 | rm -f conftest* | |
1342 | ||
1343 | fi | |
1344 | ||
1345 | if test $ac_cv_header_stdc = yes; then | |
1346 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1347 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 1348 | : |
2b576293 | 1349 | else |
bfde4a67 | 1350 | cat > conftest.$ac_ext <<EOF |
018d76dd | 1351 | #line 1352 "configure" |
2b576293 C |
1352 | #include "confdefs.h" |
1353 | #include <ctype.h> | |
1354 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1355 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1356 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1357 | int main () { int i; for (i = 0; i < 256; i++) | |
1358 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1359 | exit (0); } | |
1360 | ||
1361 | EOF | |
018d76dd | 1362 | if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1363 | then |
2b576293 C |
1364 | : |
1365 | else | |
bfde4a67 SG |
1366 | echo "configure: failed program was:" >&5 |
1367 | cat conftest.$ac_ext >&5 | |
1368 | rm -fr conftest* | |
2b576293 C |
1369 | ac_cv_header_stdc=no |
1370 | fi | |
ef6c51d1 | 1371 | rm -fr conftest* |
bfde4a67 SG |
1372 | fi |
1373 | ||
2b576293 C |
1374 | fi |
1375 | fi | |
1a7b4b7c | 1376 | |
2b576293 C |
1377 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
1378 | if test $ac_cv_header_stdc = yes; then | |
1379 | cat >> confdefs.h <<\EOF | |
1380 | #define STDC_HEADERS 1 | |
1381 | EOF | |
1382 | ||
1383 | fi | |
1384 | ||
0db3fe94 | 1385 | 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 | 1386 | do |
bfde4a67 | 1387 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 1388 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
018d76dd | 1389 | echo "configure:1390: checking for $ac_hdr" >&5 |
1a494973 C |
1390 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1392 | else | |
1393 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1394 | #line 1395 "configure" |
1a494973 C |
1395 | #include "confdefs.h" |
1396 | #include <$ac_hdr> | |
1397 | EOF | |
1a7b4b7c | 1398 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
018d76dd | 1399 | { (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1a494973 C |
1400 | ac_err=`grep -v '^ *+' conftest.out` |
1401 | if test -z "$ac_err"; then | |
1402 | rm -rf conftest* | |
1403 | eval "ac_cv_header_$ac_safe=yes" | |
1404 | else | |
1405 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1406 | echo "configure: failed program was:" >&5 |
1407 | cat conftest.$ac_ext >&5 | |
1a494973 C |
1408 | rm -rf conftest* |
1409 | eval "ac_cv_header_$ac_safe=no" | |
1410 | fi | |
1411 | rm -f conftest* | |
1412 | fi | |
1413 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1414 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 1415 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
1416 | cat >> confdefs.h <<EOF |
1417 | #define $ac_tr_hdr 1 | |
1418 | EOF | |
1419 | ||
1420 | else | |
1421 | echo "$ac_t""no" 1>&6 | |
1422 | fi | |
1423 | done | |
1424 | ||
2b576293 | 1425 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
018d76dd | 1426 | echo "configure:1427: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
1427 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
1428 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1429 | else | |
1430 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1431 | #line 1432 "configure" |
2b576293 C |
1432 | #include "confdefs.h" |
1433 | #include <sys/types.h> | |
1434 | #include <sys/stat.h> | |
1435 | ||
1436 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
1437 | # if S_ISBLK (S_IFDIR) | |
1438 | You lose. | |
1439 | # endif | |
1440 | #endif | |
1441 | ||
1442 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
1443 | # if S_ISBLK (S_IFCHR) | |
1444 | You lose. | |
1445 | # endif | |
1446 | #endif | |
1447 | ||
1448 | #if defined(S_ISLNK) && defined(S_IFREG) | |
1449 | # if S_ISLNK (S_IFREG) | |
1450 | You lose. | |
1451 | # endif | |
1452 | #endif | |
1453 | ||
1454 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
1455 | # if S_ISSOCK (S_IFREG) | |
1456 | You lose. | |
1457 | # endif | |
1458 | #endif | |
1459 | ||
1460 | EOF | |
1461 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1462 | egrep "You lose" >/dev/null 2>&1; then | |
1463 | rm -rf conftest* | |
1464 | ac_cv_header_stat_broken=yes | |
1465 | else | |
1466 | rm -rf conftest* | |
1467 | ac_cv_header_stat_broken=no | |
1468 | fi | |
1469 | rm -f conftest* | |
1470 | ||
1471 | fi | |
1a7b4b7c | 1472 | |
2b576293 C |
1473 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
1474 | if test $ac_cv_header_stat_broken = yes; then | |
1475 | cat >> confdefs.h <<\EOF | |
1476 | #define STAT_MACROS_BROKEN 1 | |
1477 | EOF | |
1478 | ||
1479 | fi | |
1480 | ||
1481 | ||
8501c742 | 1482 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
018d76dd | 1483 | echo "configure:1484: checking for working const" >&5 |
8501c742 SG |
1484 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1486 | else | |
1487 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1488 | #line 1489 "configure" |
8501c742 SG |
1489 | #include "confdefs.h" |
1490 | ||
bfde4a67 | 1491 | int main() { |
8501c742 SG |
1492 | |
1493 | /* Ultrix mips cc rejects this. */ | |
1494 | typedef int charset[2]; const charset x; | |
1495 | /* SunOS 4.1.1 cc rejects this. */ | |
1496 | char const *const *ccp; | |
1497 | char **p; | |
1498 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1499 | struct point {int x, y;}; | |
1500 | static struct point const zero = {0,0}; | |
1501 | /* AIX XL C 1.02.0.0 rejects this. | |
1502 | It does not let you subtract one const X* pointer from another in an arm | |
1503 | of an if-expression whose if-part is not a constant expression */ | |
1504 | const char *g = "string"; | |
1505 | ccp = &g + (g ? g-g : 0); | |
1506 | /* HPUX 7.0 cc rejects these. */ | |
1507 | ++ccp; | |
1508 | p = (char**) ccp; | |
1509 | ccp = (char const *const *) p; | |
1510 | { /* SCO 3.2v4 cc rejects this. */ | |
1511 | char *t; | |
1512 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1513 | ||
1514 | *t++ = 0; | |
1515 | } | |
1516 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1517 | int x[] = {25, 17}; | |
1518 | const int *foo = &x[0]; | |
1519 | ++foo; | |
1520 | } | |
1521 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1522 | typedef const int *iptr; | |
1523 | iptr p = 0; | |
1524 | ++p; | |
1525 | } | |
1526 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1527 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1528 | struct s { int j; const int *ap[3]; }; | |
1529 | struct s *b; b->j = 5; | |
1530 | } | |
1531 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1532 | const int foo = 10; | |
1533 | } | |
1534 | ||
1535 | ; return 0; } | |
1536 | EOF | |
018d76dd | 1537 | if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
1538 | rm -rf conftest* |
1539 | ac_cv_c_const=yes | |
1540 | else | |
bfde4a67 SG |
1541 | echo "configure: failed program was:" >&5 |
1542 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
1543 | rm -rf conftest* |
1544 | ac_cv_c_const=no | |
1545 | fi | |
1546 | rm -f conftest* | |
8501c742 SG |
1547 | fi |
1548 | ||
1549 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1550 | if test $ac_cv_c_const = no; then | |
1551 | cat >> confdefs.h <<\EOF | |
1552 | #define const | |
1553 | EOF | |
1554 | ||
1555 | fi | |
1556 | ||
1557 | ||
5d394f70 | 1558 | for ac_func in setpgid sbrk select poll |
72ae15f6 FF |
1559 | do |
1560 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
018d76dd | 1561 | echo "configure:1562: checking for $ac_func" >&5 |
72ae15f6 FF |
1562 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1563 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1564 | else | |
1565 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1566 | #line 1567 "configure" |
72ae15f6 FF |
1567 | #include "confdefs.h" |
1568 | /* System header to define __stub macros and hopefully few prototypes, | |
1569 | which can conflict with char $ac_func(); below. */ | |
1570 | #include <assert.h> | |
1571 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1572 | /* We use char because int might match the return type of a gcc2 |
1573 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 1574 | char $ac_func(); |
72ae15f6 | 1575 | |
bfde4a67 | 1576 | int main() { |
72ae15f6 FF |
1577 | |
1578 | /* The GNU C library defines this for functions which it implements | |
1579 | to always fail with ENOSYS. Some functions are actually named | |
1580 | something starting with __ and the normal name is an alias. */ | |
1581 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1582 | choke me | |
1583 | #else | |
1584 | $ac_func(); | |
1585 | #endif | |
1586 | ||
1587 | ; return 0; } | |
1588 | EOF | |
018d76dd | 1589 | if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
72ae15f6 FF |
1590 | rm -rf conftest* |
1591 | eval "ac_cv_func_$ac_func=yes" | |
1592 | else | |
bfde4a67 SG |
1593 | echo "configure: failed program was:" >&5 |
1594 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
1595 | rm -rf conftest* |
1596 | eval "ac_cv_func_$ac_func=no" | |
1597 | fi | |
1598 | rm -f conftest* | |
ef6c51d1 | 1599 | fi |
bfde4a67 | 1600 | |
72ae15f6 FF |
1601 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1602 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 1603 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
1604 | cat >> confdefs.h <<EOF |
1605 | #define $ac_tr_func 1 | |
1606 | EOF | |
1607 | ||
1608 | else | |
1609 | echo "$ac_t""no" 1>&6 | |
1610 | fi | |
1611 | done | |
1612 | ||
1613 | ||
0d4c1152 FF |
1614 | # If we are configured native on Linux, work around problems with sys/procfs.h |
1615 | if test "${target}" = "${host}"; then | |
1616 | case "${host}" in | |
1617 | i345686-*-linux*) | |
1618 | cat >> confdefs.h <<\EOF | |
1619 | #define START_INFERIOR_TRAPS_EXPECTED "2" | |
1620 | EOF | |
1621 | ||
1622 | cat >> confdefs.h <<\EOF | |
1623 | #define sys_quotactl 1 | |
1624 | EOF | |
1625 | ||
1626 | ;; | |
1627 | esac | |
1628 | fi | |
1629 | ||
4708ac65 | 1630 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
018d76dd | 1631 | echo "configure:1632: checking for gregset_t type" >&5 |
07b77f5c | 1632 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1633 | echo $ac_n "(cached) $ac_c" 1>&6 |
1634 | else | |
1635 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1636 | #line 1637 "configure" |
4708ac65 FF |
1637 | #include "confdefs.h" |
1638 | #include <sys/procfs.h> | |
bfde4a67 | 1639 | int main() { |
4708ac65 FF |
1640 | gregset_t *gregsetp = 0 |
1641 | ; return 0; } | |
1642 | EOF | |
018d76dd | 1643 | if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1644 | rm -rf conftest* |
07b77f5c | 1645 | gdb_cv_have_gregset_t=yes |
4708ac65 | 1646 | else |
bfde4a67 SG |
1647 | echo "configure: failed program was:" >&5 |
1648 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1649 | rm -rf conftest* |
07b77f5c | 1650 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
1651 | fi |
1652 | rm -f conftest* | |
4708ac65 FF |
1653 | fi |
1654 | ||
07b77f5c FF |
1655 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
1656 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
1657 | cat >> confdefs.h <<\EOF |
1658 | #define HAVE_GREGSET_T 1 | |
1659 | EOF | |
1660 | ||
1661 | fi | |
1662 | ||
1663 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
018d76dd | 1664 | echo "configure:1665: checking for fpregset_t type" >&5 |
07b77f5c | 1665 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1666 | echo $ac_n "(cached) $ac_c" 1>&6 |
1667 | else | |
1668 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1669 | #line 1670 "configure" |
4708ac65 FF |
1670 | #include "confdefs.h" |
1671 | #include <sys/procfs.h> | |
bfde4a67 | 1672 | int main() { |
4708ac65 FF |
1673 | fpregset_t *fpregsetp = 0 |
1674 | ; return 0; } | |
1675 | EOF | |
018d76dd | 1676 | if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1677 | rm -rf conftest* |
07b77f5c | 1678 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 1679 | else |
bfde4a67 SG |
1680 | echo "configure: failed program was:" >&5 |
1681 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1682 | rm -rf conftest* |
07b77f5c | 1683 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
1684 | fi |
1685 | rm -f conftest* | |
4708ac65 FF |
1686 | fi |
1687 | ||
07b77f5c FF |
1688 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
1689 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
1690 | cat >> confdefs.h <<\EOF |
1691 | #define HAVE_FPREGSET_T 1 | |
1692 | EOF | |
1693 | ||
1694 | fi | |
1695 | ||
bfde4a67 | 1696 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
018d76dd | 1697 | echo "configure:1698: checking for main in -lm" >&5 |
bfde4a67 | 1698 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
1699 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1700 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1701 | else | |
1702 | ac_save_LIBS="$LIBS" | |
1703 | LIBS="-lm $LIBS" | |
1704 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1705 | #line 1706 "configure" |
ef6c51d1 SG |
1706 | #include "confdefs.h" |
1707 | ||
bfde4a67 | 1708 | int main() { |
ef6c51d1 SG |
1709 | main() |
1710 | ; return 0; } | |
1711 | EOF | |
018d76dd | 1712 | if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
ef6c51d1 SG |
1713 | rm -rf conftest* |
1714 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1715 | else | |
bfde4a67 SG |
1716 | echo "configure: failed program was:" >&5 |
1717 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
1718 | rm -rf conftest* |
1719 | eval "ac_cv_lib_$ac_lib_var=no" | |
1720 | fi | |
1721 | rm -f conftest* | |
1722 | LIBS="$ac_save_LIBS" | |
1723 | ||
1724 | fi | |
1725 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1726 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
1727 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
1728 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
1729 | cat >> confdefs.h <<EOF |
1730 | #define $ac_tr_lib 1 | |
1731 | EOF | |
1732 | ||
1733 | LIBS="-lm $LIBS" | |
1734 | ||
1735 | else | |
1736 | echo "$ac_t""no" 1>&6 | |
1737 | fi | |
1738 | ||
1739 | ||
aa220473 | 1740 | |
3f550b59 | 1741 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
018d76dd | 1742 | echo "configure:1743: checking for long long support in compiler" >&5 |
3f550b59 FF |
1743 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
1744 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1745 | else | |
1746 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1747 | #line 1748 "configure" |
3f550b59 FF |
1748 | #include "confdefs.h" |
1749 | ||
bfde4a67 | 1750 | int main() { |
80f600a4 | 1751 | |
d538f9cf FF |
1752 | extern long long foo; |
1753 | switch (foo & 2) { case 0: return 1; } | |
1754 | ||
3f550b59 FF |
1755 | ; return 0; } |
1756 | EOF | |
018d76dd | 1757 | if { (eval echo configure:1758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
1758 | rm -rf conftest* |
1759 | gdb_cv_c_long_long=yes | |
1760 | else | |
bfde4a67 SG |
1761 | echo "configure: failed program was:" >&5 |
1762 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
1763 | rm -rf conftest* |
1764 | gdb_cv_c_long_long=no | |
1765 | fi | |
1766 | rm -f conftest* | |
3f550b59 FF |
1767 | fi |
1768 | ||
1769 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
1770 | if test $gdb_cv_c_long_long = yes; then | |
1771 | cat >> confdefs.h <<\EOF | |
1772 | #define CC_HAS_LONG_LONG 1 | |
1773 | EOF | |
1774 | ||
1775 | fi | |
1776 | ||
1777 | ||
1778 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
018d76dd | 1779 | echo "configure:1780: checking for long long support in printf" >&5 |
3f550b59 FF |
1780 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
1781 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1782 | else | |
1783 | if test "$cross_compiling" = yes; then | |
1784 | gdb_cv_printf_has_long_long=no | |
1785 | else | |
bfde4a67 | 1786 | cat > conftest.$ac_ext <<EOF |
018d76dd | 1787 | #line 1788 "configure" |
3f550b59 FF |
1788 | #include "confdefs.h" |
1789 | ||
1790 | int main () { | |
f7b8c9ce AC |
1791 | char buf[32]; |
1792 | long long l = 0; | |
1793 | l = (l << 16) + 0x0123; | |
1794 | l = (l << 16) + 0x4567; | |
1795 | l = (l << 16) + 0x89ab; | |
1796 | l = (l << 16) + 0xcdef; | |
1797 | sprintf (buf, "0x%016llx", l); | |
1798 | return (strcmp ("0x0123456789abcdef", buf)); | |
3f550b59 FF |
1799 | } |
1800 | EOF | |
018d76dd | 1801 | if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1802 | then |
3f550b59 FF |
1803 | gdb_cv_printf_has_long_long=yes |
1804 | else | |
bfde4a67 SG |
1805 | echo "configure: failed program was:" >&5 |
1806 | cat conftest.$ac_ext >&5 | |
1807 | rm -fr conftest* | |
3f550b59 FF |
1808 | gdb_cv_printf_has_long_long=no |
1809 | fi | |
ef6c51d1 | 1810 | rm -fr conftest* |
8b701284 ILT |
1811 | fi |
1812 | ||
bfde4a67 SG |
1813 | fi |
1814 | ||
3f550b59 FF |
1815 | if test $gdb_cv_printf_has_long_long = yes; then |
1816 | cat >> confdefs.h <<\EOF | |
1817 | #define PRINTF_HAS_LONG_LONG 1 | |
1818 | EOF | |
1819 | ||
1820 | fi | |
1821 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
1822 | ||
1823 | ||
07b77f5c | 1824 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
018d76dd | 1825 | echo "configure:1826: checking for long double support in compiler" >&5 |
aa220473 SG |
1826 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
1827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1828 | else | |
1829 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1830 | #line 1831 "configure" |
aa220473 SG |
1831 | #include "confdefs.h" |
1832 | ||
bfde4a67 | 1833 | int main() { |
aa220473 SG |
1834 | long double foo; |
1835 | ; return 0; } | |
1836 | EOF | |
018d76dd | 1837 | if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
1838 | rm -rf conftest* |
1839 | ac_cv_c_long_double=yes | |
1840 | else | |
bfde4a67 SG |
1841 | echo "configure: failed program was:" >&5 |
1842 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
1843 | rm -rf conftest* |
1844 | ac_cv_c_long_double=no | |
1845 | fi | |
1846 | rm -f conftest* | |
aa220473 SG |
1847 | fi |
1848 | ||
1849 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
1850 | if test $ac_cv_c_long_double = yes; then | |
1851 | cat >> confdefs.h <<\EOF | |
1852 | #define HAVE_LONG_DOUBLE 1 | |
1853 | EOF | |
1854 | ||
1855 | fi | |
1856 | ||
07b77f5c FF |
1857 | |
1858 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
018d76dd | 1859 | echo "configure:1860: checking for long double support in printf" >&5 |
07b77f5c FF |
1860 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
1861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1862 | else | |
1863 | if test "$cross_compiling" = yes; then | |
1864 | gdb_cv_printf_has_long_double=no | |
1865 | else | |
bfde4a67 | 1866 | cat > conftest.$ac_ext <<EOF |
018d76dd | 1867 | #line 1868 "configure" |
07b77f5c FF |
1868 | #include "confdefs.h" |
1869 | ||
1870 | int main () { | |
1871 | char buf[16]; | |
1872 | long double f = 3.141592653; | |
1873 | sprintf (buf, "%Lg", f); | |
1874 | return (strncmp ("3.14159", buf, 7)); | |
1875 | } | |
1876 | EOF | |
018d76dd | 1877 | if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1878 | then |
07b77f5c FF |
1879 | gdb_cv_printf_has_long_double=yes |
1880 | else | |
bfde4a67 SG |
1881 | echo "configure: failed program was:" >&5 |
1882 | cat conftest.$ac_ext >&5 | |
1883 | rm -fr conftest* | |
07b77f5c FF |
1884 | gdb_cv_printf_has_long_double=no |
1885 | fi | |
ef6c51d1 | 1886 | rm -fr conftest* |
8b701284 ILT |
1887 | fi |
1888 | ||
bfde4a67 SG |
1889 | fi |
1890 | ||
07b77f5c FF |
1891 | if test $gdb_cv_printf_has_long_double = yes; then |
1892 | cat >> confdefs.h <<\EOF | |
1893 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
1894 | EOF | |
1895 | ||
1896 | fi | |
1897 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
1898 | ||
f7b8c9ce AC |
1899 | |
1900 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
018d76dd | 1901 | echo "configure:1902: checking for long double support in scanf" >&5 |
f7b8c9ce AC |
1902 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
1903 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1904 | else | |
1905 | if test "$cross_compiling" = yes; then | |
1906 | gdb_cv_scanf_has_long_double=no | |
1907 | else | |
1908 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1909 | #line 1910 "configure" |
f7b8c9ce AC |
1910 | #include "confdefs.h" |
1911 | ||
1912 | int main () { | |
1913 | char *buf = "3.141592653"; | |
1914 | long double f = 0; | |
1915 | sscanf (buf, "%Lg", &f); | |
1916 | return !(f > 3.14159 && f < 3.14160); | |
1917 | } | |
1918 | EOF | |
018d76dd | 1919 | if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
f7b8c9ce AC |
1920 | then |
1921 | gdb_cv_scanf_has_long_double=yes | |
1922 | else | |
1923 | echo "configure: failed program was:" >&5 | |
1924 | cat conftest.$ac_ext >&5 | |
1925 | rm -fr conftest* | |
1926 | gdb_cv_scanf_has_long_double=no | |
1927 | fi | |
1928 | rm -fr conftest* | |
1929 | fi | |
1930 | ||
1931 | fi | |
1932 | ||
1933 | if test $gdb_cv_scanf_has_long_double = yes; then | |
1934 | cat >> confdefs.h <<\EOF | |
1935 | #define SCANF_HAS_LONG_DOUBLE 1 | |
1936 | EOF | |
1937 | ||
1938 | fi | |
1939 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
1940 | ||
bfde4a67 SG |
1941 | for ac_hdr in unistd.h |
1942 | do | |
1943 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1944 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
018d76dd | 1945 | echo "configure:1946: checking for $ac_hdr" >&5 |
bfde4a67 SG |
1946 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1948 | else | |
1949 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1950 | #line 1951 "configure" |
bfde4a67 SG |
1951 | #include "confdefs.h" |
1952 | #include <$ac_hdr> | |
1953 | EOF | |
1954 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
018d76dd | 1955 | { (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bfde4a67 SG |
1956 | ac_err=`grep -v '^ *+' conftest.out` |
1957 | if test -z "$ac_err"; then | |
1958 | rm -rf conftest* | |
1959 | eval "ac_cv_header_$ac_safe=yes" | |
1960 | else | |
1961 | echo "$ac_err" >&5 | |
1962 | echo "configure: failed program was:" >&5 | |
1963 | cat conftest.$ac_ext >&5 | |
1964 | rm -rf conftest* | |
1965 | eval "ac_cv_header_$ac_safe=no" | |
1966 | fi | |
1967 | rm -f conftest* | |
1968 | fi | |
1969 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1970 | echo "$ac_t""yes" 1>&6 | |
1971 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1972 | cat >> confdefs.h <<EOF | |
1973 | #define $ac_tr_hdr 1 | |
1974 | EOF | |
1975 | ||
1976 | else | |
1977 | echo "$ac_t""no" 1>&6 | |
1978 | fi | |
1979 | done | |
1980 | ||
1981 | for ac_func in getpagesize | |
1a7b4b7c DE |
1982 | do |
1983 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
018d76dd | 1984 | echo "configure:1985: checking for $ac_func" >&5 |
1a7b4b7c DE |
1985 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1986 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1987 | else | |
1988 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 1989 | #line 1990 "configure" |
1a7b4b7c DE |
1990 | #include "confdefs.h" |
1991 | /* System header to define __stub macros and hopefully few prototypes, | |
1992 | which can conflict with char $ac_func(); below. */ | |
1993 | #include <assert.h> | |
1994 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1995 | /* We use char because int might match the return type of a gcc2 |
1996 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
1997 | char $ac_func(); |
1998 | ||
bfde4a67 | 1999 | int main() { |
1a7b4b7c DE |
2000 | |
2001 | /* The GNU C library defines this for functions which it implements | |
2002 | to always fail with ENOSYS. Some functions are actually named | |
2003 | something starting with __ and the normal name is an alias. */ | |
2004 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2005 | choke me | |
2006 | #else | |
2007 | $ac_func(); | |
2008 | #endif | |
2009 | ||
2010 | ; return 0; } | |
2011 | EOF | |
018d76dd | 2012 | if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1a7b4b7c DE |
2013 | rm -rf conftest* |
2014 | eval "ac_cv_func_$ac_func=yes" | |
2015 | else | |
bfde4a67 SG |
2016 | echo "configure: failed program was:" >&5 |
2017 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
2018 | rm -rf conftest* |
2019 | eval "ac_cv_func_$ac_func=no" | |
2020 | fi | |
2021 | rm -f conftest* | |
ef6c51d1 | 2022 | fi |
bfde4a67 | 2023 | |
1a7b4b7c DE |
2024 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2025 | echo "$ac_t""yes" 1>&6 | |
2026 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2027 | cat >> confdefs.h <<EOF | |
2028 | #define $ac_tr_func 1 | |
2029 | EOF | |
2030 | ||
2031 | else | |
2032 | echo "$ac_t""no" 1>&6 | |
2033 | fi | |
2034 | done | |
2035 | ||
2b576293 | 2036 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
018d76dd | 2037 | echo "configure:2038: checking for working mmap" >&5 |
bfde4a67 | 2038 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
2039 | echo $ac_n "(cached) $ac_c" 1>&6 |
2040 | else | |
2041 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 2042 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 2043 | else |
bfde4a67 | 2044 | cat > conftest.$ac_ext <<EOF |
018d76dd | 2045 | #line 2046 "configure" |
2b576293 C |
2046 | #include "confdefs.h" |
2047 | ||
bfde4a67 SG |
2048 | /* Thanks to Mike Haertel and Jim Avera for this test. |
2049 | Here is a matrix of mmap possibilities: | |
2050 | mmap private not fixed | |
2051 | mmap private fixed at somewhere currently unmapped | |
2052 | mmap private fixed at somewhere already mapped | |
2053 | mmap shared not fixed | |
2054 | mmap shared fixed at somewhere currently unmapped | |
2055 | mmap shared fixed at somewhere already mapped | |
2056 | For private mappings, we should verify that changes cannot be read() | |
2057 | back from the file, nor mmap's back from the file at a different | |
2058 | address. (There have been systems where private was not correctly | |
2059 | implemented like the infamous i386 svr4.0, and systems where the | |
2060 | VM page cache was not coherent with the filesystem buffer cache | |
2061 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
2062 | For shared mappings, we should conversely verify that changes get | |
2063 | propogated back to all the places they're supposed to be. | |
2064 | ||
2065 | Grep wants private fixed already mapped. | |
2066 | The main things grep needs to know about mmap are: | |
2067 | * does it exist and is it safe to write into the mmap'd area | |
2068 | * how to use it (BSD variants) */ | |
2b576293 C |
2069 | #include <sys/types.h> |
2070 | #include <fcntl.h> | |
2071 | #include <sys/mman.h> | |
2072 | ||
bfde4a67 | 2073 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 2074 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
2075 | # ifdef HAVE_UNISTD_H |
2076 | # include <unistd.h> | |
8b701284 ILT |
2077 | # endif |
2078 | ||
bfde4a67 SG |
2079 | /* Assume that all systems that can run configure have sys/param.h. */ |
2080 | # ifndef HAVE_SYS_PARAM_H | |
2081 | # define HAVE_SYS_PARAM_H 1 | |
2082 | # endif | |
2083 | ||
2084 | # ifdef _SC_PAGESIZE | |
2085 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
2086 | # else /* no _SC_PAGESIZE */ | |
2087 | # ifdef HAVE_SYS_PARAM_H | |
2088 | # include <sys/param.h> | |
2089 | # ifdef EXEC_PAGESIZE | |
2090 | # define getpagesize() EXEC_PAGESIZE | |
2091 | # else /* no EXEC_PAGESIZE */ | |
2092 | # ifdef NBPG | |
2093 | # define getpagesize() NBPG * CLSIZE | |
2094 | # ifndef CLSIZE | |
2095 | # define CLSIZE 1 | |
2096 | # endif /* no CLSIZE */ | |
2097 | # else /* no NBPG */ | |
2098 | # ifdef NBPC | |
2099 | # define getpagesize() NBPC | |
2100 | # else /* no NBPC */ | |
2101 | # ifdef PAGESIZE | |
2102 | # define getpagesize() PAGESIZE | |
2103 | # endif /* PAGESIZE */ | |
2104 | # endif /* no NBPC */ | |
2105 | # endif /* no NBPG */ | |
2106 | # endif /* no EXEC_PAGESIZE */ | |
2107 | # else /* no HAVE_SYS_PARAM_H */ | |
2108 | # define getpagesize() 8192 /* punt totally */ | |
2109 | # endif /* no HAVE_SYS_PARAM_H */ | |
2110 | # endif /* no _SC_PAGESIZE */ | |
2111 | ||
2112 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
2113 | |
2114 | #ifdef __cplusplus | |
bfde4a67 | 2115 | extern "C" { void *malloc(unsigned); } |
2b576293 | 2116 | #else |
bfde4a67 | 2117 | char *malloc(); |
2b576293 C |
2118 | #endif |
2119 | ||
2120 | int | |
2121 | main() | |
2122 | { | |
bfde4a67 SG |
2123 | char *data, *data2, *data3; |
2124 | int i, pagesize; | |
2125 | int fd; | |
2126 | ||
2127 | pagesize = getpagesize(); | |
2128 | ||
2129 | /* | |
2130 | * First, make a file with some known garbage in it. | |
2131 | */ | |
2132 | data = malloc(pagesize); | |
2133 | if (!data) | |
2134 | exit(1); | |
2135 | for (i = 0; i < pagesize; ++i) | |
2136 | *(data + i) = rand(); | |
2137 | umask(0); | |
2138 | fd = creat("conftestmmap", 0600); | |
2139 | if (fd < 0) | |
2140 | exit(1); | |
2141 | if (write(fd, data, pagesize) != pagesize) | |
2142 | exit(1); | |
2143 | close(fd); | |
2144 | ||
2145 | /* | |
2146 | * Next, try to mmap the file at a fixed address which | |
2147 | * already has something else allocated at it. If we can, | |
2148 | * also make sure that we see the same garbage. | |
2149 | */ | |
2150 | fd = open("conftestmmap", O_RDWR); | |
2151 | if (fd < 0) | |
2152 | exit(1); | |
2153 | data2 = malloc(2 * pagesize); | |
2154 | if (!data2) | |
2155 | exit(1); | |
2156 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2157 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2158 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2159 | exit(1); | |
2160 | for (i = 0; i < pagesize; ++i) | |
2161 | if (*(data + i) != *(data2 + i)) | |
2162 | exit(1); | |
2163 | ||
2164 | /* | |
2165 | * Finally, make sure that changes to the mapped area | |
2166 | * do not percolate back to the file as seen by read(). | |
2167 | * (This is a bug on some variants of i386 svr4.0.) | |
2168 | */ | |
2169 | for (i = 0; i < pagesize; ++i) | |
2170 | *(data2 + i) = *(data2 + i) + 1; | |
2171 | data3 = malloc(pagesize); | |
2172 | if (!data3) | |
2173 | exit(1); | |
2174 | if (read(fd, data3, pagesize) != pagesize) | |
2175 | exit(1); | |
2176 | for (i = 0; i < pagesize; ++i) | |
2177 | if (*(data + i) != *(data3 + i)) | |
2178 | exit(1); | |
2179 | close(fd); | |
2180 | unlink("conftestmmap"); | |
2181 | exit(0); | |
2b576293 C |
2182 | } |
2183 | ||
2184 | EOF | |
018d76dd | 2185 | if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
2186 | then |
2187 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 2188 | else |
bfde4a67 SG |
2189 | echo "configure: failed program was:" >&5 |
2190 | cat conftest.$ac_ext >&5 | |
2191 | rm -fr conftest* | |
2192 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 2193 | fi |
ef6c51d1 | 2194 | rm -fr conftest* |
8b701284 ILT |
2195 | fi |
2196 | ||
bfde4a67 SG |
2197 | fi |
2198 | ||
2199 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2200 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
2201 | cat >> confdefs.h <<\EOF |
2202 | #define HAVE_MMAP 1 | |
2203 | EOF | |
2204 | ||
2205 | fi | |
2206 | ||
5436fc65 | 2207 | |
5819f35d | 2208 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
018d76dd | 2209 | echo "configure:2210: checking whether malloc must be declared" >&5 |
5819f35d SG |
2210 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
2211 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2212 | else | |
2213 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2214 | #line 2215 "configure" |
5819f35d SG |
2215 | #include "confdefs.h" |
2216 | ||
2217 | #include <stdio.h> | |
2218 | #ifdef HAVE_STRING_H | |
2219 | #include <string.h> | |
2220 | #else | |
2221 | #ifdef HAVE_STRINGS_H | |
2222 | #include <strings.h> | |
2223 | #endif | |
2224 | #endif | |
2225 | #ifdef HAVE_STDLIB_H | |
2226 | #include <stdlib.h> | |
2227 | #endif | |
2228 | #ifdef HAVE_UNISTD_H | |
2229 | #include <unistd.h> | |
2230 | #endif | |
bfde4a67 | 2231 | int main() { |
5819f35d SG |
2232 | char *(*pfn) = (char *(*)) malloc |
2233 | ; return 0; } | |
2234 | EOF | |
018d76dd | 2235 | if { (eval echo configure:2236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2236 | rm -rf conftest* |
2237 | bfd_cv_decl_needed_malloc=no | |
2238 | else | |
bfde4a67 SG |
2239 | echo "configure: failed program was:" >&5 |
2240 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2241 | rm -rf conftest* |
2242 | bfd_cv_decl_needed_malloc=yes | |
2243 | fi | |
2244 | rm -f conftest* | |
5819f35d SG |
2245 | fi |
2246 | ||
2247 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
2248 | if test $bfd_cv_decl_needed_malloc = yes; then | |
2249 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2250 | cat >> confdefs.h <<EOF | |
2251 | #define $bfd_tr_decl 1 | |
2252 | EOF | |
2253 | ||
2254 | fi | |
2255 | ||
2256 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
018d76dd | 2257 | echo "configure:2258: checking whether realloc must be declared" >&5 |
5819f35d SG |
2258 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
2259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2260 | else | |
2261 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2262 | #line 2263 "configure" |
5819f35d SG |
2263 | #include "confdefs.h" |
2264 | ||
2265 | #include <stdio.h> | |
2266 | #ifdef HAVE_STRING_H | |
2267 | #include <string.h> | |
2268 | #else | |
2269 | #ifdef HAVE_STRINGS_H | |
2270 | #include <strings.h> | |
2271 | #endif | |
2272 | #endif | |
2273 | #ifdef HAVE_STDLIB_H | |
2274 | #include <stdlib.h> | |
2275 | #endif | |
2276 | #ifdef HAVE_UNISTD_H | |
2277 | #include <unistd.h> | |
2278 | #endif | |
bfde4a67 | 2279 | int main() { |
5819f35d SG |
2280 | char *(*pfn) = (char *(*)) realloc |
2281 | ; return 0; } | |
2282 | EOF | |
018d76dd | 2283 | if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2284 | rm -rf conftest* |
2285 | bfd_cv_decl_needed_realloc=no | |
2286 | else | |
bfde4a67 SG |
2287 | echo "configure: failed program was:" >&5 |
2288 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2289 | rm -rf conftest* |
2290 | bfd_cv_decl_needed_realloc=yes | |
2291 | fi | |
2292 | rm -f conftest* | |
5819f35d SG |
2293 | fi |
2294 | ||
2295 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
2296 | if test $bfd_cv_decl_needed_realloc = yes; then | |
2297 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2298 | cat >> confdefs.h <<EOF | |
2299 | #define $bfd_tr_decl 1 | |
2300 | EOF | |
2301 | ||
2302 | fi | |
2303 | ||
2304 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
018d76dd | 2305 | echo "configure:2306: checking whether free must be declared" >&5 |
5819f35d SG |
2306 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
2307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2308 | else | |
2309 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2310 | #line 2311 "configure" |
5819f35d SG |
2311 | #include "confdefs.h" |
2312 | ||
2313 | #include <stdio.h> | |
2314 | #ifdef HAVE_STRING_H | |
2315 | #include <string.h> | |
2316 | #else | |
2317 | #ifdef HAVE_STRINGS_H | |
2318 | #include <strings.h> | |
2319 | #endif | |
2320 | #endif | |
2321 | #ifdef HAVE_STDLIB_H | |
2322 | #include <stdlib.h> | |
2323 | #endif | |
2324 | #ifdef HAVE_UNISTD_H | |
2325 | #include <unistd.h> | |
2326 | #endif | |
bfde4a67 | 2327 | int main() { |
5819f35d SG |
2328 | char *(*pfn) = (char *(*)) free |
2329 | ; return 0; } | |
2330 | EOF | |
018d76dd | 2331 | if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2332 | rm -rf conftest* |
2333 | bfd_cv_decl_needed_free=no | |
2334 | else | |
bfde4a67 SG |
2335 | echo "configure: failed program was:" >&5 |
2336 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2337 | rm -rf conftest* |
2338 | bfd_cv_decl_needed_free=yes | |
2339 | fi | |
2340 | rm -f conftest* | |
5819f35d SG |
2341 | fi |
2342 | ||
2343 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
2344 | if test $bfd_cv_decl_needed_free = yes; then | |
2345 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2346 | cat >> confdefs.h <<EOF | |
2347 | #define $bfd_tr_decl 1 | |
2348 | EOF | |
2349 | ||
2350 | fi | |
2351 | ||
fef1696f | 2352 | |
47ef0da5 | 2353 | |
89e673a4 SG |
2354 | |
2355 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5d394f70 SG |
2356 | case ${host_os} in |
2357 | hpux*) | |
2358 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
018d76dd | 2359 | echo "configure:2360: checking for HPUX/OSF thread support" >&5 |
5d394f70 | 2360 | if test -f /usr/include/dce/cma_config.h ; then |
c4c9112a SG |
2361 | if test "$GCC" = "yes" ; then |
2362 | echo "$ac_t""yes" 1>&6 | |
2363 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
2364 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
2365 | EOF | |
2366 | ||
c4c9112a SG |
2367 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
2368 | else | |
2369 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
2370 | fi | |
6c310da8 SG |
2371 | else |
2372 | echo "$ac_t""no" 1>&6 | |
2373 | fi | |
2374 | ;; | |
2375 | solaris*) | |
2376 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
018d76dd | 2377 | echo "configure:2378: checking for Solaris thread debugging library" >&5 |
6c310da8 SG |
2378 | if test -f /usr/lib/libthread_db.so.1 ; then |
2379 | echo "$ac_t""yes" 1>&6 | |
2380 | cat >> confdefs.h <<\EOF | |
2381 | #define HAVE_THREAD_DB_LIB 1 | |
2382 | EOF | |
2383 | ||
2384 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
bfde4a67 | 2385 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
018d76dd | 2386 | echo "configure:2387: checking for dlopen in -ldl" >&5 |
bfde4a67 | 2387 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
2388 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2389 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2390 | else | |
2391 | ac_save_LIBS="$LIBS" | |
2392 | LIBS="-ldl $LIBS" | |
2393 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2394 | #line 2395 "configure" |
95b47547 SG |
2395 | #include "confdefs.h" |
2396 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2397 | /* We use char because int might match the return type of a gcc2 | |
2398 | builtin and then its argument prototype would still apply. */ | |
2399 | char dlopen(); | |
2400 | ||
bfde4a67 | 2401 | int main() { |
95b47547 SG |
2402 | dlopen() |
2403 | ; return 0; } | |
2404 | EOF | |
018d76dd | 2405 | if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
95b47547 SG |
2406 | rm -rf conftest* |
2407 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2408 | else | |
bfde4a67 SG |
2409 | echo "configure: failed program was:" >&5 |
2410 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
2411 | rm -rf conftest* |
2412 | eval "ac_cv_lib_$ac_lib_var=no" | |
2413 | fi | |
2414 | rm -f conftest* | |
2415 | LIBS="$ac_save_LIBS" | |
2416 | ||
2417 | fi | |
2418 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2419 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
2420 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
2421 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
2422 | cat >> confdefs.h <<EOF |
2423 | #define $ac_tr_lib 1 | |
2424 | EOF | |
2425 | ||
2426 | LIBS="-ldl $LIBS" | |
2427 | ||
2428 | else | |
2429 | echo "$ac_t""no" 1>&6 | |
2430 | fi | |
2431 | ||
ef6c51d1 SG |
2432 | if test "$GCC" = "yes" ; then |
2433 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic" | |
2434 | fi | |
5d394f70 SG |
2435 | else |
2436 | echo "$ac_t""no" 1>&6 | |
2437 | fi | |
2438 | ;; | |
2439 | esac | |
4915acad | 2440 | |
89e673a4 | 2441 | fi |
47ef0da5 | 2442 | |
5436fc65 | 2443 | ENABLE_CFLAGS= |
5436fc65 C |
2444 | |
2445 | # Check whether --enable-netrom or --disable-netrom was given. | |
1a7b4b7c DE |
2446 | if test "${enable_netrom+set}" = set; then |
2447 | enableval="$enable_netrom" | |
5436fc65 C |
2448 | case "${enableval}" in |
2449 | yes) enable_netrom=yes ;; | |
2450 | no) enable_netrom=no ;; | |
2451 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
2452 | esac | |
2453 | fi | |
2454 | ||
2455 | ||
2456 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 2457 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
5436fc65 C |
2458 | fi |
2459 | ||
2460 | # start-sanitize-gdbtk | |
2476848a MH |
2461 | ENABLE_IDE= |
2462 | # Check whether --enable-ide or --disable-ide was given. | |
2463 | if test "${enable_ide+set}" = set; then | |
2464 | enableval="$enable_ide" | |
2465 | : | |
2466 | fi | |
2467 | ||
2468 | if test "$enable_ide" = yes; then | |
2469 | enable_ide=yes | |
2470 | ENABLE_IDE=1 | |
2471 | else | |
2472 | enable_ide=no | |
2473 | fi | |
2474 | ||
2475 | ||
5436fc65 C |
2476 | ENABLE_GDBTK= |
2477 | ||
2478 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
2479 | if test "${enable_gdbtk+set}" = set; then |
2480 | enableval="$enable_gdbtk" | |
5436fc65 | 2481 | case "${enableval}" in |
0fe1522a SG |
2482 | yes) |
2483 | case "$host" in | |
2484 | *go32*) | |
2485 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
2486 | enable_gdbtk=no ;; | |
8a19b35a | 2487 | *windows*) |
b613bfbf GN |
2488 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
2489 | enable_gdbtk=no ;; | |
0fe1522a SG |
2490 | *) |
2491 | enable_gdbtk=yes ;; | |
2492 | esac ;; | |
2493 | no) | |
2494 | enable_gdbtk=no ;; | |
2495 | *) | |
2496 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 2497 | esac |
0fe1522a SG |
2498 | else |
2499 | ||
b613bfbf | 2500 | # Default is on for everything but go32 and cygwin32 |
0fe1522a | 2501 | case "$host" in |
8a19b35a | 2502 | *go32* | *windows*) |
b613bfbf | 2503 | ;; |
0fe1522a SG |
2504 | *) |
2505 | enable_gdbtk=yes ;; | |
2506 | esac | |
2507 | ||
5436fc65 C |
2508 | fi |
2509 | ||
2510 | ||
9b119644 ILT |
2511 | # In the cygwin32 environment, we need some additional flags. |
2512 | echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 | |
018d76dd | 2513 | echo "configure:2514: checking for cygwin32" >&5 |
9b119644 ILT |
2514 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then |
2515 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2516 | else | |
2517 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2518 | #line 2519 "configure" |
9b119644 ILT |
2519 | #include "confdefs.h" |
2520 | ||
2521 | #ifdef __CYGWIN32__ | |
2522 | lose | |
2523 | #endif | |
2524 | EOF | |
2525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2526 | egrep "lose" >/dev/null 2>&1; then | |
2527 | rm -rf conftest* | |
2528 | gdb_cv_os_cygwin32=yes | |
2529 | else | |
2530 | rm -rf conftest* | |
2531 | gdb_cv_os_cygwin32=no | |
2532 | fi | |
2533 | rm -f conftest* | |
2534 | ||
2535 | fi | |
2536 | ||
2537 | echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6 | |
2538 | ||
2539 | WIN32LIBS= | |
2540 | WIN32LDAPP= | |
2541 | ||
2542 | ||
2543 | ||
2544 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
2545 | if test x$enable_ide = xyes; then | |
2546 | WIN32LIBS="-ladvapi32" | |
2547 | fi | |
2548 | fi | |
2549 | ||
2550 | configdir="unix" | |
8a19b35a | 2551 | |
5436fc65 | 2552 | if test "${enable_gdbtk}" = "yes"; then |
0fe1522a | 2553 | |
047465fd TT |
2554 | |
2555 | # | |
2556 | # Ok, lets find the tcl configuration | |
2557 | # First, look for one uninstalled. | |
2558 | # the alternative search directory is invoked by --with-tclconfig | |
2559 | # | |
5436fc65 | 2560 | |
047465fd TT |
2561 | if test x"${no_tcl}" = x ; then |
2562 | # we reset no_tcl in case something fails here | |
2563 | no_tcl=true | |
2564 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
2565 | if test "${with_tclconfig+set}" = set; then | |
2566 | withval="$with_tclconfig" | |
2567 | with_tclconfig=${withval} | |
5436fc65 C |
2568 | fi |
2569 | ||
047465fd | 2570 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
018d76dd | 2571 | echo "configure:2572: checking for Tcl configuration" >&5 |
047465fd | 2572 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
2573 | echo $ac_n "(cached) $ac_c" 1>&6 |
2574 | else | |
047465fd | 2575 | |
1a7b4b7c | 2576 | |
047465fd TT |
2577 | # First check to see if --with-tclconfig was specified. |
2578 | if test x"${with_tclconfig}" != x ; then | |
2579 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
2580 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
2581 | else | |
2582 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2583 | fi |
047465fd | 2584 | fi |
5436fc65 | 2585 | |
047465fd TT |
2586 | # then check for a private Tcl installation |
2587 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2588 | for i in \ | |
2589 | ../tcl \ | |
2590 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
2591 | ../../tcl \ | |
2592 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
2593 | ../../../tcl \ | |
2594 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2595 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
2596 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2597 | break |
2598 | fi | |
2599 | done | |
2600 | fi | |
2601 | # check in a few common install locations | |
2602 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2603 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2604 | if test -f "$i/tclConfig.sh" ; then | |
2605 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
2606 | break | |
2607 | fi | |
2608 | done | |
2609 | fi | |
2610 | # check in a few other private locations | |
2611 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2612 | for i in \ | |
2613 | ${srcdir}/../tcl \ | |
2614 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2615 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
2616 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2617 | break |
2618 | fi | |
2619 | done | |
2620 | fi | |
2621 | ||
5436fc65 | 2622 | fi |
1a7b4b7c | 2623 | |
047465fd TT |
2624 | if test x"${ac_cv_c_tclconfig}" = x ; then |
2625 | TCLCONFIG="# no Tcl configs found" | |
2626 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
2627 | else | |
2628 | no_tcl= | |
2629 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
2630 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 2631 | fi |
5436fc65 C |
2632 | fi |
2633 | ||
0cf433d9 ILT |
2634 | if test -z "${no_tcl}"; then |
2635 | ||
047465fd | 2636 | . $TCLCONFIG |
5436fc65 | 2637 | |
047465fd TT |
2638 | |
2639 | ||
2640 | ||
2641 | ||
2642 | ||
5436fc65 | 2643 | |
5436fc65 | 2644 | |
5436fc65 | 2645 | |
5436fc65 | 2646 | |
047465fd TT |
2647 | |
2648 | ||
2649 | ||
2650 | ||
2651 | ||
2652 | ||
2653 | ||
2654 | ||
2655 | ||
2656 | ||
2657 | ||
2658 | ||
5436fc65 | 2659 | |
5436fc65 | 2660 | |
5436fc65 | 2661 | |
0cf433d9 | 2662 | |
047465fd TT |
2663 | # |
2664 | # Ok, lets find the tk configuration | |
2665 | # First, look for one uninstalled. | |
2666 | # the alternative search directory is invoked by --with-tkconfig | |
2667 | # | |
5436fc65 | 2668 | |
047465fd TT |
2669 | if test x"${no_tk}" = x ; then |
2670 | # we reset no_tk in case something fails here | |
2671 | no_tk=true | |
2672 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
2673 | if test "${with_tkconfig+set}" = set; then | |
2674 | withval="$with_tkconfig" | |
2675 | with_tkconfig=${withval} | |
5436fc65 C |
2676 | fi |
2677 | ||
047465fd | 2678 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
018d76dd | 2679 | echo "configure:2680: checking for Tk configuration" >&5 |
047465fd | 2680 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
2681 | echo $ac_n "(cached) $ac_c" 1>&6 |
2682 | else | |
047465fd | 2683 | |
5436fc65 | 2684 | |
047465fd TT |
2685 | # First check to see if --with-tkconfig was specified. |
2686 | if test x"${with_tkconfig}" != x ; then | |
2687 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
2688 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
2689 | else | |
2690 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2691 | fi |
047465fd | 2692 | fi |
5436fc65 | 2693 | |
047465fd TT |
2694 | # then check for a private Tk library |
2695 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2696 | for i in \ | |
2697 | ../tk \ | |
2698 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
2699 | ../../tk \ | |
2700 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
2701 | ../../../tk \ | |
2702 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2703 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
2704 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2705 | break |
2706 | fi | |
2707 | done | |
2708 | fi | |
2709 | # check in a few common install locations | |
2710 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2711 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2712 | if test -f "$i/tkConfig.sh" ; then | |
2713 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
2714 | break | |
2715 | fi | |
2716 | done | |
2717 | fi | |
2718 | # check in a few other private locations | |
2719 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2720 | for i in \ | |
2721 | ${srcdir}/../tk \ | |
2722 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
2723 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
2724 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
2725 | break |
2726 | fi | |
2727 | done | |
2728 | fi | |
2729 | ||
5436fc65 | 2730 | fi |
5436fc65 | 2731 | |
047465fd TT |
2732 | if test x"${ac_cv_c_tkconfig}" = x ; then |
2733 | TKCONFIG="# no Tk configs found" | |
2734 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
2735 | else | |
2736 | no_tk= | |
2737 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
2738 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
2739 | fi | |
5436fc65 C |
2740 | fi |
2741 | ||
2742 | ||
5436fc65 | 2743 | |
0cf433d9 ILT |
2744 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
2745 | # point to doing Tcl. | |
2746 | if test -z "${no_tk}"; then | |
2747 | ||
047465fd TT |
2748 | if test -f "$TKCONFIG" ; then |
2749 | . $TKCONFIG | |
2750 | fi | |
5436fc65 | 2751 | |
047465fd TT |
2752 | |
2753 | ||
5436fc65 | 2754 | |
047465fd | 2755 | |
5436fc65 C |
2756 | |
2757 | ||
a2b63bbd | 2758 | |
047465fd TT |
2759 | |
2760 | ||
2761 | ||
9b119644 | 2762 | |
047465fd | 2763 | |
0cf433d9 | 2764 | |
5436fc65 | 2765 | # |
4e327047 TT |
2766 | # Ok, lets find the tcl source trees so we can use the headers |
2767 | # Warning: transition of version 9 to 10 will break this algorithm | |
2768 | # because 10 sorts before 9. We also look for just tcl. We have to | |
2769 | # be careful that we don't match stuff like tclX by accident. | |
2770 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 2771 | # |
8a19b35a | 2772 | |
4e327047 | 2773 | no_tcl=true |
8a19b35a | 2774 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 |
018d76dd | 2775 | echo "configure:2776: checking for Tcl private headers. dir=${configdir}" >&5 |
4e327047 | 2776 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
2777 | if test "${with_tclinclude+set}" = set; then |
2778 | withval="$with_tclinclude" | |
4e327047 TT |
2779 | with_tclinclude=${withval} |
2780 | fi | |
2781 | ||
2782 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
2783 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2784 | else | |
2785 | ||
2786 | # first check to see if --with-tclinclude was specified | |
2787 | if test x"${with_tclinclude}" != x ; then | |
2788 | if test -f ${with_tclinclude}/tclInt.h ; then | |
2789 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
2790 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
2791 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 2792 | else |
4e327047 TT |
2793 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2794 | fi | |
2795 | fi | |
047465fd TT |
2796 | |
2797 | # next check if it came with Tcl configuration file | |
2798 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2799 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
2800 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
2801 | fi | |
2802 | fi | |
2803 | ||
4e327047 TT |
2804 | # next check in private source directory |
2805 | # | |
2806 | # since ls returns lowest version numbers first, reverse its output | |
2807 | if test x"${ac_cv_c_tclh}" = x ; then | |
2808 | for i in \ | |
2809 | ${srcdir}/../tcl \ | |
047465fd | 2810 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2811 | ${srcdir}/../../tcl \ |
047465fd | 2812 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2813 | ${srcdir}/../../../tcl \ |
047465fd | 2814 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 2815 | if test -f $i/generic/tclInt.h ; then |
047465fd | 2816 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 2817 | break |
4e327047 TT |
2818 | fi |
2819 | done | |
2820 | fi | |
2821 | # finally check in a few common install locations | |
2822 | # | |
2823 | # since ls returns lowest version numbers first, reverse its output | |
2824 | if test x"${ac_cv_c_tclh}" = x ; then | |
2825 | for i in \ | |
047465fd TT |
2826 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
2827 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
2828 | /usr/local/src/tcl \ |
2829 | /usr/local/lib/tcl \ | |
2830 | ${prefix}/include ; do | |
047465fd TT |
2831 | if test -f $i/generic/tclInt.h ; then |
2832 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2833 | break |
2834 | fi | |
2835 | done | |
2836 | fi | |
2837 | # see if one is installed | |
2838 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 2839 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2840 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
018d76dd | 2841 | echo "configure:2842: checking for tclInt.h" >&5 |
5436fc65 C |
2842 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2843 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2844 | else | |
2845 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2846 | #line 2847 "configure" |
5436fc65 | 2847 | #include "confdefs.h" |
4e327047 | 2848 | #include <tclInt.h> |
5436fc65 | 2849 | EOF |
1a7b4b7c | 2850 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
018d76dd | 2851 | { (eval echo configure:2852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2852 | ac_err=`grep -v '^ *+' conftest.out` |
2853 | if test -z "$ac_err"; then | |
2854 | rm -rf conftest* | |
2855 | eval "ac_cv_header_$ac_safe=yes" | |
2856 | else | |
2857 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2858 | echo "configure: failed program was:" >&5 |
2859 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2860 | rm -rf conftest* |
2861 | eval "ac_cv_header_$ac_safe=no" | |
2862 | fi | |
2863 | rm -f conftest* | |
2864 | fi | |
2865 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2866 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 2867 | ac_cv_c_tclh=installed |
5436fc65 C |
2868 | else |
2869 | echo "$ac_t""no" 1>&6 | |
4e327047 | 2870 | ac_cv_c_tclh="" |
5436fc65 C |
2871 | fi |
2872 | ||
4e327047 TT |
2873 | fi |
2874 | ||
2875 | fi | |
2876 | ||
2877 | if test x"${ac_cv_c_tclh}" = x ; then | |
2878 | TCLHDIR="# no Tcl private headers found" | |
2879 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
2880 | fi | |
2881 | if test x"${ac_cv_c_tclh}" != x ; then | |
2882 | no_tcl="" | |
1a7b4b7c | 2883 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
2884 | echo "$ac_t""is installed" 1>&6 |
2885 | TCLHDIR="" | |
2886 | else | |
2887 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
2888 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
2889 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 2890 | fi |
5436fc65 | 2891 | fi |
4e327047 | 2892 | |
4e327047 | 2893 | |
5436fc65 | 2894 | |
0cf433d9 | 2895 | |
5436fc65 | 2896 | # |
4e327047 TT |
2897 | # Ok, lets find the tk source trees so we can use the headers |
2898 | # If the directory (presumably symlink) named "tk" exists, use that one | |
2899 | # in preference to any others. Same logic is used when choosing library | |
2900 | # and again with Tcl. The search order is the best place to look first, then in | |
2901 | # decreasing significance. The loop breaks if the trigger file is found. | |
2902 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
2903 | # directory. This converts the path from a relative to an absolute, so | |
2904 | # recursive cache variables for the path will work right. We check all | |
2905 | # the possible paths in one loop rather than many seperate loops to speed | |
2906 | # things up. | |
047465fd | 2907 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 2908 | # |
047465fd | 2909 | no_tk=true |
4e327047 | 2910 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
018d76dd | 2911 | echo "configure:2912: checking for Tk private headers" >&5 |
4e327047 | 2912 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
2913 | if test "${with_tkinclude+set}" = set; then |
2914 | withval="$with_tkinclude" | |
4e327047 TT |
2915 | with_tkinclude=${withval} |
2916 | fi | |
2917 | ||
4e327047 TT |
2918 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
2919 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2920 | else | |
2921 | ||
2922 | # first check to see if --with-tkinclude was specified | |
2923 | if test x"${with_tkinclude}" != x ; then | |
2924 | if test -f ${with_tkinclude}/tk.h ; then | |
2925 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
2926 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
2927 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 2928 | else |
4e327047 TT |
2929 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2930 | fi | |
2931 | fi | |
047465fd TT |
2932 | |
2933 | # next check if it came with Tk configuration file | |
2934 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2935 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
2936 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
2937 | fi | |
2938 | fi | |
2939 | ||
4e327047 TT |
2940 | # next check in private source directory |
2941 | # | |
047465fd | 2942 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2943 | if test x"${ac_cv_c_tkh}" = x ; then |
2944 | for i in \ | |
2945 | ${srcdir}/../tk \ | |
047465fd | 2946 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2947 | ${srcdir}/../../tk \ |
047465fd | 2948 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2949 | ${srcdir}/../../../tk \ |
047465fd TT |
2950 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
2951 | if test -f $i/generic/tk.h ; then | |
2952 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2953 | break |
2954 | fi | |
4e327047 TT |
2955 | done |
2956 | fi | |
2957 | # finally check in a few common install locations | |
2958 | # | |
047465fd | 2959 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2960 | if test x"${ac_cv_c_tkh}" = x ; then |
2961 | for i in \ | |
047465fd TT |
2962 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
2963 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
2964 | /usr/local/src/tk \ |
2965 | /usr/local/lib/tk \ | |
2966 | ${prefix}/include ; do | |
047465fd TT |
2967 | if test -f $i/generic/tk.h ; then |
2968 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2969 | break |
2970 | fi | |
2971 | done | |
2972 | fi | |
2973 | # see if one is installed | |
2974 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 2975 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2976 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
018d76dd | 2977 | echo "configure:2978: checking for tk.h" >&5 |
5436fc65 C |
2978 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2979 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2980 | else | |
2981 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 2982 | #line 2983 "configure" |
5436fc65 | 2983 | #include "confdefs.h" |
4e327047 | 2984 | #include <tk.h> |
5436fc65 | 2985 | EOF |
1a7b4b7c | 2986 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
018d76dd | 2987 | { (eval echo configure:2988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2988 | ac_err=`grep -v '^ *+' conftest.out` |
2989 | if test -z "$ac_err"; then | |
2990 | rm -rf conftest* | |
2991 | eval "ac_cv_header_$ac_safe=yes" | |
2992 | else | |
2993 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2994 | echo "configure: failed program was:" >&5 |
2995 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2996 | rm -rf conftest* |
2997 | eval "ac_cv_header_$ac_safe=no" | |
2998 | fi | |
2999 | rm -f conftest* | |
3000 | fi | |
3001 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3002 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 3003 | ac_cv_c_tkh=installed |
5436fc65 C |
3004 | else |
3005 | echo "$ac_t""no" 1>&6 | |
047465fd | 3006 | ac_cv_c_tkh="" |
5436fc65 C |
3007 | fi |
3008 | ||
4e327047 TT |
3009 | fi |
3010 | ||
3011 | fi | |
3012 | ||
3013 | if test x"${ac_cv_c_tkh}" != x ; then | |
3014 | no_tk="" | |
3015 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
3016 | echo "$ac_t""is installed" 1>&6 | |
3017 | TKHDIR="" | |
3018 | else | |
047465fd | 3019 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
3020 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
3021 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
3022 | fi |
3023 | else | |
4e327047 TT |
3024 | TKHDIR="# no Tk directory found" |
3025 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
3026 | no_tk=true | |
5436fc65 C |
3027 | fi |
3028 | ||
5436fc65 C |
3029 | |
3030 | ||
2476848a MH |
3031 | |
3032 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
018d76dd | 3033 | echo "configure:3034: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
3034 | if test x"${ac_cv_c_itclh}" = x ; then |
3035 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do | |
3036 | if test -f $i/src/itcl.h ; then | |
3037 | ac_cv_c_itclh=`(cd $i/src; pwd)` | |
3038 | break | |
3039 | fi | |
3040 | done | |
3041 | fi | |
3042 | if test x"${ac_cv_c_itclh}" = x ; then | |
3043 | ITCLHDIR="# no Itcl private headers found" | |
3044 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
3045 | fi | |
3046 | if test x"${ac_cv_c_itclh}" != x ; then | |
3047 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
3048 | fi | |
3049 | # should always be here | |
3050 | ITCLLIB="../itcl/src/libitcl.a" | |
3051 | ||
3052 | ||
3053 | ||
3054 | ||
3055 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
018d76dd | 3056 | echo "configure:3057: checking for Tix private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
3057 | if test x"${ac_cv_c_tixh}" = x ; then |
3058 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
3059 | if test -f $i/generic/tix.h ; then | |
3060 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
3061 | break | |
3062 | fi | |
3063 | done | |
3064 | fi | |
3065 | if test x"${ac_cv_c_tixh}" = x ; then | |
3066 | TIXHDIR="# no Tix private headers found" | |
3067 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
3068 | fi | |
3069 | if test x"${ac_cv_c_tixh}" != x ; then | |
3070 | TIXHDIR="-I${ac_cv_c_tixh}" | |
3071 | fi | |
2476848a MH |
3072 | |
3073 | ||
3074 | ||
6bc5b2fa | 3075 | # now look for tix library stuff |
1154b47a | 3076 | TIXVERSION=4.1.8.0 |
6bc5b2fa MH |
3077 | . ${ac_cv_c_tclconfig}/tclConfig.sh |
3078 | case "${host}" in | |
3079 | *-*-cygwin32*) | |
f1f6dd9c | 3080 | tixdir=../tix/win/tcl8.0 |
6bc5b2fa MH |
3081 | ;; |
3082 | *) | |
1154b47a | 3083 | tixdir=../tix/unix/tk8.0 |
6bc5b2fa MH |
3084 | ;; |
3085 | esac | |
3086 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then | |
3087 | TIXLIB="-L${tixdir} -ltix${TIXVERSION}" | |
018d76dd | 3088 | TIX_DEPS="${tixdir}/libtix${TIXVERSION}.a" |
6bc5b2fa MH |
3089 | else |
3090 | TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`" | |
018d76dd | 3091 | TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`.a" |
6bc5b2fa | 3092 | fi |
5436fc65 | 3093 | |
0cf433d9 | 3094 | ENABLE_GDBTK=1 |
5436fc65 | 3095 | |
6c310da8 | 3096 | # Include some libraries that Tcl and Tk want. |
2476848a | 3097 | if test "${enable_ide}" = "yes"; then |
018d76dd KS |
3098 | TCL_LIBS='$(LIBIDE) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3099 | CONFIG_DEPS='$(LIBIDE) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 3100 | else |
b2b1c5da MM |
3101 | TCL_LIBS='$(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3102 | CONFIG_DEPS='$(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 3103 | fi |
46964086 TT |
3104 | # Yes, the ordering seems wrong here. But it isn't. |
3105 | # TK_LIBS is the list of libraries that need to be linked | |
3106 | # after Tcl/Tk. | |
3107 | LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}" | |
8d21d88c | 3108 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o tracepoint.o" |
9b119644 ILT |
3109 | |
3110 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
018d76dd | 3111 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32" |
9b119644 ILT |
3112 | WIN32LDAPP="-Wl,--subsystem,windows" |
3113 | fi | |
0cf433d9 | 3114 | fi |
1a57cd09 | 3115 | fi |
a2b63bbd | 3116 | fi |
66efdff9 | 3117 | |
66efdff9 | 3118 | |
5436fc65 | 3119 | |
66efdff9 JM |
3120 | |
3121 | ||
6bc5b2fa | 3122 | |
018d76dd | 3123 | |
5436fc65 C |
3124 | # end-sanitize-gdbtk |
3125 | ||
3126 | ||
3127 | ||
3128 | ||
3129 | ||
018d76dd | 3130 | |
1d5eb137 FF |
3131 | # Begin stuff to support --enable-shared |
3132 | # Check whether --enable-shared or --disable-shared was given. | |
3133 | if test "${enable_shared+set}" = set; then | |
3134 | enableval="$enable_shared" | |
3135 | case "${enableval}" in | |
3136 | yes) shared=true ;; | |
3137 | no) shared=false ;; | |
3138 | *) shared=true ;; | |
3139 | esac | |
3140 | fi | |
3141 | ||
3142 | HLDFLAGS= | |
3143 | HLDENV= | |
3144 | # If we have shared libraries, try to set rpath reasonably. | |
3145 | if test "${shared}" = "true"; then | |
3146 | case "${host}" in | |
3147 | *-*-hpux*) | |
3148 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
3149 | ;; | |
3150 | *-*-irix5* | *-*-irix6*) | |
3151 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
3152 | ;; | |
3153 | *-*-linux*aout*) | |
3154 | ;; | |
8ddf07a2 | 3155 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
3156 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
3157 | ;; | |
3158 | *-*-solaris*) | |
3159 | HLDFLAGS='-R $(libdir)' | |
3160 | ;; | |
3161 | *-*-sysv4*) | |
3162 | 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;' | |
3163 | ;; | |
3164 | esac | |
3165 | fi | |
3166 | ||
3167 | # On SunOS, if the linker supports the -rpath option, use it to | |
3168 | # prevent ../bfd and ../opcodes from being included in the run time | |
3169 | # search path. | |
3170 | case "${host}" in | |
3171 | *-*-sunos*) | |
3172 | echo 'main () { }' > conftest.c | |
3173 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
3174 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
3175 | : | |
3176 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
3177 | : | |
3178 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
3179 | : | |
074d813d PS |
3180 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
3181 | : | |
1d5eb137 FF |
3182 | elif test "${shared}" = "true"; then |
3183 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
3184 | else | |
3185 | HLDFLAGS='-Wl,-rpath=' | |
3186 | fi | |
3187 | rm -f conftest.t conftest.c conftest | |
3188 | ;; | |
3189 | esac | |
3190 | ||
3191 | ||
3192 | # End stuff to support --enable-shared | |
3193 | ||
7c40dd08 DE |
3194 | # target_subdir is used by the testsuite to find the target libraries. |
3195 | target_subdir= | |
3196 | if test "${host}" != "${target}"; then | |
3197 | target_subdir="${target_alias}/" | |
3198 | fi | |
3199 | ||
5436fc65 | 3200 | |
5f107900 | 3201 | frags= |
5436fc65 C |
3202 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
3203 | if test ! -f ${host_makefile_frag}; then | |
3204 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
3205 | fi | |
5f107900 | 3206 | frags="$frags $host_makefile_frag" |
5436fc65 C |
3207 | |
3208 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
3209 | if test ! -f ${target_makefile_frag}; then | |
3210 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
3211 | fi | |
5f107900 | 3212 | frags="$frags $target_makefile_frag" |
5436fc65 C |
3213 | |
3214 | ||
3215 | ||
3216 | ||
3217 | ||
094fd4ae C |
3218 | hostfile=`sed -n ' |
3219 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3220 | ' ${host_makefile_frag}` | |
5436fc65 | 3221 | |
094fd4ae C |
3222 | targetfile=`sed -n ' |
3223 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3224 | ' ${target_makefile_frag}` | |
5436fc65 C |
3225 | |
3226 | # these really aren't orthogonal true/false values of the same condition, | |
3227 | # but shells are slow enough that I like to reuse the test conditions | |
3228 | # whenever possible | |
3229 | if test "${target}" = "${host}"; then | |
094fd4ae C |
3230 | nativefile=`sed -n ' |
3231 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3232 | ' ${host_makefile_frag}` | |
33ef0f93 | 3233 | # else |
5436fc65 | 3234 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 3235 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
3236 | fi |
3237 | ||
094fd4ae | 3238 | |
5436fc65 C |
3239 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
3240 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
3241 | # corresponding links. But we have to remove the xm.h files and tm.h | |
3242 | # files anyway, e.g. when switching from "configure host" to | |
3243 | # "configure none". | |
3244 | ||
3245 | files= | |
3246 | links= | |
3247 | rm -f xm.h | |
3248 | if test "${hostfile}" != ""; then | |
3249 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
3250 | links="${links} xm.h" | |
3251 | fi | |
3252 | rm -f tm.h | |
3253 | if test "${targetfile}" != ""; then | |
3254 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
3255 | links="${links} tm.h" | |
3256 | fi | |
3257 | rm -f nm.h | |
3258 | if test "${nativefile}" != ""; then | |
3259 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
3260 | links="${links} nm.h" | |
3261 | else | |
3262 | # A cross-only configuration. | |
3263 | files="${files} config/nm-empty.h" | |
3264 | links="${links} nm.h" | |
3265 | fi | |
3266 | # start-sanitize-gdbtk | |
99174711 | 3267 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
018d76dd | 3268 | echo "configure:3269: checking whether ln -s works" >&5 |
99174711 JM |
3269 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3271 | else | |
3272 | rm -f conftestdata | |
3273 | if ln -s X conftestdata 2>/dev/null | |
3274 | then | |
3275 | rm -f conftestdata | |
3276 | ac_cv_prog_LN_S="ln -s" | |
3277 | else | |
3278 | ac_cv_prog_LN_S=ln | |
3279 | fi | |
3280 | fi | |
3281 | LN_S="$ac_cv_prog_LN_S" | |
3282 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3283 | echo "$ac_t""yes" 1>&6 | |
3284 | else | |
3285 | echo "$ac_t""no" 1>&6 | |
3286 | fi | |
5436fc65 C |
3287 | |
3288 | # Make it possible to use the GUI without doing a full install | |
99174711 JM |
3289 | if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then |
3290 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then | |
3291 | echo linking $srcdir/gdbtcl to gdbtcl | |
3292 | $LN_S $srcdir/gdbtcl gdbtcl | |
3293 | else | |
3294 | echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a | |
3295 | echo " " make install before you are able to run the GUI. | |
3296 | fi | |
5436fc65 C |
3297 | fi |
3298 | # end-sanitize-gdbtk | |
3299 | ||
3300 | ||
3301 | ||
3fbb8cde | 3302 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 |
018d76dd | 3303 | echo "configure:3304: checking for Cygwin32 environment" >&5 |
3fbb8cde ILT |
3304 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
3305 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3306 | else | |
3307 | cat > conftest.$ac_ext <<EOF | |
018d76dd | 3308 | #line 3309 "configure" |
3fbb8cde ILT |
3309 | #include "confdefs.h" |
3310 | ||
3311 | int main() { | |
b2b1c5da | 3312 | return __CYGWIN32__; |
3fbb8cde ILT |
3313 | ; return 0; } |
3314 | EOF | |
018d76dd | 3315 | if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3fbb8cde ILT |
3316 | rm -rf conftest* |
3317 | am_cv_cygwin32=yes | |
3318 | else | |
3319 | echo "configure: failed program was:" >&5 | |
3320 | cat conftest.$ac_ext >&5 | |
3321 | rm -rf conftest* | |
3322 | am_cv_cygwin32=no | |
3323 | fi | |
3324 | rm -f conftest* | |
3325 | rm -f conftest* | |
3326 | fi | |
3327 | ||
3328 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
3329 | CYGWIN32= | |
3330 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
b2b1c5da MM |
3331 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 |
3332 | echo "configure:3333: checking for Mingw32 environment" >&5 | |
3333 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then | |
3334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3335 | else | |
3336 | cat > conftest.$ac_ext <<EOF | |
3337 | #line 3338 "configure" | |
3338 | #include "confdefs.h" | |
3339 | ||
3340 | int main() { | |
3341 | return __MINGW32__; | |
3342 | ; return 0; } | |
3343 | EOF | |
3344 | if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
3345 | rm -rf conftest* | |
3346 | am_cv_mingw32=yes | |
3347 | else | |
3348 | echo "configure: failed program was:" >&5 | |
3349 | cat conftest.$ac_ext >&5 | |
3350 | rm -rf conftest* | |
3351 | am_cv_mingw32=no | |
3352 | fi | |
3353 | rm -f conftest* | |
3354 | rm -f conftest* | |
3355 | fi | |
3356 | ||
3357 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
3358 | MINGW32= | |
3359 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
3360 | ||
98fa4ade GN |
3361 | |
3362 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b2b1c5da | 3363 | echo "configure:3364: checking for executable suffix" >&5 |
98fa4ade GN |
3364 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
3365 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3366 | else | |
b2b1c5da MM |
3367 | |
3368 | if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then | |
98fa4ade GN |
3369 | am_cv_exeext=.exe |
3370 | else | |
3371 | cat > am_c_test.c << 'EOF' | |
3372 | int main() { | |
3373 | /* Nothing needed here */ | |
3374 | } | |
3375 | EOF | |
3376 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
3377 | am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` | |
3378 | rm -f am_c_test* | |
3379 | fi | |
3380 | ||
3381 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
3382 | fi | |
3383 | EXEEXT="" | |
3384 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
3385 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
3386 | ||
3387 | ||
5436fc65 C |
3388 | subdirs="$configdirs" |
3389 | ||
3390 | trap '' 1 2 15 | |
3391 | cat > confcache <<\EOF | |
3392 | # This file is a shell script that caches the results of configure | |
3393 | # tests run on this system so they can be shared between configure | |
3394 | # scripts and configure runs. It is not useful on other systems. | |
3395 | # If it contains results you don't want to keep, you may remove or edit it. | |
3396 | # | |
3397 | # By default, configure uses ./config.cache as the cache file, | |
3398 | # creating it if it does not exist already. You can give configure | |
3399 | # the --cache-file=FILE option to use a different cache file; that is | |
3400 | # what configure does when it calls configure scripts in | |
3401 | # subdirectories, so they share the cache. | |
3402 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3403 | # config.status only pays attention to the cache file if you give it the | |
3404 | # --recheck option to rerun configure. | |
3405 | # | |
3406 | EOF | |
bfde4a67 SG |
3407 | # The following way of writing the cache mishandles newlines in values, |
3408 | # but we know of no workaround that is simple, portable, and efficient. | |
3409 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
3410 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3411 | # and sets the high bit in the cache file unless we assign to the vars. | |
3412 | (set) 2>&1 | | |
f7b8c9ce | 3413 | case `(ac_space=' '; set) 2>&1` in |
bfde4a67 SG |
3414 | *ac_space=\ *) |
3415 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3416 | # turns \\\\ into \\, and sed turns \\ into \). | |
3417 | sed -n \ | |
3418 | -e "s/'/'\\\\''/g" \ | |
3419 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3420 | ;; | |
3421 | *) | |
3422 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3423 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3424 | ;; | |
3425 | esac >> confcache | |
5436fc65 C |
3426 | if cmp -s $cache_file confcache; then |
3427 | : | |
3428 | else | |
3429 | if test -w $cache_file; then | |
3430 | echo "updating cache $cache_file" | |
3431 | cat confcache > $cache_file | |
3432 | else | |
3433 | echo "not updating unwritable cache $cache_file" | |
3434 | fi | |
3435 | fi | |
3436 | rm -f confcache | |
3437 | ||
3438 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3439 | ||
3440 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3441 | # Let make expand exec_prefix. | |
3442 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3443 | ||
3444 | # Any assignment to VPATH causes Sun make to only execute | |
3445 | # the first set of double-colon rules, so remove it if not needed. | |
3446 | # If there is a colon in the path, we need to keep it. | |
3447 | if test "x$srcdir" = x.; then | |
3448 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3449 | fi | |
3450 | ||
3451 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3452 | ||
db210d08 | 3453 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
3454 | |
3455 | # Without the "./", some shells look in PATH for config.status. | |
3456 | : ${CONFIG_STATUS=./config.status} | |
3457 | ||
3458 | echo creating $CONFIG_STATUS | |
3459 | rm -f $CONFIG_STATUS | |
3460 | cat > $CONFIG_STATUS <<EOF | |
3461 | #! /bin/sh | |
3462 | # Generated automatically by configure. | |
3463 | # Run this file to recreate the current configuration. | |
3464 | # This directory was configured as follows, | |
3465 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3466 | # | |
3467 | # $0 $ac_configure_args | |
3468 | # | |
3469 | # Compiler output produced by configure, useful for debugging | |
3470 | # configure, is in ./config.log if it exists. | |
3471 | ||
3472 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3473 | for ac_option | |
3474 | do | |
3475 | case "\$ac_option" in | |
3476 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3477 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3478 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3479 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b2b1c5da | 3480 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
5436fc65 C |
3481 | exit 0 ;; |
3482 | -help | --help | --hel | --he | --h) | |
3483 | echo "\$ac_cs_usage"; exit 0 ;; | |
3484 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3485 | esac | |
3486 | done | |
3487 | ||
3488 | ac_given_srcdir=$srcdir | |
3489 | ac_given_INSTALL="$INSTALL" | |
3490 | ||
0cb7d01d | 3491 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
3492 | EOF |
3493 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3494 | |
1a7b4b7c DE |
3495 | # Protect against being on the right side of a sed subst in config.status. |
3496 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3497 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
3498 | $ac_vpsub |
3499 | $extrasub | |
3500 | s%@CFLAGS@%$CFLAGS%g | |
3501 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3502 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3503 | s%@DEFS@%$DEFS%g | |
3504 | s%@LDFLAGS@%$LDFLAGS%g | |
3505 | s%@LIBS@%$LIBS%g | |
3506 | s%@exec_prefix@%$exec_prefix%g | |
3507 | s%@prefix@%$prefix%g | |
3508 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
3509 | s%@bindir@%$bindir%g |
3510 | s%@sbindir@%$sbindir%g | |
3511 | s%@libexecdir@%$libexecdir%g | |
3512 | s%@datadir@%$datadir%g | |
3513 | s%@sysconfdir@%$sysconfdir%g | |
3514 | s%@sharedstatedir@%$sharedstatedir%g | |
3515 | s%@localstatedir@%$localstatedir%g | |
3516 | s%@libdir@%$libdir%g | |
3517 | s%@includedir@%$includedir%g | |
3518 | s%@oldincludedir@%$oldincludedir%g | |
3519 | s%@infodir@%$infodir%g | |
3520 | s%@mandir@%$mandir%g | |
5436fc65 C |
3521 | s%@CC@%$CC%g |
3522 | s%@CPP@%$CPP%g | |
35ce4f08 | 3523 | s%@DLLTOOL@%$DLLTOOL%g |
5436fc65 C |
3524 | s%@host@%$host%g |
3525 | s%@host_alias@%$host_alias%g | |
3526 | s%@host_cpu@%$host_cpu%g | |
3527 | s%@host_vendor@%$host_vendor%g | |
3528 | s%@host_os@%$host_os%g | |
0579b53d GN |
3529 | s%@target@%$target%g |
3530 | s%@target_alias@%$target_alias%g | |
3531 | s%@target_cpu@%$target_cpu%g | |
3532 | s%@target_vendor@%$target_vendor%g | |
3533 | s%@target_os@%$target_os%g | |
5436fc65 C |
3534 | s%@build@%$build%g |
3535 | s%@build_alias@%$build_alias%g | |
3536 | s%@build_cpu@%$build_cpu%g | |
3537 | s%@build_vendor@%$build_vendor%g | |
3538 | s%@build_os@%$build_os%g | |
0579b53d GN |
3539 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3540 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
d8efbc66 FF |
3541 | s%@AR@%$AR%g |
3542 | s%@RANLIB@%$RANLIB%g | |
3543 | s%@YACC@%$YACC%g | |
3544 | s%@AWK@%$AWK%g | |
4915acad | 3545 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
2476848a | 3546 | s%@ENABLE_IDE@%$ENABLE_IDE%g |
9b119644 ILT |
3547 | s%@WIN32LIBS@%$WIN32LIBS%g |
3548 | s%@WIN32LDAPP@%$WIN32LDAPP%g | |
047465fd TT |
3549 | s%@TCL_VERSION@%$TCL_VERSION%g |
3550 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
3551 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
3552 | s%@TCL_CC@%$TCL_CC%g | |
3553 | s%@TCL_DEFS@%$TCL_DEFS%g | |
3554 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
3555 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
3556 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
3557 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
3558 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
3559 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
3560 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
3561 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
3562 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
3563 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
3564 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
3565 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
3566 | s%@TK_VERSION@%$TK_VERSION%g | |
3567 | s%@TK_DEFS@%$TK_DEFS%g | |
9b119644 | 3568 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g |
047465fd TT |
3569 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g |
3570 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
3571 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
3572 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 3573 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 3574 | s%@TKHDIR@%$TKHDIR%g |
2476848a MH |
3575 | s%@ITCLHDIR@%$ITCLHDIR%g |
3576 | s%@ITCLLIB@%$ITCLLIB%g | |
3577 | s%@TIXHDIR@%$TIXHDIR%g | |
5436fc65 | 3578 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 3579 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 3580 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 3581 | s%@X_LIBS@%$X_LIBS%g |
6bc5b2fa | 3582 | s%@TIXLIB@%$TIXLIB%g |
018d76dd | 3583 | s%@TIX_DEPS@%$TIX_DEPS%g |
5436fc65 | 3584 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 3585 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
018d76dd | 3586 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
1d5eb137 FF |
3587 | s%@HLDFLAGS@%$HLDFLAGS%g |
3588 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 3589 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
3590 | /@host_makefile_frag@/r $host_makefile_frag |
3591 | s%@host_makefile_frag@%%g | |
3592 | /@target_makefile_frag@/r $target_makefile_frag | |
3593 | s%@target_makefile_frag@%%g | |
5f107900 | 3594 | s%@frags@%$frags%g |
99174711 | 3595 | s%@LN_S@%$LN_S%g |
3fbb8cde | 3596 | s%@EXEEXT@%$EXEEXT%g |
5436fc65 C |
3597 | s%@subdirs@%$subdirs%g |
3598 | ||
3599 | CEOF | |
3600 | EOF | |
bfde4a67 SG |
3601 | |
3602 | cat >> $CONFIG_STATUS <<\EOF | |
3603 | ||
3604 | # Split the substitutions into bite-sized pieces for seds with | |
3605 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3606 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3607 | ac_file=1 # Number of current file. | |
3608 | ac_beg=1 # First line for current file. | |
3609 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3610 | ac_more_lines=: | |
3611 | ac_sed_cmds="" | |
3612 | while $ac_more_lines; do | |
3613 | if test $ac_beg -gt 1; then | |
3614 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3615 | else | |
3616 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3617 | fi | |
3618 | if test ! -s conftest.s$ac_file; then | |
3619 | ac_more_lines=false | |
3620 | rm -f conftest.s$ac_file | |
3621 | else | |
3622 | if test -z "$ac_sed_cmds"; then | |
3623 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3624 | else | |
3625 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3626 | fi | |
3627 | ac_file=`expr $ac_file + 1` | |
3628 | ac_beg=$ac_end | |
3629 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3630 | fi | |
3631 | done | |
3632 | if test -z "$ac_sed_cmds"; then | |
3633 | ac_sed_cmds=cat | |
3634 | fi | |
3635 | EOF | |
3636 | ||
5436fc65 C |
3637 | cat >> $CONFIG_STATUS <<EOF |
3638 | ||
0cb7d01d | 3639 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
5436fc65 C |
3640 | EOF |
3641 | cat >> $CONFIG_STATUS <<\EOF | |
3642 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 3643 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 3644 | case "$ac_file" in |
bfde4a67 | 3645 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
3646 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3647 | *) ac_file_in="${ac_file}.in" ;; | |
3648 | esac | |
3649 | ||
bfde4a67 | 3650 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
3651 | |
3652 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3653 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3654 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3655 | # The file is in a subdirectory. | |
3656 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3657 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3658 | # A "../" for each directory in $ac_dir_suffix. | |
3659 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3660 | else | |
3661 | ac_dir_suffix= ac_dots= | |
3662 | fi | |
3663 | ||
3664 | case "$ac_given_srcdir" in | |
3665 | .) srcdir=. | |
3666 | if test -z "$ac_dots"; then top_srcdir=. | |
3667 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3668 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3669 | *) # Relative path. | |
3670 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3671 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3672 | esac | |
3673 | ||
3674 | case "$ac_given_INSTALL" in | |
3675 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3676 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3677 | esac | |
bfde4a67 | 3678 | |
5436fc65 C |
3679 | echo creating "$ac_file" |
3680 | rm -f "$ac_file" | |
3681 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3682 | case "$ac_file" in | |
3683 | *Makefile*) ac_comsub="1i\\ | |
3684 | # $configure_input" ;; | |
3685 | *) ac_comsub= ;; | |
3686 | esac | |
bfde4a67 SG |
3687 | |
3688 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
3689 | sed -e "$ac_comsub |
3690 | s%@configure_input@%$configure_input%g | |
3691 | s%@srcdir@%$srcdir%g | |
3692 | s%@top_srcdir@%$top_srcdir%g | |
3693 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 3694 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 3695 | fi; done |
bfde4a67 | 3696 | rm -f conftest.s* |
5436fc65 | 3697 | |
db210d08 FF |
3698 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3699 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3700 | # | |
3701 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3702 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3703 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3704 | ac_dC='\3' | |
3705 | ac_dD='%g' | |
3706 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3707 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3708 | ac_uB='\([ ]\)%\1#\2define\3' | |
3709 | ac_uC=' ' | |
3710 | ac_uD='\4%g' | |
3711 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3712 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3713 | ac_eB='$%\1#\2define\3' | |
3714 | ac_eC=' ' | |
3715 | ac_eD='%g' | |
3716 | ||
bfde4a67 SG |
3717 | if test "${CONFIG_HEADERS+set}" != set; then |
3718 | EOF | |
3719 | cat >> $CONFIG_STATUS <<EOF | |
3720 | CONFIG_HEADERS="config.h:config.in" | |
3721 | EOF | |
3722 | cat >> $CONFIG_STATUS <<\EOF | |
3723 | fi | |
db210d08 | 3724 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 3725 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 3726 | case "$ac_file" in |
bfde4a67 | 3727 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
3728 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3729 | *) ac_file_in="${ac_file}.in" ;; | |
3730 | esac | |
3731 | ||
3732 | echo creating $ac_file | |
3733 | ||
3734 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
3735 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
3736 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
3737 | |
3738 | EOF | |
3739 | ||
3740 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
3741 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 3742 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
3743 | # Protect against being in an unquoted here document in config.status. |
3744 | rm -f conftest.vals | |
3745 | cat > conftest.hdr <<\EOF | |
3746 | s/[\\&%]/\\&/g | |
3747 | s%[\\$`]%\\&%g | |
bc859e63 | 3748 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
3749 | s%ac_d%ac_u%gp |
3750 | s%ac_u%ac_e%gp | |
3751 | EOF | |
3752 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3753 | rm -f conftest.hdr | |
3754 | ||
3755 | # This sed command replaces #undef with comments. This is necessary, for | |
3756 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3757 | # on some systems where configure will not decide to define it. | |
3758 | cat >> conftest.vals <<\EOF | |
3759 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3760 | EOF | |
3761 | ||
3762 | # Break up conftest.vals because some shells have a limit on | |
3763 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
3764 | |
3765 | rm -f conftest.tail | |
3766 | while : | |
3767 | do | |
3768 | ac_lines=`grep -c . conftest.vals` | |
3769 | # grep -c gives empty output for an empty file on some AIX systems. | |
3770 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3771 | # Write a limited-size here document to conftest.frag. | |
3772 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3773 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3774 | echo 'CEOF | |
3775 | sed -f conftest.frag conftest.in > conftest.out | |
3776 | rm -f conftest.in | |
3777 | mv conftest.out conftest.in | |
3778 | ' >> $CONFIG_STATUS | |
3779 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3780 | rm -f conftest.vals | |
3781 | mv conftest.tail conftest.vals | |
3782 | done | |
3783 | rm -f conftest.vals | |
3784 | ||
3785 | cat >> $CONFIG_STATUS <<\EOF | |
3786 | rm -f conftest.frag conftest.h | |
3787 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3788 | cat conftest.in >> conftest.h | |
3789 | rm -f conftest.in | |
3790 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3791 | echo "$ac_file is unchanged" | |
3792 | rm -f conftest.h | |
3793 | else | |
bc859e63 SG |
3794 | # Remove last slash and all that follows it. Not all systems have dirname. |
3795 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3796 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3797 | # The file is in a subdirectory. | |
3798 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3799 | fi | |
db210d08 FF |
3800 | rm -f $ac_file |
3801 | mv conftest.h $ac_file | |
3802 | fi | |
3803 | fi; done | |
3804 | ||
5436fc65 C |
3805 | EOF |
3806 | ||
3807 | cat >> $CONFIG_STATUS <<EOF | |
3808 | ac_sources="$files" | |
3809 | ac_dests="$links" | |
3810 | EOF | |
3811 | ||
3812 | cat >> $CONFIG_STATUS <<\EOF | |
3813 | srcdir=$ac_given_srcdir | |
3814 | while test -n "$ac_sources"; do | |
3815 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
3816 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
3817 | ||
3818 | echo "linking $srcdir/$ac_source to $ac_dest" | |
3819 | ||
3820 | if test ! -r $srcdir/$ac_source; then | |
3821 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
3822 | fi | |
3823 | rm -f $ac_dest | |
3824 | ||
3825 | # Make relative symlinks. | |
3826 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3827 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
3828 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
3829 | # The dest file is in a subdirectory. | |
3830 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
3831 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
3832 | # A "../" for each directory in $ac_dest_dir_suffix. | |
3833 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
3834 | else | |
3835 | ac_dest_dir_suffix= ac_dots= | |
3836 | fi | |
3837 | ||
3838 | case "$srcdir" in | |
3839 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
3840 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
3841 | esac | |
3842 | ||
3843 | # Make a symlink if possible; otherwise try a hard link. | |
3844 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
3845 | ln $srcdir/$ac_source $ac_dest; then : | |
3846 | else | |
3847 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
3848 | fi | |
3849 | done | |
0a5a1821 C |
3850 | EOF |
3851 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3852 | |
0a5a1821 C |
3853 | gdb_host_cpu=$gdb_host_cpu |
3854 | gdb_target_cpu=$gdb_target_cpu | |
3855 | nativefile=$nativefile | |
3856 | ||
3857 | EOF | |
3858 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
3859 | |
3860 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 3861 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
3862 | < Makefile > Makefile.tem |
3863 | mv -f Makefile.tem Makefile | |
3864 | fi | |
3865 | ||
3866 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
3867 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
3868 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
3869 | mv -f Makefile.tmp Makefile | |
3870 | ||
31520669 | 3871 | case x$CONFIG_HEADERS in |
18ea4416 | 3872 | xconfig.h:config.in) |
31520669 FF |
3873 | echo > stamp-h ;; |
3874 | esac | |
3875 | ||
5436fc65 C |
3876 | exit 0 |
3877 | EOF | |
3878 | chmod +x $CONFIG_STATUS | |
3879 | rm -fr confdefs* $ac_clean_files | |
3880 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3881 | ||
3882 | if test "$no_recursion" != yes; then | |
3883 | ||
3884 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
3885 | ac_sub_configure_args= | |
3886 | ac_prev= | |
3887 | for ac_arg in $ac_configure_args; do | |
3888 | if test -n "$ac_prev"; then | |
3889 | ac_prev= | |
3890 | continue | |
3891 | fi | |
3892 | case "$ac_arg" in | |
3893 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
3894 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
3895 | ac_prev=cache_file ;; | |
3896 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
3897 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
3898 | ;; | |
3899 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
3900 | ac_prev=srcdir ;; | |
3901 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
3902 | ;; | |
3903 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
3904 | esac | |
3905 | done | |
3906 | ||
3907 | for ac_config_dir in $configdirs; do | |
3908 | ||
3909 | # Do not complain, so a configure script can configure whichever | |
3910 | # parts of a large source tree are present. | |
3911 | if test ! -d $srcdir/$ac_config_dir; then | |
3912 | continue | |
3913 | fi | |
3914 | ||
3915 | echo configuring in $ac_config_dir | |
3916 | ||
3917 | case "$srcdir" in | |
3918 | .) ;; | |
3919 | *) | |
3920 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
3921 | else | |
3922 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
3923 | fi | |
3924 | ;; | |
3925 | esac | |
3926 | ||
3927 | ac_popdir=`pwd` | |
3928 | cd $ac_config_dir | |
3929 | ||
bfde4a67 SG |
3930 | # A "../" for each directory in /$ac_config_dir. |
3931 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
3932 | ||
5436fc65 C |
3933 | case "$srcdir" in |
3934 | .) # No --srcdir option. We are building in place. | |
3935 | ac_sub_srcdir=$srcdir ;; | |
3936 | /*) # Absolute path. | |
3937 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
3938 | *) # Relative path. | |
bfde4a67 | 3939 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
3940 | esac |
3941 | ||
3942 | # Check for guested configure; otherwise get Cygnus style configure. | |
3943 | if test -f $ac_sub_srcdir/configure; then | |
3944 | ac_sub_configure=$ac_sub_srcdir/configure | |
3945 | elif test -f $ac_sub_srcdir/configure.in; then | |
3946 | ac_sub_configure=$ac_configure | |
3947 | else | |
3948 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
3949 | ac_sub_configure= | |
3950 | fi | |
3951 | ||
3952 | # The recursion is here. | |
3953 | if test -n "$ac_sub_configure"; then | |
3954 | ||
3955 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
3956 | case "$cache_file" in |
3957 | /*) ac_sub_cache_file=$cache_file ;; | |
3958 | *) # Relative path. | |
3959 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
3960 | esac | |
3961 | case "$ac_given_INSTALL" in | |
3962 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3963 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3964 | esac | |
3965 | ||
3966 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
3967 | # The eval makes quoting arguments work. | |
3968 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
3969 | then : | |
3970 | else | |
3971 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
3972 | fi | |
3973 | fi | |
3974 | ||
3975 | cd $ac_popdir | |
3976 | done | |
3977 | fi | |
3978 | ||
5e711e7f PS |
3979 | |
3980 | exit 0 | |
b7f3b6d5 | 3981 |