Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
eac4afd1 | 4 | # Generated automatically using autoconf version 2.12.2 |
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: | |
fcfc3c0c TT |
14 | ac_help="$ac_help |
15 | --disable-nls do not use Native Language Support" | |
16 | ac_help="$ac_help | |
17 | --with-included-gettext use the GNU gettext library included here" | |
5436fc65 C |
18 | ac_help="$ac_help |
19 | --enable-netrom " | |
0728afad FF |
20 | ac_help="$ac_help |
21 | --with-mmalloc use memory mapped malloc package" | |
2476848a MH |
22 | ac_help="$ac_help |
23 | --enable-ide Enable IDE support" | |
5436fc65 C |
24 | ac_help="$ac_help |
25 | --enable-gdbtk " | |
26 | ac_help="$ac_help | |
047465fd | 27 | --with-tclconfig directory containing tcl configuration (tclConfig.sh)" |
4e327047 | 28 | ac_help="$ac_help |
047465fd | 29 | --with-tkconfig directory containing tk configuration (tkConfig.sh)" |
4e327047 | 30 | ac_help="$ac_help |
047465fd | 31 | --with-tclinclude directory where tcl private headers are" |
4e327047 | 32 | ac_help="$ac_help |
047465fd | 33 | --with-tkinclude directory where tk private headers are" |
b236defa FCE |
34 | ac_help="$ac_help |
35 | --with-x use the X Window System" | |
36 | ac_help="$ac_help | |
37 | --with-sim-gpu2=path Use GPU2 library under given directory" | |
75a55dc3 JM |
38 | ac_help="$ac_help |
39 | --with-sim-funit=path Use target FP lib under given directory" | |
1d5eb137 FF |
40 | ac_help="$ac_help |
41 | --enable-shared use shared libraries" | |
5436fc65 C |
42 | |
43 | # Initialize some variables set by options. | |
44 | # The variables have the same names as the options, with | |
45 | # dashes changed to underlines. | |
46 | build=NONE | |
47 | cache_file=./config.cache | |
48 | exec_prefix=NONE | |
49 | host=NONE | |
50 | no_create= | |
51 | nonopt=NONE | |
52 | no_recursion= | |
53 | prefix=NONE | |
54 | program_prefix=NONE | |
55 | program_suffix=NONE | |
56 | program_transform_name=s,x,x, | |
57 | silent= | |
58 | site= | |
59 | srcdir= | |
60 | target=NONE | |
61 | verbose= | |
62 | x_includes=NONE | |
63 | x_libraries=NONE | |
1a7b4b7c DE |
64 | bindir='${exec_prefix}/bin' |
65 | sbindir='${exec_prefix}/sbin' | |
66 | libexecdir='${exec_prefix}/libexec' | |
67 | datadir='${prefix}/share' | |
68 | sysconfdir='${prefix}/etc' | |
69 | sharedstatedir='${prefix}/com' | |
70 | localstatedir='${prefix}/var' | |
71 | libdir='${exec_prefix}/lib' | |
72 | includedir='${prefix}/include' | |
73 | oldincludedir='/usr/include' | |
74 | infodir='${prefix}/info' | |
75 | mandir='${prefix}/man' | |
5436fc65 C |
76 | |
77 | # Initialize some other variables. | |
78 | subdirs= | |
1a7b4b7c | 79 | MFLAGS= MAKEFLAGS= |
7dc185bc | 80 | SHELL=${CONFIG_SHELL-/bin/sh} |
bfde4a67 SG |
81 | # Maximum number of lines to put in a shell here document. |
82 | ac_max_here_lines=12 | |
5436fc65 C |
83 | |
84 | ac_prev= | |
85 | for ac_option | |
86 | do | |
87 | ||
88 | # If the previous option needs an argument, assign it. | |
89 | if test -n "$ac_prev"; then | |
90 | eval "$ac_prev=\$ac_option" | |
91 | ac_prev= | |
92 | continue | |
93 | fi | |
94 | ||
95 | case "$ac_option" in | |
96 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
97 | *) ac_optarg= ;; | |
98 | esac | |
99 | ||
100 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
101 | ||
102 | case "$ac_option" in | |
103 | ||
1a7b4b7c DE |
104 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
105 | ac_prev=bindir ;; | |
106 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
107 | bindir="$ac_optarg" ;; | |
108 | ||
109 | -build | --build | --buil | --bui | --bu) | |
5436fc65 | 110 | ac_prev=build ;; |
1a7b4b7c | 111 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
5436fc65 C |
112 | build="$ac_optarg" ;; |
113 | ||
114 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
115 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
116 | ac_prev=cache_file ;; | |
117 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
118 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
119 | cache_file="$ac_optarg" ;; | |
120 | ||
1a7b4b7c DE |
121 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
122 | ac_prev=datadir ;; | |
123 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
124 | | --da=*) | |
125 | datadir="$ac_optarg" ;; | |
126 | ||
5436fc65 C |
127 | -disable-* | --disable-*) |
128 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
129 | # Reject names that are not valid shell variable names. | |
130 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
131 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
132 | fi | |
133 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
134 | eval "enable_${ac_feature}=no" ;; | |
135 | ||
136 | -enable-* | --enable-*) | |
137 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
138 | # Reject names that are not valid shell variable names. | |
139 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
140 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
141 | fi | |
142 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
143 | case "$ac_option" in | |
144 | *=*) ;; | |
145 | *) ac_optarg=yes ;; | |
146 | esac | |
147 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
148 | ||
149 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
150 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
151 | | --exec | --exe | --ex) | |
152 | ac_prev=exec_prefix ;; | |
153 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
154 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
155 | | --exec=* | --exe=* | --ex=*) | |
156 | exec_prefix="$ac_optarg" ;; | |
157 | ||
158 | -gas | --gas | --ga | --g) | |
159 | # Obsolete; use --with-gas. | |
160 | with_gas=yes ;; | |
161 | ||
162 | -help | --help | --hel | --he) | |
163 | # Omit some internal or obsolete options to make the list less imposing. | |
164 | # This message is too long to be a string in the A/UX 3.1 sh. | |
165 | cat << EOF | |
166 | Usage: configure [options] [host] | |
167 | Options: [defaults in brackets after descriptions] | |
168 | Configuration: | |
169 | --cache-file=FILE cache test results in FILE | |
170 | --help print this message | |
171 | --no-create do not create output files | |
172 | --quiet, --silent do not print \`checking...' messages | |
173 | --version print the version of autoconf that created configure | |
174 | Directory and file names: | |
175 | --prefix=PREFIX install architecture-independent files in PREFIX | |
176 | [$ac_default_prefix] | |
1a7b4b7c | 177 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5436fc65 | 178 | [same as prefix] |
1a7b4b7c DE |
179 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
180 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
181 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
182 | --datadir=DIR read-only architecture-independent data in DIR | |
183 | [PREFIX/share] | |
184 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
185 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
186 | [PREFIX/com] | |
187 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
188 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
189 | --includedir=DIR C header files in DIR [PREFIX/include] | |
190 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
191 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
192 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
5436fc65 C |
193 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
194 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
195 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1a7b4b7c DE |
196 | --program-transform-name=PROGRAM |
197 | run sed PROGRAM on installed program names | |
198 | EOF | |
199 | cat << EOF | |
5436fc65 C |
200 | Host type: |
201 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
202 | --host=HOST configure for HOST [guessed] | |
203 | --target=TARGET configure for TARGET [TARGET=HOST] | |
204 | Features and packages: | |
205 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
206 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
207 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
208 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
209 | --x-includes=DIR X include files are in DIR | |
210 | --x-libraries=DIR X library files are in DIR | |
5436fc65 | 211 | EOF |
1a7b4b7c DE |
212 | if test -n "$ac_help"; then |
213 | echo "--enable and --with options recognized:$ac_help" | |
214 | fi | |
5436fc65 C |
215 | exit 0 ;; |
216 | ||
217 | -host | --host | --hos | --ho) | |
218 | ac_prev=host ;; | |
219 | -host=* | --host=* | --hos=* | --ho=*) | |
220 | host="$ac_optarg" ;; | |
221 | ||
1a7b4b7c DE |
222 | -includedir | --includedir | --includedi | --included | --include \ |
223 | | --includ | --inclu | --incl | --inc) | |
224 | ac_prev=includedir ;; | |
225 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
226 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
227 | includedir="$ac_optarg" ;; | |
228 | ||
229 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
230 | ac_prev=infodir ;; | |
231 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
232 | infodir="$ac_optarg" ;; | |
233 | ||
234 | -libdir | --libdir | --libdi | --libd) | |
235 | ac_prev=libdir ;; | |
236 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
237 | libdir="$ac_optarg" ;; | |
238 | ||
239 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
240 | | --libexe | --libex | --libe) | |
241 | ac_prev=libexecdir ;; | |
242 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
243 | | --libexe=* | --libex=* | --libe=*) | |
244 | libexecdir="$ac_optarg" ;; | |
245 | ||
246 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
247 | | --localstate | --localstat | --localsta | --localst \ | |
248 | | --locals | --local | --loca | --loc | --lo) | |
249 | ac_prev=localstatedir ;; | |
250 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
251 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
252 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
253 | localstatedir="$ac_optarg" ;; | |
254 | ||
255 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
256 | ac_prev=mandir ;; | |
257 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
258 | mandir="$ac_optarg" ;; | |
259 | ||
5436fc65 C |
260 | -nfp | --nfp | --nf) |
261 | # Obsolete; use --without-fp. | |
262 | with_fp=no ;; | |
263 | ||
264 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
265 | | --no-cr | --no-c) | |
266 | no_create=yes ;; | |
267 | ||
268 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
269 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
270 | no_recursion=yes ;; | |
271 | ||
1a7b4b7c DE |
272 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
273 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
274 | | --oldin | --oldi | --old | --ol | --o) | |
275 | ac_prev=oldincludedir ;; | |
276 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
277 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
278 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
279 | oldincludedir="$ac_optarg" ;; | |
280 | ||
5436fc65 C |
281 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
282 | ac_prev=prefix ;; | |
283 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
284 | prefix="$ac_optarg" ;; | |
285 | ||
286 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
287 | | --program-pre | --program-pr | --program-p) | |
288 | ac_prev=program_prefix ;; | |
289 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
290 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
291 | program_prefix="$ac_optarg" ;; | |
292 | ||
293 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
294 | | --program-suf | --program-su | --program-s) | |
295 | ac_prev=program_suffix ;; | |
296 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
297 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
298 | program_suffix="$ac_optarg" ;; | |
299 | ||
300 | -program-transform-name | --program-transform-name \ | |
301 | | --program-transform-nam | --program-transform-na \ | |
302 | | --program-transform-n | --program-transform- \ | |
303 | | --program-transform | --program-transfor \ | |
304 | | --program-transfo | --program-transf \ | |
305 | | --program-trans | --program-tran \ | |
306 | | --progr-tra | --program-tr | --program-t) | |
307 | ac_prev=program_transform_name ;; | |
308 | -program-transform-name=* | --program-transform-name=* \ | |
309 | | --program-transform-nam=* | --program-transform-na=* \ | |
310 | | --program-transform-n=* | --program-transform-=* \ | |
311 | | --program-transform=* | --program-transfor=* \ | |
312 | | --program-transfo=* | --program-transf=* \ | |
313 | | --program-trans=* | --program-tran=* \ | |
314 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
315 | program_transform_name="$ac_optarg" ;; | |
316 | ||
317 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
318 | | -silent | --silent | --silen | --sile | --sil) | |
319 | silent=yes ;; | |
320 | ||
1a7b4b7c DE |
321 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
322 | ac_prev=sbindir ;; | |
323 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
324 | | --sbi=* | --sb=*) | |
325 | sbindir="$ac_optarg" ;; | |
326 | ||
327 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
328 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
329 | | --sharedst | --shareds | --shared | --share | --shar \ | |
330 | | --sha | --sh) | |
331 | ac_prev=sharedstatedir ;; | |
332 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
333 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
334 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
335 | | --sha=* | --sh=*) | |
336 | sharedstatedir="$ac_optarg" ;; | |
337 | ||
5436fc65 C |
338 | -site | --site | --sit) |
339 | ac_prev=site ;; | |
340 | -site=* | --site=* | --sit=*) | |
341 | site="$ac_optarg" ;; | |
342 | ||
343 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
344 | ac_prev=srcdir ;; | |
345 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
346 | srcdir="$ac_optarg" ;; | |
347 | ||
1a7b4b7c DE |
348 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
349 | | --syscon | --sysco | --sysc | --sys | --sy) | |
350 | ac_prev=sysconfdir ;; | |
351 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
352 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
353 | sysconfdir="$ac_optarg" ;; | |
354 | ||
5436fc65 C |
355 | -target | --target | --targe | --targ | --tar | --ta | --t) |
356 | ac_prev=target ;; | |
357 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
358 | target="$ac_optarg" ;; | |
359 | ||
360 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
361 | verbose=yes ;; | |
362 | ||
363 | -version | --version | --versio | --versi | --vers) | |
eac4afd1 | 364 | echo "configure generated by autoconf version 2.12.2" |
5436fc65 C |
365 | exit 0 ;; |
366 | ||
367 | -with-* | --with-*) | |
368 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
369 | # Reject names that are not valid shell variable names. | |
370 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
371 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
372 | fi | |
373 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
374 | case "$ac_option" in | |
375 | *=*) ;; | |
376 | *) ac_optarg=yes ;; | |
377 | esac | |
378 | eval "with_${ac_package}='$ac_optarg'" ;; | |
379 | ||
380 | -without-* | --without-*) | |
381 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
382 | # Reject names that are not valid shell variable names. | |
383 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
384 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
385 | fi | |
386 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
387 | eval "with_${ac_package}=no" ;; | |
388 | ||
389 | --x) | |
390 | # Obsolete; use --with-x. | |
391 | with_x=yes ;; | |
392 | ||
393 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
394 | | --x-incl | --x-inc | --x-in | --x-i) | |
395 | ac_prev=x_includes ;; | |
396 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
397 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
398 | x_includes="$ac_optarg" ;; | |
399 | ||
400 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
401 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
402 | ac_prev=x_libraries ;; | |
403 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
404 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
405 | x_libraries="$ac_optarg" ;; | |
406 | ||
407 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
408 | ;; | |
409 | ||
1a7b4b7c | 410 | *) |
5436fc65 C |
411 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
412 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
413 | fi | |
414 | if test "x$nonopt" != xNONE; then | |
415 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
416 | fi | |
417 | nonopt="$ac_option" | |
418 | ;; | |
419 | ||
420 | esac | |
421 | done | |
422 | ||
423 | if test -n "$ac_prev"; then | |
424 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
425 | fi | |
426 | ||
427 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
428 | ||
429 | # File descriptor usage: | |
430 | # 0 standard input | |
431 | # 1 file creation | |
432 | # 2 errors and warnings | |
433 | # 3 some systems may open it to /dev/tty | |
434 | # 4 used on the Kubota Titan | |
435 | # 6 checking for... messages and results | |
436 | # 5 compiler messages saved in config.log | |
437 | if test "$silent" = yes; then | |
438 | exec 6>/dev/null | |
439 | else | |
440 | exec 6>&1 | |
441 | fi | |
442 | exec 5>./config.log | |
443 | ||
444 | echo "\ | |
445 | This file contains any messages produced by compilers while | |
446 | running configure, to aid debugging if configure makes a mistake. | |
447 | " 1>&5 | |
448 | ||
449 | # Strip out --no-create and --no-recursion so they do not pile up. | |
450 | # Also quote any args containing shell metacharacters. | |
451 | ac_configure_args= | |
452 | for ac_arg | |
453 | do | |
454 | case "$ac_arg" in | |
455 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
456 | | --no-cr | --no-c) ;; | |
457 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
458 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
459 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
460 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
461 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
462 | esac | |
463 | done | |
464 | ||
465 | # NLS nuisances. | |
bfde4a67 SG |
466 | # Only set these to C if already set. These must not be set unconditionally |
467 | # because not all systems understand e.g. LANG=C (notably SCO). | |
468 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
469 | # Non-C LC_CTYPE values break the ctype check. | |
ef6c51d1 | 470 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
bfde4a67 SG |
471 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
472 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
473 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
5436fc65 C |
474 | |
475 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
476 | rm -rf conftest* confdefs.h | |
477 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
478 | echo > confdefs.h | |
479 | ||
480 | # A filename unique to this package, relative to the directory that | |
481 | # configure is in, which we can look for to find out if srcdir is correct. | |
482 | ac_unique_file=main.c | |
483 | ||
484 | # Find the source files, if location was not specified. | |
485 | if test -z "$srcdir"; then | |
486 | ac_srcdir_defaulted=yes | |
487 | # Try the directory containing this script, then its parent. | |
488 | ac_prog=$0 | |
489 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
490 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
491 | srcdir=$ac_confdir | |
492 | if test ! -r $srcdir/$ac_unique_file; then | |
493 | srcdir=.. | |
494 | fi | |
495 | else | |
496 | ac_srcdir_defaulted=no | |
497 | fi | |
498 | if test ! -r $srcdir/$ac_unique_file; then | |
499 | if test "$ac_srcdir_defaulted" = yes; then | |
500 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
501 | else | |
502 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
503 | fi | |
504 | fi | |
505 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
506 | ||
507 | # Prefer explicitly selected file to automatically selected ones. | |
508 | if test -z "$CONFIG_SITE"; then | |
509 | if test "x$prefix" != xNONE; then | |
510 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
511 | else | |
512 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
513 | fi | |
514 | fi | |
515 | for ac_site_file in $CONFIG_SITE; do | |
516 | if test -r "$ac_site_file"; then | |
517 | echo "loading site script $ac_site_file" | |
518 | . "$ac_site_file" | |
519 | fi | |
520 | done | |
521 | ||
522 | if test -r "$cache_file"; then | |
523 | echo "loading cache $cache_file" | |
524 | . $cache_file | |
525 | else | |
526 | echo "creating cache $cache_file" | |
527 | > $cache_file | |
528 | fi | |
529 | ||
530 | ac_ext=c | |
531 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3dedc867 | 532 | ac_cpp='$CPP $CPPFLAGS' |
1a7b4b7c | 533 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
eac4afd1 | 534 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 | 535 | cross_compiling=$ac_cv_prog_cc_cross |
5436fc65 | 536 | |
eac4afd1 JM |
537 | ac_exeext= |
538 | ac_objext=o | |
5436fc65 C |
539 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
540 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
541 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
542 | ac_n= ac_c=' | |
543 | ' ac_t=' ' | |
544 | else | |
545 | ac_n=-n ac_c= ac_t= | |
546 | fi | |
547 | else | |
548 | ac_n= ac_c='\c' ac_t= | |
549 | fi | |
550 | ||
551 | ||
552 | ||
db210d08 | 553 | |
5436fc65 C |
554 | # Extract the first word of "gcc", so it can be a program name with args. |
555 | set dummy gcc; ac_word=$2 | |
556 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 557 | echo "configure:558: checking for $ac_word" >&5 |
5436fc65 C |
558 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
560 | else | |
561 | if test -n "$CC"; then | |
562 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
563 | else | |
eac4afd1 | 564 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
da3d57e3 | 565 | for ac_dir in $PATH; do |
5436fc65 C |
566 | test -z "$ac_dir" && ac_dir=. |
567 | if test -f $ac_dir/$ac_word; then | |
568 | ac_cv_prog_CC="gcc" | |
569 | break | |
570 | fi | |
571 | done | |
572 | IFS="$ac_save_ifs" | |
5436fc65 C |
573 | fi |
574 | fi | |
575 | CC="$ac_cv_prog_CC" | |
576 | if test -n "$CC"; then | |
577 | echo "$ac_t""$CC" 1>&6 | |
578 | else | |
579 | echo "$ac_t""no" 1>&6 | |
580 | fi | |
581 | ||
1a7b4b7c DE |
582 | if test -z "$CC"; then |
583 | # Extract the first word of "cc", so it can be a program name with args. | |
584 | set dummy cc; ac_word=$2 | |
585 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 586 | echo "configure:587: checking for $ac_word" >&5 |
1a7b4b7c DE |
587 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
588 | echo $ac_n "(cached) $ac_c" 1>&6 | |
589 | else | |
590 | if test -n "$CC"; then | |
591 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
592 | else | |
eac4afd1 | 593 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1a7b4b7c DE |
594 | ac_prog_rejected=no |
595 | for ac_dir in $PATH; do | |
596 | test -z "$ac_dir" && ac_dir=. | |
597 | if test -f $ac_dir/$ac_word; then | |
598 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
599 | ac_prog_rejected=yes | |
600 | continue | |
601 | fi | |
602 | ac_cv_prog_CC="cc" | |
603 | break | |
604 | fi | |
605 | done | |
606 | IFS="$ac_save_ifs" | |
607 | if test $ac_prog_rejected = yes; then | |
608 | # We found a bogon in the path, so make sure we never use it. | |
609 | set dummy $ac_cv_prog_CC | |
610 | shift | |
611 | if test $# -gt 0; then | |
612 | # We chose a different compiler from the bogus one. | |
613 | # However, it has the same basename, so the bogon will be chosen | |
614 | # first if we set CC to just the basename; use the full file name. | |
615 | shift | |
616 | set dummy "$ac_dir/$ac_word" "$@" | |
617 | shift | |
618 | ac_cv_prog_CC="$@" | |
619 | fi | |
620 | fi | |
621 | fi | |
622 | fi | |
623 | CC="$ac_cv_prog_CC" | |
624 | if test -n "$CC"; then | |
625 | echo "$ac_t""$CC" 1>&6 | |
626 | else | |
627 | echo "$ac_t""no" 1>&6 | |
628 | fi | |
629 | ||
eac4afd1 JM |
630 | if test -z "$CC"; then |
631 | case "`uname -s`" in | |
632 | *win32* | *WIN32*) | |
633 | # Extract the first word of "cl", so it can be a program name with args. | |
634 | set dummy cl; ac_word=$2 | |
635 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
636 | echo "configure:637: checking for $ac_word" >&5 | |
637 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
639 | else | |
640 | if test -n "$CC"; then | |
641 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
642 | else | |
643 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
644 | for ac_dir in $PATH; do | |
645 | test -z "$ac_dir" && ac_dir=. | |
646 | if test -f $ac_dir/$ac_word; then | |
647 | ac_cv_prog_CC="cl" | |
648 | break | |
649 | fi | |
650 | done | |
651 | IFS="$ac_save_ifs" | |
652 | fi | |
653 | fi | |
654 | CC="$ac_cv_prog_CC" | |
655 | if test -n "$CC"; then | |
656 | echo "$ac_t""$CC" 1>&6 | |
657 | else | |
658 | echo "$ac_t""no" 1>&6 | |
659 | fi | |
660 | ;; | |
661 | esac | |
662 | fi | |
1a7b4b7c DE |
663 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
664 | fi | |
5436fc65 | 665 | |
bfde4a67 | 666 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
eac4afd1 | 667 | echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
bfde4a67 SG |
668 | |
669 | ac_ext=c | |
670 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
671 | ac_cpp='$CPP $CPPFLAGS' | |
672 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
eac4afd1 | 673 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 SG |
674 | cross_compiling=$ac_cv_prog_cc_cross |
675 | ||
676 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 677 | #line 678 "configure" |
bfde4a67 SG |
678 | #include "confdefs.h" |
679 | main(){return(0);} | |
680 | EOF | |
eac4afd1 | 681 | if { (eval echo configure:682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bfde4a67 SG |
682 | ac_cv_prog_cc_works=yes |
683 | # If we can't run a trivial program, we are probably using a cross compiler. | |
684 | if (./conftest; exit) 2>/dev/null; then | |
685 | ac_cv_prog_cc_cross=no | |
686 | else | |
687 | ac_cv_prog_cc_cross=yes | |
688 | fi | |
689 | else | |
690 | echo "configure: failed program was:" >&5 | |
691 | cat conftest.$ac_ext >&5 | |
692 | ac_cv_prog_cc_works=no | |
693 | fi | |
694 | rm -fr conftest* | |
695 | ||
696 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
697 | if test $ac_cv_prog_cc_works = no; then | |
698 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
699 | fi | |
700 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
eac4afd1 | 701 | echo "configure:702: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
bfde4a67 SG |
702 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
703 | cross_compiling=$ac_cv_prog_cc_cross | |
704 | ||
5436fc65 | 705 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
eac4afd1 | 706 | echo "configure:707: checking whether we are using GNU C" >&5 |
5436fc65 C |
707 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
709 | else | |
710 | cat > conftest.c <<EOF | |
711 | #ifdef __GNUC__ | |
712 | yes; | |
713 | #endif | |
714 | EOF | |
eac4afd1 | 715 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
5436fc65 C |
716 | ac_cv_prog_gcc=yes |
717 | else | |
718 | ac_cv_prog_gcc=no | |
719 | fi | |
720 | fi | |
1a7b4b7c | 721 | |
5436fc65 | 722 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
bfde4a67 | 723 | |
5436fc65 C |
724 | if test $ac_cv_prog_gcc = yes; then |
725 | GCC=yes | |
eac4afd1 JM |
726 | else |
727 | GCC= | |
728 | fi | |
729 | ||
730 | ac_test_CFLAGS="${CFLAGS+set}" | |
731 | ac_save_CFLAGS="$CFLAGS" | |
732 | CFLAGS= | |
733 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
734 | echo "configure:735: checking whether ${CC-cc} accepts -g" >&5 | |
bfde4a67 | 735 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
5436fc65 C |
736 | echo $ac_n "(cached) $ac_c" 1>&6 |
737 | else | |
738 | echo 'void f(){}' > conftest.c | |
739 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
bfde4a67 | 740 | ac_cv_prog_cc_g=yes |
5436fc65 | 741 | else |
bfde4a67 | 742 | ac_cv_prog_cc_g=no |
5436fc65 C |
743 | fi |
744 | rm -f conftest* | |
745 | ||
746 | fi | |
1a7b4b7c | 747 | |
bfde4a67 | 748 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
eac4afd1 JM |
749 | if test "$ac_test_CFLAGS" = set; then |
750 | CFLAGS="$ac_save_CFLAGS" | |
751 | elif test $ac_cv_prog_cc_g = yes; then | |
752 | if test "$GCC" = yes; then | |
bfde4a67 SG |
753 | CFLAGS="-g -O2" |
754 | else | |
eac4afd1 | 755 | CFLAGS="-g" |
5436fc65 C |
756 | fi |
757 | else | |
eac4afd1 JM |
758 | if test "$GCC" = yes; then |
759 | CFLAGS="-O2" | |
760 | else | |
761 | CFLAGS= | |
762 | fi | |
5436fc65 C |
763 | fi |
764 | ||
765 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
eac4afd1 | 766 | echo "configure:767: checking how to run the C preprocessor" >&5 |
5436fc65 C |
767 | # On Suns, sometimes $CPP names a directory. |
768 | if test -n "$CPP" && test -d "$CPP"; then | |
769 | CPP= | |
770 | fi | |
771 | if test -z "$CPP"; then | |
772 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
774 | else | |
775 | # This must be in double quotes, not single quotes, because CPP may get | |
776 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
777 | CPP="${CC-cc} -E" | |
778 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
779 | # not just through cpp. | |
780 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 781 | #line 782 "configure" |
5436fc65 C |
782 | #include "confdefs.h" |
783 | #include <assert.h> | |
784 | Syntax Error | |
785 | EOF | |
1a7b4b7c | 786 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
eac4afd1 JM |
787 | { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
788 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5436fc65 C |
789 | if test -z "$ac_err"; then |
790 | : | |
791 | else | |
792 | echo "$ac_err" >&5 | |
bfde4a67 SG |
793 | echo "configure: failed program was:" >&5 |
794 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
795 | rm -rf conftest* |
796 | CPP="${CC-cc} -E -traditional-cpp" | |
797 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 798 | #line 799 "configure" |
5436fc65 C |
799 | #include "confdefs.h" |
800 | #include <assert.h> | |
801 | Syntax Error | |
802 | EOF | |
1a7b4b7c | 803 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
eac4afd1 JM |
804 | { (eval echo configure:805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
805 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
806 | if test -z "$ac_err"; then | |
807 | : | |
808 | else | |
809 | echo "$ac_err" >&5 | |
810 | echo "configure: failed program was:" >&5 | |
811 | cat conftest.$ac_ext >&5 | |
812 | rm -rf conftest* | |
813 | CPP="${CC-cc} -nologo -E" | |
814 | cat > conftest.$ac_ext <<EOF | |
815 | #line 816 "configure" | |
816 | #include "confdefs.h" | |
817 | #include <assert.h> | |
818 | Syntax Error | |
819 | EOF | |
820 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
821 | { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
822 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5436fc65 C |
823 | if test -z "$ac_err"; then |
824 | : | |
825 | else | |
826 | echo "$ac_err" >&5 | |
bfde4a67 SG |
827 | echo "configure: failed program was:" >&5 |
828 | cat conftest.$ac_ext >&5 | |
5436fc65 | 829 | rm -rf conftest* |
fcfc3c0c TT |
830 | CPP=/lib/cpp |
831 | fi | |
832 | rm -f conftest* | |
833 | fi | |
eac4afd1 JM |
834 | rm -f conftest* |
835 | fi | |
fcfc3c0c TT |
836 | rm -f conftest* |
837 | ac_cv_prog_CPP="$CPP" | |
838 | fi | |
839 | CPP="$ac_cv_prog_CPP" | |
840 | else | |
841 | ac_cv_prog_CPP="$CPP" | |
842 | fi | |
843 | echo "$ac_t""$CPP" 1>&6 | |
844 | ||
845 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
eac4afd1 | 846 | echo "configure:847: checking for AIX" >&5 |
fcfc3c0c | 847 | cat > conftest.$ac_ext <<EOF |
eac4afd1 | 848 | #line 849 "configure" |
fcfc3c0c TT |
849 | #include "confdefs.h" |
850 | #ifdef _AIX | |
851 | yes | |
852 | #endif | |
853 | ||
854 | EOF | |
855 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
856 | egrep "yes" >/dev/null 2>&1; then | |
857 | rm -rf conftest* | |
858 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
859 | #define _ALL_SOURCE 1 | |
860 | EOF | |
861 | ||
862 | else | |
863 | rm -rf conftest* | |
864 | echo "$ac_t""no" 1>&6 | |
865 | fi | |
866 | rm -f conftest* | |
867 | ||
868 | ||
869 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` | |
870 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 | |
eac4afd1 | 871 | echo "configure:872: checking for minix/config.h" >&5 |
fcfc3c0c TT |
872 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
873 | echo $ac_n "(cached) $ac_c" 1>&6 | |
874 | else | |
875 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 876 | #line 877 "configure" |
fcfc3c0c TT |
877 | #include "confdefs.h" |
878 | #include <minix/config.h> | |
879 | EOF | |
880 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
eac4afd1 JM |
881 | { (eval echo configure:882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
882 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
fcfc3c0c TT |
883 | if test -z "$ac_err"; then |
884 | rm -rf conftest* | |
885 | eval "ac_cv_header_$ac_safe=yes" | |
886 | else | |
887 | echo "$ac_err" >&5 | |
888 | echo "configure: failed program was:" >&5 | |
889 | cat conftest.$ac_ext >&5 | |
890 | rm -rf conftest* | |
891 | eval "ac_cv_header_$ac_safe=no" | |
892 | fi | |
893 | rm -f conftest* | |
894 | fi | |
895 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
896 | echo "$ac_t""yes" 1>&6 | |
897 | MINIX=yes | |
898 | else | |
899 | echo "$ac_t""no" 1>&6 | |
900 | MINIX= | |
901 | fi | |
902 | ||
903 | if test "$MINIX" = yes; then | |
904 | cat >> confdefs.h <<\EOF | |
905 | #define _POSIX_SOURCE 1 | |
906 | EOF | |
907 | ||
908 | cat >> confdefs.h <<\EOF | |
909 | #define _POSIX_1_SOURCE 2 | |
910 | EOF | |
911 | ||
912 | cat >> confdefs.h <<\EOF | |
913 | #define _MINIX 1 | |
914 | EOF | |
915 | ||
916 | fi | |
917 | ||
918 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
eac4afd1 | 919 | echo "configure:920: checking for POSIXized ISC" >&5 |
fcfc3c0c TT |
920 | if test -d /etc/conf/kconfig.d && |
921 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
922 | then | |
923 | echo "$ac_t""yes" 1>&6 | |
924 | ISC=yes # If later tests want to check for ISC. | |
925 | cat >> confdefs.h <<\EOF | |
926 | #define _POSIX_SOURCE 1 | |
927 | EOF | |
928 | ||
929 | if test "$GCC" = yes; then | |
930 | CC="$CC -posix" | |
931 | else | |
932 | CC="$CC -Xp" | |
933 | fi | |
934 | else | |
935 | echo "$ac_t""no" 1>&6 | |
936 | ISC= | |
937 | fi | |
938 | ||
939 | ||
940 | DLLTOOL=${DLLTOOL-dlltool} | |
941 | ||
942 | ||
943 | ac_aux_dir= | |
944 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
945 | if test -f $ac_dir/install-sh; then | |
946 | ac_aux_dir=$ac_dir | |
947 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
948 | break | |
949 | elif test -f $ac_dir/install.sh; then | |
950 | ac_aux_dir=$ac_dir | |
951 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
952 | break | |
953 | fi | |
954 | done | |
955 | if test -z "$ac_aux_dir"; then | |
956 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
957 | fi | |
958 | ac_config_guess=$ac_aux_dir/config.guess | |
959 | ac_config_sub=$ac_aux_dir/config.sub | |
960 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
961 | ||
962 | ||
963 | # Do some error checking and defaulting for the host and target type. | |
964 | # The inputs are: | |
965 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
966 | # | |
967 | # The rules are: | |
968 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
969 | # same time. | |
970 | # 2. Host defaults to nonopt. | |
971 | # 3. If nonopt is not specified, then host defaults to the current host, | |
972 | # as determined by config.guess. | |
973 | # 4. Target and build default to nonopt. | |
974 | # 5. If nonopt is not specified, then target and build default to host. | |
975 | ||
976 | # The aliases save the names the user supplied, while $host etc. | |
977 | # will get canonicalized. | |
978 | case $host---$target---$nonopt in | |
979 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
980 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
981 | esac | |
982 | ||
983 | ||
984 | # Make sure we can run config.sub. | |
7dc185bc | 985 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
fcfc3c0c TT |
986 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
987 | fi | |
988 | ||
989 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
eac4afd1 | 990 | echo "configure:991: checking host system type" >&5 |
fcfc3c0c TT |
991 | |
992 | host_alias=$host | |
993 | case "$host_alias" in | |
994 | NONE) | |
995 | case $nonopt in | |
996 | NONE) | |
7dc185bc | 997 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
fcfc3c0c TT |
998 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
999 | fi ;; | |
1000 | *) host_alias=$nonopt ;; | |
1001 | esac ;; | |
1002 | esac | |
1003 | ||
7dc185bc | 1004 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
fcfc3c0c TT |
1005 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1006 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1007 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1008 | echo "$ac_t""$host" 1>&6 | |
1009 | ||
1010 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
eac4afd1 | 1011 | echo "configure:1012: checking target system type" >&5 |
fcfc3c0c TT |
1012 | |
1013 | target_alias=$target | |
1014 | case "$target_alias" in | |
1015 | NONE) | |
1016 | case $nonopt in | |
1017 | NONE) target_alias=$host_alias ;; | |
1018 | *) target_alias=$nonopt ;; | |
1019 | esac ;; | |
1020 | esac | |
1021 | ||
7dc185bc | 1022 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
fcfc3c0c TT |
1023 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1024 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1025 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1026 | echo "$ac_t""$target" 1>&6 | |
1027 | ||
1028 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
eac4afd1 | 1029 | echo "configure:1030: checking build system type" >&5 |
fcfc3c0c TT |
1030 | |
1031 | build_alias=$build | |
1032 | case "$build_alias" in | |
1033 | NONE) | |
1034 | case $nonopt in | |
1035 | NONE) build_alias=$host_alias ;; | |
1036 | *) build_alias=$nonopt ;; | |
1037 | esac ;; | |
1038 | esac | |
1039 | ||
7dc185bc | 1040 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
fcfc3c0c TT |
1041 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1042 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1043 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1044 | echo "$ac_t""$build" 1>&6 | |
1045 | ||
1046 | test "$host_alias" != "$target_alias" && | |
1047 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1048 | NONENONEs,x,x, && | |
1049 | program_prefix=${target_alias}- | |
1050 | ||
1051 | ||
1052 | ALL_LINGUAS= | |
1053 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
eac4afd1 | 1054 | echo "configure:1055: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
fcfc3c0c TT |
1055 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1056 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1057 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1058 | else | |
1059 | cat > conftestmake <<\EOF | |
1060 | all: | |
1061 | @echo 'ac_maketemp="${MAKE}"' | |
1062 | EOF | |
1063 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1064 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1065 | if test -n "$ac_maketemp"; then | |
1066 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1067 | else | |
1068 | eval ac_cv_prog_make_${ac_make}_set=no | |
1069 | fi | |
1070 | rm -f conftestmake | |
1071 | fi | |
1072 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1073 | echo "$ac_t""yes" 1>&6 | |
1074 | SET_MAKE= | |
1075 | else | |
1076 | echo "$ac_t""no" 1>&6 | |
1077 | SET_MAKE="MAKE=${MAKE-make}" | |
1078 | fi | |
1079 | ||
1080 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1081 | set dummy ranlib; ac_word=$2 | |
1082 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 1083 | echo "configure:1084: checking for $ac_word" >&5 |
fcfc3c0c TT |
1084 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1086 | else | |
1087 | if test -n "$RANLIB"; then | |
1088 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1089 | else | |
eac4afd1 | 1090 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
fcfc3c0c TT |
1091 | for ac_dir in $PATH; do |
1092 | test -z "$ac_dir" && ac_dir=. | |
1093 | if test -f $ac_dir/$ac_word; then | |
1094 | ac_cv_prog_RANLIB="ranlib" | |
1095 | break | |
1096 | fi | |
1097 | done | |
1098 | IFS="$ac_save_ifs" | |
1099 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1100 | fi | |
1101 | fi | |
1102 | RANLIB="$ac_cv_prog_RANLIB" | |
1103 | if test -n "$RANLIB"; then | |
1104 | echo "$ac_t""$RANLIB" 1>&6 | |
1105 | else | |
1106 | echo "$ac_t""no" 1>&6 | |
1107 | fi | |
1108 | ||
1109 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
eac4afd1 | 1110 | echo "configure:1111: checking for ANSI C header files" >&5 |
fcfc3c0c TT |
1111 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1112 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1113 | else | |
1114 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1115 | #line 1116 "configure" |
fcfc3c0c TT |
1116 | #include "confdefs.h" |
1117 | #include <stdlib.h> | |
1118 | #include <stdarg.h> | |
1119 | #include <string.h> | |
1120 | #include <float.h> | |
1121 | EOF | |
1122 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
eac4afd1 JM |
1123 | { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1124 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
fcfc3c0c TT |
1125 | if test -z "$ac_err"; then |
1126 | rm -rf conftest* | |
1127 | ac_cv_header_stdc=yes | |
1128 | else | |
1129 | echo "$ac_err" >&5 | |
1130 | echo "configure: failed program was:" >&5 | |
1131 | cat conftest.$ac_ext >&5 | |
1132 | rm -rf conftest* | |
1133 | ac_cv_header_stdc=no | |
1134 | fi | |
1135 | rm -f conftest* | |
1136 | ||
1137 | if test $ac_cv_header_stdc = yes; then | |
1138 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1139 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1140 | #line 1141 "configure" |
fcfc3c0c TT |
1141 | #include "confdefs.h" |
1142 | #include <string.h> | |
1143 | EOF | |
1144 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1145 | egrep "memchr" >/dev/null 2>&1; then | |
1146 | : | |
1147 | else | |
1148 | rm -rf conftest* | |
1149 | ac_cv_header_stdc=no | |
1150 | fi | |
1151 | rm -f conftest* | |
1152 | ||
1153 | fi | |
1154 | ||
1155 | if test $ac_cv_header_stdc = yes; then | |
1156 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1157 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1158 | #line 1159 "configure" |
fcfc3c0c TT |
1159 | #include "confdefs.h" |
1160 | #include <stdlib.h> | |
1161 | EOF | |
1162 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1163 | egrep "free" >/dev/null 2>&1; then | |
1164 | : | |
1165 | else | |
1166 | rm -rf conftest* | |
1167 | ac_cv_header_stdc=no | |
1168 | fi | |
1169 | rm -f conftest* | |
1170 | ||
1171 | fi | |
1172 | ||
1173 | if test $ac_cv_header_stdc = yes; then | |
1174 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1175 | if test "$cross_compiling" = yes; then | |
1176 | : | |
1177 | else | |
1178 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1179 | #line 1180 "configure" |
fcfc3c0c TT |
1180 | #include "confdefs.h" |
1181 | #include <ctype.h> | |
1182 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1183 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1184 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1185 | int main () { int i; for (i = 0; i < 256; i++) | |
1186 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1187 | exit (0); } | |
1188 | ||
1189 | EOF | |
eac4afd1 | 1190 | if { (eval echo configure:1191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1191 | then |
1192 | : | |
1193 | else | |
1194 | echo "configure: failed program was:" >&5 | |
1195 | cat conftest.$ac_ext >&5 | |
1196 | rm -fr conftest* | |
1197 | ac_cv_header_stdc=no | |
1198 | fi | |
1199 | rm -fr conftest* | |
1200 | fi | |
1201 | ||
1202 | fi | |
1203 | fi | |
1204 | ||
1205 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1206 | if test $ac_cv_header_stdc = yes; then | |
1207 | cat >> confdefs.h <<\EOF | |
1208 | #define STDC_HEADERS 1 | |
1209 | EOF | |
1210 | ||
1211 | fi | |
1212 | ||
1213 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
eac4afd1 | 1214 | echo "configure:1215: checking for working const" >&5 |
fcfc3c0c TT |
1215 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1217 | else | |
1218 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1219 | #line 1220 "configure" |
fcfc3c0c TT |
1220 | #include "confdefs.h" |
1221 | ||
1222 | int main() { | |
1223 | ||
1224 | /* Ultrix mips cc rejects this. */ | |
1225 | typedef int charset[2]; const charset x; | |
1226 | /* SunOS 4.1.1 cc rejects this. */ | |
1227 | char const *const *ccp; | |
1228 | char **p; | |
1229 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1230 | struct point {int x, y;}; | |
1231 | static struct point const zero = {0,0}; | |
1232 | /* AIX XL C 1.02.0.0 rejects this. | |
1233 | It does not let you subtract one const X* pointer from another in an arm | |
1234 | of an if-expression whose if-part is not a constant expression */ | |
1235 | const char *g = "string"; | |
1236 | ccp = &g + (g ? g-g : 0); | |
1237 | /* HPUX 7.0 cc rejects these. */ | |
1238 | ++ccp; | |
1239 | p = (char**) ccp; | |
1240 | ccp = (char const *const *) p; | |
1241 | { /* SCO 3.2v4 cc rejects this. */ | |
1242 | char *t; | |
1243 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1244 | ||
1245 | *t++ = 0; | |
1246 | } | |
1247 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1248 | int x[] = {25, 17}; | |
1249 | const int *foo = &x[0]; | |
1250 | ++foo; | |
1251 | } | |
1252 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1253 | typedef const int *iptr; | |
1254 | iptr p = 0; | |
1255 | ++p; | |
1256 | } | |
1257 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1258 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1259 | struct s { int j; const int *ap[3]; }; | |
1260 | struct s *b; b->j = 5; | |
1261 | } | |
1262 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1263 | const int foo = 10; | |
1264 | } | |
1265 | ||
1266 | ; return 0; } | |
1267 | EOF | |
eac4afd1 | 1268 | if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1269 | rm -rf conftest* |
1270 | ac_cv_c_const=yes | |
1271 | else | |
1272 | echo "configure: failed program was:" >&5 | |
1273 | cat conftest.$ac_ext >&5 | |
1274 | rm -rf conftest* | |
1275 | ac_cv_c_const=no | |
1276 | fi | |
1277 | rm -f conftest* | |
1278 | fi | |
1279 | ||
1280 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1281 | if test $ac_cv_c_const = no; then | |
1282 | cat >> confdefs.h <<\EOF | |
1283 | #define const | |
1284 | EOF | |
1285 | ||
1286 | fi | |
1287 | ||
1288 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
eac4afd1 | 1289 | echo "configure:1290: checking for inline" >&5 |
fcfc3c0c TT |
1290 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1292 | else | |
1293 | ac_cv_c_inline=no | |
1294 | for ac_kw in inline __inline__ __inline; do | |
1295 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1296 | #line 1297 "configure" |
fcfc3c0c TT |
1297 | #include "confdefs.h" |
1298 | ||
1299 | int main() { | |
1300 | } $ac_kw foo() { | |
1301 | ; return 0; } | |
1302 | EOF | |
eac4afd1 | 1303 | if { (eval echo configure:1304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1304 | rm -rf conftest* |
1305 | ac_cv_c_inline=$ac_kw; break | |
1306 | else | |
1307 | echo "configure: failed program was:" >&5 | |
1308 | cat conftest.$ac_ext >&5 | |
1309 | fi | |
1310 | rm -f conftest* | |
1311 | done | |
1312 | ||
1313 | fi | |
1314 | ||
1315 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1316 | case "$ac_cv_c_inline" in | |
1317 | inline | yes) ;; | |
1318 | no) cat >> confdefs.h <<\EOF | |
1319 | #define inline | |
1320 | EOF | |
1321 | ;; | |
1322 | *) cat >> confdefs.h <<EOF | |
1323 | #define inline $ac_cv_c_inline | |
1324 | EOF | |
1325 | ;; | |
1326 | esac | |
1327 | ||
1328 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
eac4afd1 | 1329 | echo "configure:1330: checking for off_t" >&5 |
fcfc3c0c TT |
1330 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1331 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1332 | else | |
1333 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1334 | #line 1335 "configure" |
fcfc3c0c TT |
1335 | #include "confdefs.h" |
1336 | #include <sys/types.h> | |
1337 | #if STDC_HEADERS | |
1338 | #include <stdlib.h> | |
1339 | #include <stddef.h> | |
1340 | #endif | |
1341 | EOF | |
1342 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1343 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1344 | rm -rf conftest* | |
1345 | ac_cv_type_off_t=yes | |
1346 | else | |
1347 | rm -rf conftest* | |
1348 | ac_cv_type_off_t=no | |
1349 | fi | |
1350 | rm -f conftest* | |
1351 | ||
1352 | fi | |
1353 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1354 | if test $ac_cv_type_off_t = no; then | |
1355 | cat >> confdefs.h <<\EOF | |
1356 | #define off_t long | |
1357 | EOF | |
1358 | ||
1359 | fi | |
1360 | ||
1361 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
eac4afd1 | 1362 | echo "configure:1363: checking for size_t" >&5 |
fcfc3c0c TT |
1363 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1364 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1365 | else | |
1366 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1367 | #line 1368 "configure" |
fcfc3c0c TT |
1368 | #include "confdefs.h" |
1369 | #include <sys/types.h> | |
1370 | #if STDC_HEADERS | |
1371 | #include <stdlib.h> | |
1372 | #include <stddef.h> | |
1373 | #endif | |
1374 | EOF | |
1375 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1376 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1377 | rm -rf conftest* | |
1378 | ac_cv_type_size_t=yes | |
1379 | else | |
1380 | rm -rf conftest* | |
1381 | ac_cv_type_size_t=no | |
1382 | fi | |
1383 | rm -f conftest* | |
1384 | ||
1385 | fi | |
1386 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1387 | if test $ac_cv_type_size_t = no; then | |
1388 | cat >> confdefs.h <<\EOF | |
1389 | #define size_t unsigned | |
1390 | EOF | |
1391 | ||
1392 | fi | |
1393 | ||
1394 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1395 | # for constant arguments. Useless! | |
1396 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
eac4afd1 | 1397 | echo "configure:1398: checking for working alloca.h" >&5 |
fcfc3c0c TT |
1398 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1402 | #line 1403 "configure" |
fcfc3c0c TT |
1403 | #include "confdefs.h" |
1404 | #include <alloca.h> | |
1405 | int main() { | |
1406 | char *p = alloca(2 * sizeof(int)); | |
1407 | ; return 0; } | |
1408 | EOF | |
eac4afd1 | 1409 | if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1410 | rm -rf conftest* |
1411 | ac_cv_header_alloca_h=yes | |
1412 | else | |
1413 | echo "configure: failed program was:" >&5 | |
1414 | cat conftest.$ac_ext >&5 | |
1415 | rm -rf conftest* | |
1416 | ac_cv_header_alloca_h=no | |
1417 | fi | |
1418 | rm -f conftest* | |
1419 | fi | |
1420 | ||
1421 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1422 | if test $ac_cv_header_alloca_h = yes; then | |
1423 | cat >> confdefs.h <<\EOF | |
1424 | #define HAVE_ALLOCA_H 1 | |
1425 | EOF | |
1426 | ||
1427 | fi | |
1428 | ||
1429 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
eac4afd1 | 1430 | echo "configure:1431: checking for alloca" >&5 |
fcfc3c0c TT |
1431 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1432 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1433 | else | |
1434 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1435 | #line 1436 "configure" |
fcfc3c0c TT |
1436 | #include "confdefs.h" |
1437 | ||
1438 | #ifdef __GNUC__ | |
1439 | # define alloca __builtin_alloca | |
1440 | #else | |
eac4afd1 JM |
1441 | # ifdef _MSC_VER |
1442 | # include <malloc.h> | |
1443 | # define alloca _alloca | |
fcfc3c0c | 1444 | # else |
eac4afd1 JM |
1445 | # if HAVE_ALLOCA_H |
1446 | # include <alloca.h> | |
fcfc3c0c | 1447 | # else |
eac4afd1 JM |
1448 | # ifdef _AIX |
1449 | #pragma alloca | |
1450 | # else | |
1451 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
fcfc3c0c | 1452 | char *alloca (); |
eac4afd1 | 1453 | # endif |
fcfc3c0c TT |
1454 | # endif |
1455 | # endif | |
1456 | # endif | |
1457 | #endif | |
1458 | ||
1459 | int main() { | |
1460 | char *p = (char *) alloca(1); | |
1461 | ; return 0; } | |
1462 | EOF | |
eac4afd1 | 1463 | if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1464 | rm -rf conftest* |
1465 | ac_cv_func_alloca_works=yes | |
1466 | else | |
1467 | echo "configure: failed program was:" >&5 | |
1468 | cat conftest.$ac_ext >&5 | |
1469 | rm -rf conftest* | |
1470 | ac_cv_func_alloca_works=no | |
1471 | fi | |
1472 | rm -f conftest* | |
1473 | fi | |
1474 | ||
1475 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1476 | if test $ac_cv_func_alloca_works = yes; then | |
1477 | cat >> confdefs.h <<\EOF | |
1478 | #define HAVE_ALLOCA 1 | |
1479 | EOF | |
1480 | ||
1481 | fi | |
1482 | ||
1483 | if test $ac_cv_func_alloca_works = no; then | |
1484 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1485 | # that cause trouble. Some versions do not even contain alloca or | |
1486 | # contain a buggy version. If you still want to use their alloca, | |
1487 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
eac4afd1 | 1488 | ALLOCA=alloca.${ac_objext} |
fcfc3c0c TT |
1489 | cat >> confdefs.h <<\EOF |
1490 | #define C_ALLOCA 1 | |
1491 | EOF | |
1492 | ||
1493 | ||
1494 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
eac4afd1 | 1495 | echo "configure:1496: checking whether alloca needs Cray hooks" >&5 |
fcfc3c0c TT |
1496 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1497 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1498 | else | |
1499 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1500 | #line 1501 "configure" |
fcfc3c0c TT |
1501 | #include "confdefs.h" |
1502 | #if defined(CRAY) && ! defined(CRAY2) | |
1503 | webecray | |
1504 | #else | |
1505 | wenotbecray | |
1506 | #endif | |
1507 | ||
1508 | EOF | |
1509 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1510 | egrep "webecray" >/dev/null 2>&1; then | |
1511 | rm -rf conftest* | |
1512 | ac_cv_os_cray=yes | |
1513 | else | |
1514 | rm -rf conftest* | |
1515 | ac_cv_os_cray=no | |
1516 | fi | |
1517 | rm -f conftest* | |
1518 | ||
1519 | fi | |
1520 | ||
1521 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1522 | if test $ac_cv_os_cray = yes; then | |
1523 | for ac_func in _getb67 GETB67 getb67; do | |
1524 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
eac4afd1 | 1525 | echo "configure:1526: checking for $ac_func" >&5 |
fcfc3c0c TT |
1526 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1527 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1528 | else | |
1529 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1530 | #line 1531 "configure" |
fcfc3c0c TT |
1531 | #include "confdefs.h" |
1532 | /* System header to define __stub macros and hopefully few prototypes, | |
1533 | which can conflict with char $ac_func(); below. */ | |
1534 | #include <assert.h> | |
1535 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1536 | /* We use char because int might match the return type of a gcc2 | |
1537 | builtin and then its argument prototype would still apply. */ | |
1538 | char $ac_func(); | |
1539 | ||
1540 | int main() { | |
1541 | ||
1542 | /* The GNU C library defines this for functions which it implements | |
1543 | to always fail with ENOSYS. Some functions are actually named | |
1544 | something starting with __ and the normal name is an alias. */ | |
1545 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1546 | choke me | |
1547 | #else | |
1548 | $ac_func(); | |
1549 | #endif | |
1550 | ||
1551 | ; return 0; } | |
1552 | EOF | |
eac4afd1 | 1553 | if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1554 | rm -rf conftest* |
1555 | eval "ac_cv_func_$ac_func=yes" | |
1556 | else | |
1557 | echo "configure: failed program was:" >&5 | |
1558 | cat conftest.$ac_ext >&5 | |
1559 | rm -rf conftest* | |
1560 | eval "ac_cv_func_$ac_func=no" | |
1561 | fi | |
1562 | rm -f conftest* | |
1563 | fi | |
1564 | ||
1565 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1566 | echo "$ac_t""yes" 1>&6 | |
1567 | cat >> confdefs.h <<EOF | |
1568 | #define CRAY_STACKSEG_END $ac_func | |
1569 | EOF | |
1570 | ||
1571 | break | |
1572 | else | |
1573 | echo "$ac_t""no" 1>&6 | |
1574 | fi | |
1575 | ||
1576 | done | |
1577 | fi | |
1578 | ||
1579 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
eac4afd1 | 1580 | echo "configure:1581: checking stack direction for C alloca" >&5 |
fcfc3c0c TT |
1581 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1583 | else | |
1584 | if test "$cross_compiling" = yes; then | |
1585 | ac_cv_c_stack_direction=0 | |
1586 | else | |
1587 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1588 | #line 1589 "configure" |
fcfc3c0c TT |
1589 | #include "confdefs.h" |
1590 | find_stack_direction () | |
1591 | { | |
1592 | static char *addr = 0; | |
1593 | auto char dummy; | |
1594 | if (addr == 0) | |
1595 | { | |
1596 | addr = &dummy; | |
1597 | return find_stack_direction (); | |
1598 | } | |
1599 | else | |
1600 | return (&dummy > addr) ? 1 : -1; | |
1601 | } | |
1602 | main () | |
1603 | { | |
1604 | exit (find_stack_direction() < 0); | |
1605 | } | |
1606 | EOF | |
eac4afd1 | 1607 | if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1608 | then |
1609 | ac_cv_c_stack_direction=1 | |
1610 | else | |
1611 | echo "configure: failed program was:" >&5 | |
1612 | cat conftest.$ac_ext >&5 | |
1613 | rm -fr conftest* | |
1614 | ac_cv_c_stack_direction=-1 | |
1615 | fi | |
1616 | rm -fr conftest* | |
1617 | fi | |
1618 | ||
1619 | fi | |
1620 | ||
1621 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1622 | cat >> confdefs.h <<EOF | |
1623 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1624 | EOF | |
1625 | ||
1626 | fi | |
1627 | ||
1628 | for ac_hdr in unistd.h | |
1629 | do | |
1630 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1631 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
eac4afd1 | 1632 | echo "configure:1633: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
1633 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1635 | else | |
1636 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1637 | #line 1638 "configure" |
fcfc3c0c TT |
1638 | #include "confdefs.h" |
1639 | #include <$ac_hdr> | |
1640 | EOF | |
1641 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
eac4afd1 JM |
1642 | { (eval echo configure:1643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1643 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
fcfc3c0c TT |
1644 | if test -z "$ac_err"; then |
1645 | rm -rf conftest* | |
1646 | eval "ac_cv_header_$ac_safe=yes" | |
1647 | else | |
1648 | echo "$ac_err" >&5 | |
1649 | echo "configure: failed program was:" >&5 | |
1650 | cat conftest.$ac_ext >&5 | |
1651 | rm -rf conftest* | |
1652 | eval "ac_cv_header_$ac_safe=no" | |
1653 | fi | |
1654 | rm -f conftest* | |
1655 | fi | |
1656 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1657 | echo "$ac_t""yes" 1>&6 | |
1658 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1659 | cat >> confdefs.h <<EOF | |
1660 | #define $ac_tr_hdr 1 | |
1661 | EOF | |
1662 | ||
1663 | else | |
1664 | echo "$ac_t""no" 1>&6 | |
1665 | fi | |
1666 | done | |
1667 | ||
1668 | for ac_func in getpagesize | |
1669 | do | |
1670 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
eac4afd1 | 1671 | echo "configure:1672: checking for $ac_func" >&5 |
fcfc3c0c TT |
1672 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1674 | else | |
1675 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1676 | #line 1677 "configure" |
fcfc3c0c TT |
1677 | #include "confdefs.h" |
1678 | /* System header to define __stub macros and hopefully few prototypes, | |
1679 | which can conflict with char $ac_func(); below. */ | |
1680 | #include <assert.h> | |
1681 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1682 | /* We use char because int might match the return type of a gcc2 | |
1683 | builtin and then its argument prototype would still apply. */ | |
1684 | char $ac_func(); | |
1685 | ||
1686 | int main() { | |
1687 | ||
1688 | /* The GNU C library defines this for functions which it implements | |
1689 | to always fail with ENOSYS. Some functions are actually named | |
1690 | something starting with __ and the normal name is an alias. */ | |
1691 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1692 | choke me | |
1693 | #else | |
1694 | $ac_func(); | |
1695 | #endif | |
1696 | ||
1697 | ; return 0; } | |
1698 | EOF | |
eac4afd1 | 1699 | if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1700 | rm -rf conftest* |
1701 | eval "ac_cv_func_$ac_func=yes" | |
1702 | else | |
1703 | echo "configure: failed program was:" >&5 | |
1704 | cat conftest.$ac_ext >&5 | |
1705 | rm -rf conftest* | |
1706 | eval "ac_cv_func_$ac_func=no" | |
1707 | fi | |
1708 | rm -f conftest* | |
1709 | fi | |
1710 | ||
1711 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1712 | echo "$ac_t""yes" 1>&6 | |
1713 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1714 | cat >> confdefs.h <<EOF | |
1715 | #define $ac_tr_func 1 | |
1716 | EOF | |
1717 | ||
1718 | else | |
1719 | echo "$ac_t""no" 1>&6 | |
1720 | fi | |
1721 | done | |
1722 | ||
1723 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
eac4afd1 | 1724 | echo "configure:1725: checking for working mmap" >&5 |
fcfc3c0c TT |
1725 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1727 | else | |
1728 | if test "$cross_compiling" = yes; then | |
1729 | ac_cv_func_mmap_fixed_mapped=no | |
1730 | else | |
1731 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1732 | #line 1733 "configure" |
fcfc3c0c TT |
1733 | #include "confdefs.h" |
1734 | ||
1735 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1736 | Here is a matrix of mmap possibilities: | |
1737 | mmap private not fixed | |
1738 | mmap private fixed at somewhere currently unmapped | |
1739 | mmap private fixed at somewhere already mapped | |
1740 | mmap shared not fixed | |
1741 | mmap shared fixed at somewhere currently unmapped | |
1742 | mmap shared fixed at somewhere already mapped | |
1743 | For private mappings, we should verify that changes cannot be read() | |
1744 | back from the file, nor mmap's back from the file at a different | |
1745 | address. (There have been systems where private was not correctly | |
1746 | implemented like the infamous i386 svr4.0, and systems where the | |
1747 | VM page cache was not coherent with the filesystem buffer cache | |
1748 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1749 | For shared mappings, we should conversely verify that changes get | |
1750 | propogated back to all the places they're supposed to be. | |
1751 | ||
1752 | Grep wants private fixed already mapped. | |
1753 | The main things grep needs to know about mmap are: | |
1754 | * does it exist and is it safe to write into the mmap'd area | |
1755 | * how to use it (BSD variants) */ | |
1756 | #include <sys/types.h> | |
1757 | #include <fcntl.h> | |
1758 | #include <sys/mman.h> | |
1759 | ||
1760 | /* This mess was copied from the GNU getpagesize.h. */ | |
1761 | #ifndef HAVE_GETPAGESIZE | |
1762 | # ifdef HAVE_UNISTD_H | |
1763 | # include <unistd.h> | |
1764 | # endif | |
1765 | ||
1766 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1767 | # ifndef HAVE_SYS_PARAM_H | |
1768 | # define HAVE_SYS_PARAM_H 1 | |
1769 | # endif | |
1770 | ||
1771 | # ifdef _SC_PAGESIZE | |
1772 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1773 | # else /* no _SC_PAGESIZE */ | |
1774 | # ifdef HAVE_SYS_PARAM_H | |
1775 | # include <sys/param.h> | |
1776 | # ifdef EXEC_PAGESIZE | |
1777 | # define getpagesize() EXEC_PAGESIZE | |
1778 | # else /* no EXEC_PAGESIZE */ | |
1779 | # ifdef NBPG | |
1780 | # define getpagesize() NBPG * CLSIZE | |
1781 | # ifndef CLSIZE | |
1782 | # define CLSIZE 1 | |
1783 | # endif /* no CLSIZE */ | |
1784 | # else /* no NBPG */ | |
1785 | # ifdef NBPC | |
1786 | # define getpagesize() NBPC | |
1787 | # else /* no NBPC */ | |
1788 | # ifdef PAGESIZE | |
1789 | # define getpagesize() PAGESIZE | |
1790 | # endif /* PAGESIZE */ | |
1791 | # endif /* no NBPC */ | |
1792 | # endif /* no NBPG */ | |
1793 | # endif /* no EXEC_PAGESIZE */ | |
1794 | # else /* no HAVE_SYS_PARAM_H */ | |
1795 | # define getpagesize() 8192 /* punt totally */ | |
1796 | # endif /* no HAVE_SYS_PARAM_H */ | |
1797 | # endif /* no _SC_PAGESIZE */ | |
1798 | ||
1799 | #endif /* no HAVE_GETPAGESIZE */ | |
1800 | ||
1801 | #ifdef __cplusplus | |
1802 | extern "C" { void *malloc(unsigned); } | |
1803 | #else | |
1804 | char *malloc(); | |
1805 | #endif | |
1806 | ||
1807 | int | |
1808 | main() | |
1809 | { | |
1810 | char *data, *data2, *data3; | |
1811 | int i, pagesize; | |
1812 | int fd; | |
1813 | ||
1814 | pagesize = getpagesize(); | |
1815 | ||
1816 | /* | |
1817 | * First, make a file with some known garbage in it. | |
1818 | */ | |
1819 | data = malloc(pagesize); | |
1820 | if (!data) | |
1821 | exit(1); | |
1822 | for (i = 0; i < pagesize; ++i) | |
1823 | *(data + i) = rand(); | |
1824 | umask(0); | |
1825 | fd = creat("conftestmmap", 0600); | |
1826 | if (fd < 0) | |
1827 | exit(1); | |
1828 | if (write(fd, data, pagesize) != pagesize) | |
1829 | exit(1); | |
1830 | close(fd); | |
1831 | ||
1832 | /* | |
1833 | * Next, try to mmap the file at a fixed address which | |
1834 | * already has something else allocated at it. If we can, | |
1835 | * also make sure that we see the same garbage. | |
1836 | */ | |
1837 | fd = open("conftestmmap", O_RDWR); | |
1838 | if (fd < 0) | |
1839 | exit(1); | |
1840 | data2 = malloc(2 * pagesize); | |
1841 | if (!data2) | |
1842 | exit(1); | |
1843 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1844 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1845 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1846 | exit(1); | |
1847 | for (i = 0; i < pagesize; ++i) | |
1848 | if (*(data + i) != *(data2 + i)) | |
1849 | exit(1); | |
1850 | ||
1851 | /* | |
1852 | * Finally, make sure that changes to the mapped area | |
1853 | * do not percolate back to the file as seen by read(). | |
1854 | * (This is a bug on some variants of i386 svr4.0.) | |
1855 | */ | |
1856 | for (i = 0; i < pagesize; ++i) | |
1857 | *(data2 + i) = *(data2 + i) + 1; | |
1858 | data3 = malloc(pagesize); | |
1859 | if (!data3) | |
1860 | exit(1); | |
1861 | if (read(fd, data3, pagesize) != pagesize) | |
1862 | exit(1); | |
1863 | for (i = 0; i < pagesize; ++i) | |
1864 | if (*(data + i) != *(data3 + i)) | |
1865 | exit(1); | |
1866 | close(fd); | |
1867 | unlink("conftestmmap"); | |
1868 | exit(0); | |
1869 | } | |
1870 | ||
1871 | EOF | |
eac4afd1 | 1872 | if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1873 | then |
1874 | ac_cv_func_mmap_fixed_mapped=yes | |
1875 | else | |
1876 | echo "configure: failed program was:" >&5 | |
1877 | cat conftest.$ac_ext >&5 | |
1878 | rm -fr conftest* | |
1879 | ac_cv_func_mmap_fixed_mapped=no | |
1880 | fi | |
1881 | rm -fr conftest* | |
1882 | fi | |
1883 | ||
1884 | fi | |
1885 | ||
1886 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1887 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1888 | cat >> confdefs.h <<\EOF | |
1889 | #define HAVE_MMAP 1 | |
1890 | EOF | |
1891 | ||
1892 | fi | |
1893 | ||
1894 | ||
1895 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1896 | unistd.h values.h sys/param.h | |
1897 | do | |
1898 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1899 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
eac4afd1 | 1900 | echo "configure:1901: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
1901 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1903 | else | |
1904 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1905 | #line 1906 "configure" |
fcfc3c0c TT |
1906 | #include "confdefs.h" |
1907 | #include <$ac_hdr> | |
1908 | EOF | |
1909 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
eac4afd1 JM |
1910 | { (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1911 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
fcfc3c0c TT |
1912 | if test -z "$ac_err"; then |
1913 | rm -rf conftest* | |
1914 | eval "ac_cv_header_$ac_safe=yes" | |
1915 | else | |
1916 | echo "$ac_err" >&5 | |
1917 | echo "configure: failed program was:" >&5 | |
1918 | cat conftest.$ac_ext >&5 | |
1919 | rm -rf conftest* | |
1920 | eval "ac_cv_header_$ac_safe=no" | |
1921 | fi | |
1922 | rm -f conftest* | |
1923 | fi | |
1924 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1925 | echo "$ac_t""yes" 1>&6 | |
1926 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1927 | cat >> confdefs.h <<EOF | |
1928 | #define $ac_tr_hdr 1 | |
1929 | EOF | |
1930 | ||
1931 | else | |
1932 | echo "$ac_t""no" 1>&6 | |
1933 | fi | |
1934 | done | |
1935 | ||
1936 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
1937 | __argz_count __argz_stringify __argz_next | |
1938 | do | |
1939 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
eac4afd1 | 1940 | echo "configure:1941: checking for $ac_func" >&5 |
fcfc3c0c TT |
1941 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1943 | else | |
1944 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 1945 | #line 1946 "configure" |
fcfc3c0c TT |
1946 | #include "confdefs.h" |
1947 | /* System header to define __stub macros and hopefully few prototypes, | |
1948 | which can conflict with char $ac_func(); below. */ | |
1949 | #include <assert.h> | |
1950 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1951 | /* We use char because int might match the return type of a gcc2 | |
1952 | builtin and then its argument prototype would still apply. */ | |
1953 | char $ac_func(); | |
1954 | ||
1955 | int main() { | |
1956 | ||
1957 | /* The GNU C library defines this for functions which it implements | |
1958 | to always fail with ENOSYS. Some functions are actually named | |
1959 | something starting with __ and the normal name is an alias. */ | |
1960 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1961 | choke me | |
1962 | #else | |
1963 | $ac_func(); | |
1964 | #endif | |
1965 | ||
1966 | ; return 0; } | |
1967 | EOF | |
eac4afd1 | 1968 | if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1969 | rm -rf conftest* |
1970 | eval "ac_cv_func_$ac_func=yes" | |
1971 | else | |
1972 | echo "configure: failed program was:" >&5 | |
1973 | cat conftest.$ac_ext >&5 | |
1974 | rm -rf conftest* | |
1975 | eval "ac_cv_func_$ac_func=no" | |
1976 | fi | |
1977 | rm -f conftest* | |
1978 | fi | |
1979 | ||
1980 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1981 | echo "$ac_t""yes" 1>&6 | |
1982 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1983 | cat >> confdefs.h <<EOF | |
1984 | #define $ac_tr_func 1 | |
1985 | EOF | |
1986 | ||
1987 | else | |
1988 | echo "$ac_t""no" 1>&6 | |
1989 | fi | |
1990 | done | |
1991 | ||
1992 | ||
1993 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
1994 | for ac_func in stpcpy | |
1995 | do | |
1996 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
eac4afd1 | 1997 | echo "configure:1998: checking for $ac_func" >&5 |
fcfc3c0c TT |
1998 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2000 | else | |
2001 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2002 | #line 2003 "configure" |
fcfc3c0c TT |
2003 | #include "confdefs.h" |
2004 | /* System header to define __stub macros and hopefully few prototypes, | |
2005 | which can conflict with char $ac_func(); below. */ | |
2006 | #include <assert.h> | |
2007 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2008 | /* We use char because int might match the return type of a gcc2 | |
2009 | builtin and then its argument prototype would still apply. */ | |
2010 | char $ac_func(); | |
2011 | ||
2012 | int main() { | |
2013 | ||
2014 | /* The GNU C library defines this for functions which it implements | |
2015 | to always fail with ENOSYS. Some functions are actually named | |
2016 | something starting with __ and the normal name is an alias. */ | |
2017 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2018 | choke me | |
2019 | #else | |
2020 | $ac_func(); | |
2021 | #endif | |
2022 | ||
2023 | ; return 0; } | |
2024 | EOF | |
eac4afd1 | 2025 | if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2026 | rm -rf conftest* |
2027 | eval "ac_cv_func_$ac_func=yes" | |
2028 | else | |
2029 | echo "configure: failed program was:" >&5 | |
2030 | cat conftest.$ac_ext >&5 | |
2031 | rm -rf conftest* | |
2032 | eval "ac_cv_func_$ac_func=no" | |
2033 | fi | |
2034 | rm -f conftest* | |
2035 | fi | |
2036 | ||
2037 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2038 | echo "$ac_t""yes" 1>&6 | |
2039 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2040 | cat >> confdefs.h <<EOF | |
2041 | #define $ac_tr_func 1 | |
2042 | EOF | |
2043 | ||
2044 | else | |
2045 | echo "$ac_t""no" 1>&6 | |
2046 | fi | |
2047 | done | |
2048 | ||
2049 | fi | |
2050 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2051 | cat >> confdefs.h <<\EOF | |
2052 | #define HAVE_STPCPY 1 | |
2053 | EOF | |
2054 | ||
2055 | fi | |
2056 | ||
2057 | if test $ac_cv_header_locale_h = yes; then | |
2058 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
eac4afd1 | 2059 | echo "configure:2060: checking for LC_MESSAGES" >&5 |
fcfc3c0c TT |
2060 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2062 | else | |
2063 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2064 | #line 2065 "configure" |
fcfc3c0c TT |
2065 | #include "confdefs.h" |
2066 | #include <locale.h> | |
2067 | int main() { | |
2068 | return LC_MESSAGES | |
2069 | ; return 0; } | |
2070 | EOF | |
eac4afd1 | 2071 | if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2072 | rm -rf conftest* |
2073 | am_cv_val_LC_MESSAGES=yes | |
2074 | else | |
2075 | echo "configure: failed program was:" >&5 | |
2076 | cat conftest.$ac_ext >&5 | |
2077 | rm -rf conftest* | |
2078 | am_cv_val_LC_MESSAGES=no | |
2079 | fi | |
2080 | rm -f conftest* | |
2081 | fi | |
2082 | ||
2083 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2084 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2085 | cat >> confdefs.h <<\EOF | |
2086 | #define HAVE_LC_MESSAGES 1 | |
2087 | EOF | |
2088 | ||
2089 | fi | |
2090 | fi | |
2091 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
eac4afd1 | 2092 | echo "configure:2093: checking whether NLS is requested" >&5 |
fcfc3c0c TT |
2093 | # Check whether --enable-nls or --disable-nls was given. |
2094 | if test "${enable_nls+set}" = set; then | |
2095 | enableval="$enable_nls" | |
2096 | USE_NLS=$enableval | |
2097 | else | |
2098 | USE_NLS=yes | |
2099 | fi | |
2100 | ||
2101 | echo "$ac_t""$USE_NLS" 1>&6 | |
2102 | ||
2103 | ||
2104 | USE_INCLUDED_LIBINTL=no | |
2105 | ||
2106 | if test "$USE_NLS" = "yes"; then | |
2107 | cat >> confdefs.h <<\EOF | |
2108 | #define ENABLE_NLS 1 | |
2109 | EOF | |
2110 | ||
2111 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
eac4afd1 | 2112 | echo "configure:2113: checking whether included gettext is requested" >&5 |
fcfc3c0c TT |
2113 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2114 | if test "${with_included_gettext+set}" = set; then | |
2115 | withval="$with_included_gettext" | |
2116 | nls_cv_force_use_gnu_gettext=$withval | |
2117 | else | |
2118 | nls_cv_force_use_gnu_gettext=no | |
2119 | fi | |
2120 | ||
2121 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2122 | ||
2123 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2124 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2125 | nls_cv_header_intl= | |
2126 | nls_cv_header_libgt= | |
2127 | CATOBJEXT=NONE | |
2128 | ||
2129 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2130 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
eac4afd1 | 2131 | echo "configure:2132: checking for libintl.h" >&5 |
fcfc3c0c TT |
2132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2134 | else | |
2135 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2136 | #line 2137 "configure" |
fcfc3c0c TT |
2137 | #include "confdefs.h" |
2138 | #include <libintl.h> | |
2139 | EOF | |
2140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
eac4afd1 JM |
2141 | { (eval echo configure:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
fcfc3c0c TT |
2143 | if test -z "$ac_err"; then |
2144 | rm -rf conftest* | |
2145 | eval "ac_cv_header_$ac_safe=yes" | |
2146 | else | |
2147 | echo "$ac_err" >&5 | |
2148 | echo "configure: failed program was:" >&5 | |
2149 | cat conftest.$ac_ext >&5 | |
2150 | rm -rf conftest* | |
2151 | eval "ac_cv_header_$ac_safe=no" | |
2152 | fi | |
2153 | rm -f conftest* | |
2154 | fi | |
2155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2156 | echo "$ac_t""yes" 1>&6 | |
2157 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
eac4afd1 | 2158 | echo "configure:2159: checking for gettext in libc" >&5 |
fcfc3c0c TT |
2159 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2161 | else | |
2162 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2163 | #line 2164 "configure" |
fcfc3c0c TT |
2164 | #include "confdefs.h" |
2165 | #include <libintl.h> | |
2166 | int main() { | |
2167 | return (int) gettext ("") | |
2168 | ; return 0; } | |
2169 | EOF | |
eac4afd1 | 2170 | if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2171 | rm -rf conftest* |
2172 | gt_cv_func_gettext_libc=yes | |
2173 | else | |
2174 | echo "configure: failed program was:" >&5 | |
2175 | cat conftest.$ac_ext >&5 | |
2176 | rm -rf conftest* | |
2177 | gt_cv_func_gettext_libc=no | |
2178 | fi | |
2179 | rm -f conftest* | |
2180 | fi | |
2181 | ||
2182 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2183 | ||
2184 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2185 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
eac4afd1 | 2186 | echo "configure:2187: checking for bindtextdomain in -lintl" >&5 |
fcfc3c0c TT |
2187 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2188 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2190 | else | |
2191 | ac_save_LIBS="$LIBS" | |
2192 | LIBS="-lintl $LIBS" | |
2193 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2194 | #line 2195 "configure" |
fcfc3c0c TT |
2195 | #include "confdefs.h" |
2196 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2197 | /* We use char because int might match the return type of a gcc2 | |
2198 | builtin and then its argument prototype would still apply. */ | |
2199 | char bindtextdomain(); | |
2200 | ||
2201 | int main() { | |
2202 | bindtextdomain() | |
2203 | ; return 0; } | |
2204 | EOF | |
eac4afd1 | 2205 | if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2206 | rm -rf conftest* |
2207 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2208 | else | |
2209 | echo "configure: failed program was:" >&5 | |
2210 | cat conftest.$ac_ext >&5 | |
2211 | rm -rf conftest* | |
2212 | eval "ac_cv_lib_$ac_lib_var=no" | |
2213 | fi | |
2214 | rm -f conftest* | |
2215 | LIBS="$ac_save_LIBS" | |
2216 | ||
2217 | fi | |
2218 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2219 | echo "$ac_t""yes" 1>&6 | |
2220 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
eac4afd1 | 2221 | echo "configure:2222: checking for gettext in libintl" >&5 |
fcfc3c0c TT |
2222 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2223 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2224 | else | |
2225 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2226 | #line 2227 "configure" |
fcfc3c0c TT |
2227 | #include "confdefs.h" |
2228 | ||
2229 | int main() { | |
2230 | return (int) gettext ("") | |
2231 | ; return 0; } | |
2232 | EOF | |
eac4afd1 | 2233 | if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2234 | rm -rf conftest* |
2235 | gt_cv_func_gettext_libintl=yes | |
2236 | else | |
2237 | echo "configure: failed program was:" >&5 | |
2238 | cat conftest.$ac_ext >&5 | |
2239 | rm -rf conftest* | |
2240 | gt_cv_func_gettext_libintl=no | |
2241 | fi | |
2242 | rm -f conftest* | |
2243 | fi | |
2244 | ||
2245 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2246 | else | |
2247 | echo "$ac_t""no" 1>&6 | |
2248 | fi | |
2249 | ||
2250 | fi | |
2251 | ||
2252 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2253 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2254 | cat >> confdefs.h <<\EOF | |
2255 | #define HAVE_GETTEXT 1 | |
2256 | EOF | |
2257 | ||
2258 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2259 | set dummy msgfmt; ac_word=$2 | |
2260 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2261 | echo "configure:2262: checking for $ac_word" >&5 |
fcfc3c0c TT |
2262 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2264 | else | |
2265 | case "$MSGFMT" in | |
2266 | /*) | |
2267 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2268 | ;; | |
2269 | *) | |
2270 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2271 | for ac_dir in $PATH; do | |
2272 | test -z "$ac_dir" && ac_dir=. | |
2273 | if test -f $ac_dir/$ac_word; then | |
2274 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2275 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2276 | break | |
2277 | fi | |
2278 | fi | |
2279 | done | |
2280 | IFS="$ac_save_ifs" | |
2281 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2282 | ;; | |
2283 | esac | |
2284 | fi | |
2285 | MSGFMT="$ac_cv_path_MSGFMT" | |
2286 | if test -n "$MSGFMT"; then | |
2287 | echo "$ac_t""$MSGFMT" 1>&6 | |
2288 | else | |
2289 | echo "$ac_t""no" 1>&6 | |
2290 | fi | |
2291 | if test "$MSGFMT" != "no"; then | |
2292 | for ac_func in dcgettext | |
2293 | do | |
2294 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
eac4afd1 | 2295 | echo "configure:2296: checking for $ac_func" >&5 |
fcfc3c0c TT |
2296 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2298 | else | |
2299 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2300 | #line 2301 "configure" |
fcfc3c0c TT |
2301 | #include "confdefs.h" |
2302 | /* System header to define __stub macros and hopefully few prototypes, | |
2303 | which can conflict with char $ac_func(); below. */ | |
2304 | #include <assert.h> | |
2305 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2306 | /* We use char because int might match the return type of a gcc2 | |
2307 | builtin and then its argument prototype would still apply. */ | |
2308 | char $ac_func(); | |
2309 | ||
2310 | int main() { | |
2311 | ||
2312 | /* The GNU C library defines this for functions which it implements | |
2313 | to always fail with ENOSYS. Some functions are actually named | |
2314 | something starting with __ and the normal name is an alias. */ | |
2315 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2316 | choke me | |
2317 | #else | |
2318 | $ac_func(); | |
2319 | #endif | |
2320 | ||
2321 | ; return 0; } | |
2322 | EOF | |
eac4afd1 | 2323 | if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2324 | rm -rf conftest* |
2325 | eval "ac_cv_func_$ac_func=yes" | |
2326 | else | |
2327 | echo "configure: failed program was:" >&5 | |
2328 | cat conftest.$ac_ext >&5 | |
2329 | rm -rf conftest* | |
2330 | eval "ac_cv_func_$ac_func=no" | |
2331 | fi | |
2332 | rm -f conftest* | |
2333 | fi | |
2334 | ||
2335 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2336 | echo "$ac_t""yes" 1>&6 | |
2337 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2338 | cat >> confdefs.h <<EOF | |
2339 | #define $ac_tr_func 1 | |
2340 | EOF | |
2341 | ||
2342 | else | |
2343 | echo "$ac_t""no" 1>&6 | |
2344 | fi | |
2345 | done | |
2346 | ||
2347 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2348 | set dummy gmsgfmt; ac_word=$2 | |
2349 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2350 | echo "configure:2351: checking for $ac_word" >&5 |
fcfc3c0c TT |
2351 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2352 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2353 | else | |
2354 | case "$GMSGFMT" in | |
2355 | /*) | |
2356 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2357 | ;; | |
7dc185bc JM |
2358 | ?:/*) |
2359 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2360 | ;; | |
fcfc3c0c | 2361 | *) |
eac4afd1 | 2362 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
fcfc3c0c TT |
2363 | for ac_dir in $PATH; do |
2364 | test -z "$ac_dir" && ac_dir=. | |
2365 | if test -f $ac_dir/$ac_word; then | |
2366 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2367 | break | |
2368 | fi | |
2369 | done | |
2370 | IFS="$ac_save_ifs" | |
2371 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2372 | ;; | |
2373 | esac | |
2374 | fi | |
2375 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2376 | if test -n "$GMSGFMT"; then | |
2377 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2378 | else | |
2379 | echo "$ac_t""no" 1>&6 | |
2380 | fi | |
2381 | ||
2382 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2383 | set dummy xgettext; ac_word=$2 | |
2384 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2385 | echo "configure:2386: checking for $ac_word" >&5 |
fcfc3c0c TT |
2386 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2387 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2388 | else | |
2389 | case "$XGETTEXT" in | |
2390 | /*) | |
2391 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2392 | ;; | |
2393 | *) | |
2394 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2395 | for ac_dir in $PATH; do | |
2396 | test -z "$ac_dir" && ac_dir=. | |
2397 | if test -f $ac_dir/$ac_word; then | |
2398 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2399 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2400 | break | |
2401 | fi | |
2402 | fi | |
2403 | done | |
2404 | IFS="$ac_save_ifs" | |
2405 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2406 | ;; | |
2407 | esac | |
2408 | fi | |
2409 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2410 | if test -n "$XGETTEXT"; then | |
2411 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2412 | else | |
2413 | echo "$ac_t""no" 1>&6 | |
2414 | fi | |
2415 | ||
2416 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2417 | #line 2418 "configure" |
fcfc3c0c TT |
2418 | #include "confdefs.h" |
2419 | ||
2420 | int main() { | |
2421 | extern int _nl_msg_cat_cntr; | |
2422 | return _nl_msg_cat_cntr | |
2423 | ; return 0; } | |
2424 | EOF | |
eac4afd1 | 2425 | if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2426 | rm -rf conftest* |
2427 | CATOBJEXT=.gmo | |
2428 | DATADIRNAME=share | |
2429 | else | |
2430 | echo "configure: failed program was:" >&5 | |
2431 | cat conftest.$ac_ext >&5 | |
2432 | rm -rf conftest* | |
2433 | CATOBJEXT=.mo | |
2434 | DATADIRNAME=lib | |
5436fc65 C |
2435 | fi |
2436 | rm -f conftest* | |
fcfc3c0c TT |
2437 | INSTOBJEXT=.mo |
2438 | fi | |
2439 | fi | |
2440 | ||
2441 | else | |
2442 | echo "$ac_t""no" 1>&6 | |
5436fc65 | 2443 | fi |
fcfc3c0c TT |
2444 | |
2445 | ||
2446 | ||
2447 | if test "$CATOBJEXT" = "NONE"; then | |
2448 | nls_cv_use_gnu_gettext=yes | |
2449 | fi | |
2450 | fi | |
2451 | ||
2452 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2453 | INTLOBJS="\$(GETTOBJS)" | |
2454 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2455 | set dummy msgfmt; ac_word=$2 | |
2456 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2457 | echo "configure:2458: checking for $ac_word" >&5 |
fcfc3c0c TT |
2458 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2460 | else | |
2461 | case "$MSGFMT" in | |
2462 | /*) | |
2463 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2464 | ;; | |
2465 | *) | |
2466 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2467 | for ac_dir in $PATH; do | |
2468 | test -z "$ac_dir" && ac_dir=. | |
2469 | if test -f $ac_dir/$ac_word; then | |
2470 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2471 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2472 | break | |
2473 | fi | |
2474 | fi | |
2475 | done | |
2476 | IFS="$ac_save_ifs" | |
2477 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2478 | ;; | |
2479 | esac | |
5436fc65 | 2480 | fi |
fcfc3c0c TT |
2481 | MSGFMT="$ac_cv_path_MSGFMT" |
2482 | if test -n "$MSGFMT"; then | |
2483 | echo "$ac_t""$MSGFMT" 1>&6 | |
dedcc91d | 2484 | else |
fcfc3c0c | 2485 | echo "$ac_t""no" 1>&6 |
5436fc65 | 2486 | fi |
5436fc65 | 2487 | |
fcfc3c0c TT |
2488 | # Extract the first word of "gmsgfmt", so it can be a program name with args. |
2489 | set dummy gmsgfmt; ac_word=$2 | |
2490 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2491 | echo "configure:2492: checking for $ac_word" >&5 |
fcfc3c0c TT |
2492 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2494 | else | |
2495 | case "$GMSGFMT" in | |
2496 | /*) | |
2497 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2498 | ;; | |
7dc185bc JM |
2499 | ?:/*) |
2500 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2501 | ;; | |
fcfc3c0c | 2502 | *) |
eac4afd1 | 2503 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
fcfc3c0c TT |
2504 | for ac_dir in $PATH; do |
2505 | test -z "$ac_dir" && ac_dir=. | |
2506 | if test -f $ac_dir/$ac_word; then | |
2507 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2508 | break | |
2509 | fi | |
2510 | done | |
2511 | IFS="$ac_save_ifs" | |
2512 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2513 | ;; | |
2514 | esac | |
2515 | fi | |
2516 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2517 | if test -n "$GMSGFMT"; then | |
2518 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2519 | else | |
2520 | echo "$ac_t""no" 1>&6 | |
2521 | fi | |
5436fc65 | 2522 | |
fcfc3c0c TT |
2523 | # Extract the first word of "xgettext", so it can be a program name with args. |
2524 | set dummy xgettext; ac_word=$2 | |
2525 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2526 | echo "configure:2527: checking for $ac_word" >&5 |
fcfc3c0c TT |
2527 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2529 | else | |
2530 | case "$XGETTEXT" in | |
2531 | /*) | |
2532 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2533 | ;; | |
2534 | *) | |
2535 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2536 | for ac_dir in $PATH; do | |
2537 | test -z "$ac_dir" && ac_dir=. | |
2538 | if test -f $ac_dir/$ac_word; then | |
2539 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2540 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2541 | break | |
2542 | fi | |
2543 | fi | |
2544 | done | |
2545 | IFS="$ac_save_ifs" | |
2546 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2547 | ;; | |
2548 | esac | |
2549 | fi | |
2550 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2551 | if test -n "$XGETTEXT"; then | |
2552 | echo "$ac_t""$XGETTEXT" 1>&6 | |
5436fc65 | 2553 | else |
5436fc65 C |
2554 | echo "$ac_t""no" 1>&6 |
2555 | fi | |
5436fc65 | 2556 | |
fcfc3c0c TT |
2557 | |
2558 | USE_INCLUDED_LIBINTL=yes | |
2559 | CATOBJEXT=.gmo | |
2560 | INSTOBJEXT=.mo | |
2561 | DATADIRNAME=share | |
2562 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2563 | INTLLIBS=$INTLDEPS | |
2564 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2565 | nls_cv_header_intl=libintl.h | |
2566 | nls_cv_header_libgt=libgettext.h | |
2567 | fi | |
5436fc65 | 2568 | |
fcfc3c0c TT |
2569 | if test "$XGETTEXT" != ":"; then |
2570 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2571 | : ; | |
2572 | else | |
2573 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2574 | XGETTEXT=":" | |
2575 | fi | |
2576 | fi | |
2577 | ||
2578 | # We need to process the po/ directory. | |
2579 | POSUB=po | |
2580 | else | |
2581 | DATADIRNAME=share | |
2582 | nls_cv_header_intl=libintl.h | |
2583 | nls_cv_header_libgt=libgettext.h | |
2584 | fi | |
2585 | ||
2586 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2587 | # because some of the sources are only built for this goal. | |
2588 | if test "$PACKAGE" = gettext; then | |
2589 | USE_NLS=yes | |
2590 | USE_INCLUDED_LIBINTL=yes | |
2591 | fi | |
2592 | ||
2593 | for lang in $ALL_LINGUAS; do | |
2594 | GMOFILES="$GMOFILES $lang.gmo" | |
2595 | POFILES="$POFILES $lang.po" | |
2596 | done | |
2597 | ||
2598 | ||
2599 | ||
2600 | ||
2601 | ||
2602 | ||
2603 | ||
2604 | ||
2605 | ||
2606 | ||
2607 | ||
2608 | ||
2609 | ||
2610 | ||
2611 | if test "x$CATOBJEXT" != "x"; then | |
2612 | if test "x$ALL_LINGUAS" = "x"; then | |
2613 | LINGUAS= | |
2614 | else | |
2615 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
eac4afd1 | 2616 | echo "configure:2617: checking for catalogs to be installed" >&5 |
fcfc3c0c TT |
2617 | NEW_LINGUAS= |
2618 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2619 | case "$ALL_LINGUAS" in | |
2620 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2621 | esac | |
2622 | done | |
2623 | LINGUAS=$NEW_LINGUAS | |
2624 | echo "$ac_t""$LINGUAS" 1>&6 | |
2625 | fi | |
2626 | ||
2627 | if test -n "$LINGUAS"; then | |
2628 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2629 | fi | |
2630 | fi | |
2631 | ||
2632 | if test $ac_cv_header_locale_h = yes; then | |
2633 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2634 | else | |
2635 | INCLUDE_LOCALE_H="\ | |
2636 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2637 | fi | |
2638 | ||
2639 | ||
2640 | if test -f $srcdir/po2tbl.sed.in; then | |
2641 | if test "$CATOBJEXT" = ".cat"; then | |
2642 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2643 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
eac4afd1 | 2644 | echo "configure:2645: checking for linux/version.h" >&5 |
5436fc65 C |
2645 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2647 | else | |
2648 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2649 | #line 2650 "configure" |
5436fc65 | 2650 | #include "confdefs.h" |
fcfc3c0c | 2651 | #include <linux/version.h> |
5436fc65 | 2652 | EOF |
1a7b4b7c | 2653 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
eac4afd1 JM |
2654 | { (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2655 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5436fc65 C |
2656 | if test -z "$ac_err"; then |
2657 | rm -rf conftest* | |
2658 | eval "ac_cv_header_$ac_safe=yes" | |
2659 | else | |
2660 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2661 | echo "configure: failed program was:" >&5 |
2662 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2663 | rm -rf conftest* |
2664 | eval "ac_cv_header_$ac_safe=no" | |
2665 | fi | |
2666 | rm -f conftest* | |
2667 | fi | |
2668 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2669 | echo "$ac_t""yes" 1>&6 | |
fcfc3c0c | 2670 | msgformat=linux |
5436fc65 C |
2671 | else |
2672 | echo "$ac_t""no" 1>&6 | |
fcfc3c0c | 2673 | msgformat=xopen |
0579b53d GN |
2674 | fi |
2675 | ||
0579b53d | 2676 | |
fcfc3c0c TT |
2677 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed |
2678 | fi | |
2679 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2680 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2681 | fi | |
2682 | ||
2683 | if test "$PACKAGE" = "gettext"; then | |
2684 | GT_NO="#NO#" | |
2685 | GT_YES= | |
2686 | else | |
2687 | GT_NO= | |
2688 | GT_YES="#YES#" | |
2689 | fi | |
2690 | ||
2691 | ||
0579b53d | 2692 | |
fcfc3c0c TT |
2693 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" |
2694 | ||
0579b53d | 2695 | |
fcfc3c0c TT |
2696 | l= |
2697 | ||
0579b53d | 2698 | |
fcfc3c0c TT |
2699 | if test -d $srcdir/po; then |
2700 | test -d po || mkdir po | |
2701 | if test "x$srcdir" != "x."; then | |
2702 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2703 | posrcprefix="$srcdir/" | |
2704 | else | |
2705 | posrcprefix="../$srcdir/" | |
2706 | fi | |
2707 | else | |
2708 | posrcprefix="../" | |
2709 | fi | |
2710 | rm -f po/POTFILES | |
2711 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2712 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2713 | fi | |
2714 | ||
0579b53d | 2715 | |
bfde4a67 SG |
2716 | |
2717 | CONFIG_OBS= | |
018d76dd | 2718 | CONFIG_DEPS= |
c7bb1531 | 2719 | CONFIG_SRCS= |
bfde4a67 SG |
2720 | |
2721 | configdirs="doc testsuite" | |
2722 | ||
2723 | ||
2724 | . ${srcdir}/configure.host | |
2725 | ||
2726 | . ${srcdir}/configure.tgt | |
2727 | ||
2728 | ||
5436fc65 C |
2729 | # Find a good install program. We prefer a C program (faster), |
2730 | # so one script is as good as another. But avoid the broken or | |
2731 | # incompatible versions: | |
2732 | # SysV /etc/install, /usr/sbin/install | |
2733 | # SunOS /usr/etc/install | |
2734 | # IRIX /sbin/install | |
2735 | # AIX /bin/install | |
7dc185bc | 2736 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
5436fc65 C |
2737 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
2738 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2739 | # ./install, which can be erroneously created by make from ./install.sh. | |
2740 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
eac4afd1 | 2741 | echo "configure:2742: checking for a BSD compatible install" >&5 |
5436fc65 C |
2742 | if test -z "$INSTALL"; then |
2743 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2744 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2745 | else | |
eac4afd1 | 2746 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
5436fc65 C |
2747 | for ac_dir in $PATH; do |
2748 | # Account for people who put trailing slashes in PATH elements. | |
2749 | case "$ac_dir/" in | |
2750 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2751 | *) | |
2752 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7dc185bc JM |
2753 | # Don't use installbsd from OSF since it installs stuff as root |
2754 | # by default. | |
2755 | for ac_prog in ginstall scoinst install; do | |
5436fc65 C |
2756 | if test -f $ac_dir/$ac_prog; then |
2757 | if test $ac_prog = install && | |
2758 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2759 | # AIX install. It has an incompatible calling convention. | |
5436fc65 C |
2760 | : |
2761 | else | |
2762 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2763 | break 2 | |
2764 | fi | |
2765 | fi | |
2766 | done | |
2767 | ;; | |
2768 | esac | |
2769 | done | |
bfde4a67 | 2770 | IFS="$ac_save_IFS" |
1a7b4b7c | 2771 | |
5436fc65 | 2772 | fi |
1a7b4b7c DE |
2773 | if test "${ac_cv_path_install+set}" = set; then |
2774 | INSTALL="$ac_cv_path_install" | |
2775 | else | |
2776 | # As a last resort, use the slow shell script. We don't cache a | |
2777 | # path for INSTALL within a source directory, because that will | |
2778 | # break other packages using the cache if that directory is | |
2779 | # removed, or if the path is relative. | |
2780 | INSTALL="$ac_install_sh" | |
2781 | fi | |
5436fc65 C |
2782 | fi |
2783 | echo "$ac_t""$INSTALL" 1>&6 | |
2784 | ||
2785 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2786 | # It thinks the first close brace ends the variable substitution. | |
2787 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2788 | ||
2789 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2790 | ||
d8efbc66 FF |
2791 | if test $host != $build; then |
2792 | ac_tool_prefix=${host_alias}- | |
2793 | else | |
2794 | ac_tool_prefix= | |
2795 | fi | |
2796 | ||
2797 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2798 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2799 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2800 | echo "configure:2801: checking for $ac_word" >&5 |
d8efbc66 FF |
2801 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2803 | else | |
2804 | if test -n "$AR"; then | |
2805 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2806 | else | |
eac4afd1 | 2807 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d8efbc66 FF |
2808 | for ac_dir in $PATH; do |
2809 | test -z "$ac_dir" && ac_dir=. | |
2810 | if test -f $ac_dir/$ac_word; then | |
2811 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2812 | break | |
2813 | fi | |
2814 | done | |
2815 | IFS="$ac_save_ifs" | |
2816 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2817 | fi | |
2818 | fi | |
2819 | AR="$ac_cv_prog_AR" | |
2820 | if test -n "$AR"; then | |
2821 | echo "$ac_t""$AR" 1>&6 | |
2822 | else | |
2823 | echo "$ac_t""no" 1>&6 | |
2824 | fi | |
2825 | ||
2826 | ||
2827 | ||
2828 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2829 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2830 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2831 | echo "configure:2832: checking for $ac_word" >&5 |
d8efbc66 FF |
2832 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2834 | else | |
2835 | if test -n "$RANLIB"; then | |
2836 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2837 | else | |
eac4afd1 | 2838 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d8efbc66 FF |
2839 | for ac_dir in $PATH; do |
2840 | test -z "$ac_dir" && ac_dir=. | |
2841 | if test -f $ac_dir/$ac_word; then | |
2842 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2843 | break | |
2844 | fi | |
2845 | done | |
2846 | IFS="$ac_save_ifs" | |
2847 | fi | |
2848 | fi | |
2849 | RANLIB="$ac_cv_prog_RANLIB" | |
2850 | if test -n "$RANLIB"; then | |
2851 | echo "$ac_t""$RANLIB" 1>&6 | |
2852 | else | |
2853 | echo "$ac_t""no" 1>&6 | |
2854 | fi | |
2855 | ||
2856 | ||
2857 | if test -z "$ac_cv_prog_RANLIB"; then | |
2858 | if test -n "$ac_tool_prefix"; then | |
2859 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
2860 | set dummy ranlib; ac_word=$2 |
2861 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2862 | echo "configure:2863: checking for $ac_word" >&5 |
5436fc65 C |
2863 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2864 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2865 | else | |
2866 | if test -n "$RANLIB"; then | |
2867 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2868 | else | |
eac4afd1 | 2869 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
da3d57e3 | 2870 | for ac_dir in $PATH; do |
5436fc65 C |
2871 | test -z "$ac_dir" && ac_dir=. |
2872 | if test -f $ac_dir/$ac_word; then | |
2873 | ac_cv_prog_RANLIB="ranlib" | |
2874 | break | |
2875 | fi | |
2876 | done | |
2877 | IFS="$ac_save_ifs" | |
2878 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2879 | fi | |
2880 | fi | |
2881 | RANLIB="$ac_cv_prog_RANLIB" | |
2882 | if test -n "$RANLIB"; then | |
2883 | echo "$ac_t""$RANLIB" 1>&6 | |
2884 | else | |
2885 | echo "$ac_t""no" 1>&6 | |
2886 | fi | |
2887 | ||
d8efbc66 FF |
2888 | else |
2889 | RANLIB=":" | |
2890 | fi | |
2891 | fi | |
2892 | ||
204c8825 FF |
2893 | for ac_prog in 'bison -y' byacc |
2894 | do | |
2895 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2896 | set dummy $ac_prog; ac_word=$2 | |
2897 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2898 | echo "configure:2899: checking for $ac_word" >&5 |
204c8825 FF |
2899 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
2900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2901 | else | |
2902 | if test -n "$YACC"; then | |
2903 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2904 | else | |
eac4afd1 | 2905 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
204c8825 FF |
2906 | for ac_dir in $PATH; do |
2907 | test -z "$ac_dir" && ac_dir=. | |
2908 | if test -f $ac_dir/$ac_word; then | |
2909 | ac_cv_prog_YACC="$ac_prog" | |
2910 | break | |
2911 | fi | |
2912 | done | |
2913 | IFS="$ac_save_ifs" | |
2914 | fi | |
2915 | fi | |
2916 | YACC="$ac_cv_prog_YACC" | |
2917 | if test -n "$YACC"; then | |
2918 | echo "$ac_t""$YACC" 1>&6 | |
2919 | else | |
2920 | echo "$ac_t""no" 1>&6 | |
2921 | fi | |
2922 | ||
2923 | test -n "$YACC" && break | |
2924 | done | |
2925 | test -n "$YACC" || YACC="yacc" | |
2926 | ||
d8efbc66 FF |
2927 | for ac_prog in mawk gawk nawk awk |
2928 | do | |
2929 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2930 | set dummy $ac_prog; ac_word=$2 | |
2931 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
eac4afd1 | 2932 | echo "configure:2933: checking for $ac_word" >&5 |
d8efbc66 FF |
2933 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2934 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2935 | else | |
2936 | if test -n "$AWK"; then | |
2937 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2938 | else | |
eac4afd1 | 2939 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d8efbc66 FF |
2940 | for ac_dir in $PATH; do |
2941 | test -z "$ac_dir" && ac_dir=. | |
2942 | if test -f $ac_dir/$ac_word; then | |
2943 | ac_cv_prog_AWK="$ac_prog" | |
2944 | break | |
2945 | fi | |
2946 | done | |
2947 | IFS="$ac_save_ifs" | |
2948 | fi | |
2949 | fi | |
2950 | AWK="$ac_cv_prog_AWK" | |
2951 | if test -n "$AWK"; then | |
2952 | echo "$ac_t""$AWK" 1>&6 | |
2953 | else | |
2954 | echo "$ac_t""no" 1>&6 | |
2955 | fi | |
2956 | ||
2957 | test -n "$AWK" && break | |
2958 | done | |
2959 | ||
5436fc65 | 2960 | |
5436fc65 C |
2961 | if test "$program_transform_name" = s,x,x,; then |
2962 | program_transform_name= | |
2963 | else | |
1a7b4b7c DE |
2964 | # Double any \ or $. echo might interpret backslashes. |
2965 | cat <<\EOF_SED > conftestsed | |
2966 | s,\\,\\\\,g; s,\$,$$,g | |
2967 | EOF_SED | |
5436fc65 C |
2968 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
2969 | rm -f conftestsed | |
2970 | fi | |
2971 | test "$program_prefix" != NONE && | |
2972 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2973 | # Use a double $ so make ignores it. | |
2974 | test "$program_suffix" != NONE && | |
2975 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2976 | ||
2977 | # sed with no file args requires a program. | |
2978 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2979 | ||
2980 | ||
c14cabba | 2981 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
eac4afd1 | 2982 | echo "configure:2983: checking return type of signal handlers" >&5 |
c14cabba AC |
2983 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
2984 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2985 | else | |
2986 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 2987 | #line 2988 "configure" |
c14cabba AC |
2988 | #include "confdefs.h" |
2989 | #include <sys/types.h> | |
2990 | #include <signal.h> | |
2991 | #ifdef signal | |
2992 | #undef signal | |
2993 | #endif | |
2994 | #ifdef __cplusplus | |
2995 | extern "C" void (*signal (int, void (*)(int)))(int); | |
2996 | #else | |
2997 | void (*signal ()) (); | |
2998 | #endif | |
2999 | ||
3000 | int main() { | |
3001 | int i; | |
3002 | ; return 0; } | |
3003 | EOF | |
eac4afd1 | 3004 | if { (eval echo configure:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c14cabba AC |
3005 | rm -rf conftest* |
3006 | ac_cv_type_signal=void | |
3007 | else | |
3008 | echo "configure: failed program was:" >&5 | |
3009 | cat conftest.$ac_ext >&5 | |
3010 | rm -rf conftest* | |
3011 | ac_cv_type_signal=int | |
3012 | fi | |
3013 | rm -f conftest* | |
3014 | fi | |
3015 | ||
3016 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3017 | cat >> confdefs.h <<EOF | |
3018 | #define RETSIGTYPE $ac_cv_type_signal | |
3019 | EOF | |
3020 | ||
3021 | ||
3022 | ||
2b576293 | 3023 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
eac4afd1 | 3024 | echo "configure:3025: checking for ANSI C header files" >&5 |
2b576293 C |
3025 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3027 | else | |
3028 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 3029 | #line 3030 "configure" |
2b576293 C |
3030 | #include "confdefs.h" |
3031 | #include <stdlib.h> | |
3032 | #include <stdarg.h> | |
3033 | #include <string.h> | |
3034 | #include <float.h> | |
3035 | EOF | |
1a7b4b7c | 3036 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
eac4afd1 JM |
3037 | { (eval echo configure:3038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3038 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
2b576293 C |
3039 | if test -z "$ac_err"; then |
3040 | rm -rf conftest* | |
3041 | ac_cv_header_stdc=yes | |
3042 | else | |
3043 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3044 | echo "configure: failed program was:" >&5 |
3045 | cat conftest.$ac_ext >&5 | |
2b576293 C |
3046 | rm -rf conftest* |
3047 | ac_cv_header_stdc=no | |
3048 | fi | |
3049 | rm -f conftest* | |
3050 | ||
3051 | if test $ac_cv_header_stdc = yes; then | |
3052 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3053 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 3054 | #line 3055 "configure" |
2b576293 C |
3055 | #include "confdefs.h" |
3056 | #include <string.h> | |
3057 | EOF | |
3058 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3059 | egrep "memchr" >/dev/null 2>&1; then | |
3060 | : | |
3061 | else | |
3062 | rm -rf conftest* | |
3063 | ac_cv_header_stdc=no | |
3064 | fi | |
3065 | rm -f conftest* | |
3066 | ||
3067 | fi | |
3068 | ||
3069 | if test $ac_cv_header_stdc = yes; then | |
3070 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3071 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 3072 | #line 3073 "configure" |
2b576293 C |
3073 | #include "confdefs.h" |
3074 | #include <stdlib.h> | |
3075 | EOF | |
3076 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3077 | egrep "free" >/dev/null 2>&1; then | |
3078 | : | |
3079 | else | |
3080 | rm -rf conftest* | |
3081 | ac_cv_header_stdc=no | |
3082 | fi | |
3083 | rm -f conftest* | |
3084 | ||
3085 | fi | |
3086 | ||
3087 | if test $ac_cv_header_stdc = yes; then | |
3088 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3089 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 3090 | : |
2b576293 | 3091 | else |
bfde4a67 | 3092 | cat > conftest.$ac_ext <<EOF |
eac4afd1 | 3093 | #line 3094 "configure" |
2b576293 C |
3094 | #include "confdefs.h" |
3095 | #include <ctype.h> | |
3096 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3097 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3098 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3099 | int main () { int i; for (i = 0; i < 256; i++) | |
3100 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3101 | exit (0); } | |
3102 | ||
3103 | EOF | |
eac4afd1 | 3104 | if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 3105 | then |
2b576293 C |
3106 | : |
3107 | else | |
bfde4a67 SG |
3108 | echo "configure: failed program was:" >&5 |
3109 | cat conftest.$ac_ext >&5 | |
3110 | rm -fr conftest* | |
2b576293 C |
3111 | ac_cv_header_stdc=no |
3112 | fi | |
ef6c51d1 | 3113 | rm -fr conftest* |
bfde4a67 SG |
3114 | fi |
3115 | ||
2b576293 C |
3116 | fi |
3117 | fi | |
1a7b4b7c | 3118 | |
2b576293 C |
3119 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
3120 | if test $ac_cv_header_stdc = yes; then | |
3121 | cat >> confdefs.h <<\EOF | |
3122 | #define STDC_HEADERS 1 | |
3123 | EOF | |
3124 | ||
3125 | fi | |
3126 | ||
46ccc6bf | 3127 | 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 libintl.h wctype.h wchar.h |
1a494973 | 3128 | do |
bfde4a67 | 3129 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 3130 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
eac4afd1 | 3131 | echo "configure:3132: checking for $ac_hdr" >&5 |
1a494973 C |
3132 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3134 | else | |
3135 | cat > conftest.$ac_ext <<EOF | |
eac4afd1 | 3136 | #line 3137 "configure" |
1a494973 C |
3137 | #include "confdefs.h" |
3138 | #include <$ac_hdr> | |
3139 | EOF | |
1a7b4b7c | 3140 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
eac4afd1 JM |
3141 | { (eval echo configure:3142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3142 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
1a494973 C |
3143 | if test -z "$ac_err"; then |
3144 | rm -rf conftest* | |
3145 | eval "ac_cv_header_$ac_safe=yes" | |
3146 | else | |
3147 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3148 | echo "configure: failed program was:" >&5 |
3149 | cat conftest.$ac_ext >&5 | |
1a494973 C |
3150 | rm -rf conftest* |
3151 | eval "ac_cv_header_$ac_safe=no" | |
3152 | fi | |
3153 | rm -f conftest* | |
3154 | fi | |
3155 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3156 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 3157 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
3158 | cat >> confdefs.h <<EOF |
3159 | #define $ac_tr_hdr 1 | |
3160 | EOF | |
3161 | ||
3162 | else | |
3163 | echo "$ac_t""no" 1>&6 | |
3164 | fi | |
3165 | done | |
3166 | ||
eac4afd1 | 3167 | |
2b576293 | 3168 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
46ccc6bf | 3169 | echo "configure:3170: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
3170 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3172 | else | |
3173 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3174 | #line 3175 "configure" |
2b576293 C |
3175 | #include "confdefs.h" |
3176 | #include <sys/types.h> | |
3177 | #include <sys/stat.h> | |
3178 | ||
3179 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3180 | # if S_ISBLK (S_IFDIR) | |
3181 | You lose. | |
3182 | # endif | |
3183 | #endif | |
3184 | ||
3185 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3186 | # if S_ISBLK (S_IFCHR) | |
3187 | You lose. | |
3188 | # endif | |
3189 | #endif | |
3190 | ||
3191 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3192 | # if S_ISLNK (S_IFREG) | |
3193 | You lose. | |
3194 | # endif | |
3195 | #endif | |
3196 | ||
3197 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3198 | # if S_ISSOCK (S_IFREG) | |
3199 | You lose. | |
3200 | # endif | |
3201 | #endif | |
3202 | ||
3203 | EOF | |
3204 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3205 | egrep "You lose" >/dev/null 2>&1; then | |
3206 | rm -rf conftest* | |
3207 | ac_cv_header_stat_broken=yes | |
3208 | else | |
3209 | rm -rf conftest* | |
3210 | ac_cv_header_stat_broken=no | |
3211 | fi | |
3212 | rm -f conftest* | |
3213 | ||
3214 | fi | |
1a7b4b7c | 3215 | |
2b576293 C |
3216 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
3217 | if test $ac_cv_header_stat_broken = yes; then | |
3218 | cat >> confdefs.h <<\EOF | |
3219 | #define STAT_MACROS_BROKEN 1 | |
3220 | EOF | |
3221 | ||
3222 | fi | |
3223 | ||
3224 | ||
8501c742 | 3225 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
46ccc6bf | 3226 | echo "configure:3227: checking for working const" >&5 |
8501c742 SG |
3227 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3228 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3229 | else | |
3230 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3231 | #line 3232 "configure" |
8501c742 SG |
3232 | #include "confdefs.h" |
3233 | ||
bfde4a67 | 3234 | int main() { |
8501c742 SG |
3235 | |
3236 | /* Ultrix mips cc rejects this. */ | |
3237 | typedef int charset[2]; const charset x; | |
3238 | /* SunOS 4.1.1 cc rejects this. */ | |
3239 | char const *const *ccp; | |
3240 | char **p; | |
3241 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3242 | struct point {int x, y;}; | |
3243 | static struct point const zero = {0,0}; | |
3244 | /* AIX XL C 1.02.0.0 rejects this. | |
3245 | It does not let you subtract one const X* pointer from another in an arm | |
3246 | of an if-expression whose if-part is not a constant expression */ | |
3247 | const char *g = "string"; | |
3248 | ccp = &g + (g ? g-g : 0); | |
3249 | /* HPUX 7.0 cc rejects these. */ | |
3250 | ++ccp; | |
3251 | p = (char**) ccp; | |
3252 | ccp = (char const *const *) p; | |
3253 | { /* SCO 3.2v4 cc rejects this. */ | |
3254 | char *t; | |
3255 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3256 | ||
3257 | *t++ = 0; | |
3258 | } | |
3259 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3260 | int x[] = {25, 17}; | |
3261 | const int *foo = &x[0]; | |
3262 | ++foo; | |
3263 | } | |
3264 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3265 | typedef const int *iptr; | |
3266 | iptr p = 0; | |
3267 | ++p; | |
3268 | } | |
3269 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3270 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3271 | struct s { int j; const int *ap[3]; }; | |
3272 | struct s *b; b->j = 5; | |
3273 | } | |
3274 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3275 | const int foo = 10; | |
3276 | } | |
3277 | ||
3278 | ; return 0; } | |
3279 | EOF | |
46ccc6bf | 3280 | if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
3281 | rm -rf conftest* |
3282 | ac_cv_c_const=yes | |
3283 | else | |
bfde4a67 SG |
3284 | echo "configure: failed program was:" >&5 |
3285 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
3286 | rm -rf conftest* |
3287 | ac_cv_c_const=no | |
3288 | fi | |
3289 | rm -f conftest* | |
8501c742 SG |
3290 | fi |
3291 | ||
3292 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3293 | if test $ac_cv_c_const = no; then | |
3294 | cat >> confdefs.h <<\EOF | |
3295 | #define const | |
3296 | EOF | |
3297 | ||
3298 | fi | |
3299 | ||
3300 | ||
46ccc6bf | 3301 | for ac_func in setpgid sbrk select poll sigaction isascii bzero bcopy memcpy btowc |
72ae15f6 FF |
3302 | do |
3303 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46ccc6bf | 3304 | echo "configure:3305: checking for $ac_func" >&5 |
72ae15f6 FF |
3305 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3306 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3307 | else | |
3308 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3309 | #line 3310 "configure" |
72ae15f6 FF |
3310 | #include "confdefs.h" |
3311 | /* System header to define __stub macros and hopefully few prototypes, | |
3312 | which can conflict with char $ac_func(); below. */ | |
3313 | #include <assert.h> | |
3314 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
3315 | /* We use char because int might match the return type of a gcc2 |
3316 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 3317 | char $ac_func(); |
72ae15f6 | 3318 | |
bfde4a67 | 3319 | int main() { |
72ae15f6 FF |
3320 | |
3321 | /* The GNU C library defines this for functions which it implements | |
3322 | to always fail with ENOSYS. Some functions are actually named | |
3323 | something starting with __ and the normal name is an alias. */ | |
3324 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3325 | choke me | |
3326 | #else | |
3327 | $ac_func(); | |
3328 | #endif | |
3329 | ||
3330 | ; return 0; } | |
3331 | EOF | |
46ccc6bf | 3332 | if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
72ae15f6 FF |
3333 | rm -rf conftest* |
3334 | eval "ac_cv_func_$ac_func=yes" | |
3335 | else | |
bfde4a67 SG |
3336 | echo "configure: failed program was:" >&5 |
3337 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
3338 | rm -rf conftest* |
3339 | eval "ac_cv_func_$ac_func=no" | |
3340 | fi | |
3341 | rm -f conftest* | |
ef6c51d1 | 3342 | fi |
bfde4a67 | 3343 | |
72ae15f6 FF |
3344 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3345 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 3346 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
3347 | cat >> confdefs.h <<EOF |
3348 | #define $ac_tr_func 1 | |
3349 | EOF | |
3350 | ||
3351 | else | |
3352 | echo "$ac_t""no" 1>&6 | |
3353 | fi | |
3354 | done | |
3355 | ||
0aa3233e ILT |
3356 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3357 | # for constant arguments. Useless! | |
3358 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
46ccc6bf | 3359 | echo "configure:3360: checking for working alloca.h" >&5 |
0aa3233e ILT |
3360 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3361 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3362 | else | |
3363 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3364 | #line 3365 "configure" |
0aa3233e ILT |
3365 | #include "confdefs.h" |
3366 | #include <alloca.h> | |
3367 | int main() { | |
3368 | char *p = alloca(2 * sizeof(int)); | |
3369 | ; return 0; } | |
3370 | EOF | |
46ccc6bf | 3371 | if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3372 | rm -rf conftest* |
3373 | ac_cv_header_alloca_h=yes | |
3374 | else | |
3375 | echo "configure: failed program was:" >&5 | |
3376 | cat conftest.$ac_ext >&5 | |
3377 | rm -rf conftest* | |
3378 | ac_cv_header_alloca_h=no | |
3379 | fi | |
3380 | rm -f conftest* | |
3381 | fi | |
3382 | ||
3383 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3384 | if test $ac_cv_header_alloca_h = yes; then | |
3385 | cat >> confdefs.h <<\EOF | |
3386 | #define HAVE_ALLOCA_H 1 | |
3387 | EOF | |
3388 | ||
3389 | fi | |
3390 | ||
3391 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
46ccc6bf | 3392 | echo "configure:3393: checking for alloca" >&5 |
0aa3233e ILT |
3393 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3395 | else | |
3396 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3397 | #line 3398 "configure" |
0aa3233e ILT |
3398 | #include "confdefs.h" |
3399 | ||
3400 | #ifdef __GNUC__ | |
3401 | # define alloca __builtin_alloca | |
3402 | #else | |
eac4afd1 JM |
3403 | # ifdef _MSC_VER |
3404 | # include <malloc.h> | |
3405 | # define alloca _alloca | |
0aa3233e | 3406 | # else |
eac4afd1 JM |
3407 | # if HAVE_ALLOCA_H |
3408 | # include <alloca.h> | |
0aa3233e | 3409 | # else |
eac4afd1 JM |
3410 | # ifdef _AIX |
3411 | #pragma alloca | |
3412 | # else | |
3413 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
0aa3233e | 3414 | char *alloca (); |
eac4afd1 | 3415 | # endif |
0aa3233e ILT |
3416 | # endif |
3417 | # endif | |
3418 | # endif | |
3419 | #endif | |
3420 | ||
3421 | int main() { | |
3422 | char *p = (char *) alloca(1); | |
3423 | ; return 0; } | |
3424 | EOF | |
46ccc6bf | 3425 | if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3426 | rm -rf conftest* |
3427 | ac_cv_func_alloca_works=yes | |
3428 | else | |
3429 | echo "configure: failed program was:" >&5 | |
3430 | cat conftest.$ac_ext >&5 | |
3431 | rm -rf conftest* | |
3432 | ac_cv_func_alloca_works=no | |
3433 | fi | |
3434 | rm -f conftest* | |
3435 | fi | |
3436 | ||
3437 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3438 | if test $ac_cv_func_alloca_works = yes; then | |
3439 | cat >> confdefs.h <<\EOF | |
3440 | #define HAVE_ALLOCA 1 | |
3441 | EOF | |
3442 | ||
3443 | fi | |
3444 | ||
3445 | if test $ac_cv_func_alloca_works = no; then | |
3446 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3447 | # that cause trouble. Some versions do not even contain alloca or | |
3448 | # contain a buggy version. If you still want to use their alloca, | |
3449 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
eac4afd1 | 3450 | ALLOCA=alloca.${ac_objext} |
0aa3233e ILT |
3451 | cat >> confdefs.h <<\EOF |
3452 | #define C_ALLOCA 1 | |
3453 | EOF | |
3454 | ||
3455 | ||
3456 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
46ccc6bf | 3457 | echo "configure:3458: checking whether alloca needs Cray hooks" >&5 |
0aa3233e ILT |
3458 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3460 | else | |
3461 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3462 | #line 3463 "configure" |
0aa3233e ILT |
3463 | #include "confdefs.h" |
3464 | #if defined(CRAY) && ! defined(CRAY2) | |
3465 | webecray | |
3466 | #else | |
3467 | wenotbecray | |
3468 | #endif | |
3469 | ||
3470 | EOF | |
3471 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3472 | egrep "webecray" >/dev/null 2>&1; then | |
3473 | rm -rf conftest* | |
3474 | ac_cv_os_cray=yes | |
3475 | else | |
3476 | rm -rf conftest* | |
3477 | ac_cv_os_cray=no | |
3478 | fi | |
3479 | rm -f conftest* | |
3480 | ||
3481 | fi | |
3482 | ||
3483 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3484 | if test $ac_cv_os_cray = yes; then | |
3485 | for ac_func in _getb67 GETB67 getb67; do | |
3486 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46ccc6bf | 3487 | echo "configure:3488: checking for $ac_func" >&5 |
0aa3233e ILT |
3488 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3489 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3490 | else | |
3491 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3492 | #line 3493 "configure" |
0aa3233e ILT |
3493 | #include "confdefs.h" |
3494 | /* System header to define __stub macros and hopefully few prototypes, | |
3495 | which can conflict with char $ac_func(); below. */ | |
3496 | #include <assert.h> | |
3497 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3498 | /* We use char because int might match the return type of a gcc2 | |
3499 | builtin and then its argument prototype would still apply. */ | |
3500 | char $ac_func(); | |
3501 | ||
3502 | int main() { | |
3503 | ||
3504 | /* The GNU C library defines this for functions which it implements | |
3505 | to always fail with ENOSYS. Some functions are actually named | |
3506 | something starting with __ and the normal name is an alias. */ | |
3507 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3508 | choke me | |
3509 | #else | |
3510 | $ac_func(); | |
3511 | #endif | |
3512 | ||
3513 | ; return 0; } | |
3514 | EOF | |
46ccc6bf | 3515 | if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3516 | rm -rf conftest* |
3517 | eval "ac_cv_func_$ac_func=yes" | |
3518 | else | |
3519 | echo "configure: failed program was:" >&5 | |
3520 | cat conftest.$ac_ext >&5 | |
3521 | rm -rf conftest* | |
3522 | eval "ac_cv_func_$ac_func=no" | |
3523 | fi | |
3524 | rm -f conftest* | |
3525 | fi | |
3526 | ||
3527 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3528 | echo "$ac_t""yes" 1>&6 | |
3529 | cat >> confdefs.h <<EOF | |
3530 | #define CRAY_STACKSEG_END $ac_func | |
3531 | EOF | |
3532 | ||
3533 | break | |
3534 | else | |
3535 | echo "$ac_t""no" 1>&6 | |
3536 | fi | |
3537 | ||
3538 | done | |
3539 | fi | |
3540 | ||
3541 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
46ccc6bf | 3542 | echo "configure:3543: checking stack direction for C alloca" >&5 |
0aa3233e ILT |
3543 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3545 | else | |
3546 | if test "$cross_compiling" = yes; then | |
3547 | ac_cv_c_stack_direction=0 | |
3548 | else | |
3549 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3550 | #line 3551 "configure" |
0aa3233e ILT |
3551 | #include "confdefs.h" |
3552 | find_stack_direction () | |
3553 | { | |
3554 | static char *addr = 0; | |
3555 | auto char dummy; | |
3556 | if (addr == 0) | |
3557 | { | |
3558 | addr = &dummy; | |
3559 | return find_stack_direction (); | |
3560 | } | |
3561 | else | |
3562 | return (&dummy > addr) ? 1 : -1; | |
3563 | } | |
3564 | main () | |
3565 | { | |
3566 | exit (find_stack_direction() < 0); | |
3567 | } | |
3568 | EOF | |
46ccc6bf | 3569 | if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0aa3233e ILT |
3570 | then |
3571 | ac_cv_c_stack_direction=1 | |
3572 | else | |
3573 | echo "configure: failed program was:" >&5 | |
3574 | cat conftest.$ac_ext >&5 | |
3575 | rm -fr conftest* | |
3576 | ac_cv_c_stack_direction=-1 | |
3577 | fi | |
3578 | rm -fr conftest* | |
3579 | fi | |
3580 | ||
3581 | fi | |
3582 | ||
3583 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3584 | cat >> confdefs.h <<EOF | |
3585 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3586 | EOF | |
3587 | ||
3588 | fi | |
3589 | ||
72ae15f6 | 3590 | |
75a55dc3 | 3591 | # If we are configured native on GNU/Linux, work around problems with sys/procfs.h |
0d4c1152 FF |
3592 | if test "${target}" = "${host}"; then |
3593 | case "${host}" in | |
0728afad | 3594 | i[3456]86-*-linux*) |
0d4c1152 | 3595 | cat >> confdefs.h <<\EOF |
0728afad | 3596 | #define START_INFERIOR_TRAPS_EXPECTED 2 |
0d4c1152 FF |
3597 | EOF |
3598 | ||
3599 | cat >> confdefs.h <<\EOF | |
3600 | #define sys_quotactl 1 | |
3601 | EOF | |
3602 | ||
3603 | ;; | |
3604 | esac | |
3605 | fi | |
3606 | ||
4708ac65 | 3607 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
46ccc6bf | 3608 | echo "configure:3609: checking for gregset_t type" >&5 |
07b77f5c | 3609 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
3610 | echo $ac_n "(cached) $ac_c" 1>&6 |
3611 | else | |
3612 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3613 | #line 3614 "configure" |
4708ac65 FF |
3614 | #include "confdefs.h" |
3615 | #include <sys/procfs.h> | |
bfde4a67 | 3616 | int main() { |
4708ac65 FF |
3617 | gregset_t *gregsetp = 0 |
3618 | ; return 0; } | |
3619 | EOF | |
46ccc6bf | 3620 | if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 3621 | rm -rf conftest* |
07b77f5c | 3622 | gdb_cv_have_gregset_t=yes |
4708ac65 | 3623 | else |
bfde4a67 SG |
3624 | echo "configure: failed program was:" >&5 |
3625 | cat conftest.$ac_ext >&5 | |
4708ac65 | 3626 | rm -rf conftest* |
07b77f5c | 3627 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
3628 | fi |
3629 | rm -f conftest* | |
4708ac65 FF |
3630 | fi |
3631 | ||
07b77f5c FF |
3632 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
3633 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
3634 | cat >> confdefs.h <<\EOF |
3635 | #define HAVE_GREGSET_T 1 | |
3636 | EOF | |
3637 | ||
3638 | fi | |
3639 | ||
3640 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
46ccc6bf | 3641 | echo "configure:3642: checking for fpregset_t type" >&5 |
07b77f5c | 3642 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
3643 | echo $ac_n "(cached) $ac_c" 1>&6 |
3644 | else | |
3645 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3646 | #line 3647 "configure" |
4708ac65 FF |
3647 | #include "confdefs.h" |
3648 | #include <sys/procfs.h> | |
bfde4a67 | 3649 | int main() { |
4708ac65 FF |
3650 | fpregset_t *fpregsetp = 0 |
3651 | ; return 0; } | |
3652 | EOF | |
46ccc6bf | 3653 | if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 3654 | rm -rf conftest* |
07b77f5c | 3655 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 3656 | else |
bfde4a67 SG |
3657 | echo "configure: failed program was:" >&5 |
3658 | cat conftest.$ac_ext >&5 | |
4708ac65 | 3659 | rm -rf conftest* |
07b77f5c | 3660 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
3661 | fi |
3662 | rm -f conftest* | |
4708ac65 FF |
3663 | fi |
3664 | ||
07b77f5c FF |
3665 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
3666 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
3667 | cat >> confdefs.h <<\EOF |
3668 | #define HAVE_FPREGSET_T 1 | |
3669 | EOF | |
3670 | ||
3671 | fi | |
3672 | ||
bfde4a67 | 3673 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
46ccc6bf | 3674 | echo "configure:3675: checking for main in -lm" >&5 |
bfde4a67 | 3675 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
3676 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
3677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3678 | else | |
3679 | ac_save_LIBS="$LIBS" | |
3680 | LIBS="-lm $LIBS" | |
3681 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3682 | #line 3683 "configure" |
ef6c51d1 SG |
3683 | #include "confdefs.h" |
3684 | ||
bfde4a67 | 3685 | int main() { |
ef6c51d1 SG |
3686 | main() |
3687 | ; return 0; } | |
3688 | EOF | |
46ccc6bf | 3689 | if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ef6c51d1 SG |
3690 | rm -rf conftest* |
3691 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3692 | else | |
bfde4a67 SG |
3693 | echo "configure: failed program was:" >&5 |
3694 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
3695 | rm -rf conftest* |
3696 | eval "ac_cv_lib_$ac_lib_var=no" | |
3697 | fi | |
3698 | rm -f conftest* | |
3699 | LIBS="$ac_save_LIBS" | |
3700 | ||
3701 | fi | |
3702 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3703 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
3704 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
3705 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
3706 | cat >> confdefs.h <<EOF |
3707 | #define $ac_tr_lib 1 | |
3708 | EOF | |
3709 | ||
3710 | LIBS="-lm $LIBS" | |
3711 | ||
3712 | else | |
3713 | echo "$ac_t""no" 1>&6 | |
3714 | fi | |
3715 | ||
3716 | ||
aa220473 | 3717 | |
3f550b59 | 3718 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
46ccc6bf | 3719 | echo "configure:3720: checking for long long support in compiler" >&5 |
3f550b59 FF |
3720 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
3721 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3722 | else | |
3723 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3724 | #line 3725 "configure" |
3f550b59 FF |
3725 | #include "confdefs.h" |
3726 | ||
bfde4a67 | 3727 | int main() { |
80f600a4 | 3728 | |
d538f9cf FF |
3729 | extern long long foo; |
3730 | switch (foo & 2) { case 0: return 1; } | |
3731 | ||
3f550b59 FF |
3732 | ; return 0; } |
3733 | EOF | |
46ccc6bf | 3734 | if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
3735 | rm -rf conftest* |
3736 | gdb_cv_c_long_long=yes | |
3737 | else | |
bfde4a67 SG |
3738 | echo "configure: failed program was:" >&5 |
3739 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
3740 | rm -rf conftest* |
3741 | gdb_cv_c_long_long=no | |
3742 | fi | |
3743 | rm -f conftest* | |
3f550b59 FF |
3744 | fi |
3745 | ||
3746 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
3747 | if test $gdb_cv_c_long_long = yes; then | |
3748 | cat >> confdefs.h <<\EOF | |
3749 | #define CC_HAS_LONG_LONG 1 | |
3750 | EOF | |
3751 | ||
3752 | fi | |
3753 | ||
3754 | ||
3755 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
46ccc6bf | 3756 | echo "configure:3757: checking for long long support in printf" >&5 |
3f550b59 FF |
3757 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
3758 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3759 | else | |
3760 | if test "$cross_compiling" = yes; then | |
3761 | gdb_cv_printf_has_long_long=no | |
3762 | else | |
bfde4a67 | 3763 | cat > conftest.$ac_ext <<EOF |
46ccc6bf | 3764 | #line 3765 "configure" |
3f550b59 FF |
3765 | #include "confdefs.h" |
3766 | ||
3767 | int main () { | |
f7b8c9ce AC |
3768 | char buf[32]; |
3769 | long long l = 0; | |
3770 | l = (l << 16) + 0x0123; | |
3771 | l = (l << 16) + 0x4567; | |
3772 | l = (l << 16) + 0x89ab; | |
3773 | l = (l << 16) + 0xcdef; | |
3774 | sprintf (buf, "0x%016llx", l); | |
3775 | return (strcmp ("0x0123456789abcdef", buf)); | |
3f550b59 FF |
3776 | } |
3777 | EOF | |
46ccc6bf | 3778 | if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 3779 | then |
3f550b59 FF |
3780 | gdb_cv_printf_has_long_long=yes |
3781 | else | |
bfde4a67 SG |
3782 | echo "configure: failed program was:" >&5 |
3783 | cat conftest.$ac_ext >&5 | |
3784 | rm -fr conftest* | |
3f550b59 FF |
3785 | gdb_cv_printf_has_long_long=no |
3786 | fi | |
ef6c51d1 | 3787 | rm -fr conftest* |
8b701284 ILT |
3788 | fi |
3789 | ||
bfde4a67 SG |
3790 | fi |
3791 | ||
3f550b59 FF |
3792 | if test $gdb_cv_printf_has_long_long = yes; then |
3793 | cat >> confdefs.h <<\EOF | |
3794 | #define PRINTF_HAS_LONG_LONG 1 | |
3795 | EOF | |
3796 | ||
3797 | fi | |
3798 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
3799 | ||
3800 | ||
07b77f5c | 3801 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
46ccc6bf | 3802 | echo "configure:3803: checking for long double support in compiler" >&5 |
aa220473 SG |
3803 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
3804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3805 | else | |
3806 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3807 | #line 3808 "configure" |
aa220473 SG |
3808 | #include "confdefs.h" |
3809 | ||
bfde4a67 | 3810 | int main() { |
aa220473 SG |
3811 | long double foo; |
3812 | ; return 0; } | |
3813 | EOF | |
46ccc6bf | 3814 | if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
3815 | rm -rf conftest* |
3816 | ac_cv_c_long_double=yes | |
3817 | else | |
bfde4a67 SG |
3818 | echo "configure: failed program was:" >&5 |
3819 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
3820 | rm -rf conftest* |
3821 | ac_cv_c_long_double=no | |
3822 | fi | |
3823 | rm -f conftest* | |
aa220473 SG |
3824 | fi |
3825 | ||
3826 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
3827 | if test $ac_cv_c_long_double = yes; then | |
3828 | cat >> confdefs.h <<\EOF | |
3829 | #define HAVE_LONG_DOUBLE 1 | |
3830 | EOF | |
3831 | ||
3832 | fi | |
3833 | ||
07b77f5c FF |
3834 | |
3835 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
46ccc6bf | 3836 | echo "configure:3837: checking for long double support in printf" >&5 |
07b77f5c FF |
3837 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
3838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3839 | else | |
3840 | if test "$cross_compiling" = yes; then | |
3841 | gdb_cv_printf_has_long_double=no | |
3842 | else | |
bfde4a67 | 3843 | cat > conftest.$ac_ext <<EOF |
46ccc6bf | 3844 | #line 3845 "configure" |
07b77f5c FF |
3845 | #include "confdefs.h" |
3846 | ||
3847 | int main () { | |
3848 | char buf[16]; | |
3849 | long double f = 3.141592653; | |
3850 | sprintf (buf, "%Lg", f); | |
3851 | return (strncmp ("3.14159", buf, 7)); | |
3852 | } | |
3853 | EOF | |
46ccc6bf | 3854 | if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 3855 | then |
07b77f5c FF |
3856 | gdb_cv_printf_has_long_double=yes |
3857 | else | |
bfde4a67 SG |
3858 | echo "configure: failed program was:" >&5 |
3859 | cat conftest.$ac_ext >&5 | |
3860 | rm -fr conftest* | |
07b77f5c FF |
3861 | gdb_cv_printf_has_long_double=no |
3862 | fi | |
ef6c51d1 | 3863 | rm -fr conftest* |
8b701284 ILT |
3864 | fi |
3865 | ||
bfde4a67 SG |
3866 | fi |
3867 | ||
07b77f5c FF |
3868 | if test $gdb_cv_printf_has_long_double = yes; then |
3869 | cat >> confdefs.h <<\EOF | |
3870 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
3871 | EOF | |
3872 | ||
3873 | fi | |
3874 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
3875 | ||
f7b8c9ce AC |
3876 | |
3877 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
46ccc6bf | 3878 | echo "configure:3879: checking for long double support in scanf" >&5 |
f7b8c9ce AC |
3879 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
3880 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3881 | else | |
3882 | if test "$cross_compiling" = yes; then | |
3883 | gdb_cv_scanf_has_long_double=no | |
3884 | else | |
3885 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3886 | #line 3887 "configure" |
f7b8c9ce AC |
3887 | #include "confdefs.h" |
3888 | ||
3889 | int main () { | |
3890 | char *buf = "3.141592653"; | |
3891 | long double f = 0; | |
3892 | sscanf (buf, "%Lg", &f); | |
3893 | return !(f > 3.14159 && f < 3.14160); | |
3894 | } | |
3895 | EOF | |
46ccc6bf | 3896 | if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
f7b8c9ce AC |
3897 | then |
3898 | gdb_cv_scanf_has_long_double=yes | |
3899 | else | |
3900 | echo "configure: failed program was:" >&5 | |
3901 | cat conftest.$ac_ext >&5 | |
3902 | rm -fr conftest* | |
3903 | gdb_cv_scanf_has_long_double=no | |
3904 | fi | |
3905 | rm -fr conftest* | |
3906 | fi | |
3907 | ||
3908 | fi | |
3909 | ||
3910 | if test $gdb_cv_scanf_has_long_double = yes; then | |
3911 | cat >> confdefs.h <<\EOF | |
3912 | #define SCANF_HAS_LONG_DOUBLE 1 | |
3913 | EOF | |
3914 | ||
3915 | fi | |
3916 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
3917 | ||
bfde4a67 SG |
3918 | for ac_hdr in unistd.h |
3919 | do | |
3920 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3921 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
46ccc6bf | 3922 | echo "configure:3923: checking for $ac_hdr" >&5 |
bfde4a67 SG |
3923 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3925 | else | |
3926 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3927 | #line 3928 "configure" |
bfde4a67 SG |
3928 | #include "confdefs.h" |
3929 | #include <$ac_hdr> | |
3930 | EOF | |
3931 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
46ccc6bf | 3932 | { (eval echo configure:3933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
eac4afd1 | 3933 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
bfde4a67 SG |
3934 | if test -z "$ac_err"; then |
3935 | rm -rf conftest* | |
3936 | eval "ac_cv_header_$ac_safe=yes" | |
3937 | else | |
3938 | echo "$ac_err" >&5 | |
3939 | echo "configure: failed program was:" >&5 | |
3940 | cat conftest.$ac_ext >&5 | |
3941 | rm -rf conftest* | |
3942 | eval "ac_cv_header_$ac_safe=no" | |
3943 | fi | |
3944 | rm -f conftest* | |
3945 | fi | |
3946 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3947 | echo "$ac_t""yes" 1>&6 | |
3948 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3949 | cat >> confdefs.h <<EOF | |
3950 | #define $ac_tr_hdr 1 | |
3951 | EOF | |
3952 | ||
3953 | else | |
3954 | echo "$ac_t""no" 1>&6 | |
3955 | fi | |
3956 | done | |
3957 | ||
3958 | for ac_func in getpagesize | |
1a7b4b7c DE |
3959 | do |
3960 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
46ccc6bf | 3961 | echo "configure:3962: checking for $ac_func" >&5 |
1a7b4b7c DE |
3962 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3963 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3964 | else | |
3965 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 3966 | #line 3967 "configure" |
1a7b4b7c DE |
3967 | #include "confdefs.h" |
3968 | /* System header to define __stub macros and hopefully few prototypes, | |
3969 | which can conflict with char $ac_func(); below. */ | |
3970 | #include <assert.h> | |
3971 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
3972 | /* We use char because int might match the return type of a gcc2 |
3973 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
3974 | char $ac_func(); |
3975 | ||
bfde4a67 | 3976 | int main() { |
1a7b4b7c DE |
3977 | |
3978 | /* The GNU C library defines this for functions which it implements | |
3979 | to always fail with ENOSYS. Some functions are actually named | |
3980 | something starting with __ and the normal name is an alias. */ | |
3981 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3982 | choke me | |
3983 | #else | |
3984 | $ac_func(); | |
3985 | #endif | |
3986 | ||
3987 | ; return 0; } | |
3988 | EOF | |
46ccc6bf | 3989 | if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1a7b4b7c DE |
3990 | rm -rf conftest* |
3991 | eval "ac_cv_func_$ac_func=yes" | |
3992 | else | |
bfde4a67 SG |
3993 | echo "configure: failed program was:" >&5 |
3994 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
3995 | rm -rf conftest* |
3996 | eval "ac_cv_func_$ac_func=no" | |
3997 | fi | |
3998 | rm -f conftest* | |
ef6c51d1 | 3999 | fi |
bfde4a67 | 4000 | |
1a7b4b7c DE |
4001 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4002 | echo "$ac_t""yes" 1>&6 | |
4003 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4004 | cat >> confdefs.h <<EOF | |
4005 | #define $ac_tr_func 1 | |
4006 | EOF | |
4007 | ||
4008 | else | |
4009 | echo "$ac_t""no" 1>&6 | |
4010 | fi | |
4011 | done | |
4012 | ||
2b576293 | 4013 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
46ccc6bf | 4014 | echo "configure:4015: checking for working mmap" >&5 |
bfde4a67 | 4015 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
4016 | echo $ac_n "(cached) $ac_c" 1>&6 |
4017 | else | |
4018 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 4019 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 4020 | else |
bfde4a67 | 4021 | cat > conftest.$ac_ext <<EOF |
46ccc6bf | 4022 | #line 4023 "configure" |
2b576293 C |
4023 | #include "confdefs.h" |
4024 | ||
bfde4a67 SG |
4025 | /* Thanks to Mike Haertel and Jim Avera for this test. |
4026 | Here is a matrix of mmap possibilities: | |
4027 | mmap private not fixed | |
4028 | mmap private fixed at somewhere currently unmapped | |
4029 | mmap private fixed at somewhere already mapped | |
4030 | mmap shared not fixed | |
4031 | mmap shared fixed at somewhere currently unmapped | |
4032 | mmap shared fixed at somewhere already mapped | |
4033 | For private mappings, we should verify that changes cannot be read() | |
4034 | back from the file, nor mmap's back from the file at a different | |
4035 | address. (There have been systems where private was not correctly | |
4036 | implemented like the infamous i386 svr4.0, and systems where the | |
4037 | VM page cache was not coherent with the filesystem buffer cache | |
4038 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
4039 | For shared mappings, we should conversely verify that changes get | |
4040 | propogated back to all the places they're supposed to be. | |
4041 | ||
4042 | Grep wants private fixed already mapped. | |
4043 | The main things grep needs to know about mmap are: | |
4044 | * does it exist and is it safe to write into the mmap'd area | |
4045 | * how to use it (BSD variants) */ | |
2b576293 C |
4046 | #include <sys/types.h> |
4047 | #include <fcntl.h> | |
4048 | #include <sys/mman.h> | |
4049 | ||
bfde4a67 | 4050 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 4051 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
4052 | # ifdef HAVE_UNISTD_H |
4053 | # include <unistd.h> | |
8b701284 ILT |
4054 | # endif |
4055 | ||
bfde4a67 SG |
4056 | /* Assume that all systems that can run configure have sys/param.h. */ |
4057 | # ifndef HAVE_SYS_PARAM_H | |
4058 | # define HAVE_SYS_PARAM_H 1 | |
4059 | # endif | |
4060 | ||
4061 | # ifdef _SC_PAGESIZE | |
4062 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4063 | # else /* no _SC_PAGESIZE */ | |
4064 | # ifdef HAVE_SYS_PARAM_H | |
4065 | # include <sys/param.h> | |
4066 | # ifdef EXEC_PAGESIZE | |
4067 | # define getpagesize() EXEC_PAGESIZE | |
4068 | # else /* no EXEC_PAGESIZE */ | |
4069 | # ifdef NBPG | |
4070 | # define getpagesize() NBPG * CLSIZE | |
4071 | # ifndef CLSIZE | |
4072 | # define CLSIZE 1 | |
4073 | # endif /* no CLSIZE */ | |
4074 | # else /* no NBPG */ | |
4075 | # ifdef NBPC | |
4076 | # define getpagesize() NBPC | |
4077 | # else /* no NBPC */ | |
4078 | # ifdef PAGESIZE | |
4079 | # define getpagesize() PAGESIZE | |
4080 | # endif /* PAGESIZE */ | |
4081 | # endif /* no NBPC */ | |
4082 | # endif /* no NBPG */ | |
4083 | # endif /* no EXEC_PAGESIZE */ | |
4084 | # else /* no HAVE_SYS_PARAM_H */ | |
4085 | # define getpagesize() 8192 /* punt totally */ | |
4086 | # endif /* no HAVE_SYS_PARAM_H */ | |
4087 | # endif /* no _SC_PAGESIZE */ | |
4088 | ||
4089 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
4090 | |
4091 | #ifdef __cplusplus | |
bfde4a67 | 4092 | extern "C" { void *malloc(unsigned); } |
2b576293 | 4093 | #else |
bfde4a67 | 4094 | char *malloc(); |
2b576293 C |
4095 | #endif |
4096 | ||
4097 | int | |
4098 | main() | |
4099 | { | |
bfde4a67 SG |
4100 | char *data, *data2, *data3; |
4101 | int i, pagesize; | |
4102 | int fd; | |
4103 | ||
4104 | pagesize = getpagesize(); | |
4105 | ||
4106 | /* | |
4107 | * First, make a file with some known garbage in it. | |
4108 | */ | |
4109 | data = malloc(pagesize); | |
4110 | if (!data) | |
4111 | exit(1); | |
4112 | for (i = 0; i < pagesize; ++i) | |
4113 | *(data + i) = rand(); | |
4114 | umask(0); | |
4115 | fd = creat("conftestmmap", 0600); | |
4116 | if (fd < 0) | |
4117 | exit(1); | |
4118 | if (write(fd, data, pagesize) != pagesize) | |
4119 | exit(1); | |
4120 | close(fd); | |
4121 | ||
4122 | /* | |
4123 | * Next, try to mmap the file at a fixed address which | |
4124 | * already has something else allocated at it. If we can, | |
4125 | * also make sure that we see the same garbage. | |
4126 | */ | |
4127 | fd = open("conftestmmap", O_RDWR); | |
4128 | if (fd < 0) | |
4129 | exit(1); | |
4130 | data2 = malloc(2 * pagesize); | |
4131 | if (!data2) | |
4132 | exit(1); | |
4133 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
4134 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
4135 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
4136 | exit(1); | |
4137 | for (i = 0; i < pagesize; ++i) | |
4138 | if (*(data + i) != *(data2 + i)) | |
4139 | exit(1); | |
4140 | ||
4141 | /* | |
4142 | * Finally, make sure that changes to the mapped area | |
4143 | * do not percolate back to the file as seen by read(). | |
4144 | * (This is a bug on some variants of i386 svr4.0.) | |
4145 | */ | |
4146 | for (i = 0; i < pagesize; ++i) | |
4147 | *(data2 + i) = *(data2 + i) + 1; | |
4148 | data3 = malloc(pagesize); | |
4149 | if (!data3) | |
4150 | exit(1); | |
4151 | if (read(fd, data3, pagesize) != pagesize) | |
4152 | exit(1); | |
4153 | for (i = 0; i < pagesize; ++i) | |
4154 | if (*(data + i) != *(data3 + i)) | |
4155 | exit(1); | |
4156 | close(fd); | |
4157 | unlink("conftestmmap"); | |
4158 | exit(0); | |
2b576293 C |
4159 | } |
4160 | ||
4161 | EOF | |
46ccc6bf | 4162 | if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
4163 | then |
4164 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 4165 | else |
bfde4a67 SG |
4166 | echo "configure: failed program was:" >&5 |
4167 | cat conftest.$ac_ext >&5 | |
4168 | rm -fr conftest* | |
4169 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 4170 | fi |
ef6c51d1 | 4171 | rm -fr conftest* |
8b701284 ILT |
4172 | fi |
4173 | ||
bfde4a67 SG |
4174 | fi |
4175 | ||
4176 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
4177 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
4178 | cat >> confdefs.h <<\EOF |
4179 | #define HAVE_MMAP 1 | |
4180 | EOF | |
4181 | ||
4182 | fi | |
4183 | ||
5436fc65 | 4184 | |
5819f35d | 4185 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
46ccc6bf | 4186 | echo "configure:4187: checking whether malloc must be declared" >&5 |
5819f35d SG |
4187 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4188 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4189 | else | |
4190 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4191 | #line 4192 "configure" |
5819f35d SG |
4192 | #include "confdefs.h" |
4193 | ||
4194 | #include <stdio.h> | |
4195 | #ifdef HAVE_STRING_H | |
4196 | #include <string.h> | |
4197 | #else | |
4198 | #ifdef HAVE_STRINGS_H | |
4199 | #include <strings.h> | |
4200 | #endif | |
4201 | #endif | |
4202 | #ifdef HAVE_STDLIB_H | |
4203 | #include <stdlib.h> | |
4204 | #endif | |
4205 | #ifdef HAVE_UNISTD_H | |
4206 | #include <unistd.h> | |
4207 | #endif | |
bfde4a67 | 4208 | int main() { |
5819f35d SG |
4209 | char *(*pfn) = (char *(*)) malloc |
4210 | ; return 0; } | |
4211 | EOF | |
46ccc6bf | 4212 | if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
4213 | rm -rf conftest* |
4214 | bfd_cv_decl_needed_malloc=no | |
4215 | else | |
bfde4a67 SG |
4216 | echo "configure: failed program was:" >&5 |
4217 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
4218 | rm -rf conftest* |
4219 | bfd_cv_decl_needed_malloc=yes | |
4220 | fi | |
4221 | rm -f conftest* | |
5819f35d SG |
4222 | fi |
4223 | ||
4224 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4225 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4226 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4227 | cat >> confdefs.h <<EOF | |
4228 | #define $bfd_tr_decl 1 | |
4229 | EOF | |
4230 | ||
4231 | fi | |
4232 | ||
4233 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
46ccc6bf | 4234 | echo "configure:4235: checking whether realloc must be declared" >&5 |
5819f35d SG |
4235 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4237 | else | |
4238 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4239 | #line 4240 "configure" |
5819f35d SG |
4240 | #include "confdefs.h" |
4241 | ||
4242 | #include <stdio.h> | |
4243 | #ifdef HAVE_STRING_H | |
4244 | #include <string.h> | |
4245 | #else | |
4246 | #ifdef HAVE_STRINGS_H | |
4247 | #include <strings.h> | |
4248 | #endif | |
4249 | #endif | |
4250 | #ifdef HAVE_STDLIB_H | |
4251 | #include <stdlib.h> | |
4252 | #endif | |
4253 | #ifdef HAVE_UNISTD_H | |
4254 | #include <unistd.h> | |
4255 | #endif | |
bfde4a67 | 4256 | int main() { |
5819f35d SG |
4257 | char *(*pfn) = (char *(*)) realloc |
4258 | ; return 0; } | |
4259 | EOF | |
46ccc6bf | 4260 | if { (eval echo configure:4261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
4261 | rm -rf conftest* |
4262 | bfd_cv_decl_needed_realloc=no | |
4263 | else | |
bfde4a67 SG |
4264 | echo "configure: failed program was:" >&5 |
4265 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
4266 | rm -rf conftest* |
4267 | bfd_cv_decl_needed_realloc=yes | |
4268 | fi | |
4269 | rm -f conftest* | |
5819f35d SG |
4270 | fi |
4271 | ||
4272 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4273 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4274 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4275 | cat >> confdefs.h <<EOF | |
4276 | #define $bfd_tr_decl 1 | |
4277 | EOF | |
4278 | ||
4279 | fi | |
4280 | ||
4281 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
46ccc6bf | 4282 | echo "configure:4283: checking whether free must be declared" >&5 |
5819f35d SG |
4283 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4285 | else | |
4286 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4287 | #line 4288 "configure" |
5819f35d SG |
4288 | #include "confdefs.h" |
4289 | ||
4290 | #include <stdio.h> | |
4291 | #ifdef HAVE_STRING_H | |
4292 | #include <string.h> | |
4293 | #else | |
4294 | #ifdef HAVE_STRINGS_H | |
4295 | #include <strings.h> | |
4296 | #endif | |
4297 | #endif | |
4298 | #ifdef HAVE_STDLIB_H | |
4299 | #include <stdlib.h> | |
4300 | #endif | |
4301 | #ifdef HAVE_UNISTD_H | |
4302 | #include <unistd.h> | |
4303 | #endif | |
bfde4a67 | 4304 | int main() { |
5819f35d SG |
4305 | char *(*pfn) = (char *(*)) free |
4306 | ; return 0; } | |
4307 | EOF | |
46ccc6bf | 4308 | if { (eval echo configure:4309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
4309 | rm -rf conftest* |
4310 | bfd_cv_decl_needed_free=no | |
4311 | else | |
bfde4a67 SG |
4312 | echo "configure: failed program was:" >&5 |
4313 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
4314 | rm -rf conftest* |
4315 | bfd_cv_decl_needed_free=yes | |
4316 | fi | |
4317 | rm -f conftest* | |
5819f35d SG |
4318 | fi |
4319 | ||
4320 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4321 | if test $bfd_cv_decl_needed_free = yes; then | |
4322 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4323 | cat >> confdefs.h <<EOF | |
4324 | #define $bfd_tr_decl 1 | |
4325 | EOF | |
4326 | ||
4327 | fi | |
4328 | ||
fef1696f | 4329 | |
21cbc60c | 4330 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
46ccc6bf | 4331 | echo "configure:4332: checking whether strerror must be declared" >&5 |
21cbc60c JM |
4332 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4333 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4334 | else | |
4335 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4336 | #line 4337 "configure" |
21cbc60c JM |
4337 | #include "confdefs.h" |
4338 | ||
4339 | #include <stdio.h> | |
4340 | #ifdef HAVE_STRING_H | |
4341 | #include <string.h> | |
4342 | #else | |
4343 | #ifdef HAVE_STRINGS_H | |
4344 | #include <strings.h> | |
4345 | #endif | |
4346 | #endif | |
4347 | #ifdef HAVE_STDLIB_H | |
4348 | #include <stdlib.h> | |
4349 | #endif | |
4350 | #ifdef HAVE_UNISTD_H | |
4351 | #include <unistd.h> | |
4352 | #endif | |
4353 | int main() { | |
4354 | char *(*pfn) = (char *(*)) strerror | |
4355 | ; return 0; } | |
4356 | EOF | |
46ccc6bf | 4357 | if { (eval echo configure:4358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
21cbc60c JM |
4358 | rm -rf conftest* |
4359 | bfd_cv_decl_needed_strerror=no | |
4360 | else | |
4361 | echo "configure: failed program was:" >&5 | |
4362 | cat conftest.$ac_ext >&5 | |
4363 | rm -rf conftest* | |
4364 | bfd_cv_decl_needed_strerror=yes | |
4365 | fi | |
4366 | rm -f conftest* | |
4367 | fi | |
4368 | ||
4369 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4370 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4371 | bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4372 | cat >> confdefs.h <<EOF | |
4373 | #define $bfd_tr_decl 1 | |
4374 | EOF | |
4375 | ||
4376 | fi | |
4377 | ||
4378 | ||
47ef0da5 | 4379 | |
89e673a4 SG |
4380 | |
4381 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
4b95e9a1 JM |
4382 | case ${host_os} in |
4383 | hpux*) | |
4384 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
46ccc6bf | 4385 | echo "configure:4386: checking for HPUX/OSF thread support" >&5 |
4b95e9a1 JM |
4386 | if test -f /usr/include/dce/cma_config.h ; then |
4387 | if test "$GCC" = "yes" ; then | |
4388 | echo "$ac_t""yes" 1>&6 | |
4389 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
4390 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
4391 | EOF | |
4392 | ||
4b95e9a1 | 4393 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
c7bb1531 | 4394 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
4b95e9a1 JM |
4395 | else |
4396 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
4397 | fi | |
4398 | else | |
4399 | echo "$ac_t""no" 1>&6 | |
4400 | fi | |
4401 | ;; | |
4402 | solaris*) | |
4403 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
46ccc6bf | 4404 | echo "configure:4405: checking for Solaris thread debugging library" >&5 |
4b95e9a1 JM |
4405 | if test -f /usr/lib/libthread_db.so.1 ; then |
4406 | echo "$ac_t""yes" 1>&6 | |
4407 | cat >> confdefs.h <<\EOF | |
6c310da8 SG |
4408 | #define HAVE_THREAD_DB_LIB 1 |
4409 | EOF | |
4410 | ||
4b95e9a1 | 4411 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c7bb1531 | 4412 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
4b95e9a1 | 4413 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
46ccc6bf | 4414 | echo "configure:4415: checking for dlopen in -ldl" >&5 |
bfde4a67 | 4415 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
4416 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4418 | else | |
4419 | ac_save_LIBS="$LIBS" | |
4420 | LIBS="-ldl $LIBS" | |
4421 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4422 | #line 4423 "configure" |
95b47547 SG |
4423 | #include "confdefs.h" |
4424 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4425 | /* We use char because int might match the return type of a gcc2 | |
4426 | builtin and then its argument prototype would still apply. */ | |
4427 | char dlopen(); | |
4428 | ||
bfde4a67 | 4429 | int main() { |
95b47547 SG |
4430 | dlopen() |
4431 | ; return 0; } | |
4432 | EOF | |
46ccc6bf | 4433 | if { (eval echo configure:4434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
95b47547 SG |
4434 | rm -rf conftest* |
4435 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4436 | else | |
bfde4a67 SG |
4437 | echo "configure: failed program was:" >&5 |
4438 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
4439 | rm -rf conftest* |
4440 | eval "ac_cv_lib_$ac_lib_var=no" | |
4441 | fi | |
4442 | rm -f conftest* | |
4443 | LIBS="$ac_save_LIBS" | |
4444 | ||
4445 | fi | |
4446 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4447 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
4448 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
4449 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
4450 | cat >> confdefs.h <<EOF |
4451 | #define $ac_tr_lib 1 | |
4452 | EOF | |
4453 | ||
4454 | LIBS="-ldl $LIBS" | |
4455 | ||
4456 | else | |
4457 | echo "$ac_t""no" 1>&6 | |
4458 | fi | |
4459 | ||
4b95e9a1 JM |
4460 | if test "$GCC" = "yes" ; then |
4461 | # The GNU linker requires the -export-dynamic option to make | |
4462 | # all symbols visible in the dynamic symbol table. | |
4463 | hold_ldflags=$LDFLAGS | |
4464 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
46ccc6bf | 4465 | echo "configure:4466: checking for the ld -export-dynamic flag" >&5 |
4b95e9a1 JM |
4466 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
4467 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4468 | #line 4469 "configure" |
4b95e9a1 JM |
4469 | #include "confdefs.h" |
4470 | ||
4471 | int main() { | |
4472 | int i; | |
4473 | ; return 0; } | |
4474 | EOF | |
46ccc6bf | 4475 | if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4b95e9a1 JM |
4476 | rm -rf conftest* |
4477 | found=yes | |
4478 | else | |
4479 | echo "configure: failed program was:" >&5 | |
4480 | cat conftest.$ac_ext >&5 | |
4481 | rm -rf conftest* | |
4482 | found=no | |
4483 | fi | |
4484 | rm -f conftest* | |
4485 | LDFLAGS=$hold_ldflags | |
4486 | echo "$ac_t""$found" 1>&6 | |
4487 | if test $found = yes; then | |
4488 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
4489 | fi | |
4490 | fi | |
4491 | else | |
4492 | echo "$ac_t""no" 1>&6 | |
4493 | fi | |
4494 | ;; | |
4495 | esac | |
4496 | ||
89e673a4 | 4497 | fi |
47ef0da5 | 4498 | |
5436fc65 | 4499 | ENABLE_CFLAGS= |
5436fc65 C |
4500 | |
4501 | # Check whether --enable-netrom or --disable-netrom was given. | |
1a7b4b7c DE |
4502 | if test "${enable_netrom+set}" = set; then |
4503 | enableval="$enable_netrom" | |
5436fc65 C |
4504 | case "${enableval}" in |
4505 | yes) enable_netrom=yes ;; | |
4506 | no) enable_netrom=no ;; | |
4507 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
4508 | esac | |
4509 | fi | |
4510 | ||
4511 | ||
4512 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 4513 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
c7bb1531 | 4514 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
5436fc65 C |
4515 | fi |
4516 | ||
0728afad FF |
4517 | MMALLOC_CFLAGS= |
4518 | MMALLOC= | |
4519 | ||
4520 | ||
4521 | ||
4522 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
4523 | if test "${with_mmalloc+set}" = set; then | |
4524 | withval="$with_mmalloc" | |
4525 | case "${withval}" in | |
4526 | yes) want_mmalloc=true ;; | |
4527 | no) want_mmalloc=false;; | |
4528 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
4529 | esac | |
4530 | else | |
4531 | want_mmalloc=false | |
4532 | fi | |
4533 | ||
4534 | if test x$want_mmalloc = xtrue; then | |
4535 | cat >> confdefs.h <<\EOF | |
4536 | #define USE_MMALLOC 1 | |
4537 | EOF | |
4538 | ||
4539 | cat >> confdefs.h <<\EOF | |
dd600735 | 4540 | #define MMCHECK_FORCE 1 |
0728afad FF |
4541 | EOF |
4542 | ||
4543 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
4544 | MMALLOC='../mmalloc/libmmalloc.a' | |
4545 | fi | |
4546 | ||
5436fc65 | 4547 | # start-sanitize-gdbtk |
2476848a MH |
4548 | ENABLE_IDE= |
4549 | # Check whether --enable-ide or --disable-ide was given. | |
4550 | if test "${enable_ide+set}" = set; then | |
4551 | enableval="$enable_ide" | |
4552 | : | |
4553 | fi | |
4554 | ||
4555 | if test "$enable_ide" = yes; then | |
4556 | enable_ide=yes | |
4557 | ENABLE_IDE=1 | |
4558 | else | |
4559 | enable_ide=no | |
4560 | fi | |
4561 | ||
4562 | ||
5436fc65 C |
4563 | ENABLE_GDBTK= |
4564 | ||
4565 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
4566 | if test "${enable_gdbtk+set}" = set; then |
4567 | enableval="$enable_gdbtk" | |
5436fc65 | 4568 | case "${enableval}" in |
0fe1522a SG |
4569 | yes) |
4570 | case "$host" in | |
4571 | *go32*) | |
4572 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
4573 | enable_gdbtk=no ;; | |
8a19b35a | 4574 | *windows*) |
b613bfbf GN |
4575 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
4576 | enable_gdbtk=no ;; | |
0fe1522a SG |
4577 | *) |
4578 | enable_gdbtk=yes ;; | |
4579 | esac ;; | |
4580 | no) | |
4581 | enable_gdbtk=no ;; | |
4582 | *) | |
4583 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 4584 | esac |
0fe1522a SG |
4585 | else |
4586 | ||
b613bfbf | 4587 | # Default is on for everything but go32 and cygwin32 |
0fe1522a | 4588 | case "$host" in |
8a19b35a | 4589 | *go32* | *windows*) |
b613bfbf | 4590 | ;; |
0fe1522a SG |
4591 | *) |
4592 | enable_gdbtk=yes ;; | |
4593 | esac | |
4594 | ||
5436fc65 C |
4595 | fi |
4596 | ||
4597 | ||
9b119644 ILT |
4598 | # In the cygwin32 environment, we need some additional flags. |
4599 | echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 | |
46ccc6bf | 4600 | echo "configure:4601: checking for cygwin32" >&5 |
9b119644 ILT |
4601 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then |
4602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4603 | else | |
4604 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4605 | #line 4606 "configure" |
9b119644 ILT |
4606 | #include "confdefs.h" |
4607 | ||
4608 | #ifdef __CYGWIN32__ | |
4609 | lose | |
4610 | #endif | |
4611 | EOF | |
4612 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4613 | egrep "lose" >/dev/null 2>&1; then | |
4614 | rm -rf conftest* | |
4615 | gdb_cv_os_cygwin32=yes | |
4616 | else | |
4617 | rm -rf conftest* | |
4618 | gdb_cv_os_cygwin32=no | |
4619 | fi | |
4620 | rm -f conftest* | |
4621 | ||
4622 | fi | |
4623 | ||
4624 | echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6 | |
4625 | ||
4626 | WIN32LIBS= | |
4627 | WIN32LDAPP= | |
4628 | ||
4629 | ||
4630 | ||
929db6e5 EZ |
4631 | WINDRES=${WINDRES-windres} |
4632 | ||
4633 | ||
9b119644 ILT |
4634 | if test x$gdb_cv_os_cygwin32 = xyes; then |
4635 | if test x$enable_ide = xyes; then | |
4636 | WIN32LIBS="-ladvapi32" | |
4637 | fi | |
4638 | fi | |
4639 | ||
4640 | configdir="unix" | |
8a19b35a | 4641 | |
b177bf84 | 4642 | GDBTKLIBS= |
5436fc65 | 4643 | if test "${enable_gdbtk}" = "yes"; then |
0fe1522a | 4644 | |
047465fd TT |
4645 | |
4646 | # | |
4647 | # Ok, lets find the tcl configuration | |
4648 | # First, look for one uninstalled. | |
4649 | # the alternative search directory is invoked by --with-tclconfig | |
4650 | # | |
5436fc65 | 4651 | |
047465fd TT |
4652 | if test x"${no_tcl}" = x ; then |
4653 | # we reset no_tcl in case something fails here | |
4654 | no_tcl=true | |
4655 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
4656 | if test "${with_tclconfig+set}" = set; then | |
4657 | withval="$with_tclconfig" | |
4658 | with_tclconfig=${withval} | |
5436fc65 C |
4659 | fi |
4660 | ||
047465fd | 4661 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
46ccc6bf | 4662 | echo "configure:4663: checking for Tcl configuration" >&5 |
047465fd | 4663 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
4664 | echo $ac_n "(cached) $ac_c" 1>&6 |
4665 | else | |
047465fd | 4666 | |
1a7b4b7c | 4667 | |
047465fd TT |
4668 | # First check to see if --with-tclconfig was specified. |
4669 | if test x"${with_tclconfig}" != x ; then | |
4670 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
4671 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
4672 | else | |
4673 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 4674 | fi |
047465fd | 4675 | fi |
5436fc65 | 4676 | |
047465fd TT |
4677 | # then check for a private Tcl installation |
4678 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
4679 | for i in \ | |
4680 | ../tcl \ | |
4681 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
4682 | ../../tcl \ | |
4683 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
4684 | ../../../tcl \ | |
4685 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
4686 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
4687 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
4688 | break |
4689 | fi | |
4690 | done | |
4691 | fi | |
4692 | # check in a few common install locations | |
4693 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
4694 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
4695 | if test -f "$i/tclConfig.sh" ; then | |
4696 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
4697 | break | |
4698 | fi | |
4699 | done | |
4700 | fi | |
4701 | # check in a few other private locations | |
4702 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
4703 | for i in \ | |
4704 | ${srcdir}/../tcl \ | |
4705 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
4706 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
4707 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
4708 | break |
4709 | fi | |
4710 | done | |
4711 | fi | |
4712 | ||
5436fc65 | 4713 | fi |
1a7b4b7c | 4714 | |
047465fd TT |
4715 | if test x"${ac_cv_c_tclconfig}" = x ; then |
4716 | TCLCONFIG="# no Tcl configs found" | |
4717 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
4718 | else | |
4719 | no_tcl= | |
4720 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
4721 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 4722 | fi |
5436fc65 C |
4723 | fi |
4724 | ||
0cf433d9 ILT |
4725 | if test -z "${no_tcl}"; then |
4726 | ||
047465fd | 4727 | . $TCLCONFIG |
5436fc65 | 4728 | |
047465fd TT |
4729 | |
4730 | ||
4731 | ||
4732 | ||
4733 | ||
5436fc65 | 4734 | |
5436fc65 | 4735 | |
5436fc65 | 4736 | |
5436fc65 | 4737 | |
047465fd TT |
4738 | |
4739 | ||
4740 | ||
4741 | ||
4742 | ||
4743 | ||
4744 | ||
4745 | ||
4746 | ||
4747 | ||
4748 | ||
4749 | ||
5436fc65 | 4750 | |
5436fc65 | 4751 | |
5436fc65 | 4752 | |
0cf433d9 | 4753 | |
047465fd TT |
4754 | # |
4755 | # Ok, lets find the tk configuration | |
4756 | # First, look for one uninstalled. | |
4757 | # the alternative search directory is invoked by --with-tkconfig | |
4758 | # | |
5436fc65 | 4759 | |
047465fd TT |
4760 | if test x"${no_tk}" = x ; then |
4761 | # we reset no_tk in case something fails here | |
4762 | no_tk=true | |
4763 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
4764 | if test "${with_tkconfig+set}" = set; then | |
4765 | withval="$with_tkconfig" | |
4766 | with_tkconfig=${withval} | |
5436fc65 C |
4767 | fi |
4768 | ||
047465fd | 4769 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
46ccc6bf | 4770 | echo "configure:4771: checking for Tk configuration" >&5 |
047465fd | 4771 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
4772 | echo $ac_n "(cached) $ac_c" 1>&6 |
4773 | else | |
047465fd | 4774 | |
5436fc65 | 4775 | |
047465fd TT |
4776 | # First check to see if --with-tkconfig was specified. |
4777 | if test x"${with_tkconfig}" != x ; then | |
4778 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
4779 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
4780 | else | |
4781 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 4782 | fi |
047465fd | 4783 | fi |
5436fc65 | 4784 | |
047465fd TT |
4785 | # then check for a private Tk library |
4786 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
4787 | for i in \ | |
4788 | ../tk \ | |
4789 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
4790 | ../../tk \ | |
4791 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
4792 | ../../../tk \ | |
4793 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
4794 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
4795 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
4796 | break |
4797 | fi | |
4798 | done | |
4799 | fi | |
4800 | # check in a few common install locations | |
4801 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
4802 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
4803 | if test -f "$i/tkConfig.sh" ; then | |
4804 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
4805 | break | |
4806 | fi | |
4807 | done | |
4808 | fi | |
4809 | # check in a few other private locations | |
4810 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
4811 | for i in \ | |
4812 | ${srcdir}/../tk \ | |
4813 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
4814 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
4815 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
4816 | break |
4817 | fi | |
4818 | done | |
4819 | fi | |
4820 | ||
5436fc65 | 4821 | fi |
5436fc65 | 4822 | |
047465fd TT |
4823 | if test x"${ac_cv_c_tkconfig}" = x ; then |
4824 | TKCONFIG="# no Tk configs found" | |
4825 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
4826 | else | |
4827 | no_tk= | |
4828 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
4829 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
4830 | fi | |
5436fc65 C |
4831 | fi |
4832 | ||
4833 | ||
5436fc65 | 4834 | |
0cf433d9 ILT |
4835 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
4836 | # point to doing Tcl. | |
4837 | if test -z "${no_tk}"; then | |
4838 | ||
047465fd TT |
4839 | if test -f "$TKCONFIG" ; then |
4840 | . $TKCONFIG | |
4841 | fi | |
5436fc65 | 4842 | |
047465fd TT |
4843 | |
4844 | ||
5436fc65 | 4845 | |
047465fd | 4846 | |
5436fc65 C |
4847 | |
4848 | ||
a2b63bbd | 4849 | |
047465fd TT |
4850 | |
4851 | ||
4852 | ||
9b119644 | 4853 | |
047465fd | 4854 | |
0cf433d9 | 4855 | |
5436fc65 | 4856 | # |
4e327047 TT |
4857 | # Ok, lets find the tcl source trees so we can use the headers |
4858 | # Warning: transition of version 9 to 10 will break this algorithm | |
4859 | # because 10 sorts before 9. We also look for just tcl. We have to | |
4860 | # be careful that we don't match stuff like tclX by accident. | |
4861 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 4862 | # |
8a19b35a | 4863 | |
4e327047 | 4864 | no_tcl=true |
8a19b35a | 4865 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 |
46ccc6bf | 4866 | echo "configure:4867: checking for Tcl private headers. dir=${configdir}" >&5 |
4e327047 | 4867 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
4868 | if test "${with_tclinclude+set}" = set; then |
4869 | withval="$with_tclinclude" | |
4e327047 TT |
4870 | with_tclinclude=${withval} |
4871 | fi | |
4872 | ||
4873 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
4874 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4875 | else | |
4876 | ||
4877 | # first check to see if --with-tclinclude was specified | |
4878 | if test x"${with_tclinclude}" != x ; then | |
4879 | if test -f ${with_tclinclude}/tclInt.h ; then | |
4880 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
4881 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
4882 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 4883 | else |
4e327047 TT |
4884 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
4885 | fi | |
4886 | fi | |
047465fd TT |
4887 | |
4888 | # next check if it came with Tcl configuration file | |
4889 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
4890 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
4891 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
4892 | fi | |
4893 | fi | |
4894 | ||
4e327047 TT |
4895 | # next check in private source directory |
4896 | # | |
4897 | # since ls returns lowest version numbers first, reverse its output | |
4898 | if test x"${ac_cv_c_tclh}" = x ; then | |
4899 | for i in \ | |
4900 | ${srcdir}/../tcl \ | |
047465fd | 4901 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 4902 | ${srcdir}/../../tcl \ |
047465fd | 4903 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 4904 | ${srcdir}/../../../tcl \ |
047465fd | 4905 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 4906 | if test -f $i/generic/tclInt.h ; then |
047465fd | 4907 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 4908 | break |
4e327047 TT |
4909 | fi |
4910 | done | |
4911 | fi | |
4912 | # finally check in a few common install locations | |
4913 | # | |
4914 | # since ls returns lowest version numbers first, reverse its output | |
4915 | if test x"${ac_cv_c_tclh}" = x ; then | |
4916 | for i in \ | |
047465fd TT |
4917 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
4918 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
4919 | /usr/local/src/tcl \ |
4920 | /usr/local/lib/tcl \ | |
4921 | ${prefix}/include ; do | |
047465fd TT |
4922 | if test -f $i/generic/tclInt.h ; then |
4923 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
4924 | break |
4925 | fi | |
4926 | done | |
4927 | fi | |
4928 | # see if one is installed | |
4929 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 4930 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 4931 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
46ccc6bf | 4932 | echo "configure:4933: checking for tclInt.h" >&5 |
5436fc65 C |
4933 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4934 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4935 | else | |
4936 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 4937 | #line 4938 "configure" |
5436fc65 | 4938 | #include "confdefs.h" |
4e327047 | 4939 | #include <tclInt.h> |
5436fc65 | 4940 | EOF |
1a7b4b7c | 4941 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
46ccc6bf | 4942 | { (eval echo configure:4943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
eac4afd1 | 4943 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
4944 | if test -z "$ac_err"; then |
4945 | rm -rf conftest* | |
4946 | eval "ac_cv_header_$ac_safe=yes" | |
4947 | else | |
4948 | echo "$ac_err" >&5 | |
bfde4a67 SG |
4949 | echo "configure: failed program was:" >&5 |
4950 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
4951 | rm -rf conftest* |
4952 | eval "ac_cv_header_$ac_safe=no" | |
4953 | fi | |
4954 | rm -f conftest* | |
4955 | fi | |
4956 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4957 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 4958 | ac_cv_c_tclh=installed |
5436fc65 C |
4959 | else |
4960 | echo "$ac_t""no" 1>&6 | |
4e327047 | 4961 | ac_cv_c_tclh="" |
5436fc65 C |
4962 | fi |
4963 | ||
4e327047 TT |
4964 | fi |
4965 | ||
4966 | fi | |
4967 | ||
4968 | if test x"${ac_cv_c_tclh}" = x ; then | |
4969 | TCLHDIR="# no Tcl private headers found" | |
4970 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
4971 | fi | |
4972 | if test x"${ac_cv_c_tclh}" != x ; then | |
4973 | no_tcl="" | |
1a7b4b7c | 4974 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
4975 | echo "$ac_t""is installed" 1>&6 |
4976 | TCLHDIR="" | |
4977 | else | |
4978 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
4979 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
4980 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 4981 | fi |
5436fc65 | 4982 | fi |
4e327047 | 4983 | |
4e327047 | 4984 | |
5436fc65 | 4985 | |
0cf433d9 | 4986 | |
5436fc65 | 4987 | # |
4e327047 TT |
4988 | # Ok, lets find the tk source trees so we can use the headers |
4989 | # If the directory (presumably symlink) named "tk" exists, use that one | |
4990 | # in preference to any others. Same logic is used when choosing library | |
4991 | # and again with Tcl. The search order is the best place to look first, then in | |
4992 | # decreasing significance. The loop breaks if the trigger file is found. | |
4993 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
4994 | # directory. This converts the path from a relative to an absolute, so | |
4995 | # recursive cache variables for the path will work right. We check all | |
4996 | # the possible paths in one loop rather than many seperate loops to speed | |
4997 | # things up. | |
047465fd | 4998 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 4999 | # |
047465fd | 5000 | no_tk=true |
4e327047 | 5001 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
46ccc6bf | 5002 | echo "configure:5003: checking for Tk private headers" >&5 |
4e327047 | 5003 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
5004 | if test "${with_tkinclude+set}" = set; then |
5005 | withval="$with_tkinclude" | |
4e327047 TT |
5006 | with_tkinclude=${withval} |
5007 | fi | |
5008 | ||
4e327047 TT |
5009 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
5010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5011 | else | |
5012 | ||
5013 | # first check to see if --with-tkinclude was specified | |
5014 | if test x"${with_tkinclude}" != x ; then | |
5015 | if test -f ${with_tkinclude}/tk.h ; then | |
5016 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
5017 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
5018 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 5019 | else |
4e327047 TT |
5020 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
5021 | fi | |
5022 | fi | |
047465fd TT |
5023 | |
5024 | # next check if it came with Tk configuration file | |
5025 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5026 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
5027 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
5028 | fi | |
5029 | fi | |
5030 | ||
4e327047 TT |
5031 | # next check in private source directory |
5032 | # | |
047465fd | 5033 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5034 | if test x"${ac_cv_c_tkh}" = x ; then |
5035 | for i in \ | |
5036 | ${srcdir}/../tk \ | |
047465fd | 5037 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5038 | ${srcdir}/../../tk \ |
047465fd | 5039 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5040 | ${srcdir}/../../../tk \ |
047465fd TT |
5041 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
5042 | if test -f $i/generic/tk.h ; then | |
5043 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5044 | break |
5045 | fi | |
4e327047 TT |
5046 | done |
5047 | fi | |
5048 | # finally check in a few common install locations | |
5049 | # | |
047465fd | 5050 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5051 | if test x"${ac_cv_c_tkh}" = x ; then |
5052 | for i in \ | |
047465fd TT |
5053 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
5054 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
5055 | /usr/local/src/tk \ |
5056 | /usr/local/lib/tk \ | |
5057 | ${prefix}/include ; do | |
047465fd TT |
5058 | if test -f $i/generic/tk.h ; then |
5059 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5060 | break |
5061 | fi | |
5062 | done | |
5063 | fi | |
5064 | # see if one is installed | |
5065 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 5066 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 5067 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
46ccc6bf | 5068 | echo "configure:5069: checking for tk.h" >&5 |
5436fc65 C |
5069 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5070 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5071 | else | |
5072 | cat > conftest.$ac_ext <<EOF | |
46ccc6bf | 5073 | #line 5074 "configure" |
5436fc65 | 5074 | #include "confdefs.h" |
4e327047 | 5075 | #include <tk.h> |
5436fc65 | 5076 | EOF |
1a7b4b7c | 5077 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
46ccc6bf | 5078 | { (eval echo configure:5079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
eac4afd1 | 5079 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
5080 | if test -z "$ac_err"; then |
5081 | rm -rf conftest* | |
5082 | eval "ac_cv_header_$ac_safe=yes" | |
5083 | else | |
5084 | echo "$ac_err" >&5 | |
bfde4a67 SG |
5085 | echo "configure: failed program was:" >&5 |
5086 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
5087 | rm -rf conftest* |
5088 | eval "ac_cv_header_$ac_safe=no" | |
5089 | fi | |
5090 | rm -f conftest* | |
5091 | fi | |
5092 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5093 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 5094 | ac_cv_c_tkh=installed |
5436fc65 C |
5095 | else |
5096 | echo "$ac_t""no" 1>&6 | |
047465fd | 5097 | ac_cv_c_tkh="" |
5436fc65 C |
5098 | fi |
5099 | ||
4e327047 TT |
5100 | fi |
5101 | ||
5102 | fi | |
5103 | ||
5104 | if test x"${ac_cv_c_tkh}" != x ; then | |
5105 | no_tk="" | |
5106 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
5107 | echo "$ac_t""is installed" 1>&6 | |
5108 | TKHDIR="" | |
5109 | else | |
047465fd | 5110 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
5111 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
5112 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
5113 | fi |
5114 | else | |
4e327047 TT |
5115 | TKHDIR="# no Tk directory found" |
5116 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
5117 | no_tk=true | |
5436fc65 C |
5118 | fi |
5119 | ||
5436fc65 C |
5120 | |
5121 | ||
2476848a MH |
5122 | |
5123 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
46ccc6bf | 5124 | echo "configure:5125: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5125 | if test x"${ac_cv_c_itclh}" = x ; then |
5126 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do | |
5127 | if test -f $i/src/itcl.h ; then | |
5128 | ac_cv_c_itclh=`(cd $i/src; pwd)` | |
5129 | break | |
5130 | fi | |
5131 | done | |
5132 | fi | |
5133 | if test x"${ac_cv_c_itclh}" = x ; then | |
5134 | ITCLHDIR="# no Itcl private headers found" | |
5135 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
5136 | fi | |
5137 | if test x"${ac_cv_c_itclh}" != x ; then | |
5138 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
5139 | fi | |
5140 | # should always be here | |
5141 | ITCLLIB="../itcl/src/libitcl.a" | |
5142 | ||
5143 | ||
5144 | ||
5145 | ||
5146 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
46ccc6bf | 5147 | echo "configure:5148: checking for Tix private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5148 | if test x"${ac_cv_c_tixh}" = x ; then |
5149 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
5150 | if test -f $i/generic/tix.h ; then | |
5151 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
5152 | break | |
5153 | fi | |
5154 | done | |
5155 | fi | |
5156 | if test x"${ac_cv_c_tixh}" = x ; then | |
5157 | TIXHDIR="# no Tix private headers found" | |
5158 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
5159 | fi | |
5160 | if test x"${ac_cv_c_tixh}" != x ; then | |
5161 | TIXHDIR="-I${ac_cv_c_tixh}" | |
5162 | fi | |
2476848a MH |
5163 | |
5164 | ||
5165 | ||
6bc5b2fa | 5166 | # now look for tix library stuff |
1154b47a | 5167 | TIXVERSION=4.1.8.0 |
6bc5b2fa MH |
5168 | . ${ac_cv_c_tclconfig}/tclConfig.sh |
5169 | case "${host}" in | |
5170 | *-*-cygwin32*) | |
f1f6dd9c | 5171 | tixdir=../tix/win/tcl8.0 |
6bc5b2fa MH |
5172 | ;; |
5173 | *) | |
1154b47a | 5174 | tixdir=../tix/unix/tk8.0 |
6bc5b2fa MH |
5175 | ;; |
5176 | esac | |
bb3d9f43 KS |
5177 | if test "${TCL_SHARED_BUILD}" = "1"; then |
5178 | TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}" | |
11f91b2b KS |
5179 | |
5180 | # Can't win them all: SunOS 4 (others?) appends a version | |
5181 | # number after the ".so" | |
5182 | case "${host}" in | |
5183 | *-*-sunos4*) | |
5184 | TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;; | |
5185 | esac | |
5186 | ||
bb3d9f43 KS |
5187 | else |
5188 | TIX_LIB_EXT=".a" | |
5189 | fi | |
11f91b2b | 5190 | |
6bc5b2fa MH |
5191 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
5192 | TIXLIB="-L${tixdir} -ltix${TIXVERSION}" | |
bb3d9f43 | 5193 | TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}" |
6bc5b2fa MH |
5194 | else |
5195 | TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`" | |
bb3d9f43 | 5196 | TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}" |
6bc5b2fa | 5197 | fi |
5436fc65 | 5198 | |
0cf433d9 | 5199 | ENABLE_GDBTK=1 |
509b70ac | 5200 | ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK" |
5436fc65 | 5201 | |
6c310da8 | 5202 | # Include some libraries that Tcl and Tk want. |
2476848a | 5203 | if test "${enable_ide}" = "yes"; then |
8b5befef ILT |
5204 | TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
5205 | CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 5206 | else |
dafec9dd ILT |
5207 | TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
5208 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 5209 | fi |
46964086 TT |
5210 | # Yes, the ordering seems wrong here. But it isn't. |
5211 | # TK_LIBS is the list of libraries that need to be linked | |
b177bf84 TT |
5212 | # after Tcl/Tk. Note that this isn't put into LIBS. If it |
5213 | # were in LIBS then any link tests after this point would | |
5214 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
5215 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
f3b86a30 | 5216 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o" |
9b119644 ILT |
5217 | |
5218 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
018d76dd | 5219 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32" |
47792960 | 5220 | WIN32LDAPP="-Wl,--subsystem,console" |
929db6e5 | 5221 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" |
9b119644 | 5222 | fi |
0cf433d9 | 5223 | fi |
1a57cd09 | 5224 | fi |
a2b63bbd | 5225 | fi |
66efdff9 | 5226 | |
66efdff9 | 5227 | |
5436fc65 | 5228 | |
66efdff9 JM |
5229 | |
5230 | ||
6bc5b2fa | 5231 | |
018d76dd | 5232 | |
b177bf84 | 5233 | |
5436fc65 C |
5234 | # end-sanitize-gdbtk |
5235 | ||
b236defa FCE |
5236 | # If we find X, set shell vars x_includes and x_libraries to the |
5237 | # paths, otherwise set no_x=yes. | |
5238 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
5239 | # --without-x overrides everything else, but does not touch the cache. | |
5240 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
509b70ac | 5241 | echo "configure:5242: checking for X" >&5 |
b236defa FCE |
5242 | |
5243 | # Check whether --with-x or --without-x was given. | |
5244 | if test "${with_x+set}" = set; then | |
5245 | withval="$with_x" | |
5246 | : | |
5247 | fi | |
5248 | ||
5249 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
5250 | if test "x$with_x" = xno; then | |
5251 | # The user explicitly disabled X. | |
5252 | have_x=disabled | |
5253 | else | |
5254 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
5255 | # Both variables are already set. | |
5256 | have_x=yes | |
5257 | else | |
5258 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
5259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5260 | else | |
5261 | # One or both of the vars are not set, and there is no cached value. | |
5262 | ac_x_includes=NO ac_x_libraries=NO | |
5263 | rm -fr conftestdir | |
5264 | if mkdir conftestdir; then | |
5265 | cd conftestdir | |
5266 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
5267 | cat > Imakefile <<'EOF' | |
5268 | acfindx: | |
5269 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
5270 | EOF | |
5271 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
5272 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
5273 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
5274 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
5275 | for ac_extension in a so sl; do | |
5276 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
5277 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
5278 | ac_im_usrlibdir=$ac_im_libdir; break | |
5279 | fi | |
5280 | done | |
5281 | # Screen out bogus values from the imake configuration. They are | |
5282 | # bogus both because they are the default anyway, and because | |
5283 | # using them would break gcc on systems where it needs fixed includes. | |
5284 | case "$ac_im_incroot" in | |
5285 | /usr/include) ;; | |
5286 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
5287 | esac | |
5288 | case "$ac_im_usrlibdir" in | |
5289 | /usr/lib | /lib) ;; | |
5290 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
5291 | esac | |
5292 | fi | |
5293 | cd .. | |
5294 | rm -fr conftestdir | |
5295 | fi | |
5296 | ||
5297 | if test "$ac_x_includes" = NO; then | |
5298 | # Guess where to find include files, by looking for this one X11 .h file. | |
5299 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
5300 | ||
5301 | # First, try using that file with no special directory specified. | |
5302 | cat > conftest.$ac_ext <<EOF | |
509b70ac | 5303 | #line 5304 "configure" |
b236defa FCE |
5304 | #include "confdefs.h" |
5305 | #include <$x_direct_test_include> | |
5306 | EOF | |
5307 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
509b70ac | 5308 | { (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
eac4afd1 | 5309 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
b236defa FCE |
5310 | if test -z "$ac_err"; then |
5311 | rm -rf conftest* | |
5312 | # We can compile using X headers with no special include directory. | |
5313 | ac_x_includes= | |
5314 | else | |
5315 | echo "$ac_err" >&5 | |
5316 | echo "configure: failed program was:" >&5 | |
5317 | cat conftest.$ac_ext >&5 | |
5318 | rm -rf conftest* | |
5319 | # Look for the header file in a standard set of common directories. | |
5320 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
5321 | for ac_dir in \ | |
5322 | /usr/X11/include \ | |
5323 | /usr/X11R6/include \ | |
5324 | /usr/X11R5/include \ | |
5325 | /usr/X11R4/include \ | |
5326 | \ | |
5327 | /usr/include/X11 \ | |
5328 | /usr/include/X11R6 \ | |
5329 | /usr/include/X11R5 \ | |
5330 | /usr/include/X11R4 \ | |
5331 | \ | |
5332 | /usr/local/X11/include \ | |
5333 | /usr/local/X11R6/include \ | |
5334 | /usr/local/X11R5/include \ | |
5335 | /usr/local/X11R4/include \ | |
5336 | \ | |
5337 | /usr/local/include/X11 \ | |
5338 | /usr/local/include/X11R6 \ | |
5339 | /usr/local/include/X11R5 \ | |
5340 | /usr/local/include/X11R4 \ | |
5341 | \ | |
5342 | /usr/X386/include \ | |
5343 | /usr/x386/include \ | |
5344 | /usr/XFree86/include/X11 \ | |
5345 | \ | |
5346 | /usr/include \ | |
5347 | /usr/local/include \ | |
5348 | /usr/unsupported/include \ | |
5349 | /usr/athena/include \ | |
5350 | /usr/local/x11r5/include \ | |
5351 | /usr/lpp/Xamples/include \ | |
5352 | \ | |
5353 | /usr/openwin/include \ | |
5354 | /usr/openwin/share/include \ | |
5355 | ; \ | |
5356 | do | |
5357 | if test -r "$ac_dir/$x_direct_test_include"; then | |
5358 | ac_x_includes=$ac_dir | |
5359 | break | |
5360 | fi | |
5361 | done | |
5362 | fi | |
5363 | rm -f conftest* | |
5364 | fi # $ac_x_includes = NO | |
5365 | ||
5366 | if test "$ac_x_libraries" = NO; then | |
5367 | # Check for the libraries. | |
5368 | ||
5369 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
5370 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
5371 | ||
5372 | # See if we find them without any special options. | |
5373 | # Don't add to $LIBS permanently. | |
5374 | ac_save_LIBS="$LIBS" | |
5375 | LIBS="-l$x_direct_test_library $LIBS" | |
5376 | cat > conftest.$ac_ext <<EOF | |
509b70ac | 5377 | #line 5378 "configure" |
b236defa FCE |
5378 | #include "confdefs.h" |
5379 | ||
5380 | int main() { | |
5381 | ${x_direct_test_function}() | |
5382 | ; return 0; } | |
5383 | EOF | |
509b70ac | 5384 | if { (eval echo configure:5385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b236defa FCE |
5385 | rm -rf conftest* |
5386 | LIBS="$ac_save_LIBS" | |
5387 | # We can link X programs with no special library path. | |
5388 | ac_x_libraries= | |
5389 | else | |
5390 | echo "configure: failed program was:" >&5 | |
5391 | cat conftest.$ac_ext >&5 | |
5392 | rm -rf conftest* | |
5393 | LIBS="$ac_save_LIBS" | |
5394 | # First see if replacing the include by lib works. | |
5395 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
5396 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
5397 | /usr/X11/lib \ | |
5398 | /usr/X11R6/lib \ | |
5399 | /usr/X11R5/lib \ | |
5400 | /usr/X11R4/lib \ | |
5401 | \ | |
5402 | /usr/lib/X11 \ | |
5403 | /usr/lib/X11R6 \ | |
5404 | /usr/lib/X11R5 \ | |
5405 | /usr/lib/X11R4 \ | |
5406 | \ | |
5407 | /usr/local/X11/lib \ | |
5408 | /usr/local/X11R6/lib \ | |
5409 | /usr/local/X11R5/lib \ | |
5410 | /usr/local/X11R4/lib \ | |
5411 | \ | |
5412 | /usr/local/lib/X11 \ | |
5413 | /usr/local/lib/X11R6 \ | |
5414 | /usr/local/lib/X11R5 \ | |
5415 | /usr/local/lib/X11R4 \ | |
5416 | \ | |
5417 | /usr/X386/lib \ | |
5418 | /usr/x386/lib \ | |
5419 | /usr/XFree86/lib/X11 \ | |
5420 | \ | |
5421 | /usr/lib \ | |
5422 | /usr/local/lib \ | |
5423 | /usr/unsupported/lib \ | |
5424 | /usr/athena/lib \ | |
5425 | /usr/local/x11r5/lib \ | |
5426 | /usr/lpp/Xamples/lib \ | |
5427 | /lib/usr/lib/X11 \ | |
5428 | \ | |
5429 | /usr/openwin/lib \ | |
5430 | /usr/openwin/share/lib \ | |
5431 | ; \ | |
5432 | do | |
5433 | for ac_extension in a so sl; do | |
5434 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
5435 | ac_x_libraries=$ac_dir | |
5436 | break 2 | |
5437 | fi | |
5438 | done | |
5439 | done | |
5440 | fi | |
5441 | rm -f conftest* | |
5442 | fi # $ac_x_libraries = NO | |
5443 | ||
5444 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
5445 | # Didn't find X anywhere. Cache the known absence of X. | |
5446 | ac_cv_have_x="have_x=no" | |
5447 | else | |
5448 | # Record where we found X for the cache. | |
5449 | ac_cv_have_x="have_x=yes \ | |
5450 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
5451 | fi | |
5452 | fi | |
5453 | fi | |
5454 | eval "$ac_cv_have_x" | |
5455 | fi # $with_x != no | |
5456 | ||
5457 | if test "$have_x" != yes; then | |
5458 | echo "$ac_t""$have_x" 1>&6 | |
5459 | no_x=yes | |
5460 | else | |
5461 | # If each of the values was on the command line, it overrides each guess. | |
5462 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
5463 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
5464 | # Update the cache value to reflect the command line values. | |
5465 | ac_cv_have_x="have_x=yes \ | |
5466 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
5467 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
5468 | fi | |
5469 | ||
5470 | # start-sanitize-sky | |
5471 | # Enable GPU2 library for MIPS simulator | |
5472 | # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given. | |
5473 | if test "${with_sim_gpu2+set}" = set; then | |
5474 | withval="$with_sim_gpu2" | |
bd5eafcd FCE |
5475 | case "${target}" in |
5476 | mips*-sky-*) | |
5477 | if test -d "${withval}" | |
5478 | then | |
f915cc91 | 5479 | LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext" |
bd5eafcd FCE |
5480 | else |
5481 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
5482 | fi ;; | |
5483 | *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2 | |
5484 | esac | |
b236defa | 5485 | fi |
75a55dc3 JM |
5486 | |
5487 | # Enable target accurate FP library | |
5488 | # Check whether --with-sim-funit or --without-sim-funit was given. | |
5489 | if test "${with_sim_funit+set}" = set; then | |
5490 | withval="$with_sim_funit" | |
5491 | case "${target}" in | |
5492 | mips*-sky-*) | |
5493 | if test -d "${withval}" | |
5494 | then | |
5495 | LIBS="${LIBS} -L${withval}/lib -lfunit" | |
5496 | else | |
5497 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
5498 | fi ;; | |
5499 | *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2 | |
5500 | esac | |
5501 | fi | |
b236defa FCE |
5502 | # end-sanitize-sky |
5503 | ||
15125484 | 5504 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 |
509b70ac | 5505 | echo "configure:5506: checking for wctype in -lw" >&5 |
15125484 JM |
5506 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
5507 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5508 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5509 | else | |
5510 | ac_save_LIBS="$LIBS" | |
5511 | LIBS="-lw $LIBS" | |
5512 | cat > conftest.$ac_ext <<EOF | |
509b70ac | 5513 | #line 5514 "configure" |
15125484 JM |
5514 | #include "confdefs.h" |
5515 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5516 | /* We use char because int might match the return type of a gcc2 | |
5517 | builtin and then its argument prototype would still apply. */ | |
5518 | char wctype(); | |
5519 | ||
5520 | int main() { | |
5521 | wctype() | |
5522 | ; return 0; } | |
5523 | EOF | |
509b70ac | 5524 | if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
15125484 JM |
5525 | rm -rf conftest* |
5526 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5527 | else | |
5528 | echo "configure: failed program was:" >&5 | |
5529 | cat conftest.$ac_ext >&5 | |
5530 | rm -rf conftest* | |
5531 | eval "ac_cv_lib_$ac_lib_var=no" | |
5532 | fi | |
5533 | rm -f conftest* | |
5534 | LIBS="$ac_save_LIBS" | |
5535 | ||
5536 | fi | |
5537 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5538 | echo "$ac_t""yes" 1>&6 | |
5539 | LIBS="$LIBS -lw" | |
5540 | else | |
5541 | echo "$ac_t""no" 1>&6 | |
5542 | fi | |
5543 | ||
5544 | ||
5436fc65 C |
5545 | |
5546 | ||
5547 | ||
5548 | ||
018d76dd | 5549 | |
c7bb1531 | 5550 | |
1d5eb137 FF |
5551 | # Begin stuff to support --enable-shared |
5552 | # Check whether --enable-shared or --disable-shared was given. | |
5553 | if test "${enable_shared+set}" = set; then | |
5554 | enableval="$enable_shared" | |
5555 | case "${enableval}" in | |
5556 | yes) shared=true ;; | |
5557 | no) shared=false ;; | |
5558 | *) shared=true ;; | |
5559 | esac | |
5560 | fi | |
5561 | ||
5562 | HLDFLAGS= | |
5563 | HLDENV= | |
5564 | # If we have shared libraries, try to set rpath reasonably. | |
5565 | if test "${shared}" = "true"; then | |
5566 | case "${host}" in | |
5567 | *-*-hpux*) | |
5568 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
5569 | ;; | |
5570 | *-*-irix5* | *-*-irix6*) | |
5571 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
5572 | ;; | |
5573 | *-*-linux*aout*) | |
5574 | ;; | |
8ddf07a2 | 5575 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
5576 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
5577 | ;; | |
5578 | *-*-solaris*) | |
5579 | HLDFLAGS='-R $(libdir)' | |
5580 | ;; | |
5581 | *-*-sysv4*) | |
5582 | 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;' | |
5583 | ;; | |
5584 | esac | |
5585 | fi | |
5586 | ||
5587 | # On SunOS, if the linker supports the -rpath option, use it to | |
5588 | # prevent ../bfd and ../opcodes from being included in the run time | |
5589 | # search path. | |
5590 | case "${host}" in | |
5591 | *-*-sunos*) | |
5592 | echo 'main () { }' > conftest.c | |
5593 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
5594 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
5595 | : | |
5596 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
5597 | : | |
5598 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
5599 | : | |
074d813d PS |
5600 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
5601 | : | |
1d5eb137 FF |
5602 | elif test "${shared}" = "true"; then |
5603 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
5604 | else | |
5605 | HLDFLAGS='-Wl,-rpath=' | |
5606 | fi | |
5607 | rm -f conftest.t conftest.c conftest | |
5608 | ;; | |
5609 | esac | |
5610 | ||
5611 | ||
5612 | # End stuff to support --enable-shared | |
5613 | ||
7c40dd08 DE |
5614 | # target_subdir is used by the testsuite to find the target libraries. |
5615 | target_subdir= | |
5616 | if test "${host}" != "${target}"; then | |
5617 | target_subdir="${target_alias}/" | |
5618 | fi | |
5619 | ||
5436fc65 | 5620 | |
5f107900 | 5621 | frags= |
5436fc65 C |
5622 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
5623 | if test ! -f ${host_makefile_frag}; then | |
5624 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
5625 | fi | |
5f107900 | 5626 | frags="$frags $host_makefile_frag" |
5436fc65 C |
5627 | |
5628 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
5629 | if test ! -f ${target_makefile_frag}; then | |
5630 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
5631 | fi | |
5f107900 | 5632 | frags="$frags $target_makefile_frag" |
5436fc65 C |
5633 | |
5634 | ||
5635 | ||
5636 | ||
5637 | ||
094fd4ae C |
5638 | hostfile=`sed -n ' |
5639 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
5640 | ' ${host_makefile_frag}` | |
5436fc65 | 5641 | |
094fd4ae C |
5642 | targetfile=`sed -n ' |
5643 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
5644 | ' ${target_makefile_frag}` | |
5436fc65 C |
5645 | |
5646 | # these really aren't orthogonal true/false values of the same condition, | |
5647 | # but shells are slow enough that I like to reuse the test conditions | |
5648 | # whenever possible | |
5649 | if test "${target}" = "${host}"; then | |
094fd4ae C |
5650 | nativefile=`sed -n ' |
5651 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
5652 | ' ${host_makefile_frag}` | |
33ef0f93 | 5653 | # else |
5436fc65 | 5654 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 5655 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
5656 | fi |
5657 | ||
094fd4ae | 5658 | |
5436fc65 C |
5659 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5660 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
5661 | # corresponding links. But we have to remove the xm.h files and tm.h | |
5662 | # files anyway, e.g. when switching from "configure host" to | |
5663 | # "configure none". | |
5664 | ||
5665 | files= | |
5666 | links= | |
5667 | rm -f xm.h | |
5668 | if test "${hostfile}" != ""; then | |
5669 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
5670 | links="${links} xm.h" | |
5671 | fi | |
5672 | rm -f tm.h | |
5673 | if test "${targetfile}" != ""; then | |
5674 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
5675 | links="${links} tm.h" | |
5676 | fi | |
5677 | rm -f nm.h | |
5678 | if test "${nativefile}" != ""; then | |
5679 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
5680 | links="${links} nm.h" | |
5681 | else | |
5682 | # A cross-only configuration. | |
5683 | files="${files} config/nm-empty.h" | |
5684 | links="${links} nm.h" | |
5685 | fi | |
5686 | # start-sanitize-gdbtk | |
99174711 | 5687 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
509b70ac | 5688 | echo "configure:5689: checking whether ln -s works" >&5 |
99174711 JM |
5689 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
5690 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5691 | else | |
5692 | rm -f conftestdata | |
5693 | if ln -s X conftestdata 2>/dev/null | |
5694 | then | |
5695 | rm -f conftestdata | |
5696 | ac_cv_prog_LN_S="ln -s" | |
5697 | else | |
5698 | ac_cv_prog_LN_S=ln | |
5699 | fi | |
5700 | fi | |
5701 | LN_S="$ac_cv_prog_LN_S" | |
5702 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
5703 | echo "$ac_t""yes" 1>&6 | |
5704 | else | |
5705 | echo "$ac_t""no" 1>&6 | |
5706 | fi | |
5436fc65 C |
5707 | |
5708 | # Make it possible to use the GUI without doing a full install | |
99174711 JM |
5709 | if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then |
5710 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then | |
5711 | echo linking $srcdir/gdbtcl to gdbtcl | |
5712 | $LN_S $srcdir/gdbtcl gdbtcl | |
5713 | else | |
5714 | echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a | |
5715 | echo " " make install before you are able to run the GUI. | |
5716 | fi | |
5436fc65 C |
5717 | fi |
5718 | # end-sanitize-gdbtk | |
5719 | ||
5720 | ||
5721 | ||
3fbb8cde | 5722 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 |
509b70ac | 5723 | echo "configure:5724: checking for Cygwin32 environment" >&5 |
3fbb8cde ILT |
5724 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
5725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5726 | else | |
5727 | cat > conftest.$ac_ext <<EOF | |
509b70ac | 5728 | #line 5729 "configure" |
3fbb8cde ILT |
5729 | #include "confdefs.h" |
5730 | ||
5731 | int main() { | |
b2b1c5da | 5732 | return __CYGWIN32__; |
3fbb8cde ILT |
5733 | ; return 0; } |
5734 | EOF | |
509b70ac | 5735 | if { (eval echo configure:5736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3fbb8cde ILT |
5736 | rm -rf conftest* |
5737 | am_cv_cygwin32=yes | |
5738 | else | |
5739 | echo "configure: failed program was:" >&5 | |
5740 | cat conftest.$ac_ext >&5 | |
5741 | rm -rf conftest* | |
5742 | am_cv_cygwin32=no | |
5743 | fi | |
5744 | rm -f conftest* | |
5745 | rm -f conftest* | |
5746 | fi | |
5747 | ||
5748 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
5749 | CYGWIN32= | |
5750 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
b2b1c5da | 5751 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 |
509b70ac | 5752 | echo "configure:5753: checking for Mingw32 environment" >&5 |
b2b1c5da MM |
5753 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then |
5754 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5755 | else | |
5756 | cat > conftest.$ac_ext <<EOF | |
509b70ac | 5757 | #line 5758 "configure" |
b2b1c5da MM |
5758 | #include "confdefs.h" |
5759 | ||
5760 | int main() { | |
5761 | return __MINGW32__; | |
5762 | ; return 0; } | |
5763 | EOF | |
509b70ac | 5764 | if { (eval echo configure:5765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2b1c5da MM |
5765 | rm -rf conftest* |
5766 | am_cv_mingw32=yes | |
5767 | else | |
5768 | echo "configure: failed program was:" >&5 | |
5769 | cat conftest.$ac_ext >&5 | |
5770 | rm -rf conftest* | |
5771 | am_cv_mingw32=no | |
5772 | fi | |
5773 | rm -f conftest* | |
5774 | rm -f conftest* | |
5775 | fi | |
5776 | ||
5777 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
5778 | MINGW32= | |
5779 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
5780 | ||
98fa4ade GN |
5781 | |
5782 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
509b70ac | 5783 | echo "configure:5784: checking for executable suffix" >&5 |
98fa4ade GN |
5784 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
5785 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5786 | else | |
dd600735 | 5787 | if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then |
98fa4ade GN |
5788 | am_cv_exeext=.exe |
5789 | else | |
5790 | cat > am_c_test.c << 'EOF' | |
5791 | int main() { | |
5792 | /* Nothing needed here */ | |
5793 | } | |
5794 | EOF | |
5795 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
75a55dc3 JM |
5796 | am_cv_exeext= |
5797 | for file in am_c_test.*; do | |
5798 | case $file in | |
5799 | *.c) ;; | |
5800 | *.o) ;; | |
5801 | *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; | |
5802 | esac | |
5803 | done | |
98fa4ade GN |
5804 | rm -f am_c_test* |
5805 | fi | |
5806 | ||
5807 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
5808 | fi | |
5809 | EXEEXT="" | |
5810 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
5811 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
5812 | ||
5813 | ||
5436fc65 C |
5814 | subdirs="$configdirs" |
5815 | ||
5816 | trap '' 1 2 15 | |
5817 | cat > confcache <<\EOF | |
5818 | # This file is a shell script that caches the results of configure | |
5819 | # tests run on this system so they can be shared between configure | |
5820 | # scripts and configure runs. It is not useful on other systems. | |
5821 | # If it contains results you don't want to keep, you may remove or edit it. | |
5822 | # | |
5823 | # By default, configure uses ./config.cache as the cache file, | |
5824 | # creating it if it does not exist already. You can give configure | |
5825 | # the --cache-file=FILE option to use a different cache file; that is | |
5826 | # what configure does when it calls configure scripts in | |
5827 | # subdirectories, so they share the cache. | |
5828 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
5829 | # config.status only pays attention to the cache file if you give it the | |
5830 | # --recheck option to rerun configure. | |
5831 | # | |
5832 | EOF | |
bfde4a67 SG |
5833 | # The following way of writing the cache mishandles newlines in values, |
5834 | # but we know of no workaround that is simple, portable, and efficient. | |
5835 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
5836 | # Ultrix sh set writes to stderr and can't be redirected directly, |
5837 | # and sets the high bit in the cache file unless we assign to the vars. | |
5838 | (set) 2>&1 | | |
7dc185bc | 5839 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
bfde4a67 SG |
5840 | *ac_space=\ *) |
5841 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
5842 | # turns \\\\ into \\, and sed turns \\ into \). | |
5843 | sed -n \ | |
5844 | -e "s/'/'\\\\''/g" \ | |
5845 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
5846 | ;; | |
5847 | *) | |
5848 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5849 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
5850 | ;; | |
5851 | esac >> confcache | |
5436fc65 C |
5852 | if cmp -s $cache_file confcache; then |
5853 | : | |
5854 | else | |
5855 | if test -w $cache_file; then | |
5856 | echo "updating cache $cache_file" | |
5857 | cat confcache > $cache_file | |
5858 | else | |
5859 | echo "not updating unwritable cache $cache_file" | |
5860 | fi | |
5861 | fi | |
5862 | rm -f confcache | |
5863 | ||
5864 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
5865 | ||
5866 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
5867 | # Let make expand exec_prefix. | |
5868 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5869 | ||
5870 | # Any assignment to VPATH causes Sun make to only execute | |
5871 | # the first set of double-colon rules, so remove it if not needed. | |
5872 | # If there is a colon in the path, we need to keep it. | |
5873 | if test "x$srcdir" = x.; then | |
5874 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
5875 | fi | |
5876 | ||
5877 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
5878 | ||
db210d08 | 5879 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
5880 | |
5881 | # Without the "./", some shells look in PATH for config.status. | |
5882 | : ${CONFIG_STATUS=./config.status} | |
5883 | ||
5884 | echo creating $CONFIG_STATUS | |
5885 | rm -f $CONFIG_STATUS | |
5886 | cat > $CONFIG_STATUS <<EOF | |
5887 | #! /bin/sh | |
5888 | # Generated automatically by configure. | |
5889 | # Run this file to recreate the current configuration. | |
5890 | # This directory was configured as follows, | |
5891 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
5892 | # | |
5893 | # $0 $ac_configure_args | |
5894 | # | |
5895 | # Compiler output produced by configure, useful for debugging | |
5896 | # configure, is in ./config.log if it exists. | |
5897 | ||
5898 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
5899 | for ac_option | |
5900 | do | |
5901 | case "\$ac_option" in | |
5902 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
5903 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
5904 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
5905 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
eac4afd1 | 5906 | echo "$CONFIG_STATUS generated by autoconf version 2.12.2" |
5436fc65 C |
5907 | exit 0 ;; |
5908 | -help | --help | --hel | --he | --h) | |
5909 | echo "\$ac_cs_usage"; exit 0 ;; | |
5910 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
5911 | esac | |
5912 | done | |
5913 | ||
5914 | ac_given_srcdir=$srcdir | |
5915 | ac_given_INSTALL="$INSTALL" | |
5916 | ||
0cb7d01d | 5917 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
5918 | EOF |
5919 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 5920 | |
1a7b4b7c DE |
5921 | # Protect against being on the right side of a sed subst in config.status. |
5922 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
5923 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
5924 | $ac_vpsub |
5925 | $extrasub | |
7dc185bc | 5926 | s%@SHELL@%$SHELL%g |
5436fc65 C |
5927 | s%@CFLAGS@%$CFLAGS%g |
5928 | s%@CPPFLAGS@%$CPPFLAGS%g | |
5929 | s%@CXXFLAGS@%$CXXFLAGS%g | |
5930 | s%@DEFS@%$DEFS%g | |
5931 | s%@LDFLAGS@%$LDFLAGS%g | |
5932 | s%@LIBS@%$LIBS%g | |
5933 | s%@exec_prefix@%$exec_prefix%g | |
5934 | s%@prefix@%$prefix%g | |
5935 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
5936 | s%@bindir@%$bindir%g |
5937 | s%@sbindir@%$sbindir%g | |
5938 | s%@libexecdir@%$libexecdir%g | |
5939 | s%@datadir@%$datadir%g | |
5940 | s%@sysconfdir@%$sysconfdir%g | |
5941 | s%@sharedstatedir@%$sharedstatedir%g | |
5942 | s%@localstatedir@%$localstatedir%g | |
5943 | s%@libdir@%$libdir%g | |
5944 | s%@includedir@%$includedir%g | |
5945 | s%@oldincludedir@%$oldincludedir%g | |
5946 | s%@infodir@%$infodir%g | |
5947 | s%@mandir@%$mandir%g | |
5436fc65 C |
5948 | s%@CC@%$CC%g |
5949 | s%@CPP@%$CPP%g | |
35ce4f08 | 5950 | s%@DLLTOOL@%$DLLTOOL%g |
5436fc65 C |
5951 | s%@host@%$host%g |
5952 | s%@host_alias@%$host_alias%g | |
5953 | s%@host_cpu@%$host_cpu%g | |
5954 | s%@host_vendor@%$host_vendor%g | |
5955 | s%@host_os@%$host_os%g | |
0579b53d GN |
5956 | s%@target@%$target%g |
5957 | s%@target_alias@%$target_alias%g | |
5958 | s%@target_cpu@%$target_cpu%g | |
5959 | s%@target_vendor@%$target_vendor%g | |
5960 | s%@target_os@%$target_os%g | |
5436fc65 C |
5961 | s%@build@%$build%g |
5962 | s%@build_alias@%$build_alias%g | |
5963 | s%@build_cpu@%$build_cpu%g | |
5964 | s%@build_vendor@%$build_vendor%g | |
5965 | s%@build_os@%$build_os%g | |
fcfc3c0c TT |
5966 | s%@SET_MAKE@%$SET_MAKE%g |
5967 | s%@RANLIB@%$RANLIB%g | |
5968 | s%@ALLOCA@%$ALLOCA%g | |
5969 | s%@USE_NLS@%$USE_NLS%g | |
5970 | s%@MSGFMT@%$MSGFMT%g | |
5971 | s%@GMSGFMT@%$GMSGFMT%g | |
5972 | s%@XGETTEXT@%$XGETTEXT%g | |
5973 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
5974 | s%@CATALOGS@%$CATALOGS%g | |
5975 | s%@CATOBJEXT@%$CATOBJEXT%g | |
5976 | s%@DATADIRNAME@%$DATADIRNAME%g | |
5977 | s%@GMOFILES@%$GMOFILES%g | |
5978 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
5979 | s%@INTLDEPS@%$INTLDEPS%g | |
5980 | s%@INTLLIBS@%$INTLLIBS%g | |
5981 | s%@INTLOBJS@%$INTLOBJS%g | |
5982 | s%@POFILES@%$POFILES%g | |
5983 | s%@POSUB@%$POSUB%g | |
5984 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
5985 | s%@GT_NO@%$GT_NO%g | |
5986 | s%@GT_YES@%$GT_YES%g | |
5987 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
5988 | s%@l@%$l%g | |
0579b53d GN |
5989 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
5990 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
d8efbc66 | 5991 | s%@AR@%$AR%g |
d8efbc66 FF |
5992 | s%@YACC@%$YACC%g |
5993 | s%@AWK@%$AWK%g | |
4915acad | 5994 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
0728afad FF |
5995 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
5996 | s%@MMALLOC@%$MMALLOC%g | |
2476848a | 5997 | s%@ENABLE_IDE@%$ENABLE_IDE%g |
9b119644 ILT |
5998 | s%@WIN32LIBS@%$WIN32LIBS%g |
5999 | s%@WIN32LDAPP@%$WIN32LDAPP%g | |
929db6e5 | 6000 | s%@WINDRES@%$WINDRES%g |
047465fd TT |
6001 | s%@TCL_VERSION@%$TCL_VERSION%g |
6002 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
6003 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
6004 | s%@TCL_CC@%$TCL_CC%g | |
6005 | s%@TCL_DEFS@%$TCL_DEFS%g | |
6006 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
6007 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
6008 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
6009 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
6010 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
6011 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
6012 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
6013 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
6014 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
6015 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
6016 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
6017 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
6018 | s%@TK_VERSION@%$TK_VERSION%g | |
6019 | s%@TK_DEFS@%$TK_DEFS%g | |
9b119644 | 6020 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g |
047465fd TT |
6021 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g |
6022 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
6023 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
6024 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 6025 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 6026 | s%@TKHDIR@%$TKHDIR%g |
2476848a MH |
6027 | s%@ITCLHDIR@%$ITCLHDIR%g |
6028 | s%@ITCLLIB@%$ITCLLIB%g | |
6029 | s%@TIXHDIR@%$TIXHDIR%g | |
5436fc65 | 6030 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 6031 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 6032 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 6033 | s%@X_LIBS@%$X_LIBS%g |
6bc5b2fa | 6034 | s%@TIXLIB@%$TIXLIB%g |
018d76dd | 6035 | s%@TIX_DEPS@%$TIX_DEPS%g |
b177bf84 | 6036 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
5436fc65 | 6037 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 6038 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
018d76dd | 6039 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
c7bb1531 | 6040 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g |
1d5eb137 FF |
6041 | s%@HLDFLAGS@%$HLDFLAGS%g |
6042 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 6043 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
6044 | /@host_makefile_frag@/r $host_makefile_frag |
6045 | s%@host_makefile_frag@%%g | |
6046 | /@target_makefile_frag@/r $target_makefile_frag | |
6047 | s%@target_makefile_frag@%%g | |
5f107900 | 6048 | s%@frags@%$frags%g |
99174711 | 6049 | s%@LN_S@%$LN_S%g |
3fbb8cde | 6050 | s%@EXEEXT@%$EXEEXT%g |
5436fc65 C |
6051 | s%@subdirs@%$subdirs%g |
6052 | ||
6053 | CEOF | |
6054 | EOF | |
bfde4a67 SG |
6055 | |
6056 | cat >> $CONFIG_STATUS <<\EOF | |
6057 | ||
6058 | # Split the substitutions into bite-sized pieces for seds with | |
6059 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
6060 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
6061 | ac_file=1 # Number of current file. | |
6062 | ac_beg=1 # First line for current file. | |
6063 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
6064 | ac_more_lines=: | |
6065 | ac_sed_cmds="" | |
6066 | while $ac_more_lines; do | |
6067 | if test $ac_beg -gt 1; then | |
6068 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
6069 | else | |
6070 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
6071 | fi | |
6072 | if test ! -s conftest.s$ac_file; then | |
6073 | ac_more_lines=false | |
6074 | rm -f conftest.s$ac_file | |
6075 | else | |
6076 | if test -z "$ac_sed_cmds"; then | |
6077 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
6078 | else | |
6079 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
6080 | fi | |
6081 | ac_file=`expr $ac_file + 1` | |
6082 | ac_beg=$ac_end | |
6083 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
6084 | fi | |
6085 | done | |
6086 | if test -z "$ac_sed_cmds"; then | |
6087 | ac_sed_cmds=cat | |
6088 | fi | |
6089 | EOF | |
6090 | ||
5436fc65 C |
6091 | cat >> $CONFIG_STATUS <<EOF |
6092 | ||
0cb7d01d | 6093 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
5436fc65 C |
6094 | EOF |
6095 | cat >> $CONFIG_STATUS <<\EOF | |
6096 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 6097 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 6098 | case "$ac_file" in |
bfde4a67 | 6099 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
6100 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6101 | *) ac_file_in="${ac_file}.in" ;; | |
6102 | esac | |
6103 | ||
bfde4a67 | 6104 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
6105 | |
6106 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6107 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6108 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6109 | # The file is in a subdirectory. | |
6110 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6111 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
6112 | # A "../" for each directory in $ac_dir_suffix. | |
6113 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
6114 | else | |
6115 | ac_dir_suffix= ac_dots= | |
6116 | fi | |
6117 | ||
6118 | case "$ac_given_srcdir" in | |
6119 | .) srcdir=. | |
6120 | if test -z "$ac_dots"; then top_srcdir=. | |
6121 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
6122 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
6123 | *) # Relative path. | |
6124 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
6125 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
6126 | esac | |
6127 | ||
6128 | case "$ac_given_INSTALL" in | |
6129 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6130 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6131 | esac | |
bfde4a67 | 6132 | |
5436fc65 C |
6133 | echo creating "$ac_file" |
6134 | rm -f "$ac_file" | |
6135 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
6136 | case "$ac_file" in | |
6137 | *Makefile*) ac_comsub="1i\\ | |
6138 | # $configure_input" ;; | |
6139 | *) ac_comsub= ;; | |
6140 | esac | |
bfde4a67 SG |
6141 | |
6142 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
6143 | sed -e "$ac_comsub |
6144 | s%@configure_input@%$configure_input%g | |
6145 | s%@srcdir@%$srcdir%g | |
6146 | s%@top_srcdir@%$top_srcdir%g | |
6147 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 6148 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 6149 | fi; done |
bfde4a67 | 6150 | rm -f conftest.s* |
5436fc65 | 6151 | |
db210d08 FF |
6152 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
6153 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
6154 | # | |
6155 | # ac_d sets the value in "#define NAME VALUE" lines. | |
6156 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
6157 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
6158 | ac_dC='\3' | |
6159 | ac_dD='%g' | |
6160 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
6161 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6162 | ac_uB='\([ ]\)%\1#\2define\3' | |
6163 | ac_uC=' ' | |
6164 | ac_uD='\4%g' | |
6165 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
6166 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6167 | ac_eB='$%\1#\2define\3' | |
6168 | ac_eC=' ' | |
6169 | ac_eD='%g' | |
6170 | ||
bfde4a67 SG |
6171 | if test "${CONFIG_HEADERS+set}" != set; then |
6172 | EOF | |
6173 | cat >> $CONFIG_STATUS <<EOF | |
6174 | CONFIG_HEADERS="config.h:config.in" | |
6175 | EOF | |
6176 | cat >> $CONFIG_STATUS <<\EOF | |
6177 | fi | |
db210d08 | 6178 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 6179 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 6180 | case "$ac_file" in |
bfde4a67 | 6181 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
6182 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6183 | *) ac_file_in="${ac_file}.in" ;; | |
6184 | esac | |
6185 | ||
6186 | echo creating $ac_file | |
6187 | ||
6188 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
6189 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
6190 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
6191 | |
6192 | EOF | |
6193 | ||
6194 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
6195 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 6196 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
6197 | # Protect against being in an unquoted here document in config.status. |
6198 | rm -f conftest.vals | |
6199 | cat > conftest.hdr <<\EOF | |
6200 | s/[\\&%]/\\&/g | |
6201 | s%[\\$`]%\\&%g | |
bc859e63 | 6202 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
6203 | s%ac_d%ac_u%gp |
6204 | s%ac_u%ac_e%gp | |
6205 | EOF | |
6206 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
6207 | rm -f conftest.hdr | |
6208 | ||
6209 | # This sed command replaces #undef with comments. This is necessary, for | |
6210 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
6211 | # on some systems where configure will not decide to define it. | |
6212 | cat >> conftest.vals <<\EOF | |
6213 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
6214 | EOF | |
6215 | ||
6216 | # Break up conftest.vals because some shells have a limit on | |
6217 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
6218 | |
6219 | rm -f conftest.tail | |
6220 | while : | |
6221 | do | |
6222 | ac_lines=`grep -c . conftest.vals` | |
6223 | # grep -c gives empty output for an empty file on some AIX systems. | |
6224 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
6225 | # Write a limited-size here document to conftest.frag. | |
6226 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
6227 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
6228 | echo 'CEOF | |
6229 | sed -f conftest.frag conftest.in > conftest.out | |
6230 | rm -f conftest.in | |
6231 | mv conftest.out conftest.in | |
6232 | ' >> $CONFIG_STATUS | |
6233 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
6234 | rm -f conftest.vals | |
6235 | mv conftest.tail conftest.vals | |
6236 | done | |
6237 | rm -f conftest.vals | |
6238 | ||
6239 | cat >> $CONFIG_STATUS <<\EOF | |
6240 | rm -f conftest.frag conftest.h | |
6241 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
6242 | cat conftest.in >> conftest.h | |
6243 | rm -f conftest.in | |
6244 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
6245 | echo "$ac_file is unchanged" | |
6246 | rm -f conftest.h | |
6247 | else | |
bc859e63 SG |
6248 | # Remove last slash and all that follows it. Not all systems have dirname. |
6249 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6250 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6251 | # The file is in a subdirectory. | |
6252 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6253 | fi | |
db210d08 FF |
6254 | rm -f $ac_file |
6255 | mv conftest.h $ac_file | |
6256 | fi | |
6257 | fi; done | |
6258 | ||
5436fc65 C |
6259 | EOF |
6260 | ||
6261 | cat >> $CONFIG_STATUS <<EOF | |
6262 | ac_sources="$files" | |
6263 | ac_dests="$links" | |
6264 | EOF | |
6265 | ||
6266 | cat >> $CONFIG_STATUS <<\EOF | |
6267 | srcdir=$ac_given_srcdir | |
6268 | while test -n "$ac_sources"; do | |
6269 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
6270 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
6271 | ||
6272 | echo "linking $srcdir/$ac_source to $ac_dest" | |
6273 | ||
6274 | if test ! -r $srcdir/$ac_source; then | |
6275 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
6276 | fi | |
6277 | rm -f $ac_dest | |
6278 | ||
6279 | # Make relative symlinks. | |
6280 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6281 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
6282 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
6283 | # The dest file is in a subdirectory. | |
6284 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
6285 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
6286 | # A "../" for each directory in $ac_dest_dir_suffix. | |
6287 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
6288 | else | |
6289 | ac_dest_dir_suffix= ac_dots= | |
6290 | fi | |
6291 | ||
6292 | case "$srcdir" in | |
6293 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
6294 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
6295 | esac | |
6296 | ||
6297 | # Make a symlink if possible; otherwise try a hard link. | |
6298 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
6299 | ln $srcdir/$ac_source $ac_dest; then : | |
6300 | else | |
6301 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
6302 | fi | |
6303 | done | |
0a5a1821 C |
6304 | EOF |
6305 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 6306 | |
0a5a1821 C |
6307 | gdb_host_cpu=$gdb_host_cpu |
6308 | gdb_target_cpu=$gdb_target_cpu | |
6309 | nativefile=$nativefile | |
6310 | ||
6311 | EOF | |
6312 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
6313 | |
6314 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 6315 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
6316 | < Makefile > Makefile.tem |
6317 | mv -f Makefile.tem Makefile | |
6318 | fi | |
6319 | ||
6320 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
6321 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
6322 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
6323 | mv -f Makefile.tmp Makefile | |
6324 | ||
31520669 | 6325 | case x$CONFIG_HEADERS in |
18ea4416 | 6326 | xconfig.h:config.in) |
31520669 FF |
6327 | echo > stamp-h ;; |
6328 | esac | |
6329 | ||
5436fc65 C |
6330 | exit 0 |
6331 | EOF | |
6332 | chmod +x $CONFIG_STATUS | |
6333 | rm -fr confdefs* $ac_clean_files | |
6334 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
6335 | ||
6336 | if test "$no_recursion" != yes; then | |
6337 | ||
6338 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
6339 | ac_sub_configure_args= | |
6340 | ac_prev= | |
6341 | for ac_arg in $ac_configure_args; do | |
6342 | if test -n "$ac_prev"; then | |
6343 | ac_prev= | |
6344 | continue | |
6345 | fi | |
6346 | case "$ac_arg" in | |
6347 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6348 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6349 | ac_prev=cache_file ;; | |
6350 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6351 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
6352 | ;; | |
6353 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6354 | ac_prev=srcdir ;; | |
6355 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6356 | ;; | |
6357 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
6358 | esac | |
6359 | done | |
6360 | ||
6361 | for ac_config_dir in $configdirs; do | |
6362 | ||
6363 | # Do not complain, so a configure script can configure whichever | |
6364 | # parts of a large source tree are present. | |
6365 | if test ! -d $srcdir/$ac_config_dir; then | |
6366 | continue | |
6367 | fi | |
6368 | ||
6369 | echo configuring in $ac_config_dir | |
6370 | ||
6371 | case "$srcdir" in | |
6372 | .) ;; | |
6373 | *) | |
6374 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
6375 | else | |
6376 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
6377 | fi | |
6378 | ;; | |
6379 | esac | |
6380 | ||
6381 | ac_popdir=`pwd` | |
6382 | cd $ac_config_dir | |
6383 | ||
bfde4a67 SG |
6384 | # A "../" for each directory in /$ac_config_dir. |
6385 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
6386 | ||
5436fc65 C |
6387 | case "$srcdir" in |
6388 | .) # No --srcdir option. We are building in place. | |
6389 | ac_sub_srcdir=$srcdir ;; | |
6390 | /*) # Absolute path. | |
6391 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
6392 | *) # Relative path. | |
bfde4a67 | 6393 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
6394 | esac |
6395 | ||
6396 | # Check for guested configure; otherwise get Cygnus style configure. | |
6397 | if test -f $ac_sub_srcdir/configure; then | |
6398 | ac_sub_configure=$ac_sub_srcdir/configure | |
6399 | elif test -f $ac_sub_srcdir/configure.in; then | |
6400 | ac_sub_configure=$ac_configure | |
6401 | else | |
6402 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
6403 | ac_sub_configure= | |
6404 | fi | |
6405 | ||
6406 | # The recursion is here. | |
6407 | if test -n "$ac_sub_configure"; then | |
6408 | ||
6409 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
6410 | case "$cache_file" in |
6411 | /*) ac_sub_cache_file=$cache_file ;; | |
6412 | *) # Relative path. | |
6413 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
6414 | esac | |
6415 | case "$ac_given_INSTALL" in | |
6416 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6417 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6418 | esac | |
6419 | ||
6420 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
6421 | # The eval makes quoting arguments work. | |
6422 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
6423 | then : | |
6424 | else | |
6425 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
6426 | fi | |
6427 | fi | |
6428 | ||
6429 | cd $ac_popdir | |
6430 | done | |
6431 | fi | |
6432 | ||
5e711e7f PS |
6433 | |
6434 | exit 0 | |
b7f3b6d5 | 6435 |