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