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