]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --disable-nls do not use Native Language Support" | |
16 | ac_help="$ac_help | |
17 | --with-included-gettext use the GNU gettext library included here" | |
96baa820 JM |
18 | ac_help="$ac_help |
19 | --enable-multi-ice Build the multi-ice-gdb-server" | |
fb40c209 AC |
20 | ac_help="$ac_help |
21 | --enable-gdbmi Enable GDB-MI interface" | |
c906108c SS |
22 | ac_help="$ac_help |
23 | --enable-tui Enable full-screen terminal user interface" | |
24 | ac_help="$ac_help | |
25 | --enable-netrom Enable NetROM support" | |
26 | ac_help="$ac_help | |
27 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
28 | ac_help="$ac_help | |
29 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
30 | ac_help="$ac_help |
31 | --with-cpu=CPU Set the default CPU variant to debug" | |
32 | ac_help="$ac_help | |
33 | --enable-gdbtk Enable GDBTK GUI front end" | |
34 | ac_help="$ac_help | |
35 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
36 | ac_help="$ac_help | |
37 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
38 | ac_help="$ac_help | |
39 | --with-tclinclude=DIR Directory where tcl private headers are" | |
40 | ac_help="$ac_help | |
41 | --with-tkinclude=DIR Directory where tk private headers are" | |
42 | ac_help="$ac_help | |
43 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
44 | ac_help="$ac_help | |
45 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
46 | ac_help="$ac_help | |
47 | --with-tixconfig Directory containing tix configuration (tixConfig.sh)" | |
c906108c SS |
48 | ac_help="$ac_help |
49 | --with-x use the X Window System" | |
7a292a7a SS |
50 | ac_help="$ac_help |
51 | --enable-sim Link gdb with simulator" | |
c906108c SS |
52 | ac_help="$ac_help |
53 | --enable-shared Use shared libraries" | |
54 | ||
55 | # Initialize some variables set by options. | |
56 | # The variables have the same names as the options, with | |
57 | # dashes changed to underlines. | |
58 | build=NONE | |
59 | cache_file=./config.cache | |
60 | exec_prefix=NONE | |
61 | host=NONE | |
62 | no_create= | |
63 | nonopt=NONE | |
64 | no_recursion= | |
65 | prefix=NONE | |
66 | program_prefix=NONE | |
67 | program_suffix=NONE | |
68 | program_transform_name=s,x,x, | |
69 | silent= | |
70 | site= | |
379d6434 | 71 | sitefile= |
c906108c SS |
72 | srcdir= |
73 | target=NONE | |
74 | verbose= | |
75 | x_includes=NONE | |
76 | x_libraries=NONE | |
77 | bindir='${exec_prefix}/bin' | |
78 | sbindir='${exec_prefix}/sbin' | |
79 | libexecdir='${exec_prefix}/libexec' | |
80 | datadir='${prefix}/share' | |
81 | sysconfdir='${prefix}/etc' | |
82 | sharedstatedir='${prefix}/com' | |
83 | localstatedir='${prefix}/var' | |
84 | libdir='${exec_prefix}/lib' | |
85 | includedir='${prefix}/include' | |
86 | oldincludedir='/usr/include' | |
87 | infodir='${prefix}/info' | |
88 | mandir='${prefix}/man' | |
89 | ||
90 | # Initialize some other variables. | |
91 | subdirs= | |
92 | MFLAGS= MAKEFLAGS= | |
93 | SHELL=${CONFIG_SHELL-/bin/sh} | |
94 | # Maximum number of lines to put in a shell here document. | |
95 | ac_max_here_lines=12 | |
96 | ||
97 | ac_prev= | |
98 | for ac_option | |
99 | do | |
100 | ||
101 | # If the previous option needs an argument, assign it. | |
102 | if test -n "$ac_prev"; then | |
103 | eval "$ac_prev=\$ac_option" | |
104 | ac_prev= | |
105 | continue | |
106 | fi | |
107 | ||
108 | case "$ac_option" in | |
109 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
110 | *) ac_optarg= ;; | |
111 | esac | |
112 | ||
113 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
114 | ||
115 | case "$ac_option" in | |
116 | ||
117 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
118 | ac_prev=bindir ;; | |
119 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
120 | bindir="$ac_optarg" ;; | |
121 | ||
122 | -build | --build | --buil | --bui | --bu) | |
123 | ac_prev=build ;; | |
124 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
125 | build="$ac_optarg" ;; | |
126 | ||
127 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
128 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
129 | ac_prev=cache_file ;; | |
130 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
131 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
132 | cache_file="$ac_optarg" ;; | |
133 | ||
134 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
135 | ac_prev=datadir ;; | |
136 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
137 | | --da=*) | |
138 | datadir="$ac_optarg" ;; | |
139 | ||
140 | -disable-* | --disable-*) | |
141 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
142 | # Reject names that are not valid shell variable names. | |
143 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
144 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
145 | fi | |
146 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
147 | eval "enable_${ac_feature}=no" ;; | |
148 | ||
149 | -enable-* | --enable-*) | |
150 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
151 | # Reject names that are not valid shell variable names. | |
152 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
153 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
154 | fi | |
155 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
156 | case "$ac_option" in | |
157 | *=*) ;; | |
158 | *) ac_optarg=yes ;; | |
159 | esac | |
160 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
161 | ||
162 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
163 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
164 | | --exec | --exe | --ex) | |
165 | ac_prev=exec_prefix ;; | |
166 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
167 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
168 | | --exec=* | --exe=* | --ex=*) | |
169 | exec_prefix="$ac_optarg" ;; | |
170 | ||
171 | -gas | --gas | --ga | --g) | |
172 | # Obsolete; use --with-gas. | |
173 | with_gas=yes ;; | |
174 | ||
175 | -help | --help | --hel | --he) | |
176 | # Omit some internal or obsolete options to make the list less imposing. | |
177 | # This message is too long to be a string in the A/UX 3.1 sh. | |
178 | cat << EOF | |
179 | Usage: configure [options] [host] | |
180 | Options: [defaults in brackets after descriptions] | |
181 | Configuration: | |
182 | --cache-file=FILE cache test results in FILE | |
183 | --help print this message | |
184 | --no-create do not create output files | |
185 | --quiet, --silent do not print \`checking...' messages | |
379d6434 | 186 | --site-file=FILE use FILE as the site file |
c906108c SS |
187 | --version print the version of autoconf that created configure |
188 | Directory and file names: | |
189 | --prefix=PREFIX install architecture-independent files in PREFIX | |
190 | [$ac_default_prefix] | |
191 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
192 | [same as prefix] | |
193 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
194 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
195 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
196 | --datadir=DIR read-only architecture-independent data in DIR | |
197 | [PREFIX/share] | |
198 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
199 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
200 | [PREFIX/com] | |
201 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
202 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
203 | --includedir=DIR C header files in DIR [PREFIX/include] | |
204 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
205 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
206 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
207 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
208 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
209 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
210 | --program-transform-name=PROGRAM | |
211 | run sed PROGRAM on installed program names | |
212 | EOF | |
213 | cat << EOF | |
214 | Host type: | |
215 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
216 | --host=HOST configure for HOST [guessed] | |
217 | --target=TARGET configure for TARGET [TARGET=HOST] | |
218 | Features and packages: | |
219 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
220 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
221 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
222 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
223 | --x-includes=DIR X include files are in DIR | |
224 | --x-libraries=DIR X library files are in DIR | |
225 | EOF | |
226 | if test -n "$ac_help"; then | |
227 | echo "--enable and --with options recognized:$ac_help" | |
228 | fi | |
229 | exit 0 ;; | |
230 | ||
231 | -host | --host | --hos | --ho) | |
232 | ac_prev=host ;; | |
233 | -host=* | --host=* | --hos=* | --ho=*) | |
234 | host="$ac_optarg" ;; | |
235 | ||
236 | -includedir | --includedir | --includedi | --included | --include \ | |
237 | | --includ | --inclu | --incl | --inc) | |
238 | ac_prev=includedir ;; | |
239 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
240 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
241 | includedir="$ac_optarg" ;; | |
242 | ||
243 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
244 | ac_prev=infodir ;; | |
245 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
246 | infodir="$ac_optarg" ;; | |
247 | ||
248 | -libdir | --libdir | --libdi | --libd) | |
249 | ac_prev=libdir ;; | |
250 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
251 | libdir="$ac_optarg" ;; | |
252 | ||
253 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
254 | | --libexe | --libex | --libe) | |
255 | ac_prev=libexecdir ;; | |
256 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
257 | | --libexe=* | --libex=* | --libe=*) | |
258 | libexecdir="$ac_optarg" ;; | |
259 | ||
260 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
261 | | --localstate | --localstat | --localsta | --localst \ | |
262 | | --locals | --local | --loca | --loc | --lo) | |
263 | ac_prev=localstatedir ;; | |
264 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
265 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
266 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
267 | localstatedir="$ac_optarg" ;; | |
268 | ||
269 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
270 | ac_prev=mandir ;; | |
271 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
272 | mandir="$ac_optarg" ;; | |
273 | ||
274 | -nfp | --nfp | --nf) | |
275 | # Obsolete; use --without-fp. | |
276 | with_fp=no ;; | |
277 | ||
278 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
279 | | --no-cr | --no-c) | |
280 | no_create=yes ;; | |
281 | ||
282 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
283 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
284 | no_recursion=yes ;; | |
285 | ||
286 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
287 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
288 | | --oldin | --oldi | --old | --ol | --o) | |
289 | ac_prev=oldincludedir ;; | |
290 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
291 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
292 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
293 | oldincludedir="$ac_optarg" ;; | |
294 | ||
295 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
296 | ac_prev=prefix ;; | |
297 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
298 | prefix="$ac_optarg" ;; | |
299 | ||
300 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
301 | | --program-pre | --program-pr | --program-p) | |
302 | ac_prev=program_prefix ;; | |
303 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
304 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
305 | program_prefix="$ac_optarg" ;; | |
306 | ||
307 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
308 | | --program-suf | --program-su | --program-s) | |
309 | ac_prev=program_suffix ;; | |
310 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
311 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
312 | program_suffix="$ac_optarg" ;; | |
313 | ||
314 | -program-transform-name | --program-transform-name \ | |
315 | | --program-transform-nam | --program-transform-na \ | |
316 | | --program-transform-n | --program-transform- \ | |
317 | | --program-transform | --program-transfor \ | |
318 | | --program-transfo | --program-transf \ | |
319 | | --program-trans | --program-tran \ | |
320 | | --progr-tra | --program-tr | --program-t) | |
321 | ac_prev=program_transform_name ;; | |
322 | -program-transform-name=* | --program-transform-name=* \ | |
323 | | --program-transform-nam=* | --program-transform-na=* \ | |
324 | | --program-transform-n=* | --program-transform-=* \ | |
325 | | --program-transform=* | --program-transfor=* \ | |
326 | | --program-transfo=* | --program-transf=* \ | |
327 | | --program-trans=* | --program-tran=* \ | |
328 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
329 | program_transform_name="$ac_optarg" ;; | |
330 | ||
331 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
332 | | -silent | --silent | --silen | --sile | --sil) | |
333 | silent=yes ;; | |
334 | ||
335 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
336 | ac_prev=sbindir ;; | |
337 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
338 | | --sbi=* | --sb=*) | |
339 | sbindir="$ac_optarg" ;; | |
340 | ||
341 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
342 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
343 | | --sharedst | --shareds | --shared | --share | --shar \ | |
344 | | --sha | --sh) | |
345 | ac_prev=sharedstatedir ;; | |
346 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
347 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
348 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
349 | | --sha=* | --sh=*) | |
350 | sharedstatedir="$ac_optarg" ;; | |
351 | ||
352 | -site | --site | --sit) | |
353 | ac_prev=site ;; | |
354 | -site=* | --site=* | --sit=*) | |
355 | site="$ac_optarg" ;; | |
356 | ||
379d6434 AC |
357 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
358 | ac_prev=sitefile ;; | |
359 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
360 | sitefile="$ac_optarg" ;; | |
361 | ||
c906108c SS |
362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
363 | ac_prev=srcdir ;; | |
364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
365 | srcdir="$ac_optarg" ;; | |
366 | ||
367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
368 | | --syscon | --sysco | --sysc | --sys | --sy) | |
369 | ac_prev=sysconfdir ;; | |
370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
372 | sysconfdir="$ac_optarg" ;; | |
373 | ||
374 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
375 | ac_prev=target ;; | |
376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
377 | target="$ac_optarg" ;; | |
378 | ||
379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
380 | verbose=yes ;; | |
381 | ||
382 | -version | --version | --versio | --versi | --vers) | |
383 | echo "configure generated by autoconf version 2.13" | |
384 | exit 0 ;; | |
385 | ||
386 | -with-* | --with-*) | |
387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
388 | # Reject names that are not valid shell variable names. | |
389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
391 | fi | |
392 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
393 | case "$ac_option" in | |
394 | *=*) ;; | |
395 | *) ac_optarg=yes ;; | |
396 | esac | |
397 | eval "with_${ac_package}='$ac_optarg'" ;; | |
398 | ||
399 | -without-* | --without-*) | |
400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
401 | # Reject names that are not valid shell variable names. | |
402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
404 | fi | |
405 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
406 | eval "with_${ac_package}=no" ;; | |
407 | ||
408 | --x) | |
409 | # Obsolete; use --with-x. | |
410 | with_x=yes ;; | |
411 | ||
412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
413 | | --x-incl | --x-inc | --x-in | --x-i) | |
414 | ac_prev=x_includes ;; | |
415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
417 | x_includes="$ac_optarg" ;; | |
418 | ||
419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
421 | ac_prev=x_libraries ;; | |
422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
424 | x_libraries="$ac_optarg" ;; | |
425 | ||
426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
427 | ;; | |
428 | ||
429 | *) | |
430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
432 | fi | |
433 | if test "x$nonopt" != xNONE; then | |
434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
435 | fi | |
436 | nonopt="$ac_option" | |
437 | ;; | |
438 | ||
439 | esac | |
440 | done | |
441 | ||
442 | if test -n "$ac_prev"; then | |
443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
444 | fi | |
445 | ||
446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
447 | ||
448 | # File descriptor usage: | |
449 | # 0 standard input | |
450 | # 1 file creation | |
451 | # 2 errors and warnings | |
452 | # 3 some systems may open it to /dev/tty | |
453 | # 4 used on the Kubota Titan | |
454 | # 6 checking for... messages and results | |
455 | # 5 compiler messages saved in config.log | |
456 | if test "$silent" = yes; then | |
457 | exec 6>/dev/null | |
458 | else | |
459 | exec 6>&1 | |
460 | fi | |
461 | exec 5>./config.log | |
462 | ||
463 | echo "\ | |
464 | This file contains any messages produced by compilers while | |
465 | running configure, to aid debugging if configure makes a mistake. | |
466 | " 1>&5 | |
467 | ||
468 | # Strip out --no-create and --no-recursion so they do not pile up. | |
469 | # Also quote any args containing shell metacharacters. | |
470 | ac_configure_args= | |
471 | for ac_arg | |
472 | do | |
473 | case "$ac_arg" in | |
474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
475 | | --no-cr | --no-c) ;; | |
476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
481 | esac | |
482 | done | |
483 | ||
484 | # NLS nuisances. | |
485 | # Only set these to C if already set. These must not be set unconditionally | |
486 | # because not all systems understand e.g. LANG=C (notably SCO). | |
487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
488 | # Non-C LC_CTYPE values break the ctype check. | |
489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
493 | ||
494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
495 | rm -rf conftest* confdefs.h | |
496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
497 | echo > confdefs.h | |
498 | ||
499 | # A filename unique to this package, relative to the directory that | |
500 | # configure is in, which we can look for to find out if srcdir is correct. | |
501 | ac_unique_file=main.c | |
502 | ||
503 | # Find the source files, if location was not specified. | |
504 | if test -z "$srcdir"; then | |
505 | ac_srcdir_defaulted=yes | |
506 | # Try the directory containing this script, then its parent. | |
507 | ac_prog=$0 | |
508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
510 | srcdir=$ac_confdir | |
511 | if test ! -r $srcdir/$ac_unique_file; then | |
512 | srcdir=.. | |
513 | fi | |
514 | else | |
515 | ac_srcdir_defaulted=no | |
516 | fi | |
517 | if test ! -r $srcdir/$ac_unique_file; then | |
518 | if test "$ac_srcdir_defaulted" = yes; then | |
519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
520 | else | |
521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
522 | fi | |
523 | fi | |
524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
525 | ||
526 | # Prefer explicitly selected file to automatically selected ones. | |
379d6434 AC |
527 | if test -z "$sitefile"; then |
528 | if test -z "$CONFIG_SITE"; then | |
529 | if test "x$prefix" != xNONE; then | |
530 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
531 | else | |
532 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
533 | fi | |
c906108c | 534 | fi |
379d6434 AC |
535 | else |
536 | CONFIG_SITE="$sitefile" | |
c906108c SS |
537 | fi |
538 | for ac_site_file in $CONFIG_SITE; do | |
539 | if test -r "$ac_site_file"; then | |
540 | echo "loading site script $ac_site_file" | |
541 | . "$ac_site_file" | |
542 | fi | |
543 | done | |
544 | ||
545 | if test -r "$cache_file"; then | |
546 | echo "loading cache $cache_file" | |
547 | . $cache_file | |
548 | else | |
549 | echo "creating cache $cache_file" | |
550 | > $cache_file | |
551 | fi | |
552 | ||
553 | ac_ext=c | |
554 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
555 | ac_cpp='$CPP $CPPFLAGS' | |
556 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
557 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
558 | cross_compiling=$ac_cv_prog_cc_cross | |
559 | ||
560 | ac_exeext= | |
561 | ac_objext=o | |
562 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
563 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
564 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
565 | ac_n= ac_c=' | |
566 | ' ac_t=' ' | |
567 | else | |
568 | ac_n=-n ac_c= ac_t= | |
569 | fi | |
570 | else | |
571 | ac_n= ac_c='\c' ac_t= | |
572 | fi | |
573 | ||
574 | ||
575 | ||
576 | ||
577 | # Extract the first word of "gcc", so it can be a program name with args. | |
578 | set dummy gcc; ac_word=$2 | |
579 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 580 | echo "configure:581: checking for $ac_word" >&5 |
c906108c SS |
581 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
583 | else | |
584 | if test -n "$CC"; then | |
585 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
586 | else | |
587 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
588 | ac_dummy="$PATH" | |
589 | for ac_dir in $ac_dummy; do | |
590 | test -z "$ac_dir" && ac_dir=. | |
591 | if test -f $ac_dir/$ac_word; then | |
592 | ac_cv_prog_CC="gcc" | |
593 | break | |
594 | fi | |
595 | done | |
596 | IFS="$ac_save_ifs" | |
597 | fi | |
598 | fi | |
599 | CC="$ac_cv_prog_CC" | |
600 | if test -n "$CC"; then | |
601 | echo "$ac_t""$CC" 1>&6 | |
602 | else | |
603 | echo "$ac_t""no" 1>&6 | |
604 | fi | |
605 | ||
606 | if test -z "$CC"; then | |
607 | # Extract the first word of "cc", so it can be a program name with args. | |
608 | set dummy cc; ac_word=$2 | |
609 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 610 | echo "configure:611: checking for $ac_word" >&5 |
c906108c SS |
611 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
613 | else | |
614 | if test -n "$CC"; then | |
615 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
616 | else | |
617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
618 | ac_prog_rejected=no | |
619 | ac_dummy="$PATH" | |
620 | for ac_dir in $ac_dummy; do | |
621 | test -z "$ac_dir" && ac_dir=. | |
622 | if test -f $ac_dir/$ac_word; then | |
623 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
624 | ac_prog_rejected=yes | |
625 | continue | |
626 | fi | |
627 | ac_cv_prog_CC="cc" | |
628 | break | |
629 | fi | |
630 | done | |
631 | IFS="$ac_save_ifs" | |
632 | if test $ac_prog_rejected = yes; then | |
633 | # We found a bogon in the path, so make sure we never use it. | |
634 | set dummy $ac_cv_prog_CC | |
635 | shift | |
636 | if test $# -gt 0; then | |
637 | # We chose a different compiler from the bogus one. | |
638 | # However, it has the same basename, so the bogon will be chosen | |
639 | # first if we set CC to just the basename; use the full file name. | |
640 | shift | |
641 | set dummy "$ac_dir/$ac_word" "$@" | |
642 | shift | |
643 | ac_cv_prog_CC="$@" | |
644 | fi | |
645 | fi | |
646 | fi | |
647 | fi | |
648 | CC="$ac_cv_prog_CC" | |
649 | if test -n "$CC"; then | |
650 | echo "$ac_t""$CC" 1>&6 | |
651 | else | |
652 | echo "$ac_t""no" 1>&6 | |
653 | fi | |
654 | ||
655 | if test -z "$CC"; then | |
656 | case "`uname -s`" in | |
657 | *win32* | *WIN32*) | |
658 | # Extract the first word of "cl", so it can be a program name with args. | |
659 | set dummy cl; ac_word=$2 | |
660 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 661 | echo "configure:662: checking for $ac_word" >&5 |
c906108c SS |
662 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
663 | echo $ac_n "(cached) $ac_c" 1>&6 | |
664 | else | |
665 | if test -n "$CC"; then | |
666 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
667 | else | |
668 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
669 | ac_dummy="$PATH" | |
670 | for ac_dir in $ac_dummy; do | |
671 | test -z "$ac_dir" && ac_dir=. | |
672 | if test -f $ac_dir/$ac_word; then | |
673 | ac_cv_prog_CC="cl" | |
674 | break | |
675 | fi | |
676 | done | |
677 | IFS="$ac_save_ifs" | |
678 | fi | |
679 | fi | |
680 | CC="$ac_cv_prog_CC" | |
681 | if test -n "$CC"; then | |
682 | echo "$ac_t""$CC" 1>&6 | |
683 | else | |
684 | echo "$ac_t""no" 1>&6 | |
685 | fi | |
686 | ;; | |
687 | esac | |
688 | fi | |
689 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
690 | fi | |
691 | ||
692 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
379d6434 | 693 | echo "configure:694: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
694 | |
695 | ac_ext=c | |
696 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
697 | ac_cpp='$CPP $CPPFLAGS' | |
698 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
699 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
700 | cross_compiling=$ac_cv_prog_cc_cross | |
701 | ||
702 | cat > conftest.$ac_ext << EOF | |
703 | ||
379d6434 | 704 | #line 705 "configure" |
c906108c SS |
705 | #include "confdefs.h" |
706 | ||
707 | main(){return(0);} | |
708 | EOF | |
379d6434 | 709 | if { (eval echo configure:710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
710 | ac_cv_prog_cc_works=yes |
711 | # If we can't run a trivial program, we are probably using a cross compiler. | |
712 | if (./conftest; exit) 2>/dev/null; then | |
713 | ac_cv_prog_cc_cross=no | |
714 | else | |
715 | ac_cv_prog_cc_cross=yes | |
716 | fi | |
717 | else | |
718 | echo "configure: failed program was:" >&5 | |
719 | cat conftest.$ac_ext >&5 | |
720 | ac_cv_prog_cc_works=no | |
721 | fi | |
722 | rm -fr conftest* | |
723 | ac_ext=c | |
724 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
725 | ac_cpp='$CPP $CPPFLAGS' | |
726 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
727 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
728 | cross_compiling=$ac_cv_prog_cc_cross | |
729 | ||
730 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
731 | if test $ac_cv_prog_cc_works = no; then | |
732 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
733 | fi | |
734 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
379d6434 | 735 | echo "configure:736: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
736 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
737 | cross_compiling=$ac_cv_prog_cc_cross | |
738 | ||
739 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
379d6434 | 740 | echo "configure:741: checking whether we are using GNU C" >&5 |
c906108c SS |
741 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
742 | echo $ac_n "(cached) $ac_c" 1>&6 | |
743 | else | |
744 | cat > conftest.c <<EOF | |
745 | #ifdef __GNUC__ | |
746 | yes; | |
747 | #endif | |
748 | EOF | |
379d6434 | 749 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
750 | ac_cv_prog_gcc=yes |
751 | else | |
752 | ac_cv_prog_gcc=no | |
753 | fi | |
754 | fi | |
755 | ||
756 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
757 | ||
758 | if test $ac_cv_prog_gcc = yes; then | |
759 | GCC=yes | |
760 | else | |
761 | GCC= | |
762 | fi | |
763 | ||
764 | ac_test_CFLAGS="${CFLAGS+set}" | |
765 | ac_save_CFLAGS="$CFLAGS" | |
766 | CFLAGS= | |
767 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
379d6434 | 768 | echo "configure:769: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
769 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
771 | else | |
772 | echo 'void f(){}' > conftest.c | |
773 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
774 | ac_cv_prog_cc_g=yes | |
775 | else | |
776 | ac_cv_prog_cc_g=no | |
777 | fi | |
778 | rm -f conftest* | |
779 | ||
780 | fi | |
781 | ||
782 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
783 | if test "$ac_test_CFLAGS" = set; then | |
784 | CFLAGS="$ac_save_CFLAGS" | |
785 | elif test $ac_cv_prog_cc_g = yes; then | |
786 | if test "$GCC" = yes; then | |
787 | CFLAGS="-g -O2" | |
788 | else | |
789 | CFLAGS="-g" | |
790 | fi | |
791 | else | |
792 | if test "$GCC" = yes; then | |
793 | CFLAGS="-O2" | |
794 | else | |
795 | CFLAGS= | |
796 | fi | |
797 | fi | |
798 | ||
799 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
379d6434 | 800 | echo "configure:801: checking how to run the C preprocessor" >&5 |
c906108c SS |
801 | # On Suns, sometimes $CPP names a directory. |
802 | if test -n "$CPP" && test -d "$CPP"; then | |
803 | CPP= | |
804 | fi | |
805 | if test -z "$CPP"; then | |
806 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
807 | echo $ac_n "(cached) $ac_c" 1>&6 | |
808 | else | |
809 | # This must be in double quotes, not single quotes, because CPP may get | |
810 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
811 | CPP="${CC-cc} -E" | |
812 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
813 | # not just through cpp. | |
814 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 815 | #line 816 "configure" |
c906108c SS |
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" | |
379d6434 | 821 | { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
822 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
823 | if test -z "$ac_err"; then | |
824 | : | |
825 | else | |
826 | echo "$ac_err" >&5 | |
827 | echo "configure: failed program was:" >&5 | |
828 | cat conftest.$ac_ext >&5 | |
829 | rm -rf conftest* | |
830 | CPP="${CC-cc} -E -traditional-cpp" | |
831 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 832 | #line 833 "configure" |
c906108c SS |
833 | #include "confdefs.h" |
834 | #include <assert.h> | |
835 | Syntax Error | |
836 | EOF | |
837 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 838 | { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
839 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
840 | if test -z "$ac_err"; then | |
841 | : | |
842 | else | |
843 | echo "$ac_err" >&5 | |
844 | echo "configure: failed program was:" >&5 | |
845 | cat conftest.$ac_ext >&5 | |
846 | rm -rf conftest* | |
847 | CPP="${CC-cc} -nologo -E" | |
848 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 849 | #line 850 "configure" |
c906108c SS |
850 | #include "confdefs.h" |
851 | #include <assert.h> | |
852 | Syntax Error | |
853 | EOF | |
854 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 855 | { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
856 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
857 | if test -z "$ac_err"; then | |
858 | : | |
859 | else | |
860 | echo "$ac_err" >&5 | |
861 | echo "configure: failed program was:" >&5 | |
862 | cat conftest.$ac_ext >&5 | |
863 | rm -rf conftest* | |
864 | CPP=/lib/cpp | |
865 | fi | |
866 | rm -f conftest* | |
867 | fi | |
868 | rm -f conftest* | |
869 | fi | |
870 | rm -f conftest* | |
871 | ac_cv_prog_CPP="$CPP" | |
872 | fi | |
873 | CPP="$ac_cv_prog_CPP" | |
874 | else | |
875 | ac_cv_prog_CPP="$CPP" | |
876 | fi | |
877 | echo "$ac_t""$CPP" 1>&6 | |
878 | ||
879 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
379d6434 | 880 | echo "configure:881: checking for AIX" >&5 |
c906108c | 881 | cat > conftest.$ac_ext <<EOF |
379d6434 | 882 | #line 883 "configure" |
c906108c SS |
883 | #include "confdefs.h" |
884 | #ifdef _AIX | |
885 | yes | |
886 | #endif | |
887 | ||
888 | EOF | |
889 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
890 | egrep "yes" >/dev/null 2>&1; then | |
891 | rm -rf conftest* | |
892 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
893 | #define _ALL_SOURCE 1 | |
894 | EOF | |
895 | ||
896 | else | |
897 | rm -rf conftest* | |
898 | echo "$ac_t""no" 1>&6 | |
899 | fi | |
900 | rm -f conftest* | |
901 | ||
902 | ||
903 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
379d6434 | 904 | echo "configure:905: checking for POSIXized ISC" >&5 |
c906108c SS |
905 | if test -d /etc/conf/kconfig.d && |
906 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
907 | then | |
908 | echo "$ac_t""yes" 1>&6 | |
909 | ISC=yes # If later tests want to check for ISC. | |
910 | cat >> confdefs.h <<\EOF | |
911 | #define _POSIX_SOURCE 1 | |
912 | EOF | |
913 | ||
914 | if test "$GCC" = yes; then | |
915 | CC="$CC -posix" | |
916 | else | |
917 | CC="$CC -Xp" | |
918 | fi | |
919 | else | |
920 | echo "$ac_t""no" 1>&6 | |
921 | ISC= | |
922 | fi | |
923 | ||
924 | ||
925 | ||
926 | ||
927 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
379d6434 | 928 | echo "configure:929: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
929 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
931 | else | |
932 | am_cv_prog_cc_stdc=no | |
933 | ac_save_CC="$CC" | |
934 | # Don't try gcc -ansi; that turns off useful extensions and | |
935 | # breaks some systems' header files. | |
936 | # AIX -qlanglvl=ansi | |
937 | # Ultrix and OSF/1 -std1 | |
938 | # HP-UX -Aa -D_HPUX_SOURCE | |
939 | # SVR4 -Xc -D__EXTENSIONS__ | |
940 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
941 | do | |
942 | CC="$ac_save_CC $ac_arg" | |
943 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 944 | #line 945 "configure" |
c906108c SS |
945 | #include "confdefs.h" |
946 | #include <stdarg.h> | |
947 | #include <stdio.h> | |
948 | #include <sys/types.h> | |
949 | #include <sys/stat.h> | |
950 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
951 | struct buf { int x; }; | |
952 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
953 | static char *e (p, i) | |
954 | char **p; | |
955 | int i; | |
956 | { | |
957 | return p[i]; | |
958 | } | |
959 | static char *f (char * (*g) (char **, int), char **p, ...) | |
960 | { | |
961 | char *s; | |
962 | va_list v; | |
963 | va_start (v,p); | |
964 | s = g (p, va_arg (v,int)); | |
965 | va_end (v); | |
966 | return s; | |
967 | } | |
968 | int test (int i, double x); | |
969 | struct s1 {int (*f) (int a);}; | |
970 | struct s2 {int (*f) (double a);}; | |
971 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
972 | int argc; | |
973 | char **argv; | |
974 | ||
975 | int main() { | |
976 | ||
977 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
978 | ||
979 | ; return 0; } | |
980 | EOF | |
379d6434 | 981 | if { (eval echo configure:982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
982 | rm -rf conftest* |
983 | am_cv_prog_cc_stdc="$ac_arg"; break | |
984 | else | |
985 | echo "configure: failed program was:" >&5 | |
986 | cat conftest.$ac_ext >&5 | |
987 | fi | |
988 | rm -f conftest* | |
989 | done | |
990 | CC="$ac_save_CC" | |
991 | ||
992 | fi | |
993 | ||
994 | if test -z "$am_cv_prog_cc_stdc"; then | |
995 | echo "$ac_t""none needed" 1>&6 | |
996 | else | |
997 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
998 | fi | |
999 | case "x$am_cv_prog_cc_stdc" in | |
1000 | x|xno) ;; | |
1001 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1002 | esac | |
1003 | ||
1004 | ||
1005 | ac_aux_dir= | |
1006 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1007 | if test -f $ac_dir/install-sh; then | |
1008 | ac_aux_dir=$ac_dir | |
1009 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1010 | break | |
1011 | elif test -f $ac_dir/install.sh; then | |
1012 | ac_aux_dir=$ac_dir | |
1013 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1014 | break | |
1015 | fi | |
1016 | done | |
1017 | if test -z "$ac_aux_dir"; then | |
1018 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1019 | fi | |
1020 | ac_config_guess=$ac_aux_dir/config.guess | |
1021 | ac_config_sub=$ac_aux_dir/config.sub | |
1022 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1023 | ||
1024 | ||
1025 | # Do some error checking and defaulting for the host and target type. | |
1026 | # The inputs are: | |
1027 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1028 | # | |
1029 | # The rules are: | |
1030 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1031 | # same time. | |
1032 | # 2. Host defaults to nonopt. | |
1033 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1034 | # as determined by config.guess. | |
1035 | # 4. Target and build default to nonopt. | |
1036 | # 5. If nonopt is not specified, then target and build default to host. | |
1037 | ||
1038 | # The aliases save the names the user supplied, while $host etc. | |
1039 | # will get canonicalized. | |
1040 | case $host---$target---$nonopt in | |
1041 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1042 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1043 | esac | |
1044 | ||
1045 | ||
1046 | # Make sure we can run config.sub. | |
1047 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1048 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1049 | fi | |
1050 | ||
1051 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
379d6434 | 1052 | echo "configure:1053: checking host system type" >&5 |
c906108c SS |
1053 | |
1054 | host_alias=$host | |
1055 | case "$host_alias" in | |
1056 | NONE) | |
1057 | case $nonopt in | |
1058 | NONE) | |
1059 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1060 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1061 | fi ;; | |
1062 | *) host_alias=$nonopt ;; | |
1063 | esac ;; | |
1064 | esac | |
1065 | ||
1066 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1067 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1068 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1069 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1070 | echo "$ac_t""$host" 1>&6 | |
1071 | ||
1072 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
379d6434 | 1073 | echo "configure:1074: checking target system type" >&5 |
c906108c SS |
1074 | |
1075 | target_alias=$target | |
1076 | case "$target_alias" in | |
1077 | NONE) | |
1078 | case $nonopt in | |
1079 | NONE) target_alias=$host_alias ;; | |
1080 | *) target_alias=$nonopt ;; | |
1081 | esac ;; | |
1082 | esac | |
1083 | ||
1084 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1085 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1086 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1087 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1088 | echo "$ac_t""$target" 1>&6 | |
1089 | ||
1090 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
379d6434 | 1091 | echo "configure:1092: checking build system type" >&5 |
c906108c SS |
1092 | |
1093 | build_alias=$build | |
1094 | case "$build_alias" in | |
1095 | NONE) | |
1096 | case $nonopt in | |
1097 | NONE) build_alias=$host_alias ;; | |
1098 | *) build_alias=$nonopt ;; | |
1099 | esac ;; | |
1100 | esac | |
1101 | ||
1102 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1103 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1104 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1105 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1106 | echo "$ac_t""$build" 1>&6 | |
1107 | ||
1108 | test "$host_alias" != "$target_alias" && | |
1109 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1110 | NONENONEs,x,x, && | |
1111 | program_prefix=${target_alias}- | |
1112 | ||
1113 | ||
1114 | ALL_LINGUAS= | |
1115 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
379d6434 | 1116 | echo "configure:1117: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1117 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1118 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1120 | else | |
1121 | cat > conftestmake <<\EOF | |
1122 | all: | |
1123 | @echo 'ac_maketemp="${MAKE}"' | |
1124 | EOF | |
1125 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1126 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1127 | if test -n "$ac_maketemp"; then | |
1128 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1129 | else | |
1130 | eval ac_cv_prog_make_${ac_make}_set=no | |
1131 | fi | |
1132 | rm -f conftestmake | |
1133 | fi | |
1134 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1135 | echo "$ac_t""yes" 1>&6 | |
1136 | SET_MAKE= | |
1137 | else | |
1138 | echo "$ac_t""no" 1>&6 | |
1139 | SET_MAKE="MAKE=${MAKE-make}" | |
1140 | fi | |
1141 | ||
1142 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1143 | set dummy ranlib; ac_word=$2 | |
1144 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 1145 | echo "configure:1146: checking for $ac_word" >&5 |
c906108c SS |
1146 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1147 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1148 | else | |
1149 | if test -n "$RANLIB"; then | |
1150 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1151 | else | |
1152 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1153 | ac_dummy="$PATH" | |
1154 | for ac_dir in $ac_dummy; do | |
1155 | test -z "$ac_dir" && ac_dir=. | |
1156 | if test -f $ac_dir/$ac_word; then | |
1157 | ac_cv_prog_RANLIB="ranlib" | |
1158 | break | |
1159 | fi | |
1160 | done | |
1161 | IFS="$ac_save_ifs" | |
1162 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1163 | fi | |
1164 | fi | |
1165 | RANLIB="$ac_cv_prog_RANLIB" | |
1166 | if test -n "$RANLIB"; then | |
1167 | echo "$ac_t""$RANLIB" 1>&6 | |
1168 | else | |
1169 | echo "$ac_t""no" 1>&6 | |
1170 | fi | |
1171 | ||
1172 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
379d6434 | 1173 | echo "configure:1174: checking for ANSI C header files" >&5 |
c906108c SS |
1174 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1176 | else | |
1177 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1178 | #line 1179 "configure" |
c906108c SS |
1179 | #include "confdefs.h" |
1180 | #include <stdlib.h> | |
1181 | #include <stdarg.h> | |
1182 | #include <string.h> | |
1183 | #include <float.h> | |
1184 | EOF | |
1185 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 1186 | { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1187 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1188 | if test -z "$ac_err"; then | |
1189 | rm -rf conftest* | |
1190 | ac_cv_header_stdc=yes | |
1191 | else | |
1192 | echo "$ac_err" >&5 | |
1193 | echo "configure: failed program was:" >&5 | |
1194 | cat conftest.$ac_ext >&5 | |
1195 | rm -rf conftest* | |
1196 | ac_cv_header_stdc=no | |
1197 | fi | |
1198 | rm -f conftest* | |
1199 | ||
1200 | if test $ac_cv_header_stdc = yes; then | |
1201 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1202 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1203 | #line 1204 "configure" |
c906108c SS |
1204 | #include "confdefs.h" |
1205 | #include <string.h> | |
1206 | EOF | |
1207 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1208 | egrep "memchr" >/dev/null 2>&1; then | |
1209 | : | |
1210 | else | |
1211 | rm -rf conftest* | |
1212 | ac_cv_header_stdc=no | |
1213 | fi | |
1214 | rm -f conftest* | |
1215 | ||
1216 | fi | |
1217 | ||
1218 | if test $ac_cv_header_stdc = yes; then | |
1219 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1220 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1221 | #line 1222 "configure" |
c906108c SS |
1222 | #include "confdefs.h" |
1223 | #include <stdlib.h> | |
1224 | EOF | |
1225 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1226 | egrep "free" >/dev/null 2>&1; then | |
1227 | : | |
1228 | else | |
1229 | rm -rf conftest* | |
1230 | ac_cv_header_stdc=no | |
1231 | fi | |
1232 | rm -f conftest* | |
1233 | ||
1234 | fi | |
1235 | ||
1236 | if test $ac_cv_header_stdc = yes; then | |
1237 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1238 | if test "$cross_compiling" = yes; then | |
1239 | : | |
1240 | else | |
1241 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1242 | #line 1243 "configure" |
c906108c SS |
1243 | #include "confdefs.h" |
1244 | #include <ctype.h> | |
1245 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1246 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1247 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1248 | int main () { int i; for (i = 0; i < 256; i++) | |
1249 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1250 | exit (0); } | |
1251 | ||
1252 | EOF | |
379d6434 | 1253 | if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1254 | then |
1255 | : | |
1256 | else | |
1257 | echo "configure: failed program was:" >&5 | |
1258 | cat conftest.$ac_ext >&5 | |
1259 | rm -fr conftest* | |
1260 | ac_cv_header_stdc=no | |
1261 | fi | |
1262 | rm -fr conftest* | |
1263 | fi | |
1264 | ||
1265 | fi | |
1266 | fi | |
1267 | ||
1268 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1269 | if test $ac_cv_header_stdc = yes; then | |
1270 | cat >> confdefs.h <<\EOF | |
1271 | #define STDC_HEADERS 1 | |
1272 | EOF | |
1273 | ||
1274 | fi | |
1275 | ||
1276 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
379d6434 | 1277 | echo "configure:1278: checking for working const" >&5 |
c906108c SS |
1278 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1279 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1280 | else | |
1281 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1282 | #line 1283 "configure" |
c906108c SS |
1283 | #include "confdefs.h" |
1284 | ||
1285 | int main() { | |
1286 | ||
1287 | /* Ultrix mips cc rejects this. */ | |
1288 | typedef int charset[2]; const charset x; | |
1289 | /* SunOS 4.1.1 cc rejects this. */ | |
1290 | char const *const *ccp; | |
1291 | char **p; | |
1292 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1293 | struct point {int x, y;}; | |
1294 | static struct point const zero = {0,0}; | |
1295 | /* AIX XL C 1.02.0.0 rejects this. | |
1296 | It does not let you subtract one const X* pointer from another in an arm | |
1297 | of an if-expression whose if-part is not a constant expression */ | |
1298 | const char *g = "string"; | |
1299 | ccp = &g + (g ? g-g : 0); | |
1300 | /* HPUX 7.0 cc rejects these. */ | |
1301 | ++ccp; | |
1302 | p = (char**) ccp; | |
1303 | ccp = (char const *const *) p; | |
1304 | { /* SCO 3.2v4 cc rejects this. */ | |
1305 | char *t; | |
1306 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1307 | ||
1308 | *t++ = 0; | |
1309 | } | |
1310 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1311 | int x[] = {25, 17}; | |
1312 | const int *foo = &x[0]; | |
1313 | ++foo; | |
1314 | } | |
1315 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1316 | typedef const int *iptr; | |
1317 | iptr p = 0; | |
1318 | ++p; | |
1319 | } | |
1320 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1321 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1322 | struct s { int j; const int *ap[3]; }; | |
1323 | struct s *b; b->j = 5; | |
1324 | } | |
1325 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1326 | const int foo = 10; | |
1327 | } | |
1328 | ||
1329 | ; return 0; } | |
1330 | EOF | |
379d6434 | 1331 | if { (eval echo configure:1332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1332 | rm -rf conftest* |
1333 | ac_cv_c_const=yes | |
1334 | else | |
1335 | echo "configure: failed program was:" >&5 | |
1336 | cat conftest.$ac_ext >&5 | |
1337 | rm -rf conftest* | |
1338 | ac_cv_c_const=no | |
1339 | fi | |
1340 | rm -f conftest* | |
1341 | fi | |
1342 | ||
1343 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1344 | if test $ac_cv_c_const = no; then | |
1345 | cat >> confdefs.h <<\EOF | |
1346 | #define const | |
1347 | EOF | |
1348 | ||
1349 | fi | |
1350 | ||
1351 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
379d6434 | 1352 | echo "configure:1353: checking for inline" >&5 |
c906108c SS |
1353 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1355 | else | |
1356 | ac_cv_c_inline=no | |
1357 | for ac_kw in inline __inline__ __inline; do | |
1358 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1359 | #line 1360 "configure" |
c906108c SS |
1360 | #include "confdefs.h" |
1361 | ||
1362 | int main() { | |
1363 | } $ac_kw foo() { | |
1364 | ; return 0; } | |
1365 | EOF | |
379d6434 | 1366 | if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1367 | rm -rf conftest* |
1368 | ac_cv_c_inline=$ac_kw; break | |
1369 | else | |
1370 | echo "configure: failed program was:" >&5 | |
1371 | cat conftest.$ac_ext >&5 | |
1372 | fi | |
1373 | rm -f conftest* | |
1374 | done | |
1375 | ||
1376 | fi | |
1377 | ||
1378 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1379 | case "$ac_cv_c_inline" in | |
1380 | inline | yes) ;; | |
1381 | no) cat >> confdefs.h <<\EOF | |
1382 | #define inline | |
1383 | EOF | |
1384 | ;; | |
1385 | *) cat >> confdefs.h <<EOF | |
1386 | #define inline $ac_cv_c_inline | |
1387 | EOF | |
1388 | ;; | |
1389 | esac | |
1390 | ||
1391 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
379d6434 | 1392 | echo "configure:1393: checking for off_t" >&5 |
c906108c SS |
1393 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1395 | else | |
1396 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1397 | #line 1398 "configure" |
c906108c SS |
1398 | #include "confdefs.h" |
1399 | #include <sys/types.h> | |
1400 | #if STDC_HEADERS | |
1401 | #include <stdlib.h> | |
1402 | #include <stddef.h> | |
1403 | #endif | |
1404 | EOF | |
1405 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1406 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1407 | rm -rf conftest* | |
1408 | ac_cv_type_off_t=yes | |
1409 | else | |
1410 | rm -rf conftest* | |
1411 | ac_cv_type_off_t=no | |
1412 | fi | |
1413 | rm -f conftest* | |
1414 | ||
1415 | fi | |
1416 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1417 | if test $ac_cv_type_off_t = no; then | |
1418 | cat >> confdefs.h <<\EOF | |
1419 | #define off_t long | |
1420 | EOF | |
1421 | ||
1422 | fi | |
1423 | ||
1424 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
379d6434 | 1425 | echo "configure:1426: checking for size_t" >&5 |
c906108c SS |
1426 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1428 | else | |
1429 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1430 | #line 1431 "configure" |
c906108c SS |
1431 | #include "confdefs.h" |
1432 | #include <sys/types.h> | |
1433 | #if STDC_HEADERS | |
1434 | #include <stdlib.h> | |
1435 | #include <stddef.h> | |
1436 | #endif | |
1437 | EOF | |
1438 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1439 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1440 | rm -rf conftest* | |
1441 | ac_cv_type_size_t=yes | |
1442 | else | |
1443 | rm -rf conftest* | |
1444 | ac_cv_type_size_t=no | |
1445 | fi | |
1446 | rm -f conftest* | |
1447 | ||
1448 | fi | |
1449 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1450 | if test $ac_cv_type_size_t = no; then | |
1451 | cat >> confdefs.h <<\EOF | |
1452 | #define size_t unsigned | |
1453 | EOF | |
1454 | ||
1455 | fi | |
1456 | ||
1457 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1458 | # for constant arguments. Useless! | |
1459 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
379d6434 | 1460 | echo "configure:1461: checking for working alloca.h" >&5 |
c906108c SS |
1461 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1463 | else | |
1464 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1465 | #line 1466 "configure" |
c906108c SS |
1466 | #include "confdefs.h" |
1467 | #include <alloca.h> | |
1468 | int main() { | |
1469 | char *p = alloca(2 * sizeof(int)); | |
1470 | ; return 0; } | |
1471 | EOF | |
379d6434 | 1472 | if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1473 | rm -rf conftest* |
1474 | ac_cv_header_alloca_h=yes | |
1475 | else | |
1476 | echo "configure: failed program was:" >&5 | |
1477 | cat conftest.$ac_ext >&5 | |
1478 | rm -rf conftest* | |
1479 | ac_cv_header_alloca_h=no | |
1480 | fi | |
1481 | rm -f conftest* | |
1482 | fi | |
1483 | ||
1484 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1485 | if test $ac_cv_header_alloca_h = yes; then | |
1486 | cat >> confdefs.h <<\EOF | |
1487 | #define HAVE_ALLOCA_H 1 | |
1488 | EOF | |
1489 | ||
1490 | fi | |
1491 | ||
1492 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
379d6434 | 1493 | echo "configure:1494: checking for alloca" >&5 |
c906108c SS |
1494 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1495 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1496 | else | |
1497 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1498 | #line 1499 "configure" |
c906108c SS |
1499 | #include "confdefs.h" |
1500 | ||
1501 | #ifdef __GNUC__ | |
1502 | # define alloca __builtin_alloca | |
1503 | #else | |
1504 | # ifdef _MSC_VER | |
1505 | # include <malloc.h> | |
1506 | # define alloca _alloca | |
1507 | # else | |
1508 | # if HAVE_ALLOCA_H | |
1509 | # include <alloca.h> | |
1510 | # else | |
1511 | # ifdef _AIX | |
1512 | #pragma alloca | |
1513 | # else | |
1514 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1515 | char *alloca (); | |
1516 | # endif | |
1517 | # endif | |
1518 | # endif | |
1519 | # endif | |
1520 | #endif | |
1521 | ||
1522 | int main() { | |
1523 | char *p = (char *) alloca(1); | |
1524 | ; return 0; } | |
1525 | EOF | |
379d6434 | 1526 | if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1527 | rm -rf conftest* |
1528 | ac_cv_func_alloca_works=yes | |
1529 | else | |
1530 | echo "configure: failed program was:" >&5 | |
1531 | cat conftest.$ac_ext >&5 | |
1532 | rm -rf conftest* | |
1533 | ac_cv_func_alloca_works=no | |
1534 | fi | |
1535 | rm -f conftest* | |
1536 | fi | |
1537 | ||
1538 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1539 | if test $ac_cv_func_alloca_works = yes; then | |
1540 | cat >> confdefs.h <<\EOF | |
1541 | #define HAVE_ALLOCA 1 | |
1542 | EOF | |
1543 | ||
1544 | fi | |
1545 | ||
1546 | if test $ac_cv_func_alloca_works = no; then | |
1547 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1548 | # that cause trouble. Some versions do not even contain alloca or | |
1549 | # contain a buggy version. If you still want to use their alloca, | |
1550 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1551 | ALLOCA=alloca.${ac_objext} | |
1552 | cat >> confdefs.h <<\EOF | |
1553 | #define C_ALLOCA 1 | |
1554 | EOF | |
1555 | ||
1556 | ||
1557 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
379d6434 | 1558 | echo "configure:1559: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1559 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1560 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1561 | else | |
1562 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1563 | #line 1564 "configure" |
c906108c SS |
1564 | #include "confdefs.h" |
1565 | #if defined(CRAY) && ! defined(CRAY2) | |
1566 | webecray | |
1567 | #else | |
1568 | wenotbecray | |
1569 | #endif | |
1570 | ||
1571 | EOF | |
1572 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1573 | egrep "webecray" >/dev/null 2>&1; then | |
1574 | rm -rf conftest* | |
1575 | ac_cv_os_cray=yes | |
1576 | else | |
1577 | rm -rf conftest* | |
1578 | ac_cv_os_cray=no | |
1579 | fi | |
1580 | rm -f conftest* | |
1581 | ||
1582 | fi | |
1583 | ||
1584 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1585 | if test $ac_cv_os_cray = yes; then | |
1586 | for ac_func in _getb67 GETB67 getb67; do | |
1587 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
379d6434 | 1588 | echo "configure:1589: checking for $ac_func" >&5 |
c906108c SS |
1589 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1591 | else | |
1592 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1593 | #line 1594 "configure" |
c906108c SS |
1594 | #include "confdefs.h" |
1595 | /* System header to define __stub macros and hopefully few prototypes, | |
1596 | which can conflict with char $ac_func(); below. */ | |
1597 | #include <assert.h> | |
1598 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1599 | /* We use char because int might match the return type of a gcc2 | |
1600 | builtin and then its argument prototype would still apply. */ | |
1601 | char $ac_func(); | |
1602 | ||
1603 | int main() { | |
1604 | ||
1605 | /* The GNU C library defines this for functions which it implements | |
1606 | to always fail with ENOSYS. Some functions are actually named | |
1607 | something starting with __ and the normal name is an alias. */ | |
1608 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1609 | choke me | |
1610 | #else | |
1611 | $ac_func(); | |
1612 | #endif | |
1613 | ||
1614 | ; return 0; } | |
1615 | EOF | |
379d6434 | 1616 | if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1617 | rm -rf conftest* |
1618 | eval "ac_cv_func_$ac_func=yes" | |
1619 | else | |
1620 | echo "configure: failed program was:" >&5 | |
1621 | cat conftest.$ac_ext >&5 | |
1622 | rm -rf conftest* | |
1623 | eval "ac_cv_func_$ac_func=no" | |
1624 | fi | |
1625 | rm -f conftest* | |
1626 | fi | |
1627 | ||
1628 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1629 | echo "$ac_t""yes" 1>&6 | |
1630 | cat >> confdefs.h <<EOF | |
1631 | #define CRAY_STACKSEG_END $ac_func | |
1632 | EOF | |
1633 | ||
1634 | break | |
1635 | else | |
1636 | echo "$ac_t""no" 1>&6 | |
1637 | fi | |
1638 | ||
1639 | done | |
1640 | fi | |
1641 | ||
1642 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
379d6434 | 1643 | echo "configure:1644: checking stack direction for C alloca" >&5 |
c906108c SS |
1644 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1645 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1646 | else | |
1647 | if test "$cross_compiling" = yes; then | |
1648 | ac_cv_c_stack_direction=0 | |
1649 | else | |
1650 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1651 | #line 1652 "configure" |
c906108c SS |
1652 | #include "confdefs.h" |
1653 | find_stack_direction () | |
1654 | { | |
1655 | static char *addr = 0; | |
1656 | auto char dummy; | |
1657 | if (addr == 0) | |
1658 | { | |
1659 | addr = &dummy; | |
1660 | return find_stack_direction (); | |
1661 | } | |
1662 | else | |
1663 | return (&dummy > addr) ? 1 : -1; | |
1664 | } | |
1665 | main () | |
1666 | { | |
1667 | exit (find_stack_direction() < 0); | |
1668 | } | |
1669 | EOF | |
379d6434 | 1670 | if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1671 | then |
1672 | ac_cv_c_stack_direction=1 | |
1673 | else | |
1674 | echo "configure: failed program was:" >&5 | |
1675 | cat conftest.$ac_ext >&5 | |
1676 | rm -fr conftest* | |
1677 | ac_cv_c_stack_direction=-1 | |
1678 | fi | |
1679 | rm -fr conftest* | |
1680 | fi | |
1681 | ||
1682 | fi | |
1683 | ||
1684 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1685 | cat >> confdefs.h <<EOF | |
1686 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1687 | EOF | |
1688 | ||
1689 | fi | |
1690 | ||
1691 | for ac_hdr in unistd.h | |
1692 | do | |
1693 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1694 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
379d6434 | 1695 | echo "configure:1696: checking for $ac_hdr" >&5 |
c906108c SS |
1696 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1698 | else | |
1699 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1700 | #line 1701 "configure" |
c906108c SS |
1701 | #include "confdefs.h" |
1702 | #include <$ac_hdr> | |
1703 | EOF | |
1704 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 1705 | { (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1706 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1707 | if test -z "$ac_err"; then | |
1708 | rm -rf conftest* | |
1709 | eval "ac_cv_header_$ac_safe=yes" | |
1710 | else | |
1711 | echo "$ac_err" >&5 | |
1712 | echo "configure: failed program was:" >&5 | |
1713 | cat conftest.$ac_ext >&5 | |
1714 | rm -rf conftest* | |
1715 | eval "ac_cv_header_$ac_safe=no" | |
1716 | fi | |
1717 | rm -f conftest* | |
1718 | fi | |
1719 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1720 | echo "$ac_t""yes" 1>&6 | |
1721 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1722 | cat >> confdefs.h <<EOF | |
1723 | #define $ac_tr_hdr 1 | |
1724 | EOF | |
1725 | ||
1726 | else | |
1727 | echo "$ac_t""no" 1>&6 | |
1728 | fi | |
1729 | done | |
1730 | ||
1731 | for ac_func in getpagesize | |
1732 | do | |
1733 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
379d6434 | 1734 | echo "configure:1735: checking for $ac_func" >&5 |
c906108c SS |
1735 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1737 | else | |
1738 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1739 | #line 1740 "configure" |
c906108c SS |
1740 | #include "confdefs.h" |
1741 | /* System header to define __stub macros and hopefully few prototypes, | |
1742 | which can conflict with char $ac_func(); below. */ | |
1743 | #include <assert.h> | |
1744 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1745 | /* We use char because int might match the return type of a gcc2 | |
1746 | builtin and then its argument prototype would still apply. */ | |
1747 | char $ac_func(); | |
1748 | ||
1749 | int main() { | |
1750 | ||
1751 | /* The GNU C library defines this for functions which it implements | |
1752 | to always fail with ENOSYS. Some functions are actually named | |
1753 | something starting with __ and the normal name is an alias. */ | |
1754 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1755 | choke me | |
1756 | #else | |
1757 | $ac_func(); | |
1758 | #endif | |
1759 | ||
1760 | ; return 0; } | |
1761 | EOF | |
379d6434 | 1762 | if { (eval echo configure:1763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1763 | rm -rf conftest* |
1764 | eval "ac_cv_func_$ac_func=yes" | |
1765 | else | |
1766 | echo "configure: failed program was:" >&5 | |
1767 | cat conftest.$ac_ext >&5 | |
1768 | rm -rf conftest* | |
1769 | eval "ac_cv_func_$ac_func=no" | |
1770 | fi | |
1771 | rm -f conftest* | |
1772 | fi | |
1773 | ||
1774 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1775 | echo "$ac_t""yes" 1>&6 | |
1776 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1777 | cat >> confdefs.h <<EOF | |
1778 | #define $ac_tr_func 1 | |
1779 | EOF | |
1780 | ||
1781 | else | |
1782 | echo "$ac_t""no" 1>&6 | |
1783 | fi | |
1784 | done | |
1785 | ||
1786 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
379d6434 | 1787 | echo "configure:1788: checking for working mmap" >&5 |
c906108c SS |
1788 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1790 | else | |
1791 | if test "$cross_compiling" = yes; then | |
1792 | ac_cv_func_mmap_fixed_mapped=no | |
1793 | else | |
1794 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1795 | #line 1796 "configure" |
c906108c SS |
1796 | #include "confdefs.h" |
1797 | ||
1798 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1799 | Here is a matrix of mmap possibilities: | |
1800 | mmap private not fixed | |
1801 | mmap private fixed at somewhere currently unmapped | |
1802 | mmap private fixed at somewhere already mapped | |
1803 | mmap shared not fixed | |
1804 | mmap shared fixed at somewhere currently unmapped | |
1805 | mmap shared fixed at somewhere already mapped | |
1806 | For private mappings, we should verify that changes cannot be read() | |
1807 | back from the file, nor mmap's back from the file at a different | |
1808 | address. (There have been systems where private was not correctly | |
1809 | implemented like the infamous i386 svr4.0, and systems where the | |
1810 | VM page cache was not coherent with the filesystem buffer cache | |
1811 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1812 | For shared mappings, we should conversely verify that changes get | |
1813 | propogated back to all the places they're supposed to be. | |
1814 | ||
1815 | Grep wants private fixed already mapped. | |
1816 | The main things grep needs to know about mmap are: | |
1817 | * does it exist and is it safe to write into the mmap'd area | |
1818 | * how to use it (BSD variants) */ | |
1819 | #include <sys/types.h> | |
1820 | #include <fcntl.h> | |
1821 | #include <sys/mman.h> | |
1822 | ||
1823 | /* This mess was copied from the GNU getpagesize.h. */ | |
1824 | #ifndef HAVE_GETPAGESIZE | |
1825 | # ifdef HAVE_UNISTD_H | |
1826 | # include <unistd.h> | |
1827 | # endif | |
1828 | ||
1829 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1830 | # ifndef HAVE_SYS_PARAM_H | |
1831 | # define HAVE_SYS_PARAM_H 1 | |
1832 | # endif | |
1833 | ||
1834 | # ifdef _SC_PAGESIZE | |
1835 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1836 | # else /* no _SC_PAGESIZE */ | |
1837 | # ifdef HAVE_SYS_PARAM_H | |
1838 | # include <sys/param.h> | |
1839 | # ifdef EXEC_PAGESIZE | |
1840 | # define getpagesize() EXEC_PAGESIZE | |
1841 | # else /* no EXEC_PAGESIZE */ | |
1842 | # ifdef NBPG | |
1843 | # define getpagesize() NBPG * CLSIZE | |
1844 | # ifndef CLSIZE | |
1845 | # define CLSIZE 1 | |
1846 | # endif /* no CLSIZE */ | |
1847 | # else /* no NBPG */ | |
1848 | # ifdef NBPC | |
1849 | # define getpagesize() NBPC | |
1850 | # else /* no NBPC */ | |
1851 | # ifdef PAGESIZE | |
1852 | # define getpagesize() PAGESIZE | |
1853 | # endif /* PAGESIZE */ | |
1854 | # endif /* no NBPC */ | |
1855 | # endif /* no NBPG */ | |
1856 | # endif /* no EXEC_PAGESIZE */ | |
1857 | # else /* no HAVE_SYS_PARAM_H */ | |
1858 | # define getpagesize() 8192 /* punt totally */ | |
1859 | # endif /* no HAVE_SYS_PARAM_H */ | |
1860 | # endif /* no _SC_PAGESIZE */ | |
1861 | ||
1862 | #endif /* no HAVE_GETPAGESIZE */ | |
1863 | ||
1864 | #ifdef __cplusplus | |
1865 | extern "C" { void *malloc(unsigned); } | |
1866 | #else | |
1867 | char *malloc(); | |
1868 | #endif | |
1869 | ||
1870 | int | |
1871 | main() | |
1872 | { | |
1873 | char *data, *data2, *data3; | |
1874 | int i, pagesize; | |
1875 | int fd; | |
1876 | ||
1877 | pagesize = getpagesize(); | |
1878 | ||
1879 | /* | |
1880 | * First, make a file with some known garbage in it. | |
1881 | */ | |
1882 | data = malloc(pagesize); | |
1883 | if (!data) | |
1884 | exit(1); | |
1885 | for (i = 0; i < pagesize; ++i) | |
1886 | *(data + i) = rand(); | |
1887 | umask(0); | |
1888 | fd = creat("conftestmmap", 0600); | |
1889 | if (fd < 0) | |
1890 | exit(1); | |
1891 | if (write(fd, data, pagesize) != pagesize) | |
1892 | exit(1); | |
1893 | close(fd); | |
1894 | ||
1895 | /* | |
1896 | * Next, try to mmap the file at a fixed address which | |
1897 | * already has something else allocated at it. If we can, | |
1898 | * also make sure that we see the same garbage. | |
1899 | */ | |
1900 | fd = open("conftestmmap", O_RDWR); | |
1901 | if (fd < 0) | |
1902 | exit(1); | |
1903 | data2 = malloc(2 * pagesize); | |
1904 | if (!data2) | |
1905 | exit(1); | |
1906 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1907 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1908 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1909 | exit(1); | |
1910 | for (i = 0; i < pagesize; ++i) | |
1911 | if (*(data + i) != *(data2 + i)) | |
1912 | exit(1); | |
1913 | ||
1914 | /* | |
1915 | * Finally, make sure that changes to the mapped area | |
1916 | * do not percolate back to the file as seen by read(). | |
1917 | * (This is a bug on some variants of i386 svr4.0.) | |
1918 | */ | |
1919 | for (i = 0; i < pagesize; ++i) | |
1920 | *(data2 + i) = *(data2 + i) + 1; | |
1921 | data3 = malloc(pagesize); | |
1922 | if (!data3) | |
1923 | exit(1); | |
1924 | if (read(fd, data3, pagesize) != pagesize) | |
1925 | exit(1); | |
1926 | for (i = 0; i < pagesize; ++i) | |
1927 | if (*(data + i) != *(data3 + i)) | |
1928 | exit(1); | |
1929 | close(fd); | |
1930 | unlink("conftestmmap"); | |
1931 | exit(0); | |
1932 | } | |
1933 | ||
1934 | EOF | |
379d6434 | 1935 | if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1936 | then |
1937 | ac_cv_func_mmap_fixed_mapped=yes | |
1938 | else | |
1939 | echo "configure: failed program was:" >&5 | |
1940 | cat conftest.$ac_ext >&5 | |
1941 | rm -fr conftest* | |
1942 | ac_cv_func_mmap_fixed_mapped=no | |
1943 | fi | |
1944 | rm -fr conftest* | |
1945 | fi | |
1946 | ||
1947 | fi | |
1948 | ||
1949 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1950 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1951 | cat >> confdefs.h <<\EOF | |
1952 | #define HAVE_MMAP 1 | |
1953 | EOF | |
1954 | ||
1955 | fi | |
1956 | ||
1957 | ||
1958 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1959 | unistd.h values.h sys/param.h | |
1960 | do | |
1961 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1962 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
379d6434 | 1963 | echo "configure:1964: checking for $ac_hdr" >&5 |
c906108c SS |
1964 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1965 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1966 | else | |
1967 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 1968 | #line 1969 "configure" |
c906108c SS |
1969 | #include "confdefs.h" |
1970 | #include <$ac_hdr> | |
1971 | EOF | |
1972 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 1973 | { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1974 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1975 | if test -z "$ac_err"; then | |
1976 | rm -rf conftest* | |
1977 | eval "ac_cv_header_$ac_safe=yes" | |
1978 | else | |
1979 | echo "$ac_err" >&5 | |
1980 | echo "configure: failed program was:" >&5 | |
1981 | cat conftest.$ac_ext >&5 | |
1982 | rm -rf conftest* | |
1983 | eval "ac_cv_header_$ac_safe=no" | |
1984 | fi | |
1985 | rm -f conftest* | |
1986 | fi | |
1987 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1988 | echo "$ac_t""yes" 1>&6 | |
1989 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1990 | cat >> confdefs.h <<EOF | |
1991 | #define $ac_tr_hdr 1 | |
1992 | EOF | |
1993 | ||
1994 | else | |
1995 | echo "$ac_t""no" 1>&6 | |
1996 | fi | |
1997 | done | |
1998 | ||
1999 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2000 | __argz_count __argz_stringify __argz_next | |
2001 | do | |
2002 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
379d6434 | 2003 | echo "configure:2004: checking for $ac_func" >&5 |
c906108c SS |
2004 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2005 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2006 | else | |
2007 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2008 | #line 2009 "configure" |
c906108c SS |
2009 | #include "confdefs.h" |
2010 | /* System header to define __stub macros and hopefully few prototypes, | |
2011 | which can conflict with char $ac_func(); below. */ | |
2012 | #include <assert.h> | |
2013 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2014 | /* We use char because int might match the return type of a gcc2 | |
2015 | builtin and then its argument prototype would still apply. */ | |
2016 | char $ac_func(); | |
2017 | ||
2018 | int main() { | |
2019 | ||
2020 | /* The GNU C library defines this for functions which it implements | |
2021 | to always fail with ENOSYS. Some functions are actually named | |
2022 | something starting with __ and the normal name is an alias. */ | |
2023 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2024 | choke me | |
2025 | #else | |
2026 | $ac_func(); | |
2027 | #endif | |
2028 | ||
2029 | ; return 0; } | |
2030 | EOF | |
379d6434 | 2031 | if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2032 | rm -rf conftest* |
2033 | eval "ac_cv_func_$ac_func=yes" | |
2034 | else | |
2035 | echo "configure: failed program was:" >&5 | |
2036 | cat conftest.$ac_ext >&5 | |
2037 | rm -rf conftest* | |
2038 | eval "ac_cv_func_$ac_func=no" | |
2039 | fi | |
2040 | rm -f conftest* | |
2041 | fi | |
2042 | ||
2043 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2044 | echo "$ac_t""yes" 1>&6 | |
2045 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2046 | cat >> confdefs.h <<EOF | |
2047 | #define $ac_tr_func 1 | |
2048 | EOF | |
2049 | ||
2050 | else | |
2051 | echo "$ac_t""no" 1>&6 | |
2052 | fi | |
2053 | done | |
2054 | ||
2055 | ||
2056 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2057 | for ac_func in stpcpy | |
2058 | do | |
2059 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
379d6434 | 2060 | echo "configure:2061: checking for $ac_func" >&5 |
c906108c SS |
2061 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2062 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2063 | else | |
2064 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2065 | #line 2066 "configure" |
c906108c SS |
2066 | #include "confdefs.h" |
2067 | /* System header to define __stub macros and hopefully few prototypes, | |
2068 | which can conflict with char $ac_func(); below. */ | |
2069 | #include <assert.h> | |
2070 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2071 | /* We use char because int might match the return type of a gcc2 | |
2072 | builtin and then its argument prototype would still apply. */ | |
2073 | char $ac_func(); | |
2074 | ||
2075 | int main() { | |
2076 | ||
2077 | /* The GNU C library defines this for functions which it implements | |
2078 | to always fail with ENOSYS. Some functions are actually named | |
2079 | something starting with __ and the normal name is an alias. */ | |
2080 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2081 | choke me | |
2082 | #else | |
2083 | $ac_func(); | |
2084 | #endif | |
2085 | ||
2086 | ; return 0; } | |
2087 | EOF | |
379d6434 | 2088 | if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2089 | rm -rf conftest* |
2090 | eval "ac_cv_func_$ac_func=yes" | |
2091 | else | |
2092 | echo "configure: failed program was:" >&5 | |
2093 | cat conftest.$ac_ext >&5 | |
2094 | rm -rf conftest* | |
2095 | eval "ac_cv_func_$ac_func=no" | |
2096 | fi | |
2097 | rm -f conftest* | |
2098 | fi | |
2099 | ||
2100 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2101 | echo "$ac_t""yes" 1>&6 | |
2102 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2103 | cat >> confdefs.h <<EOF | |
2104 | #define $ac_tr_func 1 | |
2105 | EOF | |
2106 | ||
2107 | else | |
2108 | echo "$ac_t""no" 1>&6 | |
2109 | fi | |
2110 | done | |
2111 | ||
2112 | fi | |
2113 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2114 | cat >> confdefs.h <<\EOF | |
2115 | #define HAVE_STPCPY 1 | |
2116 | EOF | |
2117 | ||
2118 | fi | |
2119 | ||
2120 | if test $ac_cv_header_locale_h = yes; then | |
2121 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
379d6434 | 2122 | echo "configure:2123: checking for LC_MESSAGES" >&5 |
c906108c SS |
2123 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2125 | else | |
2126 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2127 | #line 2128 "configure" |
c906108c SS |
2128 | #include "confdefs.h" |
2129 | #include <locale.h> | |
2130 | int main() { | |
2131 | return LC_MESSAGES | |
2132 | ; return 0; } | |
2133 | EOF | |
379d6434 | 2134 | if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2135 | rm -rf conftest* |
2136 | am_cv_val_LC_MESSAGES=yes | |
2137 | else | |
2138 | echo "configure: failed program was:" >&5 | |
2139 | cat conftest.$ac_ext >&5 | |
2140 | rm -rf conftest* | |
2141 | am_cv_val_LC_MESSAGES=no | |
2142 | fi | |
2143 | rm -f conftest* | |
2144 | fi | |
2145 | ||
2146 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2147 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2148 | cat >> confdefs.h <<\EOF | |
2149 | #define HAVE_LC_MESSAGES 1 | |
2150 | EOF | |
2151 | ||
2152 | fi | |
2153 | fi | |
2154 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
379d6434 | 2155 | echo "configure:2156: checking whether NLS is requested" >&5 |
c906108c SS |
2156 | # Check whether --enable-nls or --disable-nls was given. |
2157 | if test "${enable_nls+set}" = set; then | |
2158 | enableval="$enable_nls" | |
2159 | USE_NLS=$enableval | |
2160 | else | |
2161 | USE_NLS=yes | |
2162 | fi | |
2163 | ||
2164 | echo "$ac_t""$USE_NLS" 1>&6 | |
2165 | ||
2166 | ||
2167 | USE_INCLUDED_LIBINTL=no | |
2168 | ||
2169 | if test "$USE_NLS" = "yes"; then | |
2170 | cat >> confdefs.h <<\EOF | |
2171 | #define ENABLE_NLS 1 | |
2172 | EOF | |
2173 | ||
2174 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
379d6434 | 2175 | echo "configure:2176: checking whether included gettext is requested" >&5 |
c906108c SS |
2176 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2177 | if test "${with_included_gettext+set}" = set; then | |
2178 | withval="$with_included_gettext" | |
2179 | nls_cv_force_use_gnu_gettext=$withval | |
2180 | else | |
2181 | nls_cv_force_use_gnu_gettext=no | |
2182 | fi | |
2183 | ||
2184 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2185 | ||
2186 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2187 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2188 | nls_cv_header_intl= | |
2189 | nls_cv_header_libgt= | |
2190 | CATOBJEXT=NONE | |
2191 | ||
2192 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2193 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
379d6434 | 2194 | echo "configure:2195: checking for libintl.h" >&5 |
c906108c SS |
2195 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2196 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2197 | else | |
2198 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2199 | #line 2200 "configure" |
c906108c SS |
2200 | #include "confdefs.h" |
2201 | #include <libintl.h> | |
2202 | EOF | |
2203 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 2204 | { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2205 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2206 | if test -z "$ac_err"; then | |
2207 | rm -rf conftest* | |
2208 | eval "ac_cv_header_$ac_safe=yes" | |
2209 | else | |
2210 | echo "$ac_err" >&5 | |
2211 | echo "configure: failed program was:" >&5 | |
2212 | cat conftest.$ac_ext >&5 | |
2213 | rm -rf conftest* | |
2214 | eval "ac_cv_header_$ac_safe=no" | |
2215 | fi | |
2216 | rm -f conftest* | |
2217 | fi | |
2218 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2219 | echo "$ac_t""yes" 1>&6 | |
2220 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
379d6434 | 2221 | echo "configure:2222: checking for gettext in libc" >&5 |
c906108c SS |
2222 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2223 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2224 | else | |
2225 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2226 | #line 2227 "configure" |
c906108c SS |
2227 | #include "confdefs.h" |
2228 | #include <libintl.h> | |
2229 | int main() { | |
2230 | return (int) gettext ("") | |
2231 | ; return 0; } | |
2232 | EOF | |
379d6434 | 2233 | if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2234 | rm -rf conftest* |
2235 | gt_cv_func_gettext_libc=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_libc=no | |
2241 | fi | |
2242 | rm -f conftest* | |
2243 | fi | |
2244 | ||
2245 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2246 | ||
2247 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2248 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
379d6434 | 2249 | echo "configure:2250: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2250 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2251 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2252 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2253 | else | |
2254 | ac_save_LIBS="$LIBS" | |
2255 | LIBS="-lintl $LIBS" | |
2256 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2257 | #line 2258 "configure" |
c906108c SS |
2258 | #include "confdefs.h" |
2259 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2260 | /* We use char because int might match the return type of a gcc2 | |
2261 | builtin and then its argument prototype would still apply. */ | |
2262 | char bindtextdomain(); | |
2263 | ||
2264 | int main() { | |
2265 | bindtextdomain() | |
2266 | ; return 0; } | |
2267 | EOF | |
379d6434 | 2268 | if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2269 | rm -rf conftest* |
2270 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2271 | else | |
2272 | echo "configure: failed program was:" >&5 | |
2273 | cat conftest.$ac_ext >&5 | |
2274 | rm -rf conftest* | |
2275 | eval "ac_cv_lib_$ac_lib_var=no" | |
2276 | fi | |
2277 | rm -f conftest* | |
2278 | LIBS="$ac_save_LIBS" | |
2279 | ||
2280 | fi | |
2281 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2282 | echo "$ac_t""yes" 1>&6 | |
2283 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
379d6434 | 2284 | echo "configure:2285: checking for gettext in libintl" >&5 |
c906108c SS |
2285 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2287 | else | |
2288 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2289 | #line 2290 "configure" |
c906108c SS |
2290 | #include "confdefs.h" |
2291 | ||
2292 | int main() { | |
2293 | return (int) gettext ("") | |
2294 | ; return 0; } | |
2295 | EOF | |
379d6434 | 2296 | if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2297 | rm -rf conftest* |
2298 | gt_cv_func_gettext_libintl=yes | |
2299 | else | |
2300 | echo "configure: failed program was:" >&5 | |
2301 | cat conftest.$ac_ext >&5 | |
2302 | rm -rf conftest* | |
2303 | gt_cv_func_gettext_libintl=no | |
2304 | fi | |
2305 | rm -f conftest* | |
2306 | fi | |
2307 | ||
2308 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2309 | else | |
2310 | echo "$ac_t""no" 1>&6 | |
2311 | fi | |
2312 | ||
2313 | fi | |
2314 | ||
2315 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2316 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2317 | cat >> confdefs.h <<\EOF | |
2318 | #define HAVE_GETTEXT 1 | |
2319 | EOF | |
2320 | ||
2321 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2322 | set dummy msgfmt; ac_word=$2 | |
2323 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2324 | echo "configure:2325: checking for $ac_word" >&5 |
c906108c SS |
2325 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2327 | else | |
2328 | case "$MSGFMT" in | |
2329 | /*) | |
2330 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2331 | ;; | |
2332 | *) | |
2333 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2334 | for ac_dir in $PATH; do | |
2335 | test -z "$ac_dir" && ac_dir=. | |
2336 | if test -f $ac_dir/$ac_word; then | |
2337 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2338 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2339 | break | |
2340 | fi | |
2341 | fi | |
2342 | done | |
2343 | IFS="$ac_save_ifs" | |
2344 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2345 | ;; | |
2346 | esac | |
2347 | fi | |
2348 | MSGFMT="$ac_cv_path_MSGFMT" | |
2349 | if test -n "$MSGFMT"; then | |
2350 | echo "$ac_t""$MSGFMT" 1>&6 | |
2351 | else | |
2352 | echo "$ac_t""no" 1>&6 | |
2353 | fi | |
2354 | if test "$MSGFMT" != "no"; then | |
2355 | for ac_func in dcgettext | |
2356 | do | |
2357 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
379d6434 | 2358 | echo "configure:2359: checking for $ac_func" >&5 |
c906108c SS |
2359 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2360 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2361 | else | |
2362 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2363 | #line 2364 "configure" |
c906108c SS |
2364 | #include "confdefs.h" |
2365 | /* System header to define __stub macros and hopefully few prototypes, | |
2366 | which can conflict with char $ac_func(); below. */ | |
2367 | #include <assert.h> | |
2368 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2369 | /* We use char because int might match the return type of a gcc2 | |
2370 | builtin and then its argument prototype would still apply. */ | |
2371 | char $ac_func(); | |
2372 | ||
2373 | int main() { | |
2374 | ||
2375 | /* The GNU C library defines this for functions which it implements | |
2376 | to always fail with ENOSYS. Some functions are actually named | |
2377 | something starting with __ and the normal name is an alias. */ | |
2378 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2379 | choke me | |
2380 | #else | |
2381 | $ac_func(); | |
2382 | #endif | |
2383 | ||
2384 | ; return 0; } | |
2385 | EOF | |
379d6434 | 2386 | if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2387 | rm -rf conftest* |
2388 | eval "ac_cv_func_$ac_func=yes" | |
2389 | else | |
2390 | echo "configure: failed program was:" >&5 | |
2391 | cat conftest.$ac_ext >&5 | |
2392 | rm -rf conftest* | |
2393 | eval "ac_cv_func_$ac_func=no" | |
2394 | fi | |
2395 | rm -f conftest* | |
2396 | fi | |
2397 | ||
2398 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2399 | echo "$ac_t""yes" 1>&6 | |
2400 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2401 | cat >> confdefs.h <<EOF | |
2402 | #define $ac_tr_func 1 | |
2403 | EOF | |
2404 | ||
2405 | else | |
2406 | echo "$ac_t""no" 1>&6 | |
2407 | fi | |
2408 | done | |
2409 | ||
2410 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2411 | set dummy gmsgfmt; ac_word=$2 | |
2412 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2413 | echo "configure:2414: checking for $ac_word" >&5 |
c906108c SS |
2414 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2415 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2416 | else | |
2417 | case "$GMSGFMT" in | |
2418 | /*) | |
2419 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2420 | ;; | |
2421 | ?:/*) | |
2422 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2423 | ;; | |
2424 | *) | |
2425 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2426 | ac_dummy="$PATH" | |
2427 | for ac_dir in $ac_dummy; do | |
2428 | test -z "$ac_dir" && ac_dir=. | |
2429 | if test -f $ac_dir/$ac_word; then | |
2430 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2431 | break | |
2432 | fi | |
2433 | done | |
2434 | IFS="$ac_save_ifs" | |
2435 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2436 | ;; | |
2437 | esac | |
2438 | fi | |
2439 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2440 | if test -n "$GMSGFMT"; then | |
2441 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2442 | else | |
2443 | echo "$ac_t""no" 1>&6 | |
2444 | fi | |
2445 | ||
2446 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2447 | set dummy xgettext; ac_word=$2 | |
2448 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2449 | echo "configure:2450: checking for $ac_word" >&5 |
c906108c SS |
2450 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2452 | else | |
2453 | case "$XGETTEXT" in | |
2454 | /*) | |
2455 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2456 | ;; | |
2457 | *) | |
2458 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2459 | for ac_dir in $PATH; do | |
2460 | test -z "$ac_dir" && ac_dir=. | |
2461 | if test -f $ac_dir/$ac_word; then | |
2462 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2463 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2464 | break | |
2465 | fi | |
2466 | fi | |
2467 | done | |
2468 | IFS="$ac_save_ifs" | |
2469 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2470 | ;; | |
2471 | esac | |
2472 | fi | |
2473 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2474 | if test -n "$XGETTEXT"; then | |
2475 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2476 | else | |
2477 | echo "$ac_t""no" 1>&6 | |
2478 | fi | |
2479 | ||
2480 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2481 | #line 2482 "configure" |
c906108c SS |
2482 | #include "confdefs.h" |
2483 | ||
2484 | int main() { | |
2485 | extern int _nl_msg_cat_cntr; | |
2486 | return _nl_msg_cat_cntr | |
2487 | ; return 0; } | |
2488 | EOF | |
379d6434 | 2489 | if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2490 | rm -rf conftest* |
2491 | CATOBJEXT=.gmo | |
2492 | DATADIRNAME=share | |
2493 | else | |
2494 | echo "configure: failed program was:" >&5 | |
2495 | cat conftest.$ac_ext >&5 | |
2496 | rm -rf conftest* | |
2497 | CATOBJEXT=.mo | |
2498 | DATADIRNAME=lib | |
2499 | fi | |
2500 | rm -f conftest* | |
2501 | INSTOBJEXT=.mo | |
2502 | fi | |
2503 | fi | |
2504 | ||
2505 | else | |
2506 | echo "$ac_t""no" 1>&6 | |
2507 | fi | |
2508 | ||
2509 | ||
2510 | ||
2511 | if test "$CATOBJEXT" = "NONE"; then | |
2512 | nls_cv_use_gnu_gettext=yes | |
2513 | fi | |
2514 | fi | |
2515 | ||
2516 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2517 | INTLOBJS="\$(GETTOBJS)" | |
2518 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2519 | set dummy msgfmt; ac_word=$2 | |
2520 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2521 | echo "configure:2522: checking for $ac_word" >&5 |
c906108c SS |
2522 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2524 | else | |
2525 | case "$MSGFMT" in | |
2526 | /*) | |
2527 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2528 | ;; | |
2529 | *) | |
2530 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2531 | for ac_dir in $PATH; do | |
2532 | test -z "$ac_dir" && ac_dir=. | |
2533 | if test -f $ac_dir/$ac_word; then | |
2534 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2535 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2536 | break | |
2537 | fi | |
2538 | fi | |
2539 | done | |
2540 | IFS="$ac_save_ifs" | |
2541 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2542 | ;; | |
2543 | esac | |
2544 | fi | |
2545 | MSGFMT="$ac_cv_path_MSGFMT" | |
2546 | if test -n "$MSGFMT"; then | |
2547 | echo "$ac_t""$MSGFMT" 1>&6 | |
2548 | else | |
2549 | echo "$ac_t""no" 1>&6 | |
2550 | fi | |
2551 | ||
2552 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2553 | set dummy gmsgfmt; ac_word=$2 | |
2554 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2555 | echo "configure:2556: checking for $ac_word" >&5 |
c906108c SS |
2556 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2558 | else | |
2559 | case "$GMSGFMT" in | |
2560 | /*) | |
2561 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2562 | ;; | |
2563 | ?:/*) | |
2564 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2565 | ;; | |
2566 | *) | |
2567 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2568 | ac_dummy="$PATH" | |
2569 | for ac_dir in $ac_dummy; do | |
2570 | test -z "$ac_dir" && ac_dir=. | |
2571 | if test -f $ac_dir/$ac_word; then | |
2572 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2573 | break | |
2574 | fi | |
2575 | done | |
2576 | IFS="$ac_save_ifs" | |
2577 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2578 | ;; | |
2579 | esac | |
2580 | fi | |
2581 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2582 | if test -n "$GMSGFMT"; then | |
2583 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2584 | else | |
2585 | echo "$ac_t""no" 1>&6 | |
2586 | fi | |
2587 | ||
2588 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2589 | set dummy xgettext; ac_word=$2 | |
2590 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
379d6434 | 2591 | echo "configure:2592: checking for $ac_word" >&5 |
c906108c SS |
2592 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2594 | else | |
2595 | case "$XGETTEXT" in | |
2596 | /*) | |
2597 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2598 | ;; | |
2599 | *) | |
2600 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2601 | for ac_dir in $PATH; do | |
2602 | test -z "$ac_dir" && ac_dir=. | |
2603 | if test -f $ac_dir/$ac_word; then | |
2604 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2605 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2606 | break | |
2607 | fi | |
2608 | fi | |
2609 | done | |
2610 | IFS="$ac_save_ifs" | |
2611 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2612 | ;; | |
2613 | esac | |
2614 | fi | |
2615 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2616 | if test -n "$XGETTEXT"; then | |
2617 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2618 | else | |
2619 | echo "$ac_t""no" 1>&6 | |
2620 | fi | |
2621 | ||
2622 | ||
2623 | USE_INCLUDED_LIBINTL=yes | |
2624 | CATOBJEXT=.gmo | |
2625 | INSTOBJEXT=.mo | |
2626 | DATADIRNAME=share | |
2627 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2628 | INTLLIBS=$INTLDEPS | |
2629 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2630 | nls_cv_header_intl=libintl.h | |
2631 | nls_cv_header_libgt=libgettext.h | |
2632 | fi | |
2633 | ||
2634 | if test "$XGETTEXT" != ":"; then | |
2635 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2636 | : ; | |
2637 | else | |
2638 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2639 | XGETTEXT=":" | |
2640 | fi | |
2641 | fi | |
2642 | ||
2643 | # We need to process the po/ directory. | |
2644 | POSUB=po | |
2645 | else | |
2646 | DATADIRNAME=share | |
2647 | nls_cv_header_intl=libintl.h | |
2648 | nls_cv_header_libgt=libgettext.h | |
2649 | fi | |
2650 | ||
2651 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2652 | # because some of the sources are only built for this goal. | |
2653 | if test "$PACKAGE" = gettext; then | |
2654 | USE_NLS=yes | |
2655 | USE_INCLUDED_LIBINTL=yes | |
2656 | fi | |
2657 | ||
2658 | for lang in $ALL_LINGUAS; do | |
2659 | GMOFILES="$GMOFILES $lang.gmo" | |
2660 | POFILES="$POFILES $lang.po" | |
2661 | done | |
2662 | ||
2663 | ||
2664 | ||
2665 | ||
2666 | ||
2667 | ||
2668 | ||
2669 | ||
2670 | ||
2671 | ||
2672 | ||
2673 | ||
2674 | ||
2675 | ||
2676 | if test "x$CATOBJEXT" != "x"; then | |
2677 | if test "x$ALL_LINGUAS" = "x"; then | |
2678 | LINGUAS= | |
2679 | else | |
2680 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
379d6434 | 2681 | echo "configure:2682: checking for catalogs to be installed" >&5 |
c906108c SS |
2682 | NEW_LINGUAS= |
2683 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2684 | case "$ALL_LINGUAS" in | |
2685 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2686 | esac | |
2687 | done | |
2688 | LINGUAS=$NEW_LINGUAS | |
2689 | echo "$ac_t""$LINGUAS" 1>&6 | |
2690 | fi | |
2691 | ||
2692 | if test -n "$LINGUAS"; then | |
2693 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2694 | fi | |
2695 | fi | |
2696 | ||
2697 | if test $ac_cv_header_locale_h = yes; then | |
2698 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2699 | else | |
2700 | INCLUDE_LOCALE_H="\ | |
2701 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2702 | fi | |
2703 | ||
2704 | ||
2705 | if test -f $srcdir/po2tbl.sed.in; then | |
2706 | if test "$CATOBJEXT" = ".cat"; then | |
2707 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2708 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
379d6434 | 2709 | echo "configure:2710: checking for linux/version.h" >&5 |
c906108c SS |
2710 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2712 | else | |
2713 | cat > conftest.$ac_ext <<EOF | |
379d6434 | 2714 | #line 2715 "configure" |
c906108c SS |
2715 | #include "confdefs.h" |
2716 | #include <linux/version.h> | |
2717 | EOF | |
2718 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
379d6434 | 2719 | { (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2720 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2721 | if test -z "$ac_err"; then | |
2722 | rm -rf conftest* | |
2723 | eval "ac_cv_header_$ac_safe=yes" | |
2724 | else | |
2725 | echo "$ac_err" >&5 | |
2726 | echo "configure: failed program was:" >&5 | |
2727 | cat conftest.$ac_ext >&5 | |
2728 | rm -rf conftest* | |
2729 | eval "ac_cv_header_$ac_safe=no" | |
2730 | fi | |
2731 | rm -f conftest* | |
2732 | fi | |
2733 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2734 | echo "$ac_t""yes" 1>&6 | |
2735 | msgformat=linux | |
2736 | else | |
2737 | echo "$ac_t""no" 1>&6 | |
2738 | msgformat=xopen | |
2739 | fi | |
2740 | ||
2741 | ||
2742 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2743 | fi | |
2744 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2745 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2746 | fi | |
2747 | ||
2748 | if test "$PACKAGE" = "gettext"; then | |
2749 | GT_NO="#NO#" | |
2750 | GT_YES= | |
2751 | else | |
2752 | GT_NO= | |
2753 | GT_YES="#YES#" | |
2754 | fi | |
2755 | ||
2756 | ||
2757 | ||
2758 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2759 | ||
2760 | ||
2761 | l= | |
2762 | ||
2763 | ||
2764 | if test -d $srcdir/po; then | |
2765 | test -d po || mkdir po | |
2766 | if test "x$srcdir" != "x."; then | |
2767 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2768 | posrcprefix="$srcdir/" | |
2769 | else | |
2770 | posrcprefix="../$srcdir/" | |
2771 | fi | |
2772 | else | |
2773 | posrcprefix="../" | |
2774 | fi | |
2775 | rm -f po/POTFILES | |
2776 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2777 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2778 | fi | |
2779 | ||
2780 | ||
2781 | ||
2782 | CONFIG_OBS= | |
2783 | CONFIG_DEPS= | |
2784 | CONFIG_SRCS= | |
fb40c209 AC |
2785 | CONFIG_INITS= |
2786 | ENABLE_CFLAGS= | |
b3a90332 AC |
2787 | CONFIG_ALL= |
2788 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2789 | CONFIG_INSTALL= |
2790 | CONFIG_UNINSTALL= | |
c906108c SS |
2791 | |
2792 | configdirs="doc testsuite" | |
2793 | ||
96baa820 JM |
2794 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2795 | if test "${enable_multi_ice+set}" = set; then | |
2796 | enableval="$enable_multi_ice" | |
2797 | case "${enableval}" in | |
2798 | yes ) enable_multi_ice="yes" ;; | |
2799 | no) enable_multi_ice="no" ;; | |
2800 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2801 | esac | |
2802 | ||
2803 | fi | |
2804 | ||
2805 | ||
2806 | if test "${enable_multi_ice}" = "yes"; then | |
2807 | configdirs="${configdirs} multi-ice" | |
2808 | fi | |
2809 | ||
c906108c SS |
2810 | |
2811 | . ${srcdir}/configure.host | |
2812 | ||
2813 | . ${srcdir}/configure.tgt | |
2814 | ||
2815 | ||
0d06e24b | 2816 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2817 | do |
2818 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2819 | set dummy $ac_prog; ac_word=$2 | |
2820 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 2821 | echo "configure:2822: checking for $ac_word" >&5 |
7a292a7a SS |
2822 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2824 | else | |
2825 | if test -n "$AWK"; then | |
2826 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2827 | else | |
2828 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2829 | ac_dummy="$PATH" | |
2830 | for ac_dir in $ac_dummy; do | |
2831 | test -z "$ac_dir" && ac_dir=. | |
2832 | if test -f $ac_dir/$ac_word; then | |
2833 | ac_cv_prog_AWK="$ac_prog" | |
2834 | break | |
2835 | fi | |
2836 | done | |
2837 | IFS="$ac_save_ifs" | |
2838 | fi | |
2839 | fi | |
2840 | AWK="$ac_cv_prog_AWK" | |
2841 | if test -n "$AWK"; then | |
2842 | echo "$ac_t""$AWK" 1>&6 | |
2843 | else | |
2844 | echo "$ac_t""no" 1>&6 | |
2845 | fi | |
2846 | ||
2847 | test -n "$AWK" && break | |
2848 | done | |
2849 | ||
c906108c SS |
2850 | # Find a good install program. We prefer a C program (faster), |
2851 | # so one script is as good as another. But avoid the broken or | |
2852 | # incompatible versions: | |
2853 | # SysV /etc/install, /usr/sbin/install | |
2854 | # SunOS /usr/etc/install | |
2855 | # IRIX /sbin/install | |
2856 | # AIX /bin/install | |
2857 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2858 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2859 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2860 | # ./install, which can be erroneously created by make from ./install.sh. | |
2861 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
b3a90332 | 2862 | echo "configure:2863: checking for a BSD compatible install" >&5 |
c906108c SS |
2863 | if test -z "$INSTALL"; then |
2864 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
2865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2866 | else | |
2867 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
2868 | for ac_dir in $PATH; do | |
2869 | # Account for people who put trailing slashes in PATH elements. | |
2870 | case "$ac_dir/" in | |
2871 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2872 | *) | |
2873 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2874 | # Don't use installbsd from OSF since it installs stuff as root | |
2875 | # by default. | |
2876 | for ac_prog in ginstall scoinst install; do | |
2877 | if test -f $ac_dir/$ac_prog; then | |
2878 | if test $ac_prog = install && | |
2879 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2880 | # AIX install. It has an incompatible calling convention. | |
2881 | : | |
2882 | else | |
2883 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2884 | break 2 | |
2885 | fi | |
2886 | fi | |
2887 | done | |
2888 | ;; | |
2889 | esac | |
2890 | done | |
2891 | IFS="$ac_save_IFS" | |
2892 | ||
2893 | fi | |
2894 | if test "${ac_cv_path_install+set}" = set; then | |
2895 | INSTALL="$ac_cv_path_install" | |
2896 | else | |
2897 | # As a last resort, use the slow shell script. We don't cache a | |
2898 | # path for INSTALL within a source directory, because that will | |
2899 | # break other packages using the cache if that directory is | |
2900 | # removed, or if the path is relative. | |
2901 | INSTALL="$ac_install_sh" | |
2902 | fi | |
2903 | fi | |
2904 | echo "$ac_t""$INSTALL" 1>&6 | |
2905 | ||
2906 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2907 | # It thinks the first close brace ends the variable substitution. | |
2908 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2909 | ||
2910 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
2911 | ||
2912 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2913 | ||
2914 | if test $host != $build; then | |
2915 | ac_tool_prefix=${host_alias}- | |
2916 | else | |
2917 | ac_tool_prefix= | |
2918 | fi | |
2919 | ||
2920 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
2921 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
2922 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 2923 | echo "configure:2924: checking for $ac_word" >&5 |
c906108c SS |
2924 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
2925 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2926 | else | |
2927 | if test -n "$AR"; then | |
2928 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2929 | else | |
2930 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2931 | ac_dummy="$PATH" | |
2932 | for ac_dir in $ac_dummy; do | |
2933 | test -z "$ac_dir" && ac_dir=. | |
2934 | if test -f $ac_dir/$ac_word; then | |
2935 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
2936 | break | |
2937 | fi | |
2938 | done | |
2939 | IFS="$ac_save_ifs" | |
2940 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
2941 | fi | |
2942 | fi | |
2943 | AR="$ac_cv_prog_AR" | |
2944 | if test -n "$AR"; then | |
2945 | echo "$ac_t""$AR" 1>&6 | |
2946 | else | |
2947 | echo "$ac_t""no" 1>&6 | |
2948 | fi | |
2949 | ||
2950 | ||
2951 | ||
2952 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2953 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2954 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 2955 | echo "configure:2956: checking for $ac_word" >&5 |
c906108c SS |
2956 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2957 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2958 | else | |
2959 | if test -n "$RANLIB"; then | |
2960 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2961 | else | |
2962 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2963 | ac_dummy="$PATH" | |
2964 | for ac_dir in $ac_dummy; do | |
2965 | test -z "$ac_dir" && ac_dir=. | |
2966 | if test -f $ac_dir/$ac_word; then | |
2967 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2968 | break | |
2969 | fi | |
2970 | done | |
2971 | IFS="$ac_save_ifs" | |
2972 | fi | |
2973 | fi | |
2974 | RANLIB="$ac_cv_prog_RANLIB" | |
2975 | if test -n "$RANLIB"; then | |
2976 | echo "$ac_t""$RANLIB" 1>&6 | |
2977 | else | |
2978 | echo "$ac_t""no" 1>&6 | |
2979 | fi | |
2980 | ||
2981 | ||
2982 | if test -z "$ac_cv_prog_RANLIB"; then | |
2983 | if test -n "$ac_tool_prefix"; then | |
2984 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2985 | set dummy ranlib; ac_word=$2 | |
2986 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 2987 | echo "configure:2988: checking for $ac_word" >&5 |
c906108c SS |
2988 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2990 | else | |
2991 | if test -n "$RANLIB"; then | |
2992 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2993 | else | |
2994 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2995 | ac_dummy="$PATH" | |
2996 | for ac_dir in $ac_dummy; do | |
2997 | test -z "$ac_dir" && ac_dir=. | |
2998 | if test -f $ac_dir/$ac_word; then | |
2999 | ac_cv_prog_RANLIB="ranlib" | |
3000 | break | |
3001 | fi | |
3002 | done | |
3003 | IFS="$ac_save_ifs" | |
3004 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3005 | fi | |
3006 | fi | |
3007 | RANLIB="$ac_cv_prog_RANLIB" | |
3008 | if test -n "$RANLIB"; then | |
3009 | echo "$ac_t""$RANLIB" 1>&6 | |
3010 | else | |
3011 | echo "$ac_t""no" 1>&6 | |
3012 | fi | |
3013 | ||
3014 | else | |
3015 | RANLIB=":" | |
3016 | fi | |
3017 | fi | |
3018 | ||
3019 | for ac_prog in 'bison -y' byacc | |
3020 | do | |
3021 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3022 | set dummy $ac_prog; ac_word=$2 | |
3023 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 3024 | echo "configure:3025: checking for $ac_word" >&5 |
c906108c SS |
3025 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3027 | else | |
3028 | if test -n "$YACC"; then | |
3029 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3030 | else | |
3031 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3032 | ac_dummy="$PATH" | |
3033 | for ac_dir in $ac_dummy; do | |
3034 | test -z "$ac_dir" && ac_dir=. | |
3035 | if test -f $ac_dir/$ac_word; then | |
3036 | ac_cv_prog_YACC="$ac_prog" | |
3037 | break | |
3038 | fi | |
3039 | done | |
3040 | IFS="$ac_save_ifs" | |
3041 | fi | |
3042 | fi | |
3043 | YACC="$ac_cv_prog_YACC" | |
3044 | if test -n "$YACC"; then | |
3045 | echo "$ac_t""$YACC" 1>&6 | |
3046 | else | |
3047 | echo "$ac_t""no" 1>&6 | |
3048 | fi | |
3049 | ||
3050 | test -n "$YACC" && break | |
3051 | done | |
3052 | test -n "$YACC" || YACC="yacc" | |
3053 | ||
3054 | ||
75c6e08a MK |
3055 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3056 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3057 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b3a90332 | 3058 | echo "configure:3059: checking for $ac_word" >&5 |
75c6e08a MK |
3059 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3061 | else | |
3062 | if test -n "$MIG"; then | |
3063 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3064 | else | |
3065 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3066 | ac_dummy="$PATH" | |
3067 | for ac_dir in $ac_dummy; do | |
3068 | test -z "$ac_dir" && ac_dir=. | |
3069 | if test -f $ac_dir/$ac_word; then | |
3070 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3071 | break | |
3072 | fi | |
3073 | done | |
3074 | IFS="$ac_save_ifs" | |
3075 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3076 | fi | |
3077 | fi | |
3078 | MIG="$ac_cv_prog_MIG" | |
3079 | if test -n "$MIG"; then | |
3080 | echo "$ac_t""$MIG" 1>&6 | |
3081 | else | |
3082 | echo "$ac_t""no" 1>&6 | |
3083 | fi | |
3084 | ||
3085 | ||
3086 | ||
3087 | ||
c906108c SS |
3088 | if test "$program_transform_name" = s,x,x,; then |
3089 | program_transform_name= | |
3090 | else | |
3091 | # Double any \ or $. echo might interpret backslashes. | |
3092 | cat <<\EOF_SED > conftestsed | |
3093 | s,\\,\\\\,g; s,\$,$$,g | |
3094 | EOF_SED | |
3095 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
3096 | rm -f conftestsed | |
3097 | fi | |
3098 | test "$program_prefix" != NONE && | |
3099 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3100 | # Use a double $ so make ignores it. | |
3101 | test "$program_suffix" != NONE && | |
3102 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3103 | ||
3104 | # sed with no file args requires a program. | |
3105 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3106 | ||
3107 | ||
3108 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
b3a90332 | 3109 | echo "configure:3110: checking return type of signal handlers" >&5 |
c906108c SS |
3110 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3112 | else | |
3113 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3114 | #line 3115 "configure" |
c906108c SS |
3115 | #include "confdefs.h" |
3116 | #include <sys/types.h> | |
3117 | #include <signal.h> | |
3118 | #ifdef signal | |
3119 | #undef signal | |
3120 | #endif | |
3121 | #ifdef __cplusplus | |
3122 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3123 | #else | |
3124 | void (*signal ()) (); | |
3125 | #endif | |
3126 | ||
3127 | int main() { | |
3128 | int i; | |
3129 | ; return 0; } | |
3130 | EOF | |
b3a90332 | 3131 | if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3132 | rm -rf conftest* |
3133 | ac_cv_type_signal=void | |
3134 | else | |
3135 | echo "configure: failed program was:" >&5 | |
3136 | cat conftest.$ac_ext >&5 | |
3137 | rm -rf conftest* | |
3138 | ac_cv_type_signal=int | |
3139 | fi | |
3140 | rm -f conftest* | |
3141 | fi | |
3142 | ||
3143 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3144 | cat >> confdefs.h <<EOF | |
3145 | #define RETSIGTYPE $ac_cv_type_signal | |
3146 | EOF | |
3147 | ||
3148 | ||
3149 | ||
3150 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
b3a90332 | 3151 | echo "configure:3152: checking for ANSI C header files" >&5 |
c906108c SS |
3152 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3153 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3154 | else | |
3155 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3156 | #line 3157 "configure" |
c906108c SS |
3157 | #include "confdefs.h" |
3158 | #include <stdlib.h> | |
3159 | #include <stdarg.h> | |
3160 | #include <string.h> | |
3161 | #include <float.h> | |
3162 | EOF | |
3163 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 3164 | { (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3165 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3166 | if test -z "$ac_err"; then | |
3167 | rm -rf conftest* | |
3168 | ac_cv_header_stdc=yes | |
3169 | else | |
3170 | echo "$ac_err" >&5 | |
3171 | echo "configure: failed program was:" >&5 | |
3172 | cat conftest.$ac_ext >&5 | |
3173 | rm -rf conftest* | |
3174 | ac_cv_header_stdc=no | |
3175 | fi | |
3176 | rm -f conftest* | |
3177 | ||
3178 | if test $ac_cv_header_stdc = yes; then | |
3179 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3180 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3181 | #line 3182 "configure" |
c906108c SS |
3182 | #include "confdefs.h" |
3183 | #include <string.h> | |
3184 | EOF | |
3185 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3186 | egrep "memchr" >/dev/null 2>&1; then | |
3187 | : | |
3188 | else | |
3189 | rm -rf conftest* | |
3190 | ac_cv_header_stdc=no | |
3191 | fi | |
3192 | rm -f conftest* | |
3193 | ||
3194 | fi | |
3195 | ||
3196 | if test $ac_cv_header_stdc = yes; then | |
3197 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3198 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3199 | #line 3200 "configure" |
c906108c SS |
3200 | #include "confdefs.h" |
3201 | #include <stdlib.h> | |
3202 | EOF | |
3203 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3204 | egrep "free" >/dev/null 2>&1; then | |
3205 | : | |
3206 | else | |
3207 | rm -rf conftest* | |
3208 | ac_cv_header_stdc=no | |
3209 | fi | |
3210 | rm -f conftest* | |
3211 | ||
3212 | fi | |
3213 | ||
3214 | if test $ac_cv_header_stdc = yes; then | |
3215 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3216 | if test "$cross_compiling" = yes; then | |
3217 | : | |
3218 | else | |
3219 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3220 | #line 3221 "configure" |
c906108c SS |
3221 | #include "confdefs.h" |
3222 | #include <ctype.h> | |
3223 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3224 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3225 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3226 | int main () { int i; for (i = 0; i < 256; i++) | |
3227 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3228 | exit (0); } | |
3229 | ||
3230 | EOF | |
b3a90332 | 3231 | if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3232 | then |
3233 | : | |
3234 | else | |
3235 | echo "configure: failed program was:" >&5 | |
3236 | cat conftest.$ac_ext >&5 | |
3237 | rm -fr conftest* | |
3238 | ac_cv_header_stdc=no | |
3239 | fi | |
3240 | rm -fr conftest* | |
3241 | fi | |
3242 | ||
3243 | fi | |
3244 | fi | |
3245 | ||
3246 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3247 | if test $ac_cv_header_stdc = yes; then | |
3248 | cat >> confdefs.h <<\EOF | |
3249 | #define STDC_HEADERS 1 | |
3250 | EOF | |
3251 | ||
3252 | fi | |
3253 | ||
3254 | ||
ed9a39eb | 3255 | for ac_hdr in ctype.h curses.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 3256 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 3257 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 3258 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 3259 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
c2d11a7d | 3260 | time.h sys/ioctl.h |
c906108c SS |
3261 | do |
3262 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3263 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b3a90332 | 3264 | echo "configure:3265: checking for $ac_hdr" >&5 |
c906108c SS |
3265 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3266 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3267 | else | |
3268 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3269 | #line 3270 "configure" |
c906108c SS |
3270 | #include "confdefs.h" |
3271 | #include <$ac_hdr> | |
3272 | EOF | |
3273 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 3274 | { (eval echo configure:3275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
3275 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3276 | if test -z "$ac_err"; then | |
3277 | rm -rf conftest* | |
3278 | eval "ac_cv_header_$ac_safe=yes" | |
3279 | else | |
3280 | echo "$ac_err" >&5 | |
3281 | echo "configure: failed program was:" >&5 | |
3282 | cat conftest.$ac_ext >&5 | |
3283 | rm -rf conftest* | |
3284 | eval "ac_cv_header_$ac_safe=no" | |
3285 | fi | |
3286 | rm -f conftest* | |
3287 | fi | |
3288 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3289 | echo "$ac_t""yes" 1>&6 | |
3290 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3291 | cat >> confdefs.h <<EOF | |
3292 | #define $ac_tr_hdr 1 | |
3293 | EOF | |
3294 | ||
3295 | else | |
3296 | echo "$ac_t""no" 1>&6 | |
3297 | fi | |
3298 | done | |
3299 | ||
3300 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 | |
b3a90332 | 3301 | echo "configure:3302: checking whether stat file-mode macros are broken" >&5 |
c906108c SS |
3302 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3304 | else | |
3305 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3306 | #line 3307 "configure" |
c906108c SS |
3307 | #include "confdefs.h" |
3308 | #include <sys/types.h> | |
3309 | #include <sys/stat.h> | |
3310 | ||
3311 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3312 | # if S_ISBLK (S_IFDIR) | |
3313 | You lose. | |
3314 | # endif | |
3315 | #endif | |
3316 | ||
3317 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3318 | # if S_ISBLK (S_IFCHR) | |
3319 | You lose. | |
3320 | # endif | |
3321 | #endif | |
3322 | ||
3323 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3324 | # if S_ISLNK (S_IFREG) | |
3325 | You lose. | |
3326 | # endif | |
3327 | #endif | |
3328 | ||
3329 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3330 | # if S_ISSOCK (S_IFREG) | |
3331 | You lose. | |
3332 | # endif | |
3333 | #endif | |
3334 | ||
3335 | EOF | |
3336 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3337 | egrep "You lose" >/dev/null 2>&1; then | |
3338 | rm -rf conftest* | |
3339 | ac_cv_header_stat_broken=yes | |
3340 | else | |
3341 | rm -rf conftest* | |
3342 | ac_cv_header_stat_broken=no | |
3343 | fi | |
3344 | rm -f conftest* | |
3345 | ||
3346 | fi | |
3347 | ||
3348 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3349 | if test $ac_cv_header_stat_broken = yes; then | |
3350 | cat >> confdefs.h <<\EOF | |
3351 | #define STAT_MACROS_BROKEN 1 | |
3352 | EOF | |
3353 | ||
3354 | fi | |
3355 | ||
3356 | ||
3357 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
b3a90332 | 3358 | echo "configure:3359: checking for working const" >&5 |
c906108c SS |
3359 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3360 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3361 | else | |
3362 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3363 | #line 3364 "configure" |
c906108c SS |
3364 | #include "confdefs.h" |
3365 | ||
3366 | int main() { | |
3367 | ||
3368 | /* Ultrix mips cc rejects this. */ | |
3369 | typedef int charset[2]; const charset x; | |
3370 | /* SunOS 4.1.1 cc rejects this. */ | |
3371 | char const *const *ccp; | |
3372 | char **p; | |
3373 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3374 | struct point {int x, y;}; | |
3375 | static struct point const zero = {0,0}; | |
3376 | /* AIX XL C 1.02.0.0 rejects this. | |
3377 | It does not let you subtract one const X* pointer from another in an arm | |
3378 | of an if-expression whose if-part is not a constant expression */ | |
3379 | const char *g = "string"; | |
3380 | ccp = &g + (g ? g-g : 0); | |
3381 | /* HPUX 7.0 cc rejects these. */ | |
3382 | ++ccp; | |
3383 | p = (char**) ccp; | |
3384 | ccp = (char const *const *) p; | |
3385 | { /* SCO 3.2v4 cc rejects this. */ | |
3386 | char *t; | |
3387 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3388 | ||
3389 | *t++ = 0; | |
3390 | } | |
3391 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3392 | int x[] = {25, 17}; | |
3393 | const int *foo = &x[0]; | |
3394 | ++foo; | |
3395 | } | |
3396 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3397 | typedef const int *iptr; | |
3398 | iptr p = 0; | |
3399 | ++p; | |
3400 | } | |
3401 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3402 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3403 | struct s { int j; const int *ap[3]; }; | |
3404 | struct s *b; b->j = 5; | |
3405 | } | |
3406 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3407 | const int foo = 10; | |
3408 | } | |
3409 | ||
3410 | ; return 0; } | |
3411 | EOF | |
b3a90332 | 3412 | if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3413 | rm -rf conftest* |
3414 | ac_cv_c_const=yes | |
3415 | else | |
3416 | echo "configure: failed program was:" >&5 | |
3417 | cat conftest.$ac_ext >&5 | |
3418 | rm -rf conftest* | |
3419 | ac_cv_c_const=no | |
3420 | fi | |
3421 | rm -f conftest* | |
3422 | fi | |
3423 | ||
3424 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3425 | if test $ac_cv_c_const = no; then | |
3426 | cat >> confdefs.h <<\EOF | |
3427 | #define const | |
3428 | EOF | |
3429 | ||
3430 | fi | |
3431 | ||
3432 | ||
2acceee2 | 3433 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask |
c906108c SS |
3434 | do |
3435 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b3a90332 | 3436 | echo "configure:3437: checking for $ac_func" >&5 |
c906108c SS |
3437 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3438 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3439 | else | |
3440 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3441 | #line 3442 "configure" |
c906108c SS |
3442 | #include "confdefs.h" |
3443 | /* System header to define __stub macros and hopefully few prototypes, | |
3444 | which can conflict with char $ac_func(); below. */ | |
3445 | #include <assert.h> | |
3446 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3447 | /* We use char because int might match the return type of a gcc2 | |
3448 | builtin and then its argument prototype would still apply. */ | |
3449 | char $ac_func(); | |
3450 | ||
3451 | int main() { | |
3452 | ||
3453 | /* The GNU C library defines this for functions which it implements | |
3454 | to always fail with ENOSYS. Some functions are actually named | |
3455 | something starting with __ and the normal name is an alias. */ | |
3456 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3457 | choke me | |
3458 | #else | |
3459 | $ac_func(); | |
3460 | #endif | |
3461 | ||
3462 | ; return 0; } | |
3463 | EOF | |
b3a90332 | 3464 | if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3465 | rm -rf conftest* |
3466 | eval "ac_cv_func_$ac_func=yes" | |
3467 | else | |
3468 | echo "configure: failed program was:" >&5 | |
3469 | cat conftest.$ac_ext >&5 | |
3470 | rm -rf conftest* | |
3471 | eval "ac_cv_func_$ac_func=no" | |
3472 | fi | |
3473 | rm -f conftest* | |
3474 | fi | |
3475 | ||
3476 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3477 | echo "$ac_t""yes" 1>&6 | |
3478 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3479 | cat >> confdefs.h <<EOF | |
3480 | #define $ac_tr_func 1 | |
3481 | EOF | |
3482 | ||
3483 | else | |
3484 | echo "$ac_t""no" 1>&6 | |
3485 | fi | |
3486 | done | |
3487 | ||
3488 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3489 | # for constant arguments. Useless! | |
3490 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b3a90332 | 3491 | echo "configure:3492: checking for working alloca.h" >&5 |
c906108c SS |
3492 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3494 | else | |
3495 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3496 | #line 3497 "configure" |
c906108c SS |
3497 | #include "confdefs.h" |
3498 | #include <alloca.h> | |
3499 | int main() { | |
3500 | char *p = alloca(2 * sizeof(int)); | |
3501 | ; return 0; } | |
3502 | EOF | |
b3a90332 | 3503 | if { (eval echo configure:3504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3504 | rm -rf conftest* |
3505 | ac_cv_header_alloca_h=yes | |
3506 | else | |
3507 | echo "configure: failed program was:" >&5 | |
3508 | cat conftest.$ac_ext >&5 | |
3509 | rm -rf conftest* | |
3510 | ac_cv_header_alloca_h=no | |
3511 | fi | |
3512 | rm -f conftest* | |
3513 | fi | |
3514 | ||
3515 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3516 | if test $ac_cv_header_alloca_h = yes; then | |
3517 | cat >> confdefs.h <<\EOF | |
3518 | #define HAVE_ALLOCA_H 1 | |
3519 | EOF | |
3520 | ||
3521 | fi | |
3522 | ||
3523 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b3a90332 | 3524 | echo "configure:3525: checking for alloca" >&5 |
c906108c SS |
3525 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3527 | else | |
3528 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3529 | #line 3530 "configure" |
c906108c SS |
3530 | #include "confdefs.h" |
3531 | ||
3532 | #ifdef __GNUC__ | |
3533 | # define alloca __builtin_alloca | |
3534 | #else | |
3535 | # ifdef _MSC_VER | |
3536 | # include <malloc.h> | |
3537 | # define alloca _alloca | |
3538 | # else | |
3539 | # if HAVE_ALLOCA_H | |
3540 | # include <alloca.h> | |
3541 | # else | |
3542 | # ifdef _AIX | |
3543 | #pragma alloca | |
3544 | # else | |
3545 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3546 | char *alloca (); | |
3547 | # endif | |
3548 | # endif | |
3549 | # endif | |
3550 | # endif | |
3551 | #endif | |
3552 | ||
3553 | int main() { | |
3554 | char *p = (char *) alloca(1); | |
3555 | ; return 0; } | |
3556 | EOF | |
b3a90332 | 3557 | if { (eval echo configure:3558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3558 | rm -rf conftest* |
3559 | ac_cv_func_alloca_works=yes | |
3560 | else | |
3561 | echo "configure: failed program was:" >&5 | |
3562 | cat conftest.$ac_ext >&5 | |
3563 | rm -rf conftest* | |
3564 | ac_cv_func_alloca_works=no | |
3565 | fi | |
3566 | rm -f conftest* | |
3567 | fi | |
3568 | ||
3569 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3570 | if test $ac_cv_func_alloca_works = yes; then | |
3571 | cat >> confdefs.h <<\EOF | |
3572 | #define HAVE_ALLOCA 1 | |
3573 | EOF | |
3574 | ||
3575 | fi | |
3576 | ||
3577 | if test $ac_cv_func_alloca_works = no; then | |
3578 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3579 | # that cause trouble. Some versions do not even contain alloca or | |
3580 | # contain a buggy version. If you still want to use their alloca, | |
3581 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3582 | ALLOCA=alloca.${ac_objext} | |
3583 | cat >> confdefs.h <<\EOF | |
3584 | #define C_ALLOCA 1 | |
3585 | EOF | |
3586 | ||
3587 | ||
3588 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b3a90332 | 3589 | echo "configure:3590: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
3590 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3592 | else | |
3593 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3594 | #line 3595 "configure" |
c906108c SS |
3595 | #include "confdefs.h" |
3596 | #if defined(CRAY) && ! defined(CRAY2) | |
3597 | webecray | |
3598 | #else | |
3599 | wenotbecray | |
3600 | #endif | |
3601 | ||
3602 | EOF | |
3603 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3604 | egrep "webecray" >/dev/null 2>&1; then | |
3605 | rm -rf conftest* | |
3606 | ac_cv_os_cray=yes | |
3607 | else | |
3608 | rm -rf conftest* | |
3609 | ac_cv_os_cray=no | |
3610 | fi | |
3611 | rm -f conftest* | |
3612 | ||
3613 | fi | |
3614 | ||
3615 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3616 | if test $ac_cv_os_cray = yes; then | |
3617 | for ac_func in _getb67 GETB67 getb67; do | |
3618 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b3a90332 | 3619 | echo "configure:3620: checking for $ac_func" >&5 |
c906108c SS |
3620 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3622 | else | |
3623 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3624 | #line 3625 "configure" |
c906108c SS |
3625 | #include "confdefs.h" |
3626 | /* System header to define __stub macros and hopefully few prototypes, | |
3627 | which can conflict with char $ac_func(); below. */ | |
3628 | #include <assert.h> | |
3629 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3630 | /* We use char because int might match the return type of a gcc2 | |
3631 | builtin and then its argument prototype would still apply. */ | |
3632 | char $ac_func(); | |
3633 | ||
3634 | int main() { | |
3635 | ||
3636 | /* The GNU C library defines this for functions which it implements | |
3637 | to always fail with ENOSYS. Some functions are actually named | |
3638 | something starting with __ and the normal name is an alias. */ | |
3639 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3640 | choke me | |
3641 | #else | |
3642 | $ac_func(); | |
3643 | #endif | |
3644 | ||
3645 | ; return 0; } | |
3646 | EOF | |
b3a90332 | 3647 | if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
3648 | rm -rf conftest* |
3649 | eval "ac_cv_func_$ac_func=yes" | |
3650 | else | |
3651 | echo "configure: failed program was:" >&5 | |
3652 | cat conftest.$ac_ext >&5 | |
3653 | rm -rf conftest* | |
3654 | eval "ac_cv_func_$ac_func=no" | |
3655 | fi | |
3656 | rm -f conftest* | |
3657 | fi | |
3658 | ||
3659 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3660 | echo "$ac_t""yes" 1>&6 | |
3661 | cat >> confdefs.h <<EOF | |
3662 | #define CRAY_STACKSEG_END $ac_func | |
3663 | EOF | |
3664 | ||
3665 | break | |
3666 | else | |
3667 | echo "$ac_t""no" 1>&6 | |
3668 | fi | |
3669 | ||
3670 | done | |
3671 | fi | |
3672 | ||
3673 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b3a90332 | 3674 | echo "configure:3675: checking stack direction for C alloca" >&5 |
c906108c SS |
3675 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3676 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3677 | else | |
3678 | if test "$cross_compiling" = yes; then | |
3679 | ac_cv_c_stack_direction=0 | |
3680 | else | |
3681 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3682 | #line 3683 "configure" |
c906108c SS |
3683 | #include "confdefs.h" |
3684 | find_stack_direction () | |
3685 | { | |
3686 | static char *addr = 0; | |
3687 | auto char dummy; | |
3688 | if (addr == 0) | |
3689 | { | |
3690 | addr = &dummy; | |
3691 | return find_stack_direction (); | |
3692 | } | |
3693 | else | |
3694 | return (&dummy > addr) ? 1 : -1; | |
3695 | } | |
3696 | main () | |
3697 | { | |
3698 | exit (find_stack_direction() < 0); | |
3699 | } | |
3700 | EOF | |
b3a90332 | 3701 | if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
3702 | then |
3703 | ac_cv_c_stack_direction=1 | |
3704 | else | |
3705 | echo "configure: failed program was:" >&5 | |
3706 | cat conftest.$ac_ext >&5 | |
3707 | rm -fr conftest* | |
3708 | ac_cv_c_stack_direction=-1 | |
3709 | fi | |
3710 | rm -fr conftest* | |
3711 | fi | |
3712 | ||
3713 | fi | |
3714 | ||
3715 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3716 | cat >> confdefs.h <<EOF | |
3717 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3718 | EOF | |
3719 | ||
3720 | fi | |
3721 | ||
3722 | ||
5c44784c | 3723 | echo $ac_n "checking for PTRACE_GETXFPREGS""... $ac_c" 1>&6 |
b3a90332 | 3724 | echo "configure:3725: checking for PTRACE_GETXFPREGS" >&5 |
5c44784c JM |
3725 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getxfpregs'+set}'`\" = set"; then |
3726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3727 | else | |
3728 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3729 | #line 3730 "configure" |
5c44784c JM |
3730 | #include "confdefs.h" |
3731 | #include <sys/ptrace.h> | |
3732 | int main() { | |
3733 | PTRACE_GETXFPREGS; | |
3734 | ; return 0; } | |
3735 | EOF | |
b3a90332 | 3736 | if { (eval echo configure:3737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5c44784c JM |
3737 | rm -rf conftest* |
3738 | gdb_cv_have_ptrace_getxfpregs=yes | |
3739 | else | |
3740 | echo "configure: failed program was:" >&5 | |
3741 | cat conftest.$ac_ext >&5 | |
3742 | rm -rf conftest* | |
3743 | gdb_cv_have_ptrace_getxfpregs=no | |
3744 | fi | |
3745 | rm -f conftest* | |
3746 | fi | |
3747 | ||
3748 | echo "$ac_t""$gdb_cv_have_ptrace_getxfpregs" 1>&6 | |
3749 | if test $gdb_cv_have_ptrace_getxfpregs = yes; then | |
3750 | cat >> confdefs.h <<\EOF | |
3751 | #define HAVE_PTRACE_GETXFPREGS 1 | |
3752 | EOF | |
3753 | ||
3754 | fi | |
3755 | ||
7be570e7 | 3756 | echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 |
b3a90332 | 3757 | echo "configure:3758: checking for socketpair in -lsocket" >&5 |
7be570e7 JM |
3758 | ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` |
3759 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3760 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3761 | else | |
3762 | ac_save_LIBS="$LIBS" | |
3763 | LIBS="-lsocket $LIBS" | |
3764 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3765 | #line 3766 "configure" |
7be570e7 JM |
3766 | #include "confdefs.h" |
3767 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3768 | /* We use char because int might match the return type of a gcc2 | |
3769 | builtin and then its argument prototype would still apply. */ | |
3770 | char socketpair(); | |
3771 | ||
3772 | int main() { | |
3773 | socketpair() | |
3774 | ; return 0; } | |
3775 | EOF | |
b3a90332 | 3776 | if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
3777 | rm -rf conftest* |
3778 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3779 | else | |
3780 | echo "configure: failed program was:" >&5 | |
3781 | cat conftest.$ac_ext >&5 | |
3782 | rm -rf conftest* | |
3783 | eval "ac_cv_lib_$ac_lib_var=no" | |
3784 | fi | |
3785 | rm -f conftest* | |
3786 | LIBS="$ac_save_LIBS" | |
3787 | ||
3788 | fi | |
3789 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3790 | echo "$ac_t""yes" 1>&6 | |
3791 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3792 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3793 | cat >> confdefs.h <<EOF | |
3794 | #define $ac_tr_lib 1 | |
3795 | EOF | |
3796 | ||
3797 | LIBS="-lsocket $LIBS" | |
3798 | ||
3799 | else | |
3800 | echo "$ac_t""no" 1>&6 | |
3801 | fi | |
3802 | ||
3803 | for ac_func in socketpair | |
3804 | do | |
3805 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b3a90332 | 3806 | echo "configure:3807: checking for $ac_func" >&5 |
7be570e7 JM |
3807 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3809 | else | |
3810 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3811 | #line 3812 "configure" |
7be570e7 JM |
3812 | #include "confdefs.h" |
3813 | /* System header to define __stub macros and hopefully few prototypes, | |
3814 | which can conflict with char $ac_func(); below. */ | |
3815 | #include <assert.h> | |
3816 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3817 | /* We use char because int might match the return type of a gcc2 | |
3818 | builtin and then its argument prototype would still apply. */ | |
3819 | char $ac_func(); | |
3820 | ||
3821 | int main() { | |
3822 | ||
3823 | /* The GNU C library defines this for functions which it implements | |
3824 | to always fail with ENOSYS. Some functions are actually named | |
3825 | something starting with __ and the normal name is an alias. */ | |
3826 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3827 | choke me | |
3828 | #else | |
3829 | $ac_func(); | |
3830 | #endif | |
3831 | ||
3832 | ; return 0; } | |
3833 | EOF | |
b3a90332 | 3834 | if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
3835 | rm -rf conftest* |
3836 | eval "ac_cv_func_$ac_func=yes" | |
3837 | else | |
3838 | echo "configure: failed program was:" >&5 | |
3839 | cat conftest.$ac_ext >&5 | |
3840 | rm -rf conftest* | |
3841 | eval "ac_cv_func_$ac_func=no" | |
3842 | fi | |
3843 | rm -f conftest* | |
3844 | fi | |
3845 | ||
3846 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3847 | echo "$ac_t""yes" 1>&6 | |
3848 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3849 | cat >> confdefs.h <<EOF | |
3850 | #define $ac_tr_func 1 | |
3851 | EOF | |
3852 | ||
3853 | else | |
3854 | echo "$ac_t""no" 1>&6 | |
3855 | fi | |
3856 | done | |
3857 | ||
3858 | ||
3859 | ||
c906108c | 3860 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
b3a90332 | 3861 | echo "configure:3862: checking whether malloc must be declared" >&5 |
c906108c SS |
3862 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3863 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3864 | else | |
3865 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3866 | #line 3867 "configure" |
c906108c SS |
3867 | #include "confdefs.h" |
3868 | ||
3869 | #include <stdio.h> | |
3870 | #ifdef HAVE_STRING_H | |
3871 | #include <string.h> | |
3872 | #else | |
3873 | #ifdef HAVE_STRINGS_H | |
3874 | #include <strings.h> | |
3875 | #endif | |
3876 | #endif | |
3877 | #ifdef HAVE_STDLIB_H | |
3878 | #include <stdlib.h> | |
3879 | #endif | |
3880 | #ifdef HAVE_UNISTD_H | |
3881 | #include <unistd.h> | |
3882 | #endif | |
3883 | int main() { | |
3884 | char *(*pfn) = (char *(*)) malloc | |
3885 | ; return 0; } | |
3886 | EOF | |
b3a90332 | 3887 | if { (eval echo configure:3888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3888 | rm -rf conftest* |
3889 | bfd_cv_decl_needed_malloc=no | |
3890 | else | |
3891 | echo "configure: failed program was:" >&5 | |
3892 | cat conftest.$ac_ext >&5 | |
3893 | rm -rf conftest* | |
3894 | bfd_cv_decl_needed_malloc=yes | |
3895 | fi | |
3896 | rm -f conftest* | |
3897 | fi | |
3898 | ||
3899 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
3900 | if test $bfd_cv_decl_needed_malloc = yes; then | |
3901 | cat >> confdefs.h <<\EOF | |
3902 | #define NEED_DECLARATION_MALLOC 1 | |
3903 | EOF | |
3904 | ||
3905 | fi | |
3906 | ||
3907 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
b3a90332 | 3908 | echo "configure:3909: checking whether realloc must be declared" >&5 |
c906108c SS |
3909 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3910 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3911 | else | |
3912 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3913 | #line 3914 "configure" |
c906108c SS |
3914 | #include "confdefs.h" |
3915 | ||
3916 | #include <stdio.h> | |
3917 | #ifdef HAVE_STRING_H | |
3918 | #include <string.h> | |
3919 | #else | |
3920 | #ifdef HAVE_STRINGS_H | |
3921 | #include <strings.h> | |
3922 | #endif | |
3923 | #endif | |
3924 | #ifdef HAVE_STDLIB_H | |
3925 | #include <stdlib.h> | |
3926 | #endif | |
3927 | #ifdef HAVE_UNISTD_H | |
3928 | #include <unistd.h> | |
3929 | #endif | |
3930 | int main() { | |
3931 | char *(*pfn) = (char *(*)) realloc | |
3932 | ; return 0; } | |
3933 | EOF | |
b3a90332 | 3934 | if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3935 | rm -rf conftest* |
3936 | bfd_cv_decl_needed_realloc=no | |
3937 | else | |
3938 | echo "configure: failed program was:" >&5 | |
3939 | cat conftest.$ac_ext >&5 | |
3940 | rm -rf conftest* | |
3941 | bfd_cv_decl_needed_realloc=yes | |
3942 | fi | |
3943 | rm -f conftest* | |
3944 | fi | |
3945 | ||
3946 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
3947 | if test $bfd_cv_decl_needed_realloc = yes; then | |
3948 | cat >> confdefs.h <<\EOF | |
3949 | #define NEED_DECLARATION_REALLOC 1 | |
3950 | EOF | |
3951 | ||
3952 | fi | |
3953 | ||
3954 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
b3a90332 | 3955 | echo "configure:3956: checking whether free must be declared" >&5 |
c906108c SS |
3956 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
3957 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3958 | else | |
3959 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 3960 | #line 3961 "configure" |
c906108c SS |
3961 | #include "confdefs.h" |
3962 | ||
3963 | #include <stdio.h> | |
3964 | #ifdef HAVE_STRING_H | |
3965 | #include <string.h> | |
3966 | #else | |
3967 | #ifdef HAVE_STRINGS_H | |
3968 | #include <strings.h> | |
3969 | #endif | |
3970 | #endif | |
3971 | #ifdef HAVE_STDLIB_H | |
3972 | #include <stdlib.h> | |
3973 | #endif | |
3974 | #ifdef HAVE_UNISTD_H | |
3975 | #include <unistd.h> | |
3976 | #endif | |
3977 | int main() { | |
3978 | char *(*pfn) = (char *(*)) free | |
3979 | ; return 0; } | |
3980 | EOF | |
b3a90332 | 3981 | if { (eval echo configure:3982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
3982 | rm -rf conftest* |
3983 | bfd_cv_decl_needed_free=no | |
3984 | else | |
3985 | echo "configure: failed program was:" >&5 | |
3986 | cat conftest.$ac_ext >&5 | |
3987 | rm -rf conftest* | |
3988 | bfd_cv_decl_needed_free=yes | |
3989 | fi | |
3990 | rm -f conftest* | |
3991 | fi | |
3992 | ||
3993 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
3994 | if test $bfd_cv_decl_needed_free = yes; then | |
3995 | cat >> confdefs.h <<\EOF | |
3996 | #define NEED_DECLARATION_FREE 1 | |
3997 | EOF | |
3998 | ||
3999 | fi | |
4000 | ||
4001 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
b3a90332 | 4002 | echo "configure:4003: checking whether strerror must be declared" >&5 |
c906108c SS |
4003 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4005 | else | |
4006 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4007 | #line 4008 "configure" |
c906108c SS |
4008 | #include "confdefs.h" |
4009 | ||
4010 | #include <stdio.h> | |
4011 | #ifdef HAVE_STRING_H | |
4012 | #include <string.h> | |
4013 | #else | |
4014 | #ifdef HAVE_STRINGS_H | |
4015 | #include <strings.h> | |
4016 | #endif | |
4017 | #endif | |
4018 | #ifdef HAVE_STDLIB_H | |
4019 | #include <stdlib.h> | |
4020 | #endif | |
4021 | #ifdef HAVE_UNISTD_H | |
4022 | #include <unistd.h> | |
4023 | #endif | |
4024 | int main() { | |
4025 | char *(*pfn) = (char *(*)) strerror | |
4026 | ; return 0; } | |
4027 | EOF | |
b3a90332 | 4028 | if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4029 | rm -rf conftest* |
4030 | bfd_cv_decl_needed_strerror=no | |
4031 | else | |
4032 | echo "configure: failed program was:" >&5 | |
4033 | cat conftest.$ac_ext >&5 | |
4034 | rm -rf conftest* | |
4035 | bfd_cv_decl_needed_strerror=yes | |
4036 | fi | |
4037 | rm -f conftest* | |
4038 | fi | |
4039 | ||
4040 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4041 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4042 | cat >> confdefs.h <<\EOF | |
4043 | #define NEED_DECLARATION_STRERROR 1 | |
4044 | EOF | |
4045 | ||
4046 | fi | |
4047 | ||
4048 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
b3a90332 | 4049 | echo "configure:4050: checking whether strdup must be declared" >&5 |
c906108c SS |
4050 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4052 | else | |
4053 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4054 | #line 4055 "configure" |
c906108c SS |
4055 | #include "confdefs.h" |
4056 | ||
4057 | #include <stdio.h> | |
4058 | #ifdef HAVE_STRING_H | |
4059 | #include <string.h> | |
4060 | #else | |
4061 | #ifdef HAVE_STRINGS_H | |
4062 | #include <strings.h> | |
4063 | #endif | |
4064 | #endif | |
4065 | #ifdef HAVE_STDLIB_H | |
4066 | #include <stdlib.h> | |
4067 | #endif | |
4068 | #ifdef HAVE_UNISTD_H | |
4069 | #include <unistd.h> | |
4070 | #endif | |
4071 | int main() { | |
4072 | char *(*pfn) = (char *(*)) strdup | |
4073 | ; return 0; } | |
4074 | EOF | |
b3a90332 | 4075 | if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4076 | rm -rf conftest* |
4077 | bfd_cv_decl_needed_strdup=no | |
4078 | else | |
4079 | echo "configure: failed program was:" >&5 | |
4080 | cat conftest.$ac_ext >&5 | |
4081 | rm -rf conftest* | |
4082 | bfd_cv_decl_needed_strdup=yes | |
4083 | fi | |
4084 | rm -f conftest* | |
4085 | fi | |
4086 | ||
4087 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4088 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4089 | cat >> confdefs.h <<\EOF | |
4090 | #define NEED_DECLARATION_STRDUP 1 | |
4091 | EOF | |
4092 | ||
4093 | fi | |
4094 | ||
b83266a0 | 4095 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
b3a90332 | 4096 | echo "configure:4097: checking whether strstr must be declared" >&5 |
b83266a0 SS |
4097 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4098 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4099 | else | |
4100 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4101 | #line 4102 "configure" |
b83266a0 SS |
4102 | #include "confdefs.h" |
4103 | ||
4104 | #include <stdio.h> | |
4105 | #ifdef HAVE_STRING_H | |
4106 | #include <string.h> | |
4107 | #else | |
4108 | #ifdef HAVE_STRINGS_H | |
4109 | #include <strings.h> | |
4110 | #endif | |
4111 | #endif | |
4112 | #ifdef HAVE_STDLIB_H | |
4113 | #include <stdlib.h> | |
4114 | #endif | |
4115 | #ifdef HAVE_UNISTD_H | |
4116 | #include <unistd.h> | |
4117 | #endif | |
4118 | int main() { | |
4119 | char *(*pfn) = (char *(*)) strstr | |
4120 | ; return 0; } | |
4121 | EOF | |
b3a90332 | 4122 | if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 SS |
4123 | rm -rf conftest* |
4124 | bfd_cv_decl_needed_strstr=no | |
4125 | else | |
4126 | echo "configure: failed program was:" >&5 | |
4127 | cat conftest.$ac_ext >&5 | |
4128 | rm -rf conftest* | |
4129 | bfd_cv_decl_needed_strstr=yes | |
4130 | fi | |
4131 | rm -f conftest* | |
4132 | fi | |
4133 | ||
4134 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4135 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4136 | cat >> confdefs.h <<\EOF | |
4137 | #define NEED_DECLARATION_STRSTR 1 | |
4138 | EOF | |
4139 | ||
4140 | fi | |
4141 | ||
c906108c SS |
4142 | |
4143 | ||
4144 | # The following save_state_t checkery is only necessary for HPUX | |
4145 | # versions earlier than 10.20. When those fade from memory, this | |
4146 | # could be expunged. --jsm 1999-03-22 | |
4147 | ||
4148 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
b3a90332 | 4149 | echo "configure:4150: checking for HPUX save_state structure" >&5 |
c906108c | 4150 | cat > conftest.$ac_ext <<EOF |
b3a90332 | 4151 | #line 4152 "configure" |
c906108c SS |
4152 | #include "confdefs.h" |
4153 | #include <machine/save_state.h> | |
4154 | EOF | |
4155 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4156 | egrep "save_state_t" >/dev/null 2>&1; then | |
4157 | rm -rf conftest* | |
4158 | gdb_cv_hpux_savestate=yes | |
4159 | else | |
4160 | rm -rf conftest* | |
4161 | gdb_cv_hpux_savestate=no | |
4162 | fi | |
4163 | rm -f conftest* | |
4164 | ||
4165 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4166 | #line 4167 "configure" |
c906108c SS |
4167 | #include "confdefs.h" |
4168 | #include <machine/save_state.h> | |
4169 | EOF | |
4170 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4171 | egrep "ss_wide" >/dev/null 2>&1; then | |
4172 | rm -rf conftest* | |
4173 | gdb_cv_hpux_sswide=yes | |
4174 | else | |
4175 | rm -rf conftest* | |
4176 | gdb_cv_hpux_sswide=no | |
4177 | fi | |
4178 | rm -f conftest* | |
4179 | ||
4180 | if test $gdb_cv_hpux_savestate = yes | |
4181 | then | |
4182 | cat >> confdefs.h <<\EOF | |
4183 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
4184 | EOF | |
4185 | ||
4186 | fi | |
4187 | if test $gdb_cv_hpux_sswide = yes | |
4188 | then | |
4189 | cat >> confdefs.h <<\EOF | |
4190 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
4191 | EOF | |
4192 | ||
4193 | fi | |
4194 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
4195 | ||
4196 | ||
4197 | # If we are configured native on GNU/Linux, work around problems with | |
4198 | # sys/procfs.h | |
c3f6f71d | 4199 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
4200 | |
4201 | if test "${target}" = "${host}"; then | |
4202 | case "${host}" in | |
4203 | i[3456]86-*-linux*) | |
4204 | cat >> confdefs.h <<\EOF | |
4205 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
4206 | EOF | |
4207 | ||
4208 | cat >> confdefs.h <<\EOF | |
4209 | #define sys_quotactl 1 | |
4210 | EOF | |
4211 | ||
4212 | ;; | |
c5394b80 | 4213 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
4214 | cat >> confdefs.h <<\EOF |
4215 | #define NEW_PROC_API 1 | |
c906108c SS |
4216 | EOF |
4217 | ||
c3f6f71d JM |
4218 | ;; |
4219 | # FIXME: we would like to define NEW_PROC_API for all versions of | |
4220 | # Solaris from 2.6 on... but it isn't quite working yet. Seems | |
4221 | # to work on sparc 2.6, so let's try it out there. | |
4222 | sparc-sun-solaris2.6) | |
4223 | cat >> confdefs.h <<\EOF | |
4224 | #define NEW_PROC_API 1 | |
4225 | EOF | |
4226 | ||
4227 | ;; | |
4228 | esac | |
c906108c SS |
4229 | fi |
4230 | ||
4231 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4232 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4233 | echo "configure:4234: checking for pstatus_t in sys/procfs.h" >&5 |
c906108c SS |
4234 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
4235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4236 | else | |
4237 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4238 | #line 4239 "configure" |
c906108c SS |
4239 | #include "confdefs.h" |
4240 | #include <sys/procfs.h> | |
4241 | int main() { | |
4242 | pstatus_t avar | |
4243 | ; return 0; } | |
4244 | EOF | |
b3a90332 | 4245 | if { (eval echo configure:4246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4246 | rm -rf conftest* |
4247 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
4248 | else | |
4249 | echo "configure: failed program was:" >&5 | |
4250 | cat conftest.$ac_ext >&5 | |
4251 | rm -rf conftest* | |
4252 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
4253 | ||
4254 | fi | |
4255 | rm -f conftest* | |
4256 | fi | |
4257 | ||
4258 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
4259 | cat >> confdefs.h <<\EOF | |
4260 | #define HAVE_PSTATUS_T 1 | |
4261 | EOF | |
4262 | ||
4263 | fi | |
4264 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
4265 | ||
4266 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4267 | echo "configure:4268: checking for prrun_t in sys/procfs.h" >&5 |
c906108c SS |
4268 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
4269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4270 | else | |
4271 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4272 | #line 4273 "configure" |
c906108c SS |
4273 | #include "confdefs.h" |
4274 | #include <sys/procfs.h> | |
4275 | int main() { | |
4276 | prrun_t avar | |
4277 | ; return 0; } | |
4278 | EOF | |
b3a90332 | 4279 | if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4280 | rm -rf conftest* |
4281 | bfd_cv_have_sys_procfs_type_prrun_t=yes | |
4282 | else | |
4283 | echo "configure: failed program was:" >&5 | |
4284 | cat conftest.$ac_ext >&5 | |
4285 | rm -rf conftest* | |
4286 | bfd_cv_have_sys_procfs_type_prrun_t=no | |
4287 | ||
4288 | fi | |
4289 | rm -f conftest* | |
4290 | fi | |
4291 | ||
4292 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then | |
4293 | cat >> confdefs.h <<\EOF | |
4294 | #define HAVE_PRRUN_T 1 | |
4295 | EOF | |
4296 | ||
4297 | fi | |
4298 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 | |
4299 | ||
4300 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4301 | echo "configure:4302: checking for gregset_t in sys/procfs.h" >&5 |
c906108c SS |
4302 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
4303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4304 | else | |
4305 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4306 | #line 4307 "configure" |
c906108c SS |
4307 | #include "confdefs.h" |
4308 | #include <sys/procfs.h> | |
4309 | int main() { | |
4310 | gregset_t avar | |
4311 | ; return 0; } | |
4312 | EOF | |
b3a90332 | 4313 | if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4314 | rm -rf conftest* |
4315 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
4316 | else | |
4317 | echo "configure: failed program was:" >&5 | |
4318 | cat conftest.$ac_ext >&5 | |
4319 | rm -rf conftest* | |
4320 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
4321 | ||
4322 | fi | |
4323 | rm -f conftest* | |
4324 | fi | |
4325 | ||
4326 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then | |
4327 | cat >> confdefs.h <<\EOF | |
4328 | #define HAVE_GREGSET_T 1 | |
4329 | EOF | |
4330 | ||
4331 | fi | |
4332 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 | |
4333 | ||
4334 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4335 | echo "configure:4336: checking for fpregset_t in sys/procfs.h" >&5 |
c906108c SS |
4336 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
4337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4338 | else | |
4339 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4340 | #line 4341 "configure" |
c906108c SS |
4341 | #include "confdefs.h" |
4342 | #include <sys/procfs.h> | |
4343 | int main() { | |
4344 | fpregset_t avar | |
4345 | ; return 0; } | |
4346 | EOF | |
b3a90332 | 4347 | if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4348 | rm -rf conftest* |
4349 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
4350 | else | |
4351 | echo "configure: failed program was:" >&5 | |
4352 | cat conftest.$ac_ext >&5 | |
4353 | rm -rf conftest* | |
4354 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
4355 | ||
4356 | fi | |
4357 | rm -f conftest* | |
4358 | fi | |
4359 | ||
4360 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
4361 | cat >> confdefs.h <<\EOF | |
4362 | #define HAVE_FPREGSET_T 1 | |
4363 | EOF | |
4364 | ||
4365 | fi | |
4366 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
4367 | ||
3862412b | 4368 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b3a90332 | 4369 | echo "configure:4370: checking for prgregset_t in sys/procfs.h" >&5 |
3862412b MK |
4370 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
4371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4372 | else | |
4373 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4374 | #line 4375 "configure" |
3862412b MK |
4375 | #include "confdefs.h" |
4376 | #include <sys/procfs.h> | |
4377 | int main() { | |
4378 | prgregset_t avar | |
4379 | ; return 0; } | |
4380 | EOF | |
b3a90332 | 4381 | if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4382 | rm -rf conftest* |
4383 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
4384 | else | |
4385 | echo "configure: failed program was:" >&5 | |
4386 | cat conftest.$ac_ext >&5 | |
4387 | rm -rf conftest* | |
4388 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
4389 | ||
4390 | fi | |
4391 | rm -f conftest* | |
4392 | fi | |
4393 | ||
4394 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
4395 | cat >> confdefs.h <<\EOF | |
4396 | #define HAVE_PRGREGSET_T 1 | |
4397 | EOF | |
4398 | ||
4399 | fi | |
4400 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
4401 | ||
4402 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4403 | echo "configure:4404: checking for prfpregset_t in sys/procfs.h" >&5 |
3862412b MK |
4404 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
4405 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4406 | else | |
4407 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4408 | #line 4409 "configure" |
3862412b MK |
4409 | #include "confdefs.h" |
4410 | #include <sys/procfs.h> | |
4411 | int main() { | |
4412 | prfpregset_t avar | |
4413 | ; return 0; } | |
4414 | EOF | |
b3a90332 | 4415 | if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4416 | rm -rf conftest* |
4417 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
4418 | else | |
4419 | echo "configure: failed program was:" >&5 | |
4420 | cat conftest.$ac_ext >&5 | |
4421 | rm -rf conftest* | |
4422 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
4423 | ||
4424 | fi | |
4425 | rm -f conftest* | |
4426 | fi | |
4427 | ||
4428 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
4429 | cat >> confdefs.h <<\EOF | |
4430 | #define HAVE_PRFPREGSET_T 1 | |
4431 | EOF | |
4432 | ||
4433 | fi | |
4434 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
4435 | ||
4436 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4437 | echo "configure:4438: checking for lwpid_t in sys/procfs.h" >&5 |
3862412b MK |
4438 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
4439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4440 | else | |
4441 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4442 | #line 4443 "configure" |
3862412b MK |
4443 | #include "confdefs.h" |
4444 | #include <sys/procfs.h> | |
4445 | int main() { | |
4446 | lwpid_t avar | |
4447 | ; return 0; } | |
4448 | EOF | |
b3a90332 | 4449 | if { (eval echo configure:4450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4450 | rm -rf conftest* |
4451 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
4452 | else | |
4453 | echo "configure: failed program was:" >&5 | |
4454 | cat conftest.$ac_ext >&5 | |
4455 | rm -rf conftest* | |
4456 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
4457 | ||
4458 | fi | |
4459 | rm -f conftest* | |
4460 | fi | |
4461 | ||
4462 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then | |
4463 | cat >> confdefs.h <<\EOF | |
4464 | #define HAVE_LWPID_T 1 | |
4465 | EOF | |
4466 | ||
4467 | fi | |
4468 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
4469 | ||
4470 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4471 | echo "configure:4472: checking for psaddr_t in sys/procfs.h" >&5 |
3862412b MK |
4472 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
4473 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4474 | else | |
4475 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4476 | #line 4477 "configure" |
3862412b MK |
4477 | #include "confdefs.h" |
4478 | #include <sys/procfs.h> | |
4479 | int main() { | |
4480 | psaddr_t avar | |
4481 | ; return 0; } | |
4482 | EOF | |
b3a90332 | 4483 | if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b MK |
4484 | rm -rf conftest* |
4485 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
4486 | else | |
4487 | echo "configure: failed program was:" >&5 | |
4488 | cat conftest.$ac_ext >&5 | |
4489 | rm -rf conftest* | |
4490 | bfd_cv_have_sys_procfs_type_psaddr_t=no | |
4491 | ||
4492 | fi | |
4493 | rm -f conftest* | |
4494 | fi | |
4495 | ||
4496 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then | |
4497 | cat >> confdefs.h <<\EOF | |
4498 | #define HAVE_PSADDR_T 1 | |
4499 | EOF | |
4500 | ||
4501 | fi | |
4502 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
4503 | ||
c906108c SS |
4504 | |
4505 | ||
4506 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
b3a90332 | 4507 | echo "configure:4508: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
c906108c SS |
4508 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
4509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4510 | else | |
4511 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4512 | #line 4513 "configure" |
c906108c SS |
4513 | #include "confdefs.h" |
4514 | #include <unistd.h> | |
4515 | #include <sys/types.h> | |
4516 | #include <sys/procfs.h> | |
4517 | ||
4518 | int main() { | |
4519 | ||
4520 | int dummy;; | |
4521 | dummy = ioctl(0, PIOCSET, &dummy); | |
4522 | ||
4523 | ; return 0; } | |
4524 | EOF | |
b3a90332 | 4525 | if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4526 | rm -rf conftest* |
4527 | gdb_cv_have_procfs_piocset=yes | |
4528 | else | |
4529 | echo "configure: failed program was:" >&5 | |
4530 | cat conftest.$ac_ext >&5 | |
4531 | rm -rf conftest* | |
4532 | gdb_cv_have_procfs_piocset=no | |
4533 | fi | |
4534 | rm -f conftest* | |
4535 | fi | |
4536 | ||
4537 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
4538 | if test $gdb_cv_have_procfs_piocset = yes; then | |
4539 | cat >> confdefs.h <<\EOF | |
4540 | #define HAVE_PROCFS_PIOCSET 1 | |
4541 | EOF | |
4542 | ||
4543 | fi | |
4544 | fi | |
4545 | ||
4546 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
b3a90332 | 4547 | echo "configure:4548: checking for main in -lm" >&5 |
c906108c SS |
4548 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
4549 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4551 | else | |
4552 | ac_save_LIBS="$LIBS" | |
4553 | LIBS="-lm $LIBS" | |
4554 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4555 | #line 4556 "configure" |
c906108c SS |
4556 | #include "confdefs.h" |
4557 | ||
4558 | int main() { | |
4559 | main() | |
4560 | ; return 0; } | |
4561 | EOF | |
b3a90332 | 4562 | if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4563 | rm -rf conftest* |
4564 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4565 | else | |
4566 | echo "configure: failed program was:" >&5 | |
4567 | cat conftest.$ac_ext >&5 | |
4568 | rm -rf conftest* | |
4569 | eval "ac_cv_lib_$ac_lib_var=no" | |
4570 | fi | |
4571 | rm -f conftest* | |
4572 | LIBS="$ac_save_LIBS" | |
4573 | ||
4574 | fi | |
4575 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4576 | echo "$ac_t""yes" 1>&6 | |
4577 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4578 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4579 | cat >> confdefs.h <<EOF | |
4580 | #define $ac_tr_lib 1 | |
4581 | EOF | |
4582 | ||
4583 | LIBS="-lm $LIBS" | |
4584 | ||
4585 | else | |
4586 | echo "$ac_t""no" 1>&6 | |
4587 | fi | |
4588 | ||
4589 | ||
4590 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 | |
b3a90332 | 4591 | echo "configure:4592: checking for wctype in -lc" >&5 |
c906108c SS |
4592 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4593 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4594 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4595 | else | |
4596 | ac_save_LIBS="$LIBS" | |
4597 | LIBS="-lc $LIBS" | |
4598 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4599 | #line 4600 "configure" |
c906108c SS |
4600 | #include "confdefs.h" |
4601 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4602 | /* We use char because int might match the return type of a gcc2 | |
4603 | builtin and then its argument prototype would still apply. */ | |
4604 | char wctype(); | |
4605 | ||
4606 | int main() { | |
4607 | wctype() | |
4608 | ; return 0; } | |
4609 | EOF | |
b3a90332 | 4610 | if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4611 | rm -rf conftest* |
4612 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4613 | else | |
4614 | echo "configure: failed program was:" >&5 | |
4615 | cat conftest.$ac_ext >&5 | |
4616 | rm -rf conftest* | |
4617 | eval "ac_cv_lib_$ac_lib_var=no" | |
4618 | fi | |
4619 | rm -f conftest* | |
4620 | LIBS="$ac_save_LIBS" | |
4621 | ||
4622 | fi | |
4623 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4624 | echo "$ac_t""yes" 1>&6 | |
4625 | : | |
4626 | else | |
4627 | echo "$ac_t""no" 1>&6 | |
4628 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
b3a90332 | 4629 | echo "configure:4630: checking for wctype in -lw" >&5 |
c906108c SS |
4630 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4631 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4632 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4633 | else | |
4634 | ac_save_LIBS="$LIBS" | |
4635 | LIBS="-lw $LIBS" | |
4636 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4637 | #line 4638 "configure" |
c906108c SS |
4638 | #include "confdefs.h" |
4639 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4640 | /* We use char because int might match the return type of a gcc2 | |
4641 | builtin and then its argument prototype would still apply. */ | |
4642 | char wctype(); | |
4643 | ||
4644 | int main() { | |
4645 | wctype() | |
4646 | ; return 0; } | |
4647 | EOF | |
b3a90332 | 4648 | if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4649 | rm -rf conftest* |
4650 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4651 | else | |
4652 | echo "configure: failed program was:" >&5 | |
4653 | cat conftest.$ac_ext >&5 | |
4654 | rm -rf conftest* | |
4655 | eval "ac_cv_lib_$ac_lib_var=no" | |
4656 | fi | |
4657 | rm -f conftest* | |
4658 | LIBS="$ac_save_LIBS" | |
4659 | ||
4660 | fi | |
4661 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4662 | echo "$ac_t""yes" 1>&6 | |
4663 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
4664 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4665 | cat >> confdefs.h <<EOF | |
4666 | #define $ac_tr_lib 1 | |
4667 | EOF | |
4668 | ||
4669 | LIBS="-lw $LIBS" | |
4670 | ||
4671 | else | |
4672 | echo "$ac_t""no" 1>&6 | |
4673 | fi | |
4674 | ||
4675 | fi | |
4676 | ||
4677 | ||
4678 | ||
4679 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 | |
b3a90332 | 4680 | echo "configure:4681: checking for long long support in compiler" >&5 |
c906108c SS |
4681 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4683 | else | |
4684 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4685 | #line 4686 "configure" |
c906108c SS |
4686 | #include "confdefs.h" |
4687 | ||
4688 | int main() { | |
4689 | ||
4690 | extern long long foo; | |
4691 | switch (foo & 2) { case 0: return 1; } | |
4692 | ||
4693 | ; return 0; } | |
4694 | EOF | |
b3a90332 | 4695 | if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4696 | rm -rf conftest* |
4697 | gdb_cv_c_long_long=yes | |
4698 | else | |
4699 | echo "configure: failed program was:" >&5 | |
4700 | cat conftest.$ac_ext >&5 | |
4701 | rm -rf conftest* | |
4702 | gdb_cv_c_long_long=no | |
4703 | fi | |
4704 | rm -f conftest* | |
4705 | fi | |
4706 | ||
4707 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4708 | if test $gdb_cv_c_long_long = yes; then | |
4709 | cat >> confdefs.h <<\EOF | |
4710 | #define CC_HAS_LONG_LONG 1 | |
4711 | EOF | |
4712 | ||
4713 | fi | |
4714 | ||
4715 | ||
4716 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
b3a90332 | 4717 | echo "configure:4718: checking for long long support in printf" >&5 |
c906108c SS |
4718 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4719 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4720 | else | |
4721 | if test "$cross_compiling" = yes; then | |
4722 | gdb_cv_printf_has_long_long=no | |
4723 | else | |
4724 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4725 | #line 4726 "configure" |
c906108c SS |
4726 | #include "confdefs.h" |
4727 | ||
4728 | int main () { | |
4729 | char buf[32]; | |
4730 | long long l = 0; | |
4731 | l = (l << 16) + 0x0123; | |
4732 | l = (l << 16) + 0x4567; | |
4733 | l = (l << 16) + 0x89ab; | |
4734 | l = (l << 16) + 0xcdef; | |
4735 | sprintf (buf, "0x%016llx", l); | |
4736 | return (strcmp ("0x0123456789abcdef", buf)); | |
4737 | } | |
4738 | EOF | |
b3a90332 | 4739 | if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4740 | then |
4741 | gdb_cv_printf_has_long_long=yes | |
4742 | else | |
4743 | echo "configure: failed program was:" >&5 | |
4744 | cat conftest.$ac_ext >&5 | |
4745 | rm -fr conftest* | |
4746 | gdb_cv_printf_has_long_long=no | |
4747 | fi | |
4748 | rm -fr conftest* | |
4749 | fi | |
4750 | ||
4751 | fi | |
4752 | ||
4753 | if test $gdb_cv_printf_has_long_long = yes; then | |
4754 | cat >> confdefs.h <<\EOF | |
4755 | #define PRINTF_HAS_LONG_LONG 1 | |
4756 | EOF | |
4757 | ||
4758 | fi | |
4759 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
4760 | ||
4761 | ||
4762 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
b3a90332 | 4763 | echo "configure:4764: checking for long double support in compiler" >&5 |
c906108c SS |
4764 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
4765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4766 | else | |
4767 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4768 | #line 4769 "configure" |
c906108c SS |
4769 | #include "confdefs.h" |
4770 | ||
4771 | int main() { | |
4772 | long double foo; | |
4773 | ; return 0; } | |
4774 | EOF | |
b3a90332 | 4775 | if { (eval echo configure:4776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4776 | rm -rf conftest* |
4777 | ac_cv_c_long_double=yes | |
4778 | else | |
4779 | echo "configure: failed program was:" >&5 | |
4780 | cat conftest.$ac_ext >&5 | |
4781 | rm -rf conftest* | |
4782 | ac_cv_c_long_double=no | |
4783 | fi | |
4784 | rm -f conftest* | |
4785 | fi | |
4786 | ||
4787 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
4788 | if test $ac_cv_c_long_double = yes; then | |
4789 | cat >> confdefs.h <<\EOF | |
4790 | #define HAVE_LONG_DOUBLE 1 | |
4791 | EOF | |
4792 | ||
4793 | fi | |
4794 | ||
4795 | ||
4796 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
b3a90332 | 4797 | echo "configure:4798: checking for long double support in printf" >&5 |
c906108c SS |
4798 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
4799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4800 | else | |
4801 | if test "$cross_compiling" = yes; then | |
4802 | gdb_cv_printf_has_long_double=no | |
4803 | else | |
4804 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4805 | #line 4806 "configure" |
c906108c SS |
4806 | #include "confdefs.h" |
4807 | ||
4808 | int main () { | |
4809 | char buf[16]; | |
4810 | long double f = 3.141592653; | |
4811 | sprintf (buf, "%Lg", f); | |
4812 | return (strncmp ("3.14159", buf, 7)); | |
4813 | } | |
4814 | EOF | |
b3a90332 | 4815 | if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4816 | then |
4817 | gdb_cv_printf_has_long_double=yes | |
4818 | else | |
4819 | echo "configure: failed program was:" >&5 | |
4820 | cat conftest.$ac_ext >&5 | |
4821 | rm -fr conftest* | |
4822 | gdb_cv_printf_has_long_double=no | |
4823 | fi | |
4824 | rm -fr conftest* | |
4825 | fi | |
4826 | ||
4827 | fi | |
4828 | ||
4829 | if test $gdb_cv_printf_has_long_double = yes; then | |
4830 | cat >> confdefs.h <<\EOF | |
4831 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
4832 | EOF | |
4833 | ||
4834 | fi | |
4835 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
4836 | ||
4837 | ||
4838 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
b3a90332 | 4839 | echo "configure:4840: checking for long double support in scanf" >&5 |
c906108c SS |
4840 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
4841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4842 | else | |
4843 | if test "$cross_compiling" = yes; then | |
4844 | gdb_cv_scanf_has_long_double=no | |
4845 | else | |
4846 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4847 | #line 4848 "configure" |
c906108c SS |
4848 | #include "confdefs.h" |
4849 | ||
4850 | int main () { | |
4851 | char *buf = "3.141592653"; | |
4852 | long double f = 0; | |
4853 | sscanf (buf, "%Lg", &f); | |
4854 | return !(f > 3.14159 && f < 3.14160); | |
4855 | } | |
4856 | EOF | |
b3a90332 | 4857 | if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
4858 | then |
4859 | gdb_cv_scanf_has_long_double=yes | |
4860 | else | |
4861 | echo "configure: failed program was:" >&5 | |
4862 | cat conftest.$ac_ext >&5 | |
4863 | rm -fr conftest* | |
4864 | gdb_cv_scanf_has_long_double=no | |
4865 | fi | |
4866 | rm -fr conftest* | |
4867 | fi | |
4868 | ||
4869 | fi | |
4870 | ||
4871 | if test $gdb_cv_scanf_has_long_double = yes; then | |
4872 | cat >> confdefs.h <<\EOF | |
4873 | #define SCANF_HAS_LONG_DOUBLE 1 | |
4874 | EOF | |
4875 | ||
4876 | fi | |
4877 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
4878 | ||
4879 | for ac_hdr in unistd.h | |
4880 | do | |
4881 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4882 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b3a90332 | 4883 | echo "configure:4884: checking for $ac_hdr" >&5 |
c906108c SS |
4884 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4885 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4886 | else | |
4887 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4888 | #line 4889 "configure" |
c906108c SS |
4889 | #include "confdefs.h" |
4890 | #include <$ac_hdr> | |
4891 | EOF | |
4892 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 4893 | { (eval echo configure:4894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
4894 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4895 | if test -z "$ac_err"; then | |
4896 | rm -rf conftest* | |
4897 | eval "ac_cv_header_$ac_safe=yes" | |
4898 | else | |
4899 | echo "$ac_err" >&5 | |
4900 | echo "configure: failed program was:" >&5 | |
4901 | cat conftest.$ac_ext >&5 | |
4902 | rm -rf conftest* | |
4903 | eval "ac_cv_header_$ac_safe=no" | |
4904 | fi | |
4905 | rm -f conftest* | |
4906 | fi | |
4907 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4908 | echo "$ac_t""yes" 1>&6 | |
4909 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4910 | cat >> confdefs.h <<EOF | |
4911 | #define $ac_tr_hdr 1 | |
4912 | EOF | |
4913 | ||
4914 | else | |
4915 | echo "$ac_t""no" 1>&6 | |
4916 | fi | |
4917 | done | |
4918 | ||
4919 | for ac_func in getpagesize | |
4920 | do | |
4921 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b3a90332 | 4922 | echo "configure:4923: checking for $ac_func" >&5 |
c906108c SS |
4923 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4925 | else | |
4926 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4927 | #line 4928 "configure" |
c906108c SS |
4928 | #include "confdefs.h" |
4929 | /* System header to define __stub macros and hopefully few prototypes, | |
4930 | which can conflict with char $ac_func(); below. */ | |
4931 | #include <assert.h> | |
4932 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4933 | /* We use char because int might match the return type of a gcc2 | |
4934 | builtin and then its argument prototype would still apply. */ | |
4935 | char $ac_func(); | |
4936 | ||
4937 | int main() { | |
4938 | ||
4939 | /* The GNU C library defines this for functions which it implements | |
4940 | to always fail with ENOSYS. Some functions are actually named | |
4941 | something starting with __ and the normal name is an alias. */ | |
4942 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4943 | choke me | |
4944 | #else | |
4945 | $ac_func(); | |
4946 | #endif | |
4947 | ||
4948 | ; return 0; } | |
4949 | EOF | |
b3a90332 | 4950 | if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
4951 | rm -rf conftest* |
4952 | eval "ac_cv_func_$ac_func=yes" | |
4953 | else | |
4954 | echo "configure: failed program was:" >&5 | |
4955 | cat conftest.$ac_ext >&5 | |
4956 | rm -rf conftest* | |
4957 | eval "ac_cv_func_$ac_func=no" | |
4958 | fi | |
4959 | rm -f conftest* | |
4960 | fi | |
4961 | ||
4962 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4963 | echo "$ac_t""yes" 1>&6 | |
4964 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4965 | cat >> confdefs.h <<EOF | |
4966 | #define $ac_tr_func 1 | |
4967 | EOF | |
4968 | ||
4969 | else | |
4970 | echo "$ac_t""no" 1>&6 | |
4971 | fi | |
4972 | done | |
4973 | ||
4974 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
b3a90332 | 4975 | echo "configure:4976: checking for working mmap" >&5 |
c906108c SS |
4976 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
4977 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4978 | else | |
4979 | if test "$cross_compiling" = yes; then | |
4980 | ac_cv_func_mmap_fixed_mapped=no | |
4981 | else | |
4982 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 4983 | #line 4984 "configure" |
c906108c SS |
4984 | #include "confdefs.h" |
4985 | ||
4986 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
4987 | Here is a matrix of mmap possibilities: | |
4988 | mmap private not fixed | |
4989 | mmap private fixed at somewhere currently unmapped | |
4990 | mmap private fixed at somewhere already mapped | |
4991 | mmap shared not fixed | |
4992 | mmap shared fixed at somewhere currently unmapped | |
4993 | mmap shared fixed at somewhere already mapped | |
4994 | For private mappings, we should verify that changes cannot be read() | |
4995 | back from the file, nor mmap's back from the file at a different | |
4996 | address. (There have been systems where private was not correctly | |
4997 | implemented like the infamous i386 svr4.0, and systems where the | |
4998 | VM page cache was not coherent with the filesystem buffer cache | |
4999 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5000 | For shared mappings, we should conversely verify that changes get | |
5001 | propogated back to all the places they're supposed to be. | |
5002 | ||
5003 | Grep wants private fixed already mapped. | |
5004 | The main things grep needs to know about mmap are: | |
5005 | * does it exist and is it safe to write into the mmap'd area | |
5006 | * how to use it (BSD variants) */ | |
5007 | #include <sys/types.h> | |
5008 | #include <fcntl.h> | |
5009 | #include <sys/mman.h> | |
5010 | ||
5011 | /* This mess was copied from the GNU getpagesize.h. */ | |
5012 | #ifndef HAVE_GETPAGESIZE | |
5013 | # ifdef HAVE_UNISTD_H | |
5014 | # include <unistd.h> | |
5015 | # endif | |
5016 | ||
5017 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5018 | # ifndef HAVE_SYS_PARAM_H | |
5019 | # define HAVE_SYS_PARAM_H 1 | |
5020 | # endif | |
5021 | ||
5022 | # ifdef _SC_PAGESIZE | |
5023 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5024 | # else /* no _SC_PAGESIZE */ | |
5025 | # ifdef HAVE_SYS_PARAM_H | |
5026 | # include <sys/param.h> | |
5027 | # ifdef EXEC_PAGESIZE | |
5028 | # define getpagesize() EXEC_PAGESIZE | |
5029 | # else /* no EXEC_PAGESIZE */ | |
5030 | # ifdef NBPG | |
5031 | # define getpagesize() NBPG * CLSIZE | |
5032 | # ifndef CLSIZE | |
5033 | # define CLSIZE 1 | |
5034 | # endif /* no CLSIZE */ | |
5035 | # else /* no NBPG */ | |
5036 | # ifdef NBPC | |
5037 | # define getpagesize() NBPC | |
5038 | # else /* no NBPC */ | |
5039 | # ifdef PAGESIZE | |
5040 | # define getpagesize() PAGESIZE | |
5041 | # endif /* PAGESIZE */ | |
5042 | # endif /* no NBPC */ | |
5043 | # endif /* no NBPG */ | |
5044 | # endif /* no EXEC_PAGESIZE */ | |
5045 | # else /* no HAVE_SYS_PARAM_H */ | |
5046 | # define getpagesize() 8192 /* punt totally */ | |
5047 | # endif /* no HAVE_SYS_PARAM_H */ | |
5048 | # endif /* no _SC_PAGESIZE */ | |
5049 | ||
5050 | #endif /* no HAVE_GETPAGESIZE */ | |
5051 | ||
5052 | #ifdef __cplusplus | |
5053 | extern "C" { void *malloc(unsigned); } | |
5054 | #else | |
5055 | char *malloc(); | |
5056 | #endif | |
5057 | ||
5058 | int | |
5059 | main() | |
5060 | { | |
5061 | char *data, *data2, *data3; | |
5062 | int i, pagesize; | |
5063 | int fd; | |
5064 | ||
5065 | pagesize = getpagesize(); | |
5066 | ||
5067 | /* | |
5068 | * First, make a file with some known garbage in it. | |
5069 | */ | |
5070 | data = malloc(pagesize); | |
5071 | if (!data) | |
5072 | exit(1); | |
5073 | for (i = 0; i < pagesize; ++i) | |
5074 | *(data + i) = rand(); | |
5075 | umask(0); | |
5076 | fd = creat("conftestmmap", 0600); | |
5077 | if (fd < 0) | |
5078 | exit(1); | |
5079 | if (write(fd, data, pagesize) != pagesize) | |
5080 | exit(1); | |
5081 | close(fd); | |
5082 | ||
5083 | /* | |
5084 | * Next, try to mmap the file at a fixed address which | |
5085 | * already has something else allocated at it. If we can, | |
5086 | * also make sure that we see the same garbage. | |
5087 | */ | |
5088 | fd = open("conftestmmap", O_RDWR); | |
5089 | if (fd < 0) | |
5090 | exit(1); | |
5091 | data2 = malloc(2 * pagesize); | |
5092 | if (!data2) | |
5093 | exit(1); | |
5094 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5095 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5096 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5097 | exit(1); | |
5098 | for (i = 0; i < pagesize; ++i) | |
5099 | if (*(data + i) != *(data2 + i)) | |
5100 | exit(1); | |
5101 | ||
5102 | /* | |
5103 | * Finally, make sure that changes to the mapped area | |
5104 | * do not percolate back to the file as seen by read(). | |
5105 | * (This is a bug on some variants of i386 svr4.0.) | |
5106 | */ | |
5107 | for (i = 0; i < pagesize; ++i) | |
5108 | *(data2 + i) = *(data2 + i) + 1; | |
5109 | data3 = malloc(pagesize); | |
5110 | if (!data3) | |
5111 | exit(1); | |
5112 | if (read(fd, data3, pagesize) != pagesize) | |
5113 | exit(1); | |
5114 | for (i = 0; i < pagesize; ++i) | |
5115 | if (*(data + i) != *(data3 + i)) | |
5116 | exit(1); | |
5117 | close(fd); | |
5118 | unlink("conftestmmap"); | |
5119 | exit(0); | |
5120 | } | |
5121 | ||
5122 | EOF | |
b3a90332 | 5123 | if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
5124 | then |
5125 | ac_cv_func_mmap_fixed_mapped=yes | |
5126 | else | |
5127 | echo "configure: failed program was:" >&5 | |
5128 | cat conftest.$ac_ext >&5 | |
5129 | rm -fr conftest* | |
5130 | ac_cv_func_mmap_fixed_mapped=no | |
5131 | fi | |
5132 | rm -fr conftest* | |
5133 | fi | |
5134 | ||
5135 | fi | |
5136 | ||
5137 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5138 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5139 | cat >> confdefs.h <<\EOF | |
5140 | #define HAVE_MMAP 1 | |
5141 | EOF | |
5142 | ||
5143 | fi | |
5144 | ||
5145 | ||
5146 | ||
5147 | ||
5148 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5149 | case ${host_os} in | |
5150 | hpux*) | |
5151 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
b3a90332 | 5152 | echo "configure:5153: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
5153 | if test -f /usr/include/dce/cma_config.h ; then |
5154 | if test "$GCC" = "yes" ; then | |
5155 | echo "$ac_t""yes" 1>&6 | |
5156 | cat >> confdefs.h <<\EOF | |
5157 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
5158 | EOF | |
5159 | ||
5160 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
5161 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
dfcd3bfb | 5162 | CONFIG_INITS="${CONFIG_INITS} hpux-thread.c" |
c906108c SS |
5163 | else |
5164 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
5165 | fi | |
5166 | else | |
5167 | echo "$ac_t""no" 1>&6 | |
5168 | fi | |
5169 | ;; | |
5170 | solaris*) | |
5171 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
b3a90332 | 5172 | echo "configure:5173: checking for Solaris thread debugging library" >&5 |
c906108c SS |
5173 | if test -f /usr/lib/libthread_db.so.1 ; then |
5174 | echo "$ac_t""yes" 1>&6 | |
5175 | cat >> confdefs.h <<\EOF | |
5176 | #define HAVE_THREAD_DB_LIB 1 | |
5177 | EOF | |
5178 | ||
5179 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
5180 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
5181 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
b3a90332 | 5182 | echo "configure:5183: checking for dlopen in -ldl" >&5 |
c906108c SS |
5183 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
5184 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5185 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5186 | else | |
5187 | ac_save_LIBS="$LIBS" | |
5188 | LIBS="-ldl $LIBS" | |
5189 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5190 | #line 5191 "configure" |
c906108c SS |
5191 | #include "confdefs.h" |
5192 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5193 | /* We use char because int might match the return type of a gcc2 | |
5194 | builtin and then its argument prototype would still apply. */ | |
5195 | char dlopen(); | |
5196 | ||
5197 | int main() { | |
5198 | dlopen() | |
5199 | ; return 0; } | |
5200 | EOF | |
b3a90332 | 5201 | if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5202 | rm -rf conftest* |
5203 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5204 | else | |
5205 | echo "configure: failed program was:" >&5 | |
5206 | cat conftest.$ac_ext >&5 | |
5207 | rm -rf conftest* | |
5208 | eval "ac_cv_lib_$ac_lib_var=no" | |
5209 | fi | |
5210 | rm -f conftest* | |
5211 | LIBS="$ac_save_LIBS" | |
5212 | ||
5213 | fi | |
5214 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5215 | echo "$ac_t""yes" 1>&6 | |
5216 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
5217 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
5218 | cat >> confdefs.h <<EOF | |
5219 | #define $ac_tr_lib 1 | |
5220 | EOF | |
5221 | ||
5222 | LIBS="-ldl $LIBS" | |
5223 | ||
5224 | else | |
5225 | echo "$ac_t""no" 1>&6 | |
5226 | fi | |
5227 | ||
5228 | if test "$GCC" = "yes" ; then | |
5229 | # The GNU linker requires the -export-dynamic option to make | |
5230 | # all symbols visible in the dynamic symbol table. | |
5231 | hold_ldflags=$LDFLAGS | |
5232 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
b3a90332 | 5233 | echo "configure:5234: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
5234 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5235 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5236 | #line 5237 "configure" |
c906108c SS |
5237 | #include "confdefs.h" |
5238 | ||
5239 | int main() { | |
5240 | int i; | |
5241 | ; return 0; } | |
5242 | EOF | |
b3a90332 | 5243 | if { (eval echo configure:5244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5244 | rm -rf conftest* |
5245 | found=yes | |
5246 | else | |
5247 | echo "configure: failed program was:" >&5 | |
5248 | cat conftest.$ac_ext >&5 | |
5249 | rm -rf conftest* | |
5250 | found=no | |
5251 | fi | |
5252 | rm -f conftest* | |
5253 | LDFLAGS=$hold_ldflags | |
5254 | echo "$ac_t""$found" 1>&6 | |
5255 | if test $found = yes; then | |
5256 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5257 | fi | |
5258 | fi | |
5259 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
5260 | # at one point. | |
5261 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
b3a90332 | 5262 | echo "configure:5263: checking if <proc_service.h> is old" >&5 |
c906108c SS |
5263 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5264 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5265 | else | |
5266 | ||
5267 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5268 | #line 5269 "configure" |
c906108c SS |
5269 | #include "confdefs.h" |
5270 | ||
5271 | #include <proc_service.h> | |
5272 | ps_err_e ps_pdwrite | |
5273 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5274 | ||
5275 | int main() { | |
5276 | ||
5277 | ; return 0; } | |
5278 | EOF | |
b3a90332 | 5279 | if { (eval echo configure:5280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5280 | rm -rf conftest* |
5281 | gdb_cv_proc_service_is_old=no | |
5282 | else | |
5283 | echo "configure: failed program was:" >&5 | |
5284 | cat conftest.$ac_ext >&5 | |
5285 | rm -rf conftest* | |
5286 | gdb_cv_proc_service_is_old=yes | |
5287 | fi | |
5288 | rm -f conftest* | |
5289 | ||
5290 | fi | |
5291 | ||
5292 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5293 | if test $gdb_cv_proc_service_is_old = yes; then | |
5294 | cat >> confdefs.h <<\EOF | |
5295 | #define PROC_SERVICE_IS_OLD 1 | |
5296 | EOF | |
5297 | ||
5298 | fi | |
5299 | else | |
5300 | echo "$ac_t""no" 1>&6 | |
5301 | fi | |
5302 | ;; | |
5303 | esac | |
5304 | ||
5305 | fi | |
5306 | ||
fb40c209 AC |
5307 | |
5308 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
5309 | if test "${enable_gdbmi+set}" = set; then | |
5310 | enableval="$enable_gdbmi" | |
5311 | ||
5312 | case "${enable_gdbmi}" in | |
5313 | yes | no) ;; | |
5314 | "") enable_gdbmi=yes ;; | |
5315 | *) | |
5316 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
5317 | ;; | |
5318 | esac | |
5319 | ||
5320 | fi | |
5321 | ||
5322 | case ${enable_gdbmi} in | |
5323 | "yes" ) | |
5324 | if test -d "${srcdir}/mi" ; then | |
5325 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
5326 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
5327 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
5328 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 5329 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
5330 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
5331 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
5332 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
5333 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
5334 | fi |
5335 | ;; | |
5336 | esac | |
c906108c SS |
5337 | |
5338 | # Check whether --enable-tui or --disable-tui was given. | |
5339 | if test "${enable_tui+set}" = set; then | |
5340 | enableval="$enable_tui" | |
5341 | ||
5342 | case "${enable_tui}" in | |
5343 | yes | no) ;; | |
5344 | "") enable_tui=yes ;; | |
5345 | *) | |
5346 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
5347 | ;; | |
5348 | esac | |
5349 | ||
5350 | fi | |
5351 | ||
5352 | case ${enable_tui} in | |
5353 | "yes" ) | |
5354 | cat >> confdefs.h <<\EOF | |
5355 | #define TUI 1 | |
5356 | EOF | |
5357 | ||
5358 | BUILD_TUI=all-tui | |
5359 | TUI_LIBRARY=tui/libtui.a | |
5360 | ;; | |
5361 | * ) | |
5362 | BUILD_TUI= | |
5363 | TUI_LIBRARY= | |
5364 | ;; | |
5365 | esac | |
5366 | ||
5367 | ||
5368 | ||
5369 | # Check whether --enable-netrom or --disable-netrom was given. | |
5370 | if test "${enable_netrom+set}" = set; then | |
5371 | enableval="$enable_netrom" | |
5372 | case "${enableval}" in | |
5373 | yes) enable_netrom=yes ;; | |
5374 | no) enable_netrom=no ;; | |
5375 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5376 | esac | |
5377 | fi | |
5378 | ||
5379 | ||
5380 | if test "${enable_netrom}" = "yes"; then | |
5381 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
5382 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
dfcd3bfb | 5383 | CONFIG_INITS="${CONFIG_INITS} remote-nrom.c" |
c906108c SS |
5384 | fi |
5385 | ||
5386 | # Check whether --enable-build-warnings or --disable-build-warnings was given. | |
5387 | if test "${enable_build_warnings+set}" = set; then | |
5388 | enableval="$enable_build_warnings" | |
b0b1b869 AC |
5389 | |
5390 | # not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations | |
5391 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith" | |
c906108c SS |
5392 | case "${enableval}" in |
5393 | yes) ;; | |
5394 | no) build_warnings="-w";; | |
5395 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5396 | build_warnings="${build_warnings} ${t}";; | |
5397 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
5398 | build_warnings="${t} ${build_warnings}";; | |
5399 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
5400 | esac | |
d4f3574e SS |
5401 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
5402 | echo "Setting warning flags = $build_warnings" 6>&1 | |
c906108c | 5403 | fi |
104c1213 JM |
5404 | WARN_CFLAGS="" |
5405 | WERROR_CFLAGS="" | |
c906108c SS |
5406 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
5407 | then | |
104c1213 JM |
5408 | # Separate out the -Werror flag as some files just cannot be |
5409 | # compiled with it enabled. | |
5410 | for w in ${build_warnings}; do | |
5411 | case $w in | |
5412 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
5413 | *) WARN_CFLAGS="${WARN_CFLAGS} $w" | |
5414 | esac | |
5415 | done | |
c906108c | 5416 | fi |
d4f3574e SS |
5417 | else |
5418 | build_warnings="" | |
5419 | fi | |
5420 | ||
c906108c SS |
5421 | |
5422 | ||
104c1213 | 5423 | |
c906108c SS |
5424 | MMALLOC_CFLAGS= |
5425 | MMALLOC= | |
5426 | ||
5427 | ||
5428 | ||
5429 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5430 | if test "${with_mmalloc+set}" = set; then | |
5431 | withval="$with_mmalloc" | |
5432 | case "${withval}" in | |
5433 | yes) want_mmalloc=true ;; | |
5434 | no) want_mmalloc=false;; | |
5435 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5436 | esac | |
5437 | else | |
5438 | want_mmalloc=false | |
5439 | fi | |
5440 | ||
5441 | if test x$want_mmalloc = xtrue; then | |
5442 | cat >> confdefs.h <<\EOF | |
5443 | #define USE_MMALLOC 1 | |
5444 | EOF | |
5445 | ||
5446 | cat >> confdefs.h <<\EOF | |
5447 | #define MMCHECK_FORCE 1 | |
5448 | EOF | |
5449 | ||
5450 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5451 | MMALLOC='../mmalloc/libmmalloc.a' | |
5452 | fi | |
5453 | ||
7a292a7a SS |
5454 | |
5455 | # In the Cygwin environment, we need some additional flags. | |
5456 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
b3a90332 | 5457 | echo "configure:5458: checking for cygwin" >&5 |
7a292a7a SS |
5458 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
5459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5460 | else | |
5461 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5462 | #line 5463 "configure" |
7a292a7a SS |
5463 | #include "confdefs.h" |
5464 | ||
5465 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
5466 | lose | |
5467 | #endif | |
5468 | EOF | |
5469 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5470 | egrep "lose" >/dev/null 2>&1; then | |
5471 | rm -rf conftest* | |
5472 | gdb_cv_os_cygwin=yes | |
5473 | else | |
5474 | rm -rf conftest* | |
5475 | gdb_cv_os_cygwin=no | |
5476 | fi | |
5477 | rm -f conftest* | |
5478 | ||
5479 | fi | |
5480 | ||
5481 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
5482 | ||
5483 | DLLTOOL=${DLLTOOL-dlltool} | |
5484 | WINDRES=${WINDRES-windres} | |
5485 | ||
5486 | ||
5487 | ||
b83266a0 SS |
5488 | if test x$gdb_host = xgo32; then |
5489 | TERM_LIB= | |
5490 | else | |
c906108c SS |
5491 | if test x$gdb_cv_os_cygwin = xyes; then |
5492 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
5493 | else | |
5494 | TERM_LIB= | |
5495 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
b3a90332 | 5496 | echo "configure:5497: checking for tgetent in -lncurses" >&5 |
c906108c SS |
5497 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
5498 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5500 | else | |
5501 | ac_save_LIBS="$LIBS" | |
5502 | LIBS="-lncurses $LIBS" | |
5503 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5504 | #line 5505 "configure" |
c906108c SS |
5505 | #include "confdefs.h" |
5506 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5507 | /* We use char because int might match the return type of a gcc2 | |
5508 | builtin and then its argument prototype would still apply. */ | |
5509 | char tgetent(); | |
5510 | ||
5511 | int main() { | |
5512 | tgetent() | |
5513 | ; return 0; } | |
5514 | EOF | |
b3a90332 | 5515 | if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5516 | rm -rf conftest* |
5517 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5518 | else | |
5519 | echo "configure: failed program was:" >&5 | |
5520 | cat conftest.$ac_ext >&5 | |
5521 | rm -rf conftest* | |
5522 | eval "ac_cv_lib_$ac_lib_var=no" | |
5523 | fi | |
5524 | rm -f conftest* | |
5525 | LIBS="$ac_save_LIBS" | |
5526 | ||
5527 | fi | |
5528 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5529 | echo "$ac_t""yes" 1>&6 | |
5530 | TERM_LIB=-lncurses | |
5531 | else | |
5532 | echo "$ac_t""no" 1>&6 | |
5533 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
b3a90332 | 5534 | echo "configure:5535: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
5535 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
5536 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5537 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5538 | else | |
5539 | ac_save_LIBS="$LIBS" | |
5540 | LIBS="-lHcurses $LIBS" | |
5541 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5542 | #line 5543 "configure" |
c906108c SS |
5543 | #include "confdefs.h" |
5544 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5545 | /* We use char because int might match the return type of a gcc2 | |
5546 | builtin and then its argument prototype would still apply. */ | |
5547 | char tgetent(); | |
5548 | ||
5549 | int main() { | |
5550 | tgetent() | |
5551 | ; return 0; } | |
5552 | EOF | |
b3a90332 | 5553 | if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5554 | rm -rf conftest* |
5555 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5556 | else | |
5557 | echo "configure: failed program was:" >&5 | |
5558 | cat conftest.$ac_ext >&5 | |
5559 | rm -rf conftest* | |
5560 | eval "ac_cv_lib_$ac_lib_var=no" | |
5561 | fi | |
5562 | rm -f conftest* | |
5563 | LIBS="$ac_save_LIBS" | |
5564 | ||
5565 | fi | |
5566 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5567 | echo "$ac_t""yes" 1>&6 | |
5568 | TERM_LIB=-lHcurses | |
5569 | else | |
5570 | echo "$ac_t""no" 1>&6 | |
5571 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
b3a90332 | 5572 | echo "configure:5573: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
5573 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
5574 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5575 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5576 | else | |
5577 | ac_save_LIBS="$LIBS" | |
5578 | LIBS="-ltermlib $LIBS" | |
5579 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5580 | #line 5581 "configure" |
c906108c SS |
5581 | #include "confdefs.h" |
5582 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5583 | /* We use char because int might match the return type of a gcc2 | |
5584 | builtin and then its argument prototype would still apply. */ | |
5585 | char tgetent(); | |
5586 | ||
5587 | int main() { | |
5588 | tgetent() | |
5589 | ; return 0; } | |
5590 | EOF | |
b3a90332 | 5591 | if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5592 | rm -rf conftest* |
5593 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5594 | else | |
5595 | echo "configure: failed program was:" >&5 | |
5596 | cat conftest.$ac_ext >&5 | |
5597 | rm -rf conftest* | |
5598 | eval "ac_cv_lib_$ac_lib_var=no" | |
5599 | fi | |
5600 | rm -f conftest* | |
5601 | LIBS="$ac_save_LIBS" | |
5602 | ||
5603 | fi | |
5604 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5605 | echo "$ac_t""yes" 1>&6 | |
5606 | TERM_LIB=-ltermlib | |
5607 | else | |
5608 | echo "$ac_t""no" 1>&6 | |
5609 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
b3a90332 | 5610 | echo "configure:5611: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
5611 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
5612 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5613 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5614 | else | |
5615 | ac_save_LIBS="$LIBS" | |
5616 | LIBS="-ltermcap $LIBS" | |
5617 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5618 | #line 5619 "configure" |
c906108c SS |
5619 | #include "confdefs.h" |
5620 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5621 | /* We use char because int might match the return type of a gcc2 | |
5622 | builtin and then its argument prototype would still apply. */ | |
5623 | char tgetent(); | |
5624 | ||
5625 | int main() { | |
5626 | tgetent() | |
5627 | ; return 0; } | |
5628 | EOF | |
b3a90332 | 5629 | if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5630 | rm -rf conftest* |
5631 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5632 | else | |
5633 | echo "configure: failed program was:" >&5 | |
5634 | cat conftest.$ac_ext >&5 | |
5635 | rm -rf conftest* | |
5636 | eval "ac_cv_lib_$ac_lib_var=no" | |
5637 | fi | |
5638 | rm -f conftest* | |
5639 | LIBS="$ac_save_LIBS" | |
5640 | ||
5641 | fi | |
5642 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5643 | echo "$ac_t""yes" 1>&6 | |
5644 | TERM_LIB=-ltermcap | |
5645 | else | |
5646 | echo "$ac_t""no" 1>&6 | |
5647 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
b3a90332 | 5648 | echo "configure:5649: checking for tgetent in -lcurses" >&5 |
c906108c SS |
5649 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
5650 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5651 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5652 | else | |
5653 | ac_save_LIBS="$LIBS" | |
5654 | LIBS="-lcurses $LIBS" | |
5655 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5656 | #line 5657 "configure" |
c906108c SS |
5657 | #include "confdefs.h" |
5658 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5659 | /* We use char because int might match the return type of a gcc2 | |
5660 | builtin and then its argument prototype would still apply. */ | |
5661 | char tgetent(); | |
5662 | ||
5663 | int main() { | |
5664 | tgetent() | |
5665 | ; return 0; } | |
5666 | EOF | |
b3a90332 | 5667 | if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5668 | rm -rf conftest* |
5669 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5670 | else | |
5671 | echo "configure: failed program was:" >&5 | |
5672 | cat conftest.$ac_ext >&5 | |
5673 | rm -rf conftest* | |
5674 | eval "ac_cv_lib_$ac_lib_var=no" | |
5675 | fi | |
5676 | rm -f conftest* | |
5677 | LIBS="$ac_save_LIBS" | |
5678 | ||
5679 | fi | |
5680 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5681 | echo "$ac_t""yes" 1>&6 | |
5682 | TERM_LIB=-lcurses | |
5683 | else | |
5684 | echo "$ac_t""no" 1>&6 | |
5685 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
b3a90332 | 5686 | echo "configure:5687: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
5687 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
5688 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5690 | else | |
5691 | ac_save_LIBS="$LIBS" | |
5692 | LIBS="-lterminfo $LIBS" | |
5693 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 5694 | #line 5695 "configure" |
c906108c SS |
5695 | #include "confdefs.h" |
5696 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5697 | /* We use char because int might match the return type of a gcc2 | |
5698 | builtin and then its argument prototype would still apply. */ | |
5699 | char tgetent(); | |
5700 | ||
5701 | int main() { | |
5702 | tgetent() | |
5703 | ; return 0; } | |
5704 | EOF | |
b3a90332 | 5705 | if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
5706 | rm -rf conftest* |
5707 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5708 | else | |
5709 | echo "configure: failed program was:" >&5 | |
5710 | cat conftest.$ac_ext >&5 | |
5711 | rm -rf conftest* | |
5712 | eval "ac_cv_lib_$ac_lib_var=no" | |
5713 | fi | |
5714 | rm -f conftest* | |
5715 | LIBS="$ac_save_LIBS" | |
5716 | ||
5717 | fi | |
5718 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5719 | echo "$ac_t""yes" 1>&6 | |
5720 | TERM_LIB=-lterminfo | |
5721 | else | |
5722 | echo "$ac_t""no" 1>&6 | |
5723 | fi | |
5724 | ||
5725 | fi | |
5726 | ||
5727 | fi | |
5728 | ||
5729 | fi | |
5730 | ||
5731 | fi | |
5732 | ||
5733 | fi | |
5734 | ||
5735 | ||
5736 | if test "x$TERM_LIB" = x | |
5737 | then | |
5738 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
5739 | fi | |
5740 | fi | |
b83266a0 | 5741 | fi |
c906108c SS |
5742 | |
5743 | ||
cd0fc7c3 SS |
5744 | # libreadline needs libuser32.a in a cygwin environment |
5745 | WIN32LIBS= | |
5746 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
5747 | WIN32LIBS="-luser32" |
5748 | case "${target}" in | |
5749 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
5750 | ;; | |
5751 | esac | |
cd0fc7c3 | 5752 | fi |
c906108c | 5753 | |
7a292a7a | 5754 | |
3fc11d3e JM |
5755 | LIBGUI="../libgui/src/libgui.a" |
5756 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
5757 | ||
5758 | ||
7a292a7a | 5759 | |
8b93c638 JM |
5760 | # Check whether --with-cpu or --without-cpu was given. |
5761 | if test "${with_cpu+set}" = set; then | |
5762 | withval="$with_cpu" | |
5763 | case "${target}" in | |
5764 | powerpc-* | powerpcle-* ) | |
5765 | ## It would be nice to keep this table in sync with the one in | |
5766 | ## gcc/configure. | |
5767 | case "${with_cpu}" in | |
5768 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
5769 | | 604 | 750 ) | |
5770 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
5771 | ;; | |
5772 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
5773 | ## These are all RS6000 variants, as far as GDB is concerned. | |
5774 | with_cpu=rs6000 | |
5775 | ;; | |
5776 | 603e | ec603e ) | |
5777 | with_cpu=603 | |
5778 | ;; | |
5779 | 604e ) | |
5780 | with_cpu=604 | |
5781 | ;; | |
5782 | * ) | |
5783 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
5784 | with_cpu=ppc-uisa | |
5785 | ;; | |
5786 | esac | |
5787 | ;; | |
5788 | * ) | |
5789 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
5790 | ;; | |
5791 | esac | |
5792 | cat >> confdefs.h <<EOF | |
5793 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
5794 | EOF | |
5795 | ||
5796 | ||
5797 | fi | |
5798 | ||
5799 | ||
5800 | ||
3fc11d3e JM |
5801 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
5802 | if test "${enable_gdbtk+set}" = set; then | |
5803 | enableval="$enable_gdbtk" | |
5804 | case "${enableval}" in | |
5805 | yes) | |
5806 | case "$host" in | |
5807 | *go32*) | |
5808 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
5809 | enable_gdbtk=no ;; | |
5810 | *windows*) | |
5811 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
5812 | enable_gdbtk=no ;; | |
5813 | *) | |
5814 | enable_gdbtk=yes ;; | |
5815 | esac ;; | |
5816 | no) | |
5817 | enable_gdbtk=no ;; | |
5818 | *) | |
5819 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5820 | esac | |
5821 | else | |
5822 | ||
5823 | # Default is on for everything but go32 and Cygwin | |
5824 | case "$host" in | |
5825 | *go32* | *windows*) | |
5826 | ;; | |
5827 | *) | |
379d6434 AC |
5828 | if test -d "${srcdir}/gdbtk" ; then |
5829 | enable_gdbtk=yes | |
5830 | fi | |
5831 | ;; | |
5832 | esac | |
3fc11d3e JM |
5833 | |
5834 | fi | |
5835 | ||
5836 | ||
5837 | WIN32LDAPP= | |
5838 | ||
5839 | ||
5840 | ||
5841 | configdir="unix" | |
5842 | ||
5843 | GDBTKLIBS= | |
5844 | if test "${enable_gdbtk}" = "yes"; then | |
5845 | ||
5846 | ||
5847 | # | |
5848 | # Ok, lets find the tcl configuration | |
5849 | # First, look for one uninstalled. | |
5850 | # the alternative search directory is invoked by --with-tclconfig | |
5851 | # | |
5852 | ||
5853 | if test x"${no_tcl}" = x ; then | |
5854 | # we reset no_tcl in case something fails here | |
5855 | no_tcl=true | |
5856 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
5857 | if test "${with_tclconfig+set}" = set; then | |
5858 | withval="$with_tclconfig" | |
5859 | with_tclconfig=${withval} | |
5860 | fi | |
5861 | ||
5862 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
b3a90332 | 5863 | echo "configure:5864: checking for Tcl configuration" >&5 |
3fc11d3e JM |
5864 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5866 | else | |
5867 | ||
5868 | ||
5869 | # First check to see if --with-tclconfig was specified. | |
5870 | if test x"${with_tclconfig}" != x ; then | |
5871 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
5872 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
5873 | else | |
5874 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5875 | fi | |
5876 | fi | |
5877 | ||
5878 | # then check for a private Tcl installation | |
5879 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5880 | for i in \ | |
5881 | ../tcl \ | |
5882 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
5883 | ../../tcl \ | |
5884 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
5885 | ../../../tcl \ | |
5886 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
5887 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
5888 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
5889 | break | |
5890 | fi | |
5891 | done | |
5892 | fi | |
5893 | # check in a few common install locations | |
5894 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5895 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
5896 | if test -f "$i/tclConfig.sh" ; then | |
5897 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
5898 | break | |
5899 | fi | |
5900 | done | |
5901 | fi | |
5902 | # check in a few other private locations | |
5903 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5904 | for i in \ | |
5905 | ${srcdir}/../tcl \ | |
5906 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
5907 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
5908 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
5909 | break | |
5910 | fi | |
5911 | done | |
5912 | fi | |
5913 | ||
5914 | fi | |
5915 | ||
5916 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5917 | TCLCONFIG="# no Tcl configs found" | |
5918 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
5919 | else | |
5920 | no_tcl= | |
5921 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
5922 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5923 | fi | |
5924 | fi | |
5925 | ||
5926 | if test -z "${no_tcl}"; then | |
5927 | ||
5928 | . $TCLCONFIG | |
5929 | ||
5930 | ||
5931 | ||
5932 | ||
5933 | ||
5934 | ||
5935 | ||
5936 | ||
5937 | ||
5938 | ||
5939 | ||
5940 | ||
5941 | ||
5942 | ||
5943 | ||
5944 | ||
5945 | ||
5946 | ||
5947 | ||
5948 | ||
5949 | ||
5950 | ||
5951 | ||
5952 | ||
5953 | ||
5954 | ||
5955 | # | |
5956 | # Ok, lets find the tk configuration | |
5957 | # First, look for one uninstalled. | |
5958 | # the alternative search directory is invoked by --with-tkconfig | |
5959 | # | |
5960 | ||
5961 | if test x"${no_tk}" = x ; then | |
5962 | # we reset no_tk in case something fails here | |
5963 | no_tk=true | |
5964 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
5965 | if test "${with_tkconfig+set}" = set; then | |
5966 | withval="$with_tkconfig" | |
5967 | with_tkconfig=${withval} | |
5968 | fi | |
5969 | ||
5970 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
b3a90332 | 5971 | echo "configure:5972: checking for Tk configuration" >&5 |
3fc11d3e JM |
5972 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5974 | else | |
5975 | ||
5976 | ||
5977 | # First check to see if --with-tkconfig was specified. | |
5978 | if test x"${with_tkconfig}" != x ; then | |
5979 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
5980 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
5981 | else | |
5982 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5983 | fi | |
5984 | fi | |
5985 | ||
5986 | # then check for a private Tk library | |
5987 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5988 | for i in \ | |
5989 | ../tk \ | |
5990 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
5991 | ../../tk \ | |
5992 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
5993 | ../../../tk \ | |
5994 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
5995 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
5996 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
5997 | break | |
5998 | fi | |
5999 | done | |
6000 | fi | |
6001 | # check in a few common install locations | |
6002 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6003 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6004 | if test -f "$i/tkConfig.sh" ; then | |
6005 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
6006 | break | |
6007 | fi | |
6008 | done | |
6009 | fi | |
6010 | # check in a few other private locations | |
6011 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6012 | for i in \ | |
6013 | ${srcdir}/../tk \ | |
6014 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
6015 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
6016 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
6017 | break | |
6018 | fi | |
6019 | done | |
6020 | fi | |
6021 | ||
6022 | fi | |
6023 | ||
6024 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6025 | TKCONFIG="# no Tk configs found" | |
6026 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
6027 | else | |
6028 | no_tk= | |
6029 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
6030 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
6031 | fi | |
6032 | fi | |
6033 | ||
6034 | ||
6035 | ||
6036 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
6037 | # point to doing Tcl. | |
6038 | if test -z "${no_tk}"; then | |
6039 | ||
6040 | if test -f "$TKCONFIG" ; then | |
6041 | . $TKCONFIG | |
6042 | fi | |
6043 | ||
6044 | ||
6045 | ||
6046 | ||
6047 | ||
6048 | ||
6049 | ||
6050 | ||
6051 | ||
6052 | ||
6053 | ||
6054 | ||
6055 | ||
6056 | ||
6057 | # | |
6058 | # Ok, lets find the tcl source trees so we can use the headers | |
6059 | # Warning: transition of version 9 to 10 will break this algorithm | |
6060 | # because 10 sorts before 9. We also look for just tcl. We have to | |
6061 | # be careful that we don't match stuff like tclX by accident. | |
6062 | # the alternative search directory is involked by --with-tclinclude | |
6063 | # | |
6064 | ||
6065 | no_tcl=true | |
6066 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
b3a90332 | 6067 | echo "configure:6068: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
6068 | # Check whether --with-tclinclude or --without-tclinclude was given. |
6069 | if test "${with_tclinclude+set}" = set; then | |
6070 | withval="$with_tclinclude" | |
6071 | with_tclinclude=${withval} | |
6072 | fi | |
6073 | ||
6074 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
6075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6076 | else | |
6077 | ||
6078 | # first check to see if --with-tclinclude was specified | |
6079 | if test x"${with_tclinclude}" != x ; then | |
6080 | if test -f ${with_tclinclude}/tclInt.h ; then | |
6081 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
6082 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
6083 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
6084 | else | |
6085 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6086 | fi | |
6087 | fi | |
6088 | ||
6089 | # next check if it came with Tcl configuration file | |
6090 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
6091 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
6092 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
6093 | fi | |
6094 | fi | |
6095 | ||
6096 | # next check in private source directory | |
6097 | # | |
6098 | # since ls returns lowest version numbers first, reverse its output | |
6099 | if test x"${ac_cv_c_tclh}" = x ; then | |
6100 | for i in \ | |
6101 | ${srcdir}/../tcl \ | |
6102 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
6103 | ${srcdir}/../../tcl \ | |
6104 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
6105 | ${srcdir}/../../../tcl \ | |
6106 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
6107 | if test -f $i/generic/tclInt.h ; then | |
6108 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6109 | break | |
6110 | fi | |
6111 | done | |
6112 | fi | |
6113 | # finally check in a few common install locations | |
6114 | # | |
6115 | # since ls returns lowest version numbers first, reverse its output | |
6116 | if test x"${ac_cv_c_tclh}" = x ; then | |
6117 | for i in \ | |
6118 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
6119 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
6120 | /usr/local/src/tcl \ | |
6121 | /usr/local/lib/tcl \ | |
6122 | ${prefix}/include ; do | |
6123 | if test -f $i/generic/tclInt.h ; then | |
6124 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
6125 | break | |
6126 | fi | |
6127 | done | |
6128 | fi | |
6129 | # see if one is installed | |
6130 | if test x"${ac_cv_c_tclh}" = x ; then | |
6131 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
6132 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
b3a90332 | 6133 | echo "configure:6134: checking for tclInt.h" >&5 |
3fc11d3e JM |
6134 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6136 | else | |
6137 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 6138 | #line 6139 "configure" |
3fc11d3e JM |
6139 | #include "confdefs.h" |
6140 | #include <tclInt.h> | |
6141 | EOF | |
6142 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 6143 | { (eval echo configure:6144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6144 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6145 | if test -z "$ac_err"; then | |
6146 | rm -rf conftest* | |
6147 | eval "ac_cv_header_$ac_safe=yes" | |
6148 | else | |
6149 | echo "$ac_err" >&5 | |
6150 | echo "configure: failed program was:" >&5 | |
6151 | cat conftest.$ac_ext >&5 | |
6152 | rm -rf conftest* | |
6153 | eval "ac_cv_header_$ac_safe=no" | |
6154 | fi | |
6155 | rm -f conftest* | |
6156 | fi | |
6157 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6158 | echo "$ac_t""yes" 1>&6 | |
6159 | ac_cv_c_tclh=installed | |
6160 | else | |
6161 | echo "$ac_t""no" 1>&6 | |
6162 | ac_cv_c_tclh="" | |
6163 | fi | |
6164 | ||
6165 | fi | |
6166 | ||
6167 | fi | |
6168 | ||
6169 | if test x"${ac_cv_c_tclh}" = x ; then | |
6170 | TCLHDIR="# no Tcl private headers found" | |
6171 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
6172 | fi | |
6173 | if test x"${ac_cv_c_tclh}" != x ; then | |
6174 | no_tcl="" | |
6175 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
6176 | echo "$ac_t""is installed" 1>&6 | |
6177 | TCLHDIR="" | |
6178 | else | |
6179 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
6180 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
6181 | TCLHDIR="-I${ac_cv_c_tclh}" | |
6182 | fi | |
6183 | fi | |
6184 | ||
6185 | ||
6186 | ||
6187 | ||
6188 | # | |
6189 | # Ok, lets find the tk source trees so we can use the headers | |
6190 | # If the directory (presumably symlink) named "tk" exists, use that one | |
6191 | # in preference to any others. Same logic is used when choosing library | |
6192 | # and again with Tcl. The search order is the best place to look first, then in | |
6193 | # decreasing significance. The loop breaks if the trigger file is found. | |
6194 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
6195 | # directory. This converts the path from a relative to an absolute, so | |
6196 | # recursive cache variables for the path will work right. We check all | |
6197 | # the possible paths in one loop rather than many seperate loops to speed | |
6198 | # things up. | |
6199 | # the alternative search directory is involked by --with-tkinclude | |
6200 | # | |
6201 | no_tk=true | |
6202 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
b3a90332 | 6203 | echo "configure:6204: checking for Tk private headers" >&5 |
3fc11d3e JM |
6204 | # Check whether --with-tkinclude or --without-tkinclude was given. |
6205 | if test "${with_tkinclude+set}" = set; then | |
6206 | withval="$with_tkinclude" | |
6207 | with_tkinclude=${withval} | |
6208 | fi | |
6209 | ||
6210 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
6211 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6212 | else | |
6213 | ||
6214 | # first check to see if --with-tkinclude was specified | |
6215 | if test x"${with_tkinclude}" != x ; then | |
6216 | if test -f ${with_tkinclude}/tk.h ; then | |
6217 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
6218 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
6219 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
6220 | else | |
6221 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
6222 | fi | |
6223 | fi | |
6224 | ||
6225 | # next check if it came with Tk configuration file | |
6226 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
6227 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
6228 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
6229 | fi | |
6230 | fi | |
6231 | ||
6232 | # next check in private source directory | |
6233 | # | |
6234 | # since ls returns lowest version numbers first, reverse its output | |
6235 | if test x"${ac_cv_c_tkh}" = x ; then | |
6236 | for i in \ | |
6237 | ${srcdir}/../tk \ | |
6238 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
6239 | ${srcdir}/../../tk \ | |
6240 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
6241 | ${srcdir}/../../../tk \ | |
6242 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
6243 | if test -f $i/generic/tk.h ; then | |
6244 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6245 | break | |
6246 | fi | |
6247 | done | |
6248 | fi | |
6249 | # finally check in a few common install locations | |
6250 | # | |
6251 | # since ls returns lowest version numbers first, reverse its output | |
6252 | if test x"${ac_cv_c_tkh}" = x ; then | |
6253 | for i in \ | |
6254 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
6255 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
6256 | /usr/local/src/tk \ | |
6257 | /usr/local/lib/tk \ | |
6258 | ${prefix}/include ; do | |
6259 | if test -f $i/generic/tk.h ; then | |
6260 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
6261 | break | |
6262 | fi | |
6263 | done | |
6264 | fi | |
6265 | # see if one is installed | |
6266 | if test x"${ac_cv_c_tkh}" = x ; then | |
6267 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
6268 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
b3a90332 | 6269 | echo "configure:6270: checking for tk.h" >&5 |
3fc11d3e JM |
6270 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6271 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6272 | else | |
6273 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 6274 | #line 6275 "configure" |
3fc11d3e JM |
6275 | #include "confdefs.h" |
6276 | #include <tk.h> | |
6277 | EOF | |
6278 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 6279 | { (eval echo configure:6280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
6280 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6281 | if test -z "$ac_err"; then | |
6282 | rm -rf conftest* | |
6283 | eval "ac_cv_header_$ac_safe=yes" | |
6284 | else | |
6285 | echo "$ac_err" >&5 | |
6286 | echo "configure: failed program was:" >&5 | |
6287 | cat conftest.$ac_ext >&5 | |
6288 | rm -rf conftest* | |
6289 | eval "ac_cv_header_$ac_safe=no" | |
6290 | fi | |
6291 | rm -f conftest* | |
6292 | fi | |
6293 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
6294 | echo "$ac_t""yes" 1>&6 | |
6295 | ac_cv_c_tkh=installed | |
6296 | else | |
6297 | echo "$ac_t""no" 1>&6 | |
6298 | ac_cv_c_tkh="" | |
6299 | fi | |
6300 | ||
6301 | fi | |
6302 | ||
6303 | fi | |
6304 | ||
6305 | if test x"${ac_cv_c_tkh}" != x ; then | |
6306 | no_tk="" | |
6307 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
6308 | echo "$ac_t""is installed" 1>&6 | |
6309 | TKHDIR="" | |
6310 | else | |
6311 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
6312 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
6313 | TKHDIR="-I${ac_cv_c_tkh}" | |
6314 | fi | |
6315 | else | |
6316 | TKHDIR="# no Tk directory found" | |
6317 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
6318 | no_tk=true | |
6319 | fi | |
6320 | ||
6321 | ||
6322 | ||
6323 | ||
6324 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b3a90332 | 6325 | echo "configure:6326: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6326 | if test x"${ac_cv_c_itclh}" = x ; then |
6327 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
6328 | if test -f $i/generic/itcl.h ; then | |
6329 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
6330 | break | |
6331 | fi | |
6332 | done | |
6333 | fi | |
6334 | if test x"${ac_cv_c_itclh}" = x ; then | |
6335 | ITCLHDIR="# no Itcl private headers found" | |
6336 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
6337 | fi | |
6338 | if test x"${ac_cv_c_itclh}" != x ; then | |
6339 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
6340 | fi | |
6341 | # should always be here | |
6342 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
6343 | ||
6344 | #AC_SUBST(ITCLLIB) | |
6345 | ||
6346 | ||
6347 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b3a90332 | 6348 | echo "configure:6349: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6349 | if test x"${ac_cv_c_itkh}" = x ; then |
6350 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
6351 | if test -f $i/generic/itk.h ; then | |
6352 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
6353 | break | |
6354 | fi | |
6355 | done | |
6356 | fi | |
6357 | if test x"${ac_cv_c_itkh}" = x ; then | |
6358 | ITKHDIR="# no Itk private headers found" | |
6359 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
6360 | fi | |
6361 | if test x"${ac_cv_c_itkh}" != x ; then | |
6362 | ITKHDIR="-I${ac_cv_c_itkh}" | |
6363 | fi | |
6364 | # should always be here | |
6365 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
6366 | ||
6367 | #AC_SUBST(ITKLIB) | |
6368 | ||
6369 | ||
6370 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b3a90332 | 6371 | echo "configure:6372: checking for Tix private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
6372 | if test x"${ac_cv_c_tixh}" = x ; then |
6373 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
6374 | if test -f $i/generic/tix.h ; then | |
6375 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
6376 | break | |
6377 | fi | |
6378 | done | |
6379 | fi | |
6380 | if test x"${ac_cv_c_tixh}" = x ; then | |
6381 | TIXHDIR="# no Tix private headers found" | |
6382 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
6383 | fi | |
6384 | if test x"${ac_cv_c_tixh}" != x ; then | |
6385 | TIXHDIR="-I${ac_cv_c_tixh}" | |
6386 | fi | |
6387 | ||
6388 | ||
6389 | ||
6390 | # now look for Itcl library stuff | |
6391 | ||
6392 | ||
6393 | # | |
6394 | # Ok, lets find the itcl configuration | |
6395 | # First, look for one uninstalled. | |
6396 | # the alternative search directory is invoked by --with-itclconfig | |
6397 | # | |
6398 | ||
6399 | if test x"${no_itcl}" = x ; then | |
6400 | # we reset no_itcl in case something fails here | |
6401 | no_itcl=true | |
6402 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
6403 | if test "${with_itclconfig+set}" = set; then | |
6404 | withval="$with_itclconfig" | |
6405 | with_itclconfig=${withval} | |
6406 | fi | |
6407 | ||
6408 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
b3a90332 | 6409 | echo "configure:6410: checking for Itcl configuration" >&5 |
3fc11d3e JM |
6410 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
6411 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6412 | else | |
6413 | ||
6414 | ||
6415 | # First check to see if --with-itclconfig was specified. | |
6416 | if test x"${with_itclconfig}" != x ; then | |
6417 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
6418 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
6419 | else | |
6420 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
6421 | fi | |
6422 | fi | |
6423 | ||
6424 | # then check for a private Itcl library | |
6425 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6426 | for i in \ | |
6427 | ../itcl/itcl \ | |
6428 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
6429 | ../../itcl \ | |
6430 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
6431 | ../../../itcl \ | |
6432 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6433 | if test -f "$i/itclConfig.sh" ; then | |
6434 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6435 | break | |
6436 | fi | |
6437 | done | |
6438 | fi | |
6439 | # check in a few common install locations | |
6440 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6441 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6442 | if test -f "$i/itclConfig.sh" ; then | |
6443 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6444 | break | |
6445 | fi | |
6446 | done | |
6447 | fi | |
6448 | # check in a few other private locations | |
6449 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6450 | for i in \ | |
6451 | ${srcdir}/../itcl/itcl \ | |
6452 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
6453 | if test -f "$i/itclConfig.sh" ; then | |
6454 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
6455 | break | |
6456 | fi | |
6457 | done | |
6458 | fi | |
6459 | ||
6460 | fi | |
6461 | ||
6462 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
6463 | ITCLCONFIG="# no Itcl configs found" | |
6464 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
6465 | else | |
6466 | no_itcl= | |
6467 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
6468 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
6469 | fi | |
6470 | fi | |
6471 | ||
6472 | if test -z "${no_itcl}"; then | |
6473 | ||
6474 | if test -f "$ITCLCONFIG" ; then | |
6475 | . $ITCLCONFIG | |
6476 | fi | |
6477 | ||
6478 | ||
6479 | ||
6480 | ||
6481 | ||
6482 | ||
6483 | ||
6484 | ||
6485 | ||
6486 | ||
6487 | ||
6488 | case "${host}" in | |
6489 | *-*-cygwin*) | |
6490 | itcldir=../itcl/itcl/win/ | |
6491 | ;; | |
6492 | *) | |
6493 | itcldir=../itcl/itcl/unix/ | |
6494 | ;; | |
6495 | esac | |
6496 | ||
6497 | ||
6498 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
6499 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
6500 | fi | |
6501 | ||
6502 | ||
6503 | # now look for Itk library stuff | |
6504 | ||
6505 | # | |
6506 | # Ok, lets find the itk configuration | |
6507 | # First, look for one uninstalled. | |
6508 | # the alternative search directory is invoked by --with-itkconfig | |
6509 | # | |
6510 | ||
6511 | if test x"${no_itk}" = x ; then | |
6512 | # we reset no_itk in case something fails here | |
6513 | no_itk=true | |
6514 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
6515 | if test "${with_itkconfig+set}" = set; then | |
6516 | withval="$with_itkconfig" | |
6517 | with_itkconfig=${withval} | |
6518 | fi | |
6519 | ||
6520 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
b3a90332 | 6521 | echo "configure:6522: checking for Itk configuration" >&5 |
3fc11d3e JM |
6522 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
6523 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6524 | else | |
6525 | ||
6526 | ||
6527 | # First check to see if --with-itkconfig was specified. | |
6528 | if test x"${with_itkconfig}" != x ; then | |
6529 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
6530 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
6531 | else | |
6532 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
6533 | fi | |
6534 | fi | |
6535 | ||
6536 | # then check for a private Itk library | |
6537 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6538 | for i in \ | |
6539 | ../itcl/itk \ | |
6540 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
6541 | ../../itk \ | |
6542 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
6543 | ../../../itk \ | |
6544 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
6545 | if test -f "$i/itkConfig.sh" ; then | |
6546 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6547 | break | |
6548 | fi | |
6549 | done | |
6550 | fi | |
6551 | # check in a few common install locations | |
6552 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6553 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6554 | if test -f "$i/itkConfig.sh" ; then | |
6555 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6556 | break | |
6557 | fi | |
6558 | done | |
6559 | fi | |
6560 | # check in a few other private locations | |
6561 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6562 | for i in \ | |
6563 | ${srcdir}/../itcl/itk \ | |
6564 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
6565 | if test -f "$i/itkConfig.sh" ; then | |
6566 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
6567 | break | |
6568 | fi | |
6569 | done | |
6570 | fi | |
6571 | ||
6572 | fi | |
6573 | ||
6574 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
6575 | ITKCONFIG="# no Itk configs found" | |
6576 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
6577 | else | |
6578 | no_itk= | |
6579 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
6580 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
6581 | fi | |
6582 | fi | |
6583 | ||
6584 | ||
6585 | if test -z "${no_itcl}"; then | |
6586 | ||
6587 | if test -f "$ITKCONFIG" ; then | |
6588 | . $ITKCONFIG | |
6589 | fi | |
6590 | ||
6591 | ||
6592 | ||
6593 | ||
6594 | ||
6595 | ||
6596 | ||
6597 | ||
6598 | ||
6599 | ||
6600 | ||
6601 | ||
6602 | case "${host}" in | |
6603 | *-*-cygwin*) | |
6604 | itkdir=../itcl/itk/win/ | |
6605 | ;; | |
6606 | *) | |
6607 | itkdir=../itcl/itk/unix/ | |
6608 | ;; | |
6609 | esac | |
6610 | ||
6611 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
6612 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
6613 | fi | |
6614 | ||
6615 | # now look for Tix library stuff | |
6616 | ||
6617 | # | |
6618 | # Ok, lets find the tix configuration | |
6619 | # First, look for one uninstalled. | |
6620 | # the alternative search directory is invoked by --with-itkconfig | |
6621 | # | |
6622 | ||
6623 | if test x"${no_tix}" = x ; then | |
6624 | # we reset no_tix in case something fails here | |
6625 | no_tix=true | |
6626 | # Check whether --with-tixconfig or --without-tixconfig was given. | |
6627 | if test "${with_tixconfig+set}" = set; then | |
6628 | withval="$with_tixconfig" | |
6629 | with_tixconfig=${withval} | |
6630 | fi | |
6631 | ||
6632 | echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 | |
b3a90332 | 6633 | echo "configure:6634: checking for Tix configuration" >&5 |
3fc11d3e JM |
6634 | if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then |
6635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6636 | else | |
6637 | ||
6638 | ||
6639 | # First check to see if --with-tixconfig was specified. | |
6640 | if test x"${with_tixconfig}" != x ; then | |
6641 | if test -f "${with_tixconfig}/tixConfig.sh" ; then | |
6642 | ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` | |
6643 | else | |
6644 | { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } | |
6645 | fi | |
6646 | fi | |
6647 | ||
6648 | # then check for a private Tix library | |
6649 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6650 | for i in \ | |
6651 | ../tix \ | |
6652 | `ls -dr ../tix 2>/dev/null` \ | |
6653 | ../../tix \ | |
6654 | `ls -dr ../../tix 2>/dev/null` \ | |
6655 | ../../../tix \ | |
6656 | `ls -dr ../../../tix 2>/dev/null` ; do | |
6657 | echo "**** Looking at $i - with ${configdir}" | |
6658 | if test -f "$i/tixConfig.sh" ; then | |
6659 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6660 | break | |
6661 | fi | |
6662 | done | |
6663 | fi | |
6664 | # check in a few common install locations | |
6665 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6666 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
6667 | echo "**** Looking at $i" | |
6668 | if test -f "$i/tixConfig.sh" ; then | |
6669 | ac_cv_c_tixconfig=`(cd $i; pwd)` | |
6670 | break | |
6671 | fi | |
6672 | done | |
6673 | fi | |
6674 | # check in a few other private locations | |
6675 | echo "**** Other private locations" | |
6676 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6677 | for i in \ | |
6678 | ${srcdir}/../tix \ | |
6679 | `ls -dr ${srcdir}/../tix 2>/dev/null` ; do | |
6680 | echo "**** Looking at $i - with ${configdir}" | |
6681 | if test -f "$i/${configdir}/tixConfig.sh" ; then | |
6682 | ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` | |
6683 | break | |
6684 | fi | |
6685 | done | |
6686 | fi | |
6687 | ||
6688 | fi | |
6689 | ||
6690 | if test x"${ac_cv_c_tixconfig}" = x ; then | |
6691 | TIXCONFIG="# no Tix configs found" | |
6692 | echo "configure: warning: Can't find Tix configuration definitions" 1>&2 | |
6693 | else | |
6694 | no_tix= | |
6695 | TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh | |
6696 | echo "$ac_t""found $TIXCONFIG" 1>&6 | |
6697 | fi | |
6698 | fi | |
6699 | ||
6700 | ||
6701 | if test -z "${no_tix}"; then | |
6702 | ||
6703 | if test -f "$TIXCONFIG" ; then | |
6704 | . $TIXCONFIG | |
6705 | fi | |
6706 | ||
6707 | ||
6708 | ||
6709 | ||
6710 | ||
6711 | ||
6712 | ||
6713 | ||
6714 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
6715 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
6716 | fi | |
6717 | ||
3fc11d3e JM |
6718 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" |
6719 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
6720 | # know whether 8.2 will or not, but I bet it will. | |
6721 | # I don't have to worry about 7.x since we don't support it. | |
6722 | GDBTK_CFLAGS="" | |
6723 | if test "$GCC" = "yes"; then | |
6724 | if test "$TCL_VERSION" != "8.0" ; then | |
6725 | GDBTK_CFLAGS="-fwritable-strings" | |
6726 | fi | |
6727 | fi | |
6728 | ||
6729 | # Include some libraries that Tcl and Tk want. | |
6730 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
6731 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
6732 | # Yes, the ordering seems wrong here. But it isn't. | |
6733 | # TK_LIBS is the list of libraries that need to be linked | |
6734 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
6735 | # were in LIBS then any link tests after this point would | |
6736 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
6737 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
6738 | CONFIG_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" |
6739 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
6740 | CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" | |
b3a90332 AC |
6741 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
6742 | CONFIG_CLEAN="${CONFIG_ALL} \$(SUBDIR_GDBTK_CLEAN)" | |
e56ac5c3 AC |
6743 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
6744 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
6745 | |
6746 | if test x$gdb_cv_os_cygwin = xyes; then | |
6747 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
6748 | WIN32LDAPP="-Wl,--subsystem,console" | |
6749 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
6750 | fi | |
6751 | fi | |
6752 | fi | |
6753 | fi | |
6754 | ||
6755 | ||
6756 | ||
6757 | ||
6758 | ||
6759 | ||
6760 | ||
6761 | ||
6762 | ||
6763 | ||
6764 | ||
6765 | ||
6766 | ||
c906108c SS |
6767 | # If we find X, set shell vars x_includes and x_libraries to the |
6768 | # paths, otherwise set no_x=yes. | |
6769 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
6770 | # --without-x overrides everything else, but does not touch the cache. | |
6771 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
b3a90332 | 6772 | echo "configure:6773: checking for X" >&5 |
c906108c SS |
6773 | |
6774 | # Check whether --with-x or --without-x was given. | |
6775 | if test "${with_x+set}" = set; then | |
6776 | withval="$with_x" | |
6777 | : | |
6778 | fi | |
6779 | ||
6780 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
6781 | if test "x$with_x" = xno; then | |
6782 | # The user explicitly disabled X. | |
6783 | have_x=disabled | |
6784 | else | |
6785 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
6786 | # Both variables are already set. | |
6787 | have_x=yes | |
6788 | else | |
6789 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
6790 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6791 | else | |
6792 | # One or both of the vars are not set, and there is no cached value. | |
6793 | ac_x_includes=NO ac_x_libraries=NO | |
6794 | rm -fr conftestdir | |
6795 | if mkdir conftestdir; then | |
6796 | cd conftestdir | |
6797 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
6798 | cat > Imakefile <<'EOF' | |
6799 | acfindx: | |
6800 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
6801 | EOF | |
6802 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
6803 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
6804 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
6805 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
6806 | for ac_extension in a so sl; do | |
6807 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
6808 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
6809 | ac_im_usrlibdir=$ac_im_libdir; break | |
6810 | fi | |
6811 | done | |
6812 | # Screen out bogus values from the imake configuration. They are | |
6813 | # bogus both because they are the default anyway, and because | |
6814 | # using them would break gcc on systems where it needs fixed includes. | |
6815 | case "$ac_im_incroot" in | |
6816 | /usr/include) ;; | |
6817 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
6818 | esac | |
6819 | case "$ac_im_usrlibdir" in | |
6820 | /usr/lib | /lib) ;; | |
6821 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
6822 | esac | |
6823 | fi | |
6824 | cd .. | |
6825 | rm -fr conftestdir | |
6826 | fi | |
6827 | ||
6828 | if test "$ac_x_includes" = NO; then | |
6829 | # Guess where to find include files, by looking for this one X11 .h file. | |
6830 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
6831 | ||
6832 | # First, try using that file with no special directory specified. | |
6833 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 6834 | #line 6835 "configure" |
c906108c SS |
6835 | #include "confdefs.h" |
6836 | #include <$x_direct_test_include> | |
6837 | EOF | |
6838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b3a90332 | 6839 | { (eval echo configure:6840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
6840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6841 | if test -z "$ac_err"; then | |
6842 | rm -rf conftest* | |
6843 | # We can compile using X headers with no special include directory. | |
6844 | ac_x_includes= | |
6845 | else | |
6846 | echo "$ac_err" >&5 | |
6847 | echo "configure: failed program was:" >&5 | |
6848 | cat conftest.$ac_ext >&5 | |
6849 | rm -rf conftest* | |
6850 | # Look for the header file in a standard set of common directories. | |
6851 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
6852 | for ac_dir in \ | |
6853 | /usr/X11/include \ | |
6854 | /usr/X11R6/include \ | |
6855 | /usr/X11R5/include \ | |
6856 | /usr/X11R4/include \ | |
6857 | \ | |
6858 | /usr/include/X11 \ | |
6859 | /usr/include/X11R6 \ | |
6860 | /usr/include/X11R5 \ | |
6861 | /usr/include/X11R4 \ | |
6862 | \ | |
6863 | /usr/local/X11/include \ | |
6864 | /usr/local/X11R6/include \ | |
6865 | /usr/local/X11R5/include \ | |
6866 | /usr/local/X11R4/include \ | |
6867 | \ | |
6868 | /usr/local/include/X11 \ | |
6869 | /usr/local/include/X11R6 \ | |
6870 | /usr/local/include/X11R5 \ | |
6871 | /usr/local/include/X11R4 \ | |
6872 | \ | |
6873 | /usr/X386/include \ | |
6874 | /usr/x386/include \ | |
6875 | /usr/XFree86/include/X11 \ | |
6876 | \ | |
6877 | /usr/include \ | |
6878 | /usr/local/include \ | |
6879 | /usr/unsupported/include \ | |
6880 | /usr/athena/include \ | |
6881 | /usr/local/x11r5/include \ | |
6882 | /usr/lpp/Xamples/include \ | |
6883 | \ | |
6884 | /usr/openwin/include \ | |
6885 | /usr/openwin/share/include \ | |
6886 | ; \ | |
6887 | do | |
6888 | if test -r "$ac_dir/$x_direct_test_include"; then | |
6889 | ac_x_includes=$ac_dir | |
6890 | break | |
6891 | fi | |
6892 | done | |
6893 | fi | |
6894 | rm -f conftest* | |
6895 | fi # $ac_x_includes = NO | |
6896 | ||
6897 | if test "$ac_x_libraries" = NO; then | |
6898 | # Check for the libraries. | |
6899 | ||
6900 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
6901 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
6902 | ||
6903 | # See if we find them without any special options. | |
6904 | # Don't add to $LIBS permanently. | |
6905 | ac_save_LIBS="$LIBS" | |
6906 | LIBS="-l$x_direct_test_library $LIBS" | |
6907 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 6908 | #line 6909 "configure" |
c906108c SS |
6909 | #include "confdefs.h" |
6910 | ||
6911 | int main() { | |
6912 | ${x_direct_test_function}() | |
6913 | ; return 0; } | |
6914 | EOF | |
b3a90332 | 6915 | if { (eval echo configure:6916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
6916 | rm -rf conftest* |
6917 | LIBS="$ac_save_LIBS" | |
6918 | # We can link X programs with no special library path. | |
6919 | ac_x_libraries= | |
6920 | else | |
6921 | echo "configure: failed program was:" >&5 | |
6922 | cat conftest.$ac_ext >&5 | |
6923 | rm -rf conftest* | |
6924 | LIBS="$ac_save_LIBS" | |
6925 | # First see if replacing the include by lib works. | |
6926 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
6927 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
6928 | /usr/X11/lib \ | |
6929 | /usr/X11R6/lib \ | |
6930 | /usr/X11R5/lib \ | |
6931 | /usr/X11R4/lib \ | |
6932 | \ | |
6933 | /usr/lib/X11 \ | |
6934 | /usr/lib/X11R6 \ | |
6935 | /usr/lib/X11R5 \ | |
6936 | /usr/lib/X11R4 \ | |
6937 | \ | |
6938 | /usr/local/X11/lib \ | |
6939 | /usr/local/X11R6/lib \ | |
6940 | /usr/local/X11R5/lib \ | |
6941 | /usr/local/X11R4/lib \ | |
6942 | \ | |
6943 | /usr/local/lib/X11 \ | |
6944 | /usr/local/lib/X11R6 \ | |
6945 | /usr/local/lib/X11R5 \ | |
6946 | /usr/local/lib/X11R4 \ | |
6947 | \ | |
6948 | /usr/X386/lib \ | |
6949 | /usr/x386/lib \ | |
6950 | /usr/XFree86/lib/X11 \ | |
6951 | \ | |
6952 | /usr/lib \ | |
6953 | /usr/local/lib \ | |
6954 | /usr/unsupported/lib \ | |
6955 | /usr/athena/lib \ | |
6956 | /usr/local/x11r5/lib \ | |
6957 | /usr/lpp/Xamples/lib \ | |
6958 | /lib/usr/lib/X11 \ | |
6959 | \ | |
6960 | /usr/openwin/lib \ | |
6961 | /usr/openwin/share/lib \ | |
6962 | ; \ | |
6963 | do | |
6964 | for ac_extension in a so sl; do | |
6965 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
6966 | ac_x_libraries=$ac_dir | |
6967 | break 2 | |
6968 | fi | |
6969 | done | |
6970 | done | |
6971 | fi | |
6972 | rm -f conftest* | |
6973 | fi # $ac_x_libraries = NO | |
6974 | ||
6975 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
6976 | # Didn't find X anywhere. Cache the known absence of X. | |
6977 | ac_cv_have_x="have_x=no" | |
6978 | else | |
6979 | # Record where we found X for the cache. | |
6980 | ac_cv_have_x="have_x=yes \ | |
6981 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
6982 | fi | |
6983 | fi | |
6984 | fi | |
6985 | eval "$ac_cv_have_x" | |
6986 | fi # $with_x != no | |
6987 | ||
6988 | if test "$have_x" != yes; then | |
6989 | echo "$ac_t""$have_x" 1>&6 | |
6990 | no_x=yes | |
6991 | else | |
6992 | # If each of the values was on the command line, it overrides each guess. | |
6993 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
6994 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
6995 | # Update the cache value to reflect the command line values. | |
6996 | ac_cv_have_x="have_x=yes \ | |
6997 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
6998 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
6999 | fi | |
7000 | ||
7001 | ||
7a292a7a SS |
7002 | |
7003 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
7004 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
7005 | # This code just checks for a few cases where we'd like to ignore those | |
7006 | # definitions, even when they're present in the '.mt' file. These cases | |
7007 | # are when --disable-sim is specified, or if the simulator directory is | |
7008 | # not part of the soruce tree. | |
7009 | # | |
7010 | # Check whether --enable-sim or --disable-sim was given. | |
7011 | if test "${enable_sim+set}" = set; then | |
7012 | enableval="$enable_sim" | |
7013 | echo "enable_sim = $enable_sim"; | |
7014 | echo "enableval = ${enableval}"; | |
7015 | case "${enableval}" in | |
7016 | yes) ignore_sim=false ;; | |
7017 | no) ignore_sim=true ;; | |
7018 | *) ignore_sim=false ;; | |
7019 | esac | |
7020 | else | |
7021 | ignore_sim=false | |
7022 | fi | |
7023 | ||
7024 | ||
7025 | if test ! -d "${srcdir}/../sim"; then | |
7026 | ignore_sim=true | |
7027 | fi | |
7028 | ||
7029 | if test "${ignore_sim}" = "true"; then | |
7030 | IGNORE_SIM="SIM=" | |
7031 | IGNORE_SIM_OBS="SIM_OBS=" | |
7032 | else | |
7033 | IGNORE_SIM="" | |
7034 | IGNORE_SIM_OBS="" | |
7035 | cat >> confdefs.h <<\EOF | |
7036 | #define WITH_SIM 1 | |
7037 | EOF | |
7038 | ||
7039 | fi | |
7040 | ||
7041 | ||
7042 | ||
c906108c SS |
7043 | |
7044 | ||
7045 | ||
7046 | ||
7047 | ||
7048 | ||
dfcd3bfb | 7049 | |
e56ac5c3 AC |
7050 | |
7051 | ||
b3a90332 AC |
7052 | |
7053 | ||
c906108c SS |
7054 | # Begin stuff to support --enable-shared |
7055 | # Check whether --enable-shared or --disable-shared was given. | |
7056 | if test "${enable_shared+set}" = set; then | |
7057 | enableval="$enable_shared" | |
7058 | case "${enableval}" in | |
7059 | yes) shared=true ;; | |
7060 | no) shared=false ;; | |
7061 | *) shared=true ;; | |
7062 | esac | |
7063 | fi | |
7064 | ||
7065 | HLDFLAGS= | |
7066 | HLDENV= | |
7067 | # If we have shared libraries, try to set rpath reasonably. | |
7068 | if test "${shared}" = "true"; then | |
7069 | case "${host}" in | |
7070 | *-*-hpux*) | |
7071 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
7072 | ;; | |
7073 | *-*-irix5* | *-*-irix6*) | |
7074 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7075 | ;; | |
7076 | *-*-linux*aout*) | |
7077 | ;; | |
7078 | *-*-linux* | *-pc-linux-gnu) | |
7079 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
7080 | ;; | |
7081 | *-*-solaris*) | |
7082 | HLDFLAGS='-R $(libdir)' | |
7083 | ;; | |
7084 | *-*-sysv4*) | |
7085 | 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;' | |
7086 | ;; | |
7087 | esac | |
7088 | fi | |
7089 | ||
7090 | # On SunOS, if the linker supports the -rpath option, use it to | |
7091 | # prevent ../bfd and ../opcodes from being included in the run time | |
7092 | # search path. | |
7093 | case "${host}" in | |
7094 | *-*-sunos*) | |
7095 | echo 'main () { }' > conftest.c | |
7096 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
7097 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
7098 | : | |
7099 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
7100 | : | |
7101 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
7102 | : | |
7103 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
7104 | : | |
7105 | elif test "${shared}" = "true"; then | |
7106 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
7107 | else | |
7108 | HLDFLAGS='-Wl,-rpath=' | |
7109 | fi | |
7110 | rm -f conftest.t conftest.c conftest | |
7111 | ;; | |
7112 | esac | |
7113 | ||
7114 | ||
7115 | # End stuff to support --enable-shared | |
7116 | ||
7117 | # target_subdir is used by the testsuite to find the target libraries. | |
7118 | target_subdir= | |
7119 | if test "${host}" != "${target}"; then | |
7120 | target_subdir="${target_alias}/" | |
7121 | fi | |
7122 | ||
7123 | ||
7124 | frags= | |
7125 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
7126 | if test ! -f ${host_makefile_frag}; then | |
7127 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
7128 | fi | |
7129 | frags="$frags $host_makefile_frag" | |
7130 | ||
7131 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
7132 | if test ! -f ${target_makefile_frag}; then | |
7133 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
7134 | fi | |
7135 | frags="$frags $target_makefile_frag" | |
7136 | ||
7137 | ||
7138 | ||
7139 | ||
7140 | ||
7141 | hostfile=`sed -n ' | |
7142 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7143 | ' ${host_makefile_frag}` | |
7144 | ||
7145 | targetfile=`sed -n ' | |
7146 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7147 | ' ${target_makefile_frag}` | |
7148 | ||
7149 | # these really aren't orthogonal true/false values of the same condition, | |
7150 | # but shells are slow enough that I like to reuse the test conditions | |
7151 | # whenever possible | |
7152 | if test "${target}" = "${host}"; then | |
7153 | nativefile=`sed -n ' | |
7154 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
7155 | ' ${host_makefile_frag}` | |
7156 | # else | |
7157 | # GDBserver is only useful in a "native" enviroment | |
7158 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
7159 | fi | |
7160 | ||
7161 | ||
96baa820 JM |
7162 | SUBDIRS="doc testsuite nlm" |
7163 | if test "${enable_multi_ice}" = "yes"; then | |
7164 | SUBDIRS="${SUBDIRS} multi-ice" | |
7165 | fi | |
7166 | ||
7167 | ||
7168 | ||
c906108c SS |
7169 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
7170 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
7171 | # corresponding links. But we have to remove the xm.h files and tm.h | |
7172 | # files anyway, e.g. when switching from "configure host" to | |
7173 | # "configure none". | |
7174 | ||
7175 | files= | |
7176 | links= | |
7177 | rm -f xm.h | |
7178 | if test "${hostfile}" != ""; then | |
7179 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
7180 | links="${links} xm.h" | |
7181 | fi | |
7182 | rm -f tm.h | |
7183 | if test "${targetfile}" != ""; then | |
7184 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
7185 | links="${links} tm.h" | |
7186 | fi | |
7187 | rm -f nm.h | |
7188 | if test "${nativefile}" != ""; then | |
7189 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
7190 | links="${links} nm.h" | |
7191 | else | |
7192 | # A cross-only configuration. | |
7193 | files="${files} config/nm-empty.h" | |
7194 | links="${links} nm.h" | |
7195 | fi | |
3fc11d3e | 7196 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
b3a90332 | 7197 | echo "configure:7198: checking whether ln -s works" >&5 |
3fc11d3e JM |
7198 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
7199 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7200 | else | |
7201 | rm -f conftestdata | |
7202 | if ln -s X conftestdata 2>/dev/null | |
7203 | then | |
7204 | rm -f conftestdata | |
7205 | ac_cv_prog_LN_S="ln -s" | |
7206 | else | |
7207 | ac_cv_prog_LN_S=ln | |
7208 | fi | |
7209 | fi | |
7210 | LN_S="$ac_cv_prog_LN_S" | |
7211 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
7212 | echo "$ac_t""yes" 1>&6 | |
7213 | else | |
7214 | echo "$ac_t""no" 1>&6 | |
7215 | fi | |
7216 | ||
c906108c SS |
7217 | |
7218 | ||
7219 | ||
7220 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
b3a90332 | 7221 | echo "configure:7222: checking for Cygwin environment" >&5 |
c906108c SS |
7222 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
7223 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7224 | else | |
7225 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 7226 | #line 7227 "configure" |
c906108c SS |
7227 | #include "confdefs.h" |
7228 | ||
7229 | int main() { | |
7230 | ||
7231 | #ifndef __CYGWIN__ | |
7232 | #define __CYGWIN__ __CYGWIN32__ | |
7233 | #endif | |
7234 | return __CYGWIN__; | |
7235 | ; return 0; } | |
7236 | EOF | |
b3a90332 | 7237 | if { (eval echo configure:7238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7238 | rm -rf conftest* |
7239 | ac_cv_cygwin=yes | |
7240 | else | |
7241 | echo "configure: failed program was:" >&5 | |
7242 | cat conftest.$ac_ext >&5 | |
7243 | rm -rf conftest* | |
7244 | ac_cv_cygwin=no | |
7245 | fi | |
7246 | rm -f conftest* | |
7247 | rm -f conftest* | |
7248 | fi | |
7249 | ||
7250 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
7251 | CYGWIN= | |
7252 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
7253 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
b3a90332 | 7254 | echo "configure:7255: checking for mingw32 environment" >&5 |
c906108c SS |
7255 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
7256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7257 | else | |
7258 | cat > conftest.$ac_ext <<EOF | |
b3a90332 | 7259 | #line 7260 "configure" |
c906108c SS |
7260 | #include "confdefs.h" |
7261 | ||
7262 | int main() { | |
7263 | return __MINGW32__; | |
7264 | ; return 0; } | |
7265 | EOF | |
b3a90332 | 7266 | if { (eval echo configure:7267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7267 | rm -rf conftest* |
7268 | ac_cv_mingw32=yes | |
7269 | else | |
7270 | echo "configure: failed program was:" >&5 | |
7271 | cat conftest.$ac_ext >&5 | |
7272 | rm -rf conftest* | |
7273 | ac_cv_mingw32=no | |
7274 | fi | |
7275 | rm -f conftest* | |
7276 | rm -f conftest* | |
7277 | fi | |
7278 | ||
7279 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
7280 | MINGW32= | |
7281 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
7282 | ||
7283 | ||
7284 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b3a90332 | 7285 | echo "configure:7286: checking for executable suffix" >&5 |
c906108c SS |
7286 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
7287 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7288 | else | |
7289 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
7290 | ac_cv_exeext=.exe | |
7291 | else | |
7292 | rm -f conftest* | |
7293 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
7294 | ac_cv_exeext= | |
b3a90332 | 7295 | if { (eval echo configure:7296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
7296 | for file in conftest.*; do |
7297 | case $file in | |
379d6434 | 7298 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
7299 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
7300 | esac | |
7301 | done | |
7302 | else | |
7303 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
7304 | fi | |
7305 | rm -f conftest* | |
7306 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
7307 | fi | |
7308 | fi | |
7309 | ||
7310 | EXEEXT="" | |
7311 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
7312 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
7313 | ac_exeext=$EXEEXT | |
7314 | ||
7315 | ||
7316 | subdirs="$configdirs" | |
7317 | ||
7318 | trap '' 1 2 15 | |
7319 | cat > confcache <<\EOF | |
7320 | # This file is a shell script that caches the results of configure | |
7321 | # tests run on this system so they can be shared between configure | |
7322 | # scripts and configure runs. It is not useful on other systems. | |
7323 | # If it contains results you don't want to keep, you may remove or edit it. | |
7324 | # | |
7325 | # By default, configure uses ./config.cache as the cache file, | |
7326 | # creating it if it does not exist already. You can give configure | |
7327 | # the --cache-file=FILE option to use a different cache file; that is | |
7328 | # what configure does when it calls configure scripts in | |
7329 | # subdirectories, so they share the cache. | |
7330 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7331 | # config.status only pays attention to the cache file if you give it the | |
7332 | # --recheck option to rerun configure. | |
7333 | # | |
7334 | EOF | |
7335 | # The following way of writing the cache mishandles newlines in values, | |
7336 | # but we know of no workaround that is simple, portable, and efficient. | |
7337 | # So, don't put newlines in cache variables' values. | |
7338 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7339 | # and sets the high bit in the cache file unless we assign to the vars. | |
7340 | (set) 2>&1 | | |
7341 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7342 | *ac_space=\ *) | |
7343 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7344 | # turns \\\\ into \\, and sed turns \\ into \). | |
7345 | sed -n \ | |
7346 | -e "s/'/'\\\\''/g" \ | |
7347 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7348 | ;; | |
7349 | *) | |
7350 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7351 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7352 | ;; | |
7353 | esac >> confcache | |
7354 | if cmp -s $cache_file confcache; then | |
7355 | : | |
7356 | else | |
7357 | if test -w $cache_file; then | |
7358 | echo "updating cache $cache_file" | |
7359 | cat confcache > $cache_file | |
7360 | else | |
7361 | echo "not updating unwritable cache $cache_file" | |
7362 | fi | |
7363 | fi | |
7364 | rm -f confcache | |
7365 | ||
7366 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
7367 | ||
7368 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
7369 | # Let make expand exec_prefix. | |
7370 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7371 | ||
7372 | # Any assignment to VPATH causes Sun make to only execute | |
7373 | # the first set of double-colon rules, so remove it if not needed. | |
7374 | # If there is a colon in the path, we need to keep it. | |
7375 | if test "x$srcdir" = x.; then | |
7376 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
7377 | fi | |
7378 | ||
7379 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
7380 | ||
7381 | DEFS=-DHAVE_CONFIG_H | |
7382 | ||
7383 | # Without the "./", some shells look in PATH for config.status. | |
7384 | : ${CONFIG_STATUS=./config.status} | |
7385 | ||
7386 | echo creating $CONFIG_STATUS | |
7387 | rm -f $CONFIG_STATUS | |
7388 | cat > $CONFIG_STATUS <<EOF | |
7389 | #! /bin/sh | |
7390 | # Generated automatically by configure. | |
7391 | # Run this file to recreate the current configuration. | |
7392 | # This directory was configured as follows, | |
7393 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7394 | # | |
7395 | # $0 $ac_configure_args | |
7396 | # | |
7397 | # Compiler output produced by configure, useful for debugging | |
7398 | # configure, is in ./config.log if it exists. | |
7399 | ||
7400 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
7401 | for ac_option | |
7402 | do | |
7403 | case "\$ac_option" in | |
7404 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7405 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7406 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7407 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7408 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7409 | exit 0 ;; | |
7410 | -help | --help | --hel | --he | --h) | |
7411 | echo "\$ac_cs_usage"; exit 0 ;; | |
7412 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
7413 | esac | |
7414 | done | |
7415 | ||
7416 | ac_given_srcdir=$srcdir | |
7417 | ac_given_INSTALL="$INSTALL" | |
7418 | ||
7419 | trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
7420 | EOF | |
7421 | cat >> $CONFIG_STATUS <<EOF | |
7422 | ||
7423 | # Protect against being on the right side of a sed subst in config.status. | |
7424 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7425 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7426 | $ac_vpsub | |
7427 | $extrasub | |
7428 | s%@SHELL@%$SHELL%g | |
7429 | s%@CFLAGS@%$CFLAGS%g | |
7430 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7431 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7432 | s%@FFLAGS@%$FFLAGS%g | |
7433 | s%@DEFS@%$DEFS%g | |
7434 | s%@LDFLAGS@%$LDFLAGS%g | |
7435 | s%@LIBS@%$LIBS%g | |
7436 | s%@exec_prefix@%$exec_prefix%g | |
7437 | s%@prefix@%$prefix%g | |
7438 | s%@program_transform_name@%$program_transform_name%g | |
7439 | s%@bindir@%$bindir%g | |
7440 | s%@sbindir@%$sbindir%g | |
7441 | s%@libexecdir@%$libexecdir%g | |
7442 | s%@datadir@%$datadir%g | |
7443 | s%@sysconfdir@%$sysconfdir%g | |
7444 | s%@sharedstatedir@%$sharedstatedir%g | |
7445 | s%@localstatedir@%$localstatedir%g | |
7446 | s%@libdir@%$libdir%g | |
7447 | s%@includedir@%$includedir%g | |
7448 | s%@oldincludedir@%$oldincludedir%g | |
7449 | s%@infodir@%$infodir%g | |
7450 | s%@mandir@%$mandir%g | |
7451 | s%@CC@%$CC%g | |
7452 | s%@CPP@%$CPP%g | |
7453 | s%@host@%$host%g | |
7454 | s%@host_alias@%$host_alias%g | |
7455 | s%@host_cpu@%$host_cpu%g | |
7456 | s%@host_vendor@%$host_vendor%g | |
7457 | s%@host_os@%$host_os%g | |
7458 | s%@target@%$target%g | |
7459 | s%@target_alias@%$target_alias%g | |
7460 | s%@target_cpu@%$target_cpu%g | |
7461 | s%@target_vendor@%$target_vendor%g | |
7462 | s%@target_os@%$target_os%g | |
7463 | s%@build@%$build%g | |
7464 | s%@build_alias@%$build_alias%g | |
7465 | s%@build_cpu@%$build_cpu%g | |
7466 | s%@build_vendor@%$build_vendor%g | |
7467 | s%@build_os@%$build_os%g | |
7468 | s%@SET_MAKE@%$SET_MAKE%g | |
7469 | s%@RANLIB@%$RANLIB%g | |
7470 | s%@ALLOCA@%$ALLOCA%g | |
7471 | s%@USE_NLS@%$USE_NLS%g | |
7472 | s%@MSGFMT@%$MSGFMT%g | |
7473 | s%@GMSGFMT@%$GMSGFMT%g | |
7474 | s%@XGETTEXT@%$XGETTEXT%g | |
7475 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7476 | s%@CATALOGS@%$CATALOGS%g | |
7477 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7478 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7479 | s%@GMOFILES@%$GMOFILES%g | |
7480 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7481 | s%@INTLDEPS@%$INTLDEPS%g | |
7482 | s%@INTLLIBS@%$INTLLIBS%g | |
7483 | s%@INTLOBJS@%$INTLOBJS%g | |
7484 | s%@POFILES@%$POFILES%g | |
7485 | s%@POSUB@%$POSUB%g | |
7486 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7487 | s%@GT_NO@%$GT_NO%g | |
7488 | s%@GT_YES@%$GT_YES%g | |
7489 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7490 | s%@l@%$l%g | |
7a292a7a | 7491 | s%@AWK@%$AWK%g |
c906108c SS |
7492 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
7493 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7494 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7495 | s%@AR@%$AR%g | |
7496 | s%@YACC@%$YACC%g | |
75c6e08a | 7497 | s%@MIG@%$MIG%g |
c906108c SS |
7498 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
7499 | s%@BUILD_TUI@%$BUILD_TUI%g | |
7500 | s%@TUI_LIBRARY@%$TUI_LIBRARY%g | |
7501 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g | |
104c1213 | 7502 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
7503 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
7504 | s%@MMALLOC@%$MMALLOC%g | |
7a292a7a SS |
7505 | s%@DLLTOOL@%$DLLTOOL%g |
7506 | s%@WINDRES@%$WINDRES%g | |
c906108c | 7507 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 7508 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
7509 | s%@LIBGUI@%$LIBGUI%g |
7510 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
7511 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
7512 | s%@TCL_VERSION@%$TCL_VERSION%g | |
7513 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
7514 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
7515 | s%@TCL_CC@%$TCL_CC%g | |
7516 | s%@TCL_DEFS@%$TCL_DEFS%g | |
7517 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
7518 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
7519 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
7520 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
7521 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
7522 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
7523 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
7524 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
7525 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
7526 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
7527 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
7528 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
7529 | s%@TK_VERSION@%$TK_VERSION%g | |
7530 | s%@TK_DEFS@%$TK_DEFS%g | |
7531 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
7532 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
7533 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
7534 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
7535 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
7536 | s%@TCLHDIR@%$TCLHDIR%g | |
7537 | s%@TKHDIR@%$TKHDIR%g | |
7538 | s%@ITCLHDIR@%$ITCLHDIR%g | |
7539 | s%@ITKHDIR@%$ITKHDIR%g | |
7540 | s%@TIXHDIR@%$TIXHDIR%g | |
7541 | s%@ITCL_VERSION@%$ITCL_VERSION%g | |
7542 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
7543 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
7544 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
7545 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
7546 | s%@ITK_VERSION@%$ITK_VERSION%g | |
7547 | s%@ITK_DEFS@%$ITK_DEFS%g | |
7548 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
7549 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
7550 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7551 | s%@TIX_VERSION@%$TIX_VERSION%g | |
7552 | s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g | |
7a292a7a SS |
7553 | s%@X_CFLAGS@%$X_CFLAGS%g |
7554 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
7555 | s%@X_LIBS@%$X_LIBS%g | |
7556 | s%@ITCLLIB@%$ITCLLIB%g | |
7557 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
7558 | s%@ITKLIB@%$ITKLIB%g | |
7559 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7560 | s%@TIXLIB@%$TIXLIB%g | |
7561 | s%@TIX_DEPS@%$TIX_DEPS%g | |
7562 | s%@GDBTKLIBS@%$GDBTKLIBS%g | |
7563 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
7564 | s%@IGNORE_SIM@%$IGNORE_SIM%g | |
7565 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
7566 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
7567 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
7568 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g | |
7569 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 7570 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
7571 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
7572 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
7573 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
7574 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
7575 | s%@HLDFLAGS@%$HLDFLAGS%g |
7576 | s%@HLDENV@%$HLDENV%g | |
7577 | s%@target_subdir@%$target_subdir%g | |
7578 | /@host_makefile_frag@/r $host_makefile_frag | |
7579 | s%@host_makefile_frag@%%g | |
7580 | /@target_makefile_frag@/r $target_makefile_frag | |
7581 | s%@target_makefile_frag@%%g | |
7582 | s%@frags@%$frags%g | |
96baa820 | 7583 | s%@SUBDIRS@%$SUBDIRS%g |
7a292a7a | 7584 | s%@LN_S@%$LN_S%g |
c906108c SS |
7585 | s%@EXEEXT@%$EXEEXT%g |
7586 | s%@subdirs@%$subdirs%g | |
7587 | ||
7588 | CEOF | |
7589 | EOF | |
7590 | ||
7591 | cat >> $CONFIG_STATUS <<\EOF | |
7592 | ||
7593 | # Split the substitutions into bite-sized pieces for seds with | |
7594 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
7595 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
7596 | ac_file=1 # Number of current file. | |
7597 | ac_beg=1 # First line for current file. | |
7598 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7599 | ac_more_lines=: | |
7600 | ac_sed_cmds="" | |
7601 | while $ac_more_lines; do | |
7602 | if test $ac_beg -gt 1; then | |
7603 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7604 | else | |
7605 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7606 | fi | |
7607 | if test ! -s conftest.s$ac_file; then | |
7608 | ac_more_lines=false | |
7609 | rm -f conftest.s$ac_file | |
7610 | else | |
7611 | if test -z "$ac_sed_cmds"; then | |
7612 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
7613 | else | |
7614 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
7615 | fi | |
7616 | ac_file=`expr $ac_file + 1` | |
7617 | ac_beg=$ac_end | |
7618 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
7619 | fi | |
7620 | done | |
7621 | if test -z "$ac_sed_cmds"; then | |
7622 | ac_sed_cmds=cat | |
7623 | fi | |
7624 | EOF | |
7625 | ||
7626 | cat >> $CONFIG_STATUS <<EOF | |
7627 | ||
7628 | CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"} | |
7629 | EOF | |
7630 | cat >> $CONFIG_STATUS <<\EOF | |
7631 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
7632 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7633 | case "$ac_file" in | |
7634 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7635 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7636 | *) ac_file_in="${ac_file}.in" ;; | |
7637 | esac | |
7638 | ||
7639 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
7640 | ||
7641 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7642 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7643 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7644 | # The file is in a subdirectory. | |
7645 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7646 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
7647 | # A "../" for each directory in $ac_dir_suffix. | |
7648 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
7649 | else | |
7650 | ac_dir_suffix= ac_dots= | |
7651 | fi | |
7652 | ||
7653 | case "$ac_given_srcdir" in | |
7654 | .) srcdir=. | |
7655 | if test -z "$ac_dots"; then top_srcdir=. | |
7656 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
7657 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
7658 | *) # Relative path. | |
7659 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
7660 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
7661 | esac | |
7662 | ||
7663 | case "$ac_given_INSTALL" in | |
7664 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7665 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7666 | esac | |
7667 | ||
7668 | echo creating "$ac_file" | |
7669 | rm -f "$ac_file" | |
7670 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
7671 | case "$ac_file" in | |
7672 | *Makefile*) ac_comsub="1i\\ | |
7673 | # $configure_input" ;; | |
7674 | *) ac_comsub= ;; | |
7675 | esac | |
7676 | ||
7677 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7678 | sed -e "$ac_comsub | |
7679 | s%@configure_input@%$configure_input%g | |
7680 | s%@srcdir@%$srcdir%g | |
7681 | s%@top_srcdir@%$top_srcdir%g | |
7682 | s%@INSTALL@%$INSTALL%g | |
7683 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
7684 | fi; done | |
7685 | rm -f conftest.s* | |
7686 | ||
7687 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
7688 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
7689 | # | |
7690 | # ac_d sets the value in "#define NAME VALUE" lines. | |
7691 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
7692 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
7693 | ac_dC='\3' | |
7694 | ac_dD='%g' | |
7695 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
7696 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7697 | ac_uB='\([ ]\)%\1#\2define\3' | |
7698 | ac_uC=' ' | |
7699 | ac_uD='\4%g' | |
7700 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
7701 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7702 | ac_eB='$%\1#\2define\3' | |
7703 | ac_eC=' ' | |
7704 | ac_eD='%g' | |
7705 | ||
7706 | if test "${CONFIG_HEADERS+set}" != set; then | |
7707 | EOF | |
7708 | cat >> $CONFIG_STATUS <<EOF | |
7709 | CONFIG_HEADERS="config.h:config.in" | |
7710 | EOF | |
7711 | cat >> $CONFIG_STATUS <<\EOF | |
7712 | fi | |
7713 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
7714 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7715 | case "$ac_file" in | |
7716 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7717 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7718 | *) ac_file_in="${ac_file}.in" ;; | |
7719 | esac | |
7720 | ||
7721 | echo creating $ac_file | |
7722 | ||
7723 | rm -f conftest.frag conftest.in conftest.out | |
7724 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7725 | cat $ac_file_inputs > conftest.in | |
7726 | ||
7727 | EOF | |
7728 | ||
7729 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
7730 | # the proper values into config.h.in to produce config.h. And first: | |
7731 | # Protect against being on the right side of a sed subst in config.status. | |
7732 | # Protect against being in an unquoted here document in config.status. | |
7733 | rm -f conftest.vals | |
7734 | cat > conftest.hdr <<\EOF | |
7735 | s/[\\&%]/\\&/g | |
7736 | s%[\\$`]%\\&%g | |
7737 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
7738 | s%ac_d%ac_u%gp | |
7739 | s%ac_u%ac_e%gp | |
7740 | EOF | |
7741 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
7742 | rm -f conftest.hdr | |
7743 | ||
7744 | # This sed command replaces #undef with comments. This is necessary, for | |
7745 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
7746 | # on some systems where configure will not decide to define it. | |
7747 | cat >> conftest.vals <<\EOF | |
7748 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
7749 | EOF | |
7750 | ||
7751 | # Break up conftest.vals because some shells have a limit on | |
7752 | # the size of here documents, and old seds have small limits too. | |
7753 | ||
7754 | rm -f conftest.tail | |
7755 | while : | |
7756 | do | |
7757 | ac_lines=`grep -c . conftest.vals` | |
7758 | # grep -c gives empty output for an empty file on some AIX systems. | |
7759 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
7760 | # Write a limited-size here document to conftest.frag. | |
7761 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
7762 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
7763 | echo 'CEOF | |
7764 | sed -f conftest.frag conftest.in > conftest.out | |
7765 | rm -f conftest.in | |
7766 | mv conftest.out conftest.in | |
7767 | ' >> $CONFIG_STATUS | |
7768 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
7769 | rm -f conftest.vals | |
7770 | mv conftest.tail conftest.vals | |
7771 | done | |
7772 | rm -f conftest.vals | |
7773 | ||
7774 | cat >> $CONFIG_STATUS <<\EOF | |
7775 | rm -f conftest.frag conftest.h | |
7776 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
7777 | cat conftest.in >> conftest.h | |
7778 | rm -f conftest.in | |
7779 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
7780 | echo "$ac_file is unchanged" | |
7781 | rm -f conftest.h | |
7782 | else | |
7783 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7784 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7785 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7786 | # The file is in a subdirectory. | |
7787 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7788 | fi | |
7789 | rm -f $ac_file | |
7790 | mv conftest.h $ac_file | |
7791 | fi | |
7792 | fi; done | |
7793 | ||
7794 | EOF | |
7795 | ||
7796 | cat >> $CONFIG_STATUS <<EOF | |
7797 | ac_sources="$files" | |
7798 | ac_dests="$links" | |
7799 | EOF | |
7800 | ||
7801 | cat >> $CONFIG_STATUS <<\EOF | |
7802 | srcdir=$ac_given_srcdir | |
7803 | while test -n "$ac_sources"; do | |
7804 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
7805 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
7806 | ||
7807 | echo "linking $srcdir/$ac_source to $ac_dest" | |
7808 | ||
7809 | if test ! -r $srcdir/$ac_source; then | |
7810 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
7811 | fi | |
7812 | rm -f $ac_dest | |
7813 | ||
7814 | # Make relative symlinks. | |
7815 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7816 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
7817 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
7818 | # The dest file is in a subdirectory. | |
7819 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
7820 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
7821 | # A "../" for each directory in $ac_dest_dir_suffix. | |
7822 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
7823 | else | |
7824 | ac_dest_dir_suffix= ac_dots= | |
7825 | fi | |
7826 | ||
7827 | case "$srcdir" in | |
7828 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
7829 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
7830 | esac | |
7831 | ||
7832 | # Make a symlink if possible; otherwise try a hard link. | |
7833 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
7834 | ln $srcdir/$ac_source $ac_dest; then : | |
7835 | else | |
7836 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
7837 | fi | |
7838 | done | |
7839 | EOF | |
7840 | cat >> $CONFIG_STATUS <<EOF | |
7841 | ||
7842 | gdb_host_cpu=$gdb_host_cpu | |
7843 | gdb_target_cpu=$gdb_target_cpu | |
7844 | nativefile=$nativefile | |
7845 | ||
7846 | EOF | |
7847 | cat >> $CONFIG_STATUS <<\EOF | |
7848 | ||
7849 | if test "${nativefile}" = ""; then | |
7850 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ | |
7851 | < Makefile > Makefile.tem | |
7852 | mv -f Makefile.tem Makefile | |
7853 | fi | |
7854 | ||
7855 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
7856 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
7857 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
7858 | mv -f Makefile.tmp Makefile | |
7859 | ||
2acceee2 | 7860 | |
c906108c SS |
7861 | case x$CONFIG_HEADERS in |
7862 | xconfig.h:config.in) | |
7863 | echo > stamp-h ;; | |
7864 | esac | |
7865 | ||
7866 | exit 0 | |
7867 | EOF | |
7868 | chmod +x $CONFIG_STATUS | |
7869 | rm -fr confdefs* $ac_clean_files | |
7870 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
7871 | ||
7872 | if test "$no_recursion" != yes; then | |
7873 | ||
7874 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
7875 | ac_sub_configure_args= | |
7876 | ac_prev= | |
7877 | for ac_arg in $ac_configure_args; do | |
7878 | if test -n "$ac_prev"; then | |
7879 | ac_prev= | |
7880 | continue | |
7881 | fi | |
7882 | case "$ac_arg" in | |
7883 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
7884 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
7885 | ac_prev=cache_file ;; | |
7886 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
7887 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
7888 | ;; | |
7889 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
7890 | ac_prev=srcdir ;; | |
7891 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
7892 | ;; | |
7893 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
7894 | esac | |
7895 | done | |
7896 | ||
7897 | for ac_config_dir in $configdirs; do | |
7898 | ||
7899 | # Do not complain, so a configure script can configure whichever | |
7900 | # parts of a large source tree are present. | |
7901 | if test ! -d $srcdir/$ac_config_dir; then | |
7902 | continue | |
7903 | fi | |
7904 | ||
7905 | echo configuring in $ac_config_dir | |
7906 | ||
7907 | case "$srcdir" in | |
7908 | .) ;; | |
7909 | *) | |
7910 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
7911 | else | |
7912 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
7913 | fi | |
7914 | ;; | |
7915 | esac | |
7916 | ||
7917 | ac_popdir=`pwd` | |
7918 | cd $ac_config_dir | |
7919 | ||
7920 | # A "../" for each directory in /$ac_config_dir. | |
7921 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
7922 | ||
7923 | case "$srcdir" in | |
7924 | .) # No --srcdir option. We are building in place. | |
7925 | ac_sub_srcdir=$srcdir ;; | |
7926 | /*) # Absolute path. | |
7927 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
7928 | *) # Relative path. | |
7929 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
7930 | esac | |
7931 | ||
7932 | # Check for guested configure; otherwise get Cygnus style configure. | |
7933 | if test -f $ac_sub_srcdir/configure; then | |
7934 | ac_sub_configure=$ac_sub_srcdir/configure | |
7935 | elif test -f $ac_sub_srcdir/configure.in; then | |
7936 | ac_sub_configure=$ac_configure | |
7937 | else | |
7938 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
7939 | ac_sub_configure= | |
7940 | fi | |
7941 | ||
7942 | # The recursion is here. | |
7943 | if test -n "$ac_sub_configure"; then | |
7944 | ||
7945 | # Make the cache file name correct relative to the subdirectory. | |
7946 | case "$cache_file" in | |
7947 | /*) ac_sub_cache_file=$cache_file ;; | |
7948 | *) # Relative path. | |
7949 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
7950 | esac | |
7951 | case "$ac_given_INSTALL" in | |
7952 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7953 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7954 | esac | |
7955 | ||
7956 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
7957 | # The eval makes quoting arguments work. | |
7958 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
7959 | then : | |
7960 | else | |
7961 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
7962 | fi | |
7963 | fi | |
7964 | ||
7965 | cd $ac_popdir | |
7966 | done | |
7967 | fi | |
7968 | ||
7969 | ||
7970 | exit 0 |