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