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