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