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: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
96baa820 JM |
21 | ac_help="$ac_help |
22 | --enable-multi-ice Build the multi-ice-gdb-server" | |
d318976c FN |
23 | ac_help="$ac_help |
24 | --enable-gdbcli Enable GDB-CLI interface" | |
fb40c209 AC |
25 | ac_help="$ac_help |
26 | --enable-gdbmi Enable GDB-MI interface" | |
b4df4f68 | 27 | ac_help="$ac_help |
6c5cfe5b | 28 | --with-uiout Use new uiout functions instead of *printf's" |
c906108c SS |
29 | ac_help="$ac_help |
30 | --enable-tui Enable full-screen terminal user interface" | |
31 | ac_help="$ac_help | |
32 | --enable-netrom Enable NetROM support" | |
33 | ac_help="$ac_help | |
34 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
35 | ac_help="$ac_help |
36 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --with-mmalloc Use memory mapped malloc package" | |
88987551 L |
39 | ac_help="$ac_help |
40 | --with-included-regex Use included regex" | |
7a292a7a SS |
41 | ac_help="$ac_help |
42 | --with-cpu=CPU Set the default CPU variant to debug" | |
43 | ac_help="$ac_help | |
44 | --enable-gdbtk Enable GDBTK GUI front end" | |
45 | ac_help="$ac_help | |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --with-x use the X Window System" | |
7a292a7a SS |
59 | ac_help="$ac_help |
60 | --enable-sim Link gdb with simulator" | |
c906108c SS |
61 | ac_help="$ac_help |
62 | --enable-shared Use shared libraries" | |
234b45d4 KB |
63 | ac_help="$ac_help |
64 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
65 | |
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
c41b7eb1 | 82 | sitefile= |
c906108c SS |
83 | srcdir= |
84 | target=NONE | |
85 | verbose= | |
86 | x_includes=NONE | |
87 | x_libraries=NONE | |
88 | bindir='${exec_prefix}/bin' | |
89 | sbindir='${exec_prefix}/sbin' | |
90 | libexecdir='${exec_prefix}/libexec' | |
91 | datadir='${prefix}/share' | |
92 | sysconfdir='${prefix}/etc' | |
93 | sharedstatedir='${prefix}/com' | |
94 | localstatedir='${prefix}/var' | |
95 | libdir='${exec_prefix}/lib' | |
96 | includedir='${prefix}/include' | |
97 | oldincludedir='/usr/include' | |
98 | infodir='${prefix}/info' | |
99 | mandir='${prefix}/man' | |
100 | ||
101 | # Initialize some other variables. | |
102 | subdirs= | |
103 | MFLAGS= MAKEFLAGS= | |
104 | SHELL=${CONFIG_SHELL-/bin/sh} | |
105 | # Maximum number of lines to put in a shell here document. | |
106 | ac_max_here_lines=12 | |
107 | ||
108 | ac_prev= | |
109 | for ac_option | |
110 | do | |
111 | ||
112 | # If the previous option needs an argument, assign it. | |
113 | if test -n "$ac_prev"; then | |
114 | eval "$ac_prev=\$ac_option" | |
115 | ac_prev= | |
116 | continue | |
117 | fi | |
118 | ||
119 | case "$ac_option" in | |
120 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
121 | *) ac_optarg= ;; | |
122 | esac | |
123 | ||
124 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
125 | ||
126 | case "$ac_option" in | |
127 | ||
128 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
129 | ac_prev=bindir ;; | |
130 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
131 | bindir="$ac_optarg" ;; | |
132 | ||
133 | -build | --build | --buil | --bui | --bu) | |
134 | ac_prev=build ;; | |
135 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
136 | build="$ac_optarg" ;; | |
137 | ||
138 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
139 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
140 | ac_prev=cache_file ;; | |
141 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
142 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
143 | cache_file="$ac_optarg" ;; | |
144 | ||
145 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
146 | ac_prev=datadir ;; | |
147 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
148 | | --da=*) | |
149 | datadir="$ac_optarg" ;; | |
150 | ||
151 | -disable-* | --disable-*) | |
152 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
153 | # Reject names that are not valid shell variable names. | |
154 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
155 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
156 | fi | |
157 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
158 | eval "enable_${ac_feature}=no" ;; | |
159 | ||
160 | -enable-* | --enable-*) | |
161 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
162 | # Reject names that are not valid shell variable names. | |
163 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
164 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
165 | fi | |
166 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
167 | case "$ac_option" in | |
168 | *=*) ;; | |
169 | *) ac_optarg=yes ;; | |
170 | esac | |
171 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
172 | ||
173 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
174 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
175 | | --exec | --exe | --ex) | |
176 | ac_prev=exec_prefix ;; | |
177 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
178 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
179 | | --exec=* | --exe=* | --ex=*) | |
180 | exec_prefix="$ac_optarg" ;; | |
181 | ||
182 | -gas | --gas | --ga | --g) | |
183 | # Obsolete; use --with-gas. | |
184 | with_gas=yes ;; | |
185 | ||
186 | -help | --help | --hel | --he) | |
187 | # Omit some internal or obsolete options to make the list less imposing. | |
188 | # This message is too long to be a string in the A/UX 3.1 sh. | |
189 | cat << EOF | |
190 | Usage: configure [options] [host] | |
191 | Options: [defaults in brackets after descriptions] | |
192 | Configuration: | |
193 | --cache-file=FILE cache test results in FILE | |
194 | --help print this message | |
195 | --no-create do not create output files | |
196 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 197 | --site-file=FILE use FILE as the site file |
c906108c SS |
198 | --version print the version of autoconf that created configure |
199 | Directory and file names: | |
200 | --prefix=PREFIX install architecture-independent files in PREFIX | |
201 | [$ac_default_prefix] | |
202 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
203 | [same as prefix] | |
204 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
205 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
206 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
207 | --datadir=DIR read-only architecture-independent data in DIR | |
208 | [PREFIX/share] | |
209 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
210 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
211 | [PREFIX/com] | |
212 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
213 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
214 | --includedir=DIR C header files in DIR [PREFIX/include] | |
215 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
216 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
217 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
218 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
219 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
220 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
221 | --program-transform-name=PROGRAM | |
222 | run sed PROGRAM on installed program names | |
223 | EOF | |
224 | cat << EOF | |
225 | Host type: | |
226 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
227 | --host=HOST configure for HOST [guessed] | |
228 | --target=TARGET configure for TARGET [TARGET=HOST] | |
229 | Features and packages: | |
230 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
231 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
232 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
233 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
234 | --x-includes=DIR X include files are in DIR | |
235 | --x-libraries=DIR X library files are in DIR | |
236 | EOF | |
237 | if test -n "$ac_help"; then | |
238 | echo "--enable and --with options recognized:$ac_help" | |
239 | fi | |
240 | exit 0 ;; | |
241 | ||
242 | -host | --host | --hos | --ho) | |
243 | ac_prev=host ;; | |
244 | -host=* | --host=* | --hos=* | --ho=*) | |
245 | host="$ac_optarg" ;; | |
246 | ||
247 | -includedir | --includedir | --includedi | --included | --include \ | |
248 | | --includ | --inclu | --incl | --inc) | |
249 | ac_prev=includedir ;; | |
250 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
251 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
252 | includedir="$ac_optarg" ;; | |
253 | ||
254 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
255 | ac_prev=infodir ;; | |
256 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
257 | infodir="$ac_optarg" ;; | |
258 | ||
259 | -libdir | --libdir | --libdi | --libd) | |
260 | ac_prev=libdir ;; | |
261 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
262 | libdir="$ac_optarg" ;; | |
263 | ||
264 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
265 | | --libexe | --libex | --libe) | |
266 | ac_prev=libexecdir ;; | |
267 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
268 | | --libexe=* | --libex=* | --libe=*) | |
269 | libexecdir="$ac_optarg" ;; | |
270 | ||
271 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
272 | | --localstate | --localstat | --localsta | --localst \ | |
273 | | --locals | --local | --loca | --loc | --lo) | |
274 | ac_prev=localstatedir ;; | |
275 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
276 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
277 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
278 | localstatedir="$ac_optarg" ;; | |
279 | ||
280 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
281 | ac_prev=mandir ;; | |
282 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
283 | mandir="$ac_optarg" ;; | |
284 | ||
285 | -nfp | --nfp | --nf) | |
286 | # Obsolete; use --without-fp. | |
287 | with_fp=no ;; | |
288 | ||
289 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
290 | | --no-cr | --no-c) | |
291 | no_create=yes ;; | |
292 | ||
293 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
294 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
295 | no_recursion=yes ;; | |
296 | ||
297 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
298 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
299 | | --oldin | --oldi | --old | --ol | --o) | |
300 | ac_prev=oldincludedir ;; | |
301 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
302 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
303 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
304 | oldincludedir="$ac_optarg" ;; | |
305 | ||
306 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
307 | ac_prev=prefix ;; | |
308 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
309 | prefix="$ac_optarg" ;; | |
310 | ||
311 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
312 | | --program-pre | --program-pr | --program-p) | |
313 | ac_prev=program_prefix ;; | |
314 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
315 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
316 | program_prefix="$ac_optarg" ;; | |
317 | ||
318 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
319 | | --program-suf | --program-su | --program-s) | |
320 | ac_prev=program_suffix ;; | |
321 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
322 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
323 | program_suffix="$ac_optarg" ;; | |
324 | ||
325 | -program-transform-name | --program-transform-name \ | |
326 | | --program-transform-nam | --program-transform-na \ | |
327 | | --program-transform-n | --program-transform- \ | |
328 | | --program-transform | --program-transfor \ | |
329 | | --program-transfo | --program-transf \ | |
330 | | --program-trans | --program-tran \ | |
331 | | --progr-tra | --program-tr | --program-t) | |
332 | ac_prev=program_transform_name ;; | |
333 | -program-transform-name=* | --program-transform-name=* \ | |
334 | | --program-transform-nam=* | --program-transform-na=* \ | |
335 | | --program-transform-n=* | --program-transform-=* \ | |
336 | | --program-transform=* | --program-transfor=* \ | |
337 | | --program-transfo=* | --program-transf=* \ | |
338 | | --program-trans=* | --program-tran=* \ | |
339 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
340 | program_transform_name="$ac_optarg" ;; | |
341 | ||
342 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
343 | | -silent | --silent | --silen | --sile | --sil) | |
344 | silent=yes ;; | |
345 | ||
346 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
347 | ac_prev=sbindir ;; | |
348 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
349 | | --sbi=* | --sb=*) | |
350 | sbindir="$ac_optarg" ;; | |
351 | ||
352 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
353 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
354 | | --sharedst | --shareds | --shared | --share | --shar \ | |
355 | | --sha | --sh) | |
356 | ac_prev=sharedstatedir ;; | |
357 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
358 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
359 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
360 | | --sha=* | --sh=*) | |
361 | sharedstatedir="$ac_optarg" ;; | |
362 | ||
363 | -site | --site | --sit) | |
364 | ac_prev=site ;; | |
365 | -site=* | --site=* | --sit=*) | |
366 | site="$ac_optarg" ;; | |
367 | ||
c41b7eb1 JB |
368 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
369 | ac_prev=sitefile ;; | |
370 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
371 | sitefile="$ac_optarg" ;; | |
372 | ||
c906108c SS |
373 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
374 | ac_prev=srcdir ;; | |
375 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
376 | srcdir="$ac_optarg" ;; | |
377 | ||
378 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
379 | | --syscon | --sysco | --sysc | --sys | --sy) | |
380 | ac_prev=sysconfdir ;; | |
381 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
382 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
383 | sysconfdir="$ac_optarg" ;; | |
384 | ||
385 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
386 | ac_prev=target ;; | |
387 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
388 | target="$ac_optarg" ;; | |
389 | ||
390 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
391 | verbose=yes ;; | |
392 | ||
393 | -version | --version | --versio | --versi | --vers) | |
394 | echo "configure generated by autoconf version 2.13" | |
395 | exit 0 ;; | |
396 | ||
397 | -with-* | --with-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | case "$ac_option" in | |
405 | *=*) ;; | |
406 | *) ac_optarg=yes ;; | |
407 | esac | |
408 | eval "with_${ac_package}='$ac_optarg'" ;; | |
409 | ||
410 | -without-* | --without-*) | |
411 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
412 | # Reject names that are not valid shell variable names. | |
413 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
414 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
415 | fi | |
416 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
417 | eval "with_${ac_package}=no" ;; | |
418 | ||
419 | --x) | |
420 | # Obsolete; use --with-x. | |
421 | with_x=yes ;; | |
422 | ||
423 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
424 | | --x-incl | --x-inc | --x-in | --x-i) | |
425 | ac_prev=x_includes ;; | |
426 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
427 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
428 | x_includes="$ac_optarg" ;; | |
429 | ||
430 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
431 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
432 | ac_prev=x_libraries ;; | |
433 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
434 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
435 | x_libraries="$ac_optarg" ;; | |
436 | ||
437 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
438 | ;; | |
439 | ||
440 | *) | |
441 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
442 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
443 | fi | |
444 | if test "x$nonopt" != xNONE; then | |
445 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
446 | fi | |
447 | nonopt="$ac_option" | |
448 | ;; | |
449 | ||
450 | esac | |
451 | done | |
452 | ||
453 | if test -n "$ac_prev"; then | |
454 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
455 | fi | |
456 | ||
457 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
458 | ||
459 | # File descriptor usage: | |
460 | # 0 standard input | |
461 | # 1 file creation | |
462 | # 2 errors and warnings | |
463 | # 3 some systems may open it to /dev/tty | |
464 | # 4 used on the Kubota Titan | |
465 | # 6 checking for... messages and results | |
466 | # 5 compiler messages saved in config.log | |
467 | if test "$silent" = yes; then | |
468 | exec 6>/dev/null | |
469 | else | |
470 | exec 6>&1 | |
471 | fi | |
472 | exec 5>./config.log | |
473 | ||
474 | echo "\ | |
475 | This file contains any messages produced by compilers while | |
476 | running configure, to aid debugging if configure makes a mistake. | |
477 | " 1>&5 | |
478 | ||
479 | # Strip out --no-create and --no-recursion so they do not pile up. | |
480 | # Also quote any args containing shell metacharacters. | |
481 | ac_configure_args= | |
482 | for ac_arg | |
483 | do | |
484 | case "$ac_arg" in | |
485 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
486 | | --no-cr | --no-c) ;; | |
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
489 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
490 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
491 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
492 | esac | |
493 | done | |
494 | ||
495 | # NLS nuisances. | |
496 | # Only set these to C if already set. These must not be set unconditionally | |
497 | # because not all systems understand e.g. LANG=C (notably SCO). | |
498 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
499 | # Non-C LC_CTYPE values break the ctype check. | |
500 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
501 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
502 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
503 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
504 | ||
505 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
506 | rm -rf conftest* confdefs.h | |
507 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
508 | echo > confdefs.h | |
509 | ||
510 | # A filename unique to this package, relative to the directory that | |
511 | # configure is in, which we can look for to find out if srcdir is correct. | |
512 | ac_unique_file=main.c | |
513 | ||
514 | # Find the source files, if location was not specified. | |
515 | if test -z "$srcdir"; then | |
516 | ac_srcdir_defaulted=yes | |
517 | # Try the directory containing this script, then its parent. | |
518 | ac_prog=$0 | |
519 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
520 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
521 | srcdir=$ac_confdir | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | srcdir=.. | |
524 | fi | |
525 | else | |
526 | ac_srcdir_defaulted=no | |
527 | fi | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | if test "$ac_srcdir_defaulted" = yes; then | |
530 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
531 | else | |
532 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
533 | fi | |
534 | fi | |
535 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
536 | ||
537 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
538 | if test -z "$sitefile"; then |
539 | if test -z "$CONFIG_SITE"; then | |
540 | if test "x$prefix" != xNONE; then | |
541 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
542 | else | |
543 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
544 | fi | |
c906108c | 545 | fi |
c41b7eb1 JB |
546 | else |
547 | CONFIG_SITE="$sitefile" | |
c906108c SS |
548 | fi |
549 | for ac_site_file in $CONFIG_SITE; do | |
550 | if test -r "$ac_site_file"; then | |
551 | echo "loading site script $ac_site_file" | |
552 | . "$ac_site_file" | |
553 | fi | |
554 | done | |
555 | ||
556 | if test -r "$cache_file"; then | |
557 | echo "loading cache $cache_file" | |
558 | . $cache_file | |
559 | else | |
560 | echo "creating cache $cache_file" | |
561 | > $cache_file | |
562 | fi | |
563 | ||
564 | ac_ext=c | |
565 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
566 | ac_cpp='$CPP $CPPFLAGS' | |
567 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
568 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
569 | cross_compiling=$ac_cv_prog_cc_cross | |
570 | ||
571 | ac_exeext= | |
572 | ac_objext=o | |
573 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
574 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
575 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
576 | ac_n= ac_c=' | |
577 | ' ac_t=' ' | |
578 | else | |
579 | ac_n=-n ac_c= ac_t= | |
580 | fi | |
581 | else | |
582 | ac_n= ac_c='\c' ac_t= | |
583 | fi | |
584 | ||
585 | ||
586 | ||
413ccac7 | 587 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
c41b7eb1 | 588 | echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
590 | if test "${enable_maintainer_mode+set}" = set; then | |
591 | enableval="$enable_maintainer_mode" | |
592 | USE_MAINTAINER_MODE=$enableval | |
593 | else | |
594 | USE_MAINTAINER_MODE=no | |
595 | fi | |
596 | ||
597 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
598 | ||
599 | ||
600 | if test $USE_MAINTAINER_MODE = yes; then | |
601 | MAINTAINER_MODE_TRUE= | |
602 | MAINTAINER_MODE_FALSE='#' | |
603 | else | |
604 | MAINTAINER_MODE_TRUE='#' | |
605 | MAINTAINER_MODE_FALSE= | |
606 | fi | |
607 | MAINT=$MAINTAINER_MODE_TRUE | |
608 | ||
609 | ||
c906108c SS |
610 | |
611 | # Extract the first word of "gcc", so it can be a program name with args. | |
612 | set dummy gcc; ac_word=$2 | |
613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
c41b7eb1 | 614 | echo "configure:615: checking for $ac_word" >&5 |
c906108c SS |
615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
617 | else | |
618 | if test -n "$CC"; then | |
619 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
620 | else | |
621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
622 | ac_dummy="$PATH" | |
623 | for ac_dir in $ac_dummy; do | |
624 | test -z "$ac_dir" && ac_dir=. | |
625 | if test -f $ac_dir/$ac_word; then | |
626 | ac_cv_prog_CC="gcc" | |
627 | break | |
628 | fi | |
629 | done | |
630 | IFS="$ac_save_ifs" | |
631 | fi | |
632 | fi | |
633 | CC="$ac_cv_prog_CC" | |
634 | if test -n "$CC"; then | |
635 | echo "$ac_t""$CC" 1>&6 | |
636 | else | |
637 | echo "$ac_t""no" 1>&6 | |
638 | fi | |
639 | ||
640 | if test -z "$CC"; then | |
641 | # Extract the first word of "cc", so it can be a program name with args. | |
642 | set dummy cc; ac_word=$2 | |
643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
c41b7eb1 | 644 | echo "configure:645: checking for $ac_word" >&5 |
c906108c SS |
645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
647 | else | |
648 | if test -n "$CC"; then | |
649 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
650 | else | |
651 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
652 | ac_prog_rejected=no | |
653 | ac_dummy="$PATH" | |
654 | for ac_dir in $ac_dummy; do | |
655 | test -z "$ac_dir" && ac_dir=. | |
656 | if test -f $ac_dir/$ac_word; then | |
657 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
658 | ac_prog_rejected=yes | |
659 | continue | |
660 | fi | |
661 | ac_cv_prog_CC="cc" | |
662 | break | |
663 | fi | |
664 | done | |
665 | IFS="$ac_save_ifs" | |
666 | if test $ac_prog_rejected = yes; then | |
667 | # We found a bogon in the path, so make sure we never use it. | |
668 | set dummy $ac_cv_prog_CC | |
669 | shift | |
670 | if test $# -gt 0; then | |
671 | # We chose a different compiler from the bogus one. | |
672 | # However, it has the same basename, so the bogon will be chosen | |
673 | # first if we set CC to just the basename; use the full file name. | |
674 | shift | |
675 | set dummy "$ac_dir/$ac_word" "$@" | |
676 | shift | |
677 | ac_cv_prog_CC="$@" | |
678 | fi | |
679 | fi | |
680 | fi | |
681 | fi | |
682 | CC="$ac_cv_prog_CC" | |
683 | if test -n "$CC"; then | |
684 | echo "$ac_t""$CC" 1>&6 | |
685 | else | |
686 | echo "$ac_t""no" 1>&6 | |
687 | fi | |
688 | ||
689 | if test -z "$CC"; then | |
690 | case "`uname -s`" in | |
691 | *win32* | *WIN32*) | |
692 | # Extract the first word of "cl", so it can be a program name with args. | |
693 | set dummy cl; ac_word=$2 | |
694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
c41b7eb1 | 695 | echo "configure:696: checking for $ac_word" >&5 |
c906108c SS |
696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
698 | else | |
699 | if test -n "$CC"; then | |
700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
701 | else | |
702 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
703 | ac_dummy="$PATH" | |
704 | for ac_dir in $ac_dummy; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="cl" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | fi | |
713 | fi | |
714 | CC="$ac_cv_prog_CC" | |
715 | if test -n "$CC"; then | |
716 | echo "$ac_t""$CC" 1>&6 | |
717 | else | |
718 | echo "$ac_t""no" 1>&6 | |
719 | fi | |
720 | ;; | |
721 | esac | |
722 | fi | |
723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
724 | fi | |
725 | ||
726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
c41b7eb1 | 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
728 | |
729 | ac_ext=c | |
730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
731 | ac_cpp='$CPP $CPPFLAGS' | |
732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
734 | cross_compiling=$ac_cv_prog_cc_cross | |
735 | ||
736 | cat > conftest.$ac_ext << EOF | |
737 | ||
c41b7eb1 | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
c41b7eb1 | 743 | if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
744 | ac_cv_prog_cc_works=yes |
745 | # If we can't run a trivial program, we are probably using a cross compiler. | |
746 | if (./conftest; exit) 2>/dev/null; then | |
747 | ac_cv_prog_cc_cross=no | |
748 | else | |
749 | ac_cv_prog_cc_cross=yes | |
750 | fi | |
751 | else | |
752 | echo "configure: failed program was:" >&5 | |
753 | cat conftest.$ac_ext >&5 | |
754 | ac_cv_prog_cc_works=no | |
755 | fi | |
756 | rm -fr conftest* | |
757 | ac_ext=c | |
758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
759 | ac_cpp='$CPP $CPPFLAGS' | |
760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
762 | cross_compiling=$ac_cv_prog_cc_cross | |
763 | ||
764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
765 | if test $ac_cv_prog_cc_works = no; then | |
766 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
767 | fi | |
768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
c41b7eb1 | 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
771 | cross_compiling=$ac_cv_prog_cc_cross | |
772 | ||
773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
c41b7eb1 | 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
c906108c SS |
775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
777 | else | |
778 | cat > conftest.c <<EOF | |
779 | #ifdef __GNUC__ | |
780 | yes; | |
781 | #endif | |
782 | EOF | |
c41b7eb1 | 783 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
784 | ac_cv_prog_gcc=yes |
785 | else | |
786 | ac_cv_prog_gcc=no | |
787 | fi | |
788 | fi | |
789 | ||
790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
791 | ||
792 | if test $ac_cv_prog_gcc = yes; then | |
793 | GCC=yes | |
794 | else | |
795 | GCC= | |
796 | fi | |
797 | ||
798 | ac_test_CFLAGS="${CFLAGS+set}" | |
799 | ac_save_CFLAGS="$CFLAGS" | |
800 | CFLAGS= | |
801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
c41b7eb1 | 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | echo 'void f(){}' > conftest.c | |
807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
808 | ac_cv_prog_cc_g=yes | |
809 | else | |
810 | ac_cv_prog_cc_g=no | |
811 | fi | |
812 | rm -f conftest* | |
813 | ||
814 | fi | |
815 | ||
816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
817 | if test "$ac_test_CFLAGS" = set; then | |
818 | CFLAGS="$ac_save_CFLAGS" | |
819 | elif test $ac_cv_prog_cc_g = yes; then | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-g -O2" | |
822 | else | |
823 | CFLAGS="-g" | |
824 | fi | |
825 | else | |
826 | if test "$GCC" = yes; then | |
827 | CFLAGS="-O2" | |
828 | else | |
829 | CFLAGS= | |
830 | fi | |
831 | fi | |
832 | ||
833 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
c41b7eb1 | 834 | echo "configure:835: checking how to run the C preprocessor" >&5 |
c906108c SS |
835 | # On Suns, sometimes $CPP names a directory. |
836 | if test -n "$CPP" && test -d "$CPP"; then | |
837 | CPP= | |
838 | fi | |
839 | if test -z "$CPP"; then | |
840 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
842 | else | |
843 | # This must be in double quotes, not single quotes, because CPP may get | |
844 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
845 | CPP="${CC-cc} -E" | |
846 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
847 | # not just through cpp. | |
848 | cat > conftest.$ac_ext <<EOF | |
c41b7eb1 | 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" | |
c41b7eb1 | 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="${CC-cc} -E -traditional-cpp" | |
865 | cat > conftest.$ac_ext <<EOF | |
c41b7eb1 | 866 | #line 867 "configure" |
c906108c SS |
867 | #include "confdefs.h" |
868 | #include <assert.h> | |
869 | Syntax Error | |
870 | EOF | |
871 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
c41b7eb1 | 872 | { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
873 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
874 | if test -z "$ac_err"; then | |
875 | : | |
876 | else | |
877 | echo "$ac_err" >&5 | |
878 | echo "configure: failed program was:" >&5 | |
879 | cat conftest.$ac_ext >&5 | |
880 | rm -rf conftest* | |
881 | CPP="${CC-cc} -nologo -E" | |
882 | cat > conftest.$ac_ext <<EOF | |
c41b7eb1 | 883 | #line 884 "configure" |
c906108c SS |
884 | #include "confdefs.h" |
885 | #include <assert.h> | |
886 | Syntax Error | |
887 | EOF | |
888 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
c41b7eb1 | 889 | { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
890 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
891 | if test -z "$ac_err"; then | |
892 | : | |
893 | else | |
894 | echo "$ac_err" >&5 | |
895 | echo "configure: failed program was:" >&5 | |
896 | cat conftest.$ac_ext >&5 | |
897 | rm -rf conftest* | |
898 | CPP=/lib/cpp | |
899 | fi | |
900 | rm -f conftest* | |
901 | fi | |
902 | rm -f conftest* | |
903 | fi | |
904 | rm -f conftest* | |
905 | ac_cv_prog_CPP="$CPP" | |
906 | fi | |
907 | CPP="$ac_cv_prog_CPP" | |
908 | else | |
909 | ac_cv_prog_CPP="$CPP" | |
910 | fi | |
911 | echo "$ac_t""$CPP" 1>&6 | |
912 | ||
913 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
c41b7eb1 | 914 | echo "configure:915: checking for AIX" >&5 |
c906108c | 915 | cat > conftest.$ac_ext <<EOF |
c41b7eb1 | 916 | #line 917 "configure" |
c906108c SS |
917 | #include "confdefs.h" |
918 | #ifdef _AIX | |
919 | yes | |
920 | #endif | |
921 | ||
922 | EOF | |
923 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
924 | egrep "yes" >/dev/null 2>&1; then | |
925 | rm -rf conftest* | |
926 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
927 | #define _ALL_SOURCE 1 | |
928 | EOF | |
929 | ||
930 | else | |
931 | rm -rf conftest* | |
932 | echo "$ac_t""no" 1>&6 | |
933 | fi | |
934 | rm -f conftest* | |
935 | ||
936 | ||
56157b4a | 937 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
c41b7eb1 | 938 | echo "configure:939: checking for POSIXized ISC" >&5 |
56157b4a AC |
939 | if test -d /etc/conf/kconfig.d && |
940 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
941 | then | |
942 | echo "$ac_t""yes" 1>&6 | |
943 | ISC=yes # If later tests want to check for ISC. | |
944 | cat >> confdefs.h <<\EOF | |
945 | #define _POSIX_SOURCE 1 | |
c906108c SS |
946 | EOF |
947 | ||
56157b4a AC |
948 | if test "$GCC" = yes; then |
949 | CC="$CC -posix" | |
950 | else | |
951 | CC="$CC -Xp" | |
952 | fi | |
c906108c SS |
953 | else |
954 | echo "$ac_t""no" 1>&6 | |
56157b4a | 955 | ISC= |
c906108c SS |
956 | fi |
957 | ||
958 | ||
959 | ||
960 | ||
961 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
c41b7eb1 | 962 | echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
963 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
965 | else | |
966 | am_cv_prog_cc_stdc=no | |
967 | ac_save_CC="$CC" | |
968 | # Don't try gcc -ansi; that turns off useful extensions and | |
969 | # breaks some systems' header files. | |
970 | # AIX -qlanglvl=ansi | |
971 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
972 | # HP-UX 10.20 and later -Ae |
973 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 974 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 975 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
976 | do |
977 | CC="$ac_save_CC $ac_arg" | |
978 | cat > conftest.$ac_ext <<EOF | |
c41b7eb1 | 979 | #line 980 "configure" |
c906108c SS |
980 | #include "confdefs.h" |
981 | #include <stdarg.h> | |
982 | #include <stdio.h> | |
983 | #include <sys/types.h> | |
984 | #include <sys/stat.h> | |
985 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
986 | struct buf { int x; }; | |
987 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
988 | static char *e (p, i) | |
989 | char **p; | |
990 | int i; | |
991 | { | |
992 | return p[i]; | |
993 | } | |
994 | static char *f (char * (*g) (char **, int), char **p, ...) | |
995 | { | |
996 | char *s; | |
997 | va_list v; | |
998 | va_start (v,p); | |
999 | s = g (p, va_arg (v,int)); | |
1000 | va_end (v); | |
1001 | return s; | |
1002 | } | |
1003 | int test (int i, double x); | |
1004 | struct s1 {int (*f) (int a);}; | |
1005 | struct s2 {int (*f) (double a);}; | |
1006 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1007 | int argc; | |
1008 | char **argv; | |
1009 | ||
1010 | int main() { | |
1011 | ||
1012 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1013 | ||
1014 | ; return 0; } | |
1015 | EOF | |
c41b7eb1 | 1016 | if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1017 | rm -rf conftest* |
1018 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1019 | else | |
1020 | echo "configure: failed program was:" >&5 | |
1021 | cat conftest.$ac_ext >&5 | |
1022 | fi | |
1023 | rm -f conftest* | |
1024 | done | |
1025 | CC="$ac_save_CC" | |
1026 | ||
1027 | fi | |
1028 | ||
1029 | if test -z "$am_cv_prog_cc_stdc"; then | |
1030 | echo "$ac_t""none needed" 1>&6 | |
1031 | else | |
1032 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1033 | fi | |
1034 | case "x$am_cv_prog_cc_stdc" in | |
1035 | x|xno) ;; | |
1036 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1037 | esac | |
1038 | ||
1039 | ||
1040 | ac_aux_dir= | |
1041 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1042 | if test -f $ac_dir/install-sh; then | |
1043 | ac_aux_dir=$ac_dir | |
1044 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1045 | break | |
1046 | elif test -f $ac_dir/install.sh; then | |
1047 | ac_aux_dir=$ac_dir | |
1048 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1049 | break | |
1050 | fi | |
1051 | done | |
1052 | if test -z "$ac_aux_dir"; then | |
1053 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1054 | fi | |
1055 | ac_config_guess=$ac_aux_dir/config.guess | |
1056 | ac_config_sub=$ac_aux_dir/config.sub | |
1057 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1058 | ||
1059 | ||
1060 | # Do some error checking and defaulting for the host and target type. | |
1061 | # The inputs are: | |
1062 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1063 | # | |
1064 | # The rules are: | |
1065 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1066 | # same time. | |
1067 | # 2. Host defaults to nonopt. | |
1068 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1069 | # as determined by config.guess. | |
1070 | # 4. Target and build default to nonopt. | |
1071 | # 5. If nonopt is not specified, then target and build default to host. | |
1072 | ||
1073 | # The aliases save the names the user supplied, while $host etc. | |
1074 | # will get canonicalized. | |
1075 | case $host---$target---$nonopt in | |
1076 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1077 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1078 | esac | |
1079 | ||
1080 | ||
1081 | # Make sure we can run config.sub. | |
1082 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1083 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1084 | fi | |
1085 | ||
1086 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
c41b7eb1 | 1087 | echo "configure:1088: checking host system type" >&5 |
c906108c SS |
1088 | |
1089 | host_alias=$host | |
1090 | case "$host_alias" in | |
1091 | NONE) | |
1092 | case $nonopt in | |
1093 | NONE) | |
1094 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1095 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1096 | fi ;; | |
1097 | *) host_alias=$nonopt ;; | |
1098 | esac ;; | |
1099 | esac | |
1100 | ||
1101 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1102 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1103 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1104 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1105 | echo "$ac_t""$host" 1>&6 | |
1106 | ||
1107 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
c41b7eb1 | 1108 | echo "configure:1109: checking target system type" >&5 |
c906108c SS |
1109 | |
1110 | target_alias=$target | |
1111 | case "$target_alias" in | |
1112 | NONE) | |
1113 | case $nonopt in | |
1114 | NONE) target_alias=$host_alias ;; | |
1115 | *) target_alias=$nonopt ;; | |
1116 | esac ;; | |
1117 | esac | |
1118 | ||
1119 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1120 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1121 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1122 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1123 | echo "$ac_t""$target" 1>&6 | |
1124 | ||
1125 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
c41b7eb1 | 1126 | echo "configure:1127: checking build system type" >&5 |
c906108c SS |
1127 | |
1128 | build_alias=$build | |
1129 | case "$build_alias" in | |
1130 | NONE) | |
1131 | case $nonopt in | |
1132 | NONE) build_alias=$host_alias ;; | |
1133 | *) build_alias=$nonopt ;; | |
1134 | esac ;; | |
1135 | esac | |
1136 | ||
1137 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1138 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1139 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1140 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1141 | echo "$ac_t""$build" 1>&6 | |
1142 | ||
1143 | test "$host_alias" != "$target_alias" && | |
1144 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1145 | NONENONEs,x,x, && | |
1146 | program_prefix=${target_alias}- | |
1147 | ||
1148 | ||
8bb2c122 MK |
1149 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1150 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1151 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1152 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1153 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1154 | # 2.5x. | |
1155 | if test $host != $build; then | |
1156 | ac_tool_prefix=${host_alias}- | |
1157 | else | |
1158 | ac_tool_prefix= | |
1159 | fi | |
1160 | ||
1161 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1162 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1163 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1164 | echo "configure:1165: checking for $ac_word" >&5 | |
1165 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
1166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1167 | else | |
1168 | if test -n "$RANLIB"; then | |
1169 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1170 | else | |
1171 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1172 | ac_dummy="$PATH" | |
1173 | for ac_dir in $ac_dummy; do | |
1174 | test -z "$ac_dir" && ac_dir=. | |
1175 | if test -f $ac_dir/$ac_word; then | |
1176 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1177 | break | |
1178 | fi | |
1179 | done | |
1180 | IFS="$ac_save_ifs" | |
1181 | fi | |
1182 | fi | |
1183 | RANLIB="$ac_cv_prog_RANLIB" | |
1184 | if test -n "$RANLIB"; then | |
1185 | echo "$ac_t""$RANLIB" 1>&6 | |
1186 | else | |
1187 | echo "$ac_t""no" 1>&6 | |
1188 | fi | |
1189 | ||
1190 | ||
1191 | if test -z "$ac_cv_prog_RANLIB"; then | |
1192 | if test -n "$ac_tool_prefix"; then | |
1193 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1194 | set dummy ranlib; ac_word=$2 | |
1195 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1196 | echo "configure:1197: checking for $ac_word" >&5 | |
1197 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
1198 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1199 | else | |
1200 | if test -n "$RANLIB"; then | |
1201 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1202 | else | |
1203 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1204 | ac_dummy="$PATH" | |
1205 | for ac_dir in $ac_dummy; do | |
1206 | test -z "$ac_dir" && ac_dir=. | |
1207 | if test -f $ac_dir/$ac_word; then | |
1208 | ac_cv_prog_RANLIB="ranlib" | |
1209 | break | |
1210 | fi | |
1211 | done | |
1212 | IFS="$ac_save_ifs" | |
1213 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1214 | fi | |
1215 | fi | |
1216 | RANLIB="$ac_cv_prog_RANLIB" | |
1217 | if test -n "$RANLIB"; then | |
1218 | echo "$ac_t""$RANLIB" 1>&6 | |
1219 | else | |
1220 | echo "$ac_t""no" 1>&6 | |
1221 | fi | |
1222 | ||
1223 | else | |
1224 | RANLIB=":" | |
1225 | fi | |
1226 | fi | |
1227 | ||
1228 | ||
c906108c SS |
1229 | ALL_LINGUAS= |
1230 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
8bb2c122 | 1231 | echo "configure:1232: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1232 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1233 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1235 | else | |
1236 | cat > conftestmake <<\EOF | |
1237 | all: | |
1238 | @echo 'ac_maketemp="${MAKE}"' | |
1239 | EOF | |
1240 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1241 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1242 | if test -n "$ac_maketemp"; then | |
1243 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1244 | else | |
1245 | eval ac_cv_prog_make_${ac_make}_set=no | |
1246 | fi | |
1247 | rm -f conftestmake | |
1248 | fi | |
1249 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1250 | echo "$ac_t""yes" 1>&6 | |
1251 | SET_MAKE= | |
1252 | else | |
1253 | echo "$ac_t""no" 1>&6 | |
1254 | SET_MAKE="MAKE=${MAKE-make}" | |
1255 | fi | |
1256 | ||
1257 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1258 | set dummy ranlib; ac_word=$2 | |
1259 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 1260 | echo "configure:1261: checking for $ac_word" >&5 |
c906108c SS |
1261 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1262 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1263 | else | |
1264 | if test -n "$RANLIB"; then | |
1265 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1266 | else | |
1267 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1268 | ac_dummy="$PATH" | |
1269 | for ac_dir in $ac_dummy; do | |
1270 | test -z "$ac_dir" && ac_dir=. | |
1271 | if test -f $ac_dir/$ac_word; then | |
1272 | ac_cv_prog_RANLIB="ranlib" | |
1273 | break | |
1274 | fi | |
1275 | done | |
1276 | IFS="$ac_save_ifs" | |
1277 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1278 | fi | |
1279 | fi | |
1280 | RANLIB="$ac_cv_prog_RANLIB" | |
1281 | if test -n "$RANLIB"; then | |
1282 | echo "$ac_t""$RANLIB" 1>&6 | |
1283 | else | |
1284 | echo "$ac_t""no" 1>&6 | |
1285 | fi | |
1286 | ||
1287 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
8bb2c122 | 1288 | echo "configure:1289: checking for ANSI C header files" >&5 |
c906108c SS |
1289 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1291 | else | |
1292 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1293 | #line 1294 "configure" |
c906108c SS |
1294 | #include "confdefs.h" |
1295 | #include <stdlib.h> | |
1296 | #include <stdarg.h> | |
1297 | #include <string.h> | |
1298 | #include <float.h> | |
1299 | EOF | |
1300 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8bb2c122 | 1301 | { (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1302 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1303 | if test -z "$ac_err"; then | |
1304 | rm -rf conftest* | |
1305 | ac_cv_header_stdc=yes | |
1306 | else | |
1307 | echo "$ac_err" >&5 | |
1308 | echo "configure: failed program was:" >&5 | |
1309 | cat conftest.$ac_ext >&5 | |
1310 | rm -rf conftest* | |
1311 | ac_cv_header_stdc=no | |
1312 | fi | |
1313 | rm -f conftest* | |
1314 | ||
1315 | if test $ac_cv_header_stdc = yes; then | |
1316 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1317 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1318 | #line 1319 "configure" |
c906108c SS |
1319 | #include "confdefs.h" |
1320 | #include <string.h> | |
1321 | EOF | |
1322 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1323 | egrep "memchr" >/dev/null 2>&1; then | |
1324 | : | |
1325 | else | |
1326 | rm -rf conftest* | |
1327 | ac_cv_header_stdc=no | |
1328 | fi | |
1329 | rm -f conftest* | |
1330 | ||
1331 | fi | |
1332 | ||
1333 | if test $ac_cv_header_stdc = yes; then | |
1334 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1335 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1336 | #line 1337 "configure" |
c906108c SS |
1337 | #include "confdefs.h" |
1338 | #include <stdlib.h> | |
1339 | EOF | |
1340 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1341 | egrep "free" >/dev/null 2>&1; then | |
1342 | : | |
1343 | else | |
1344 | rm -rf conftest* | |
1345 | ac_cv_header_stdc=no | |
1346 | fi | |
1347 | rm -f conftest* | |
1348 | ||
1349 | fi | |
1350 | ||
1351 | if test $ac_cv_header_stdc = yes; then | |
1352 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1353 | if test "$cross_compiling" = yes; then | |
1354 | : | |
1355 | else | |
1356 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1357 | #line 1358 "configure" |
c906108c SS |
1358 | #include "confdefs.h" |
1359 | #include <ctype.h> | |
1360 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1361 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1362 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1363 | int main () { int i; for (i = 0; i < 256; i++) | |
1364 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1365 | exit (0); } | |
1366 | ||
1367 | EOF | |
8bb2c122 | 1368 | if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1369 | then |
1370 | : | |
1371 | else | |
1372 | echo "configure: failed program was:" >&5 | |
1373 | cat conftest.$ac_ext >&5 | |
1374 | rm -fr conftest* | |
1375 | ac_cv_header_stdc=no | |
1376 | fi | |
1377 | rm -fr conftest* | |
1378 | fi | |
1379 | ||
1380 | fi | |
1381 | fi | |
1382 | ||
1383 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1384 | if test $ac_cv_header_stdc = yes; then | |
1385 | cat >> confdefs.h <<\EOF | |
1386 | #define STDC_HEADERS 1 | |
1387 | EOF | |
1388 | ||
1389 | fi | |
1390 | ||
1391 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
8bb2c122 | 1392 | echo "configure:1393: checking for working const" >&5 |
c906108c SS |
1393 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1395 | else | |
1396 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1397 | #line 1398 "configure" |
c906108c SS |
1398 | #include "confdefs.h" |
1399 | ||
1400 | int main() { | |
1401 | ||
1402 | /* Ultrix mips cc rejects this. */ | |
1403 | typedef int charset[2]; const charset x; | |
1404 | /* SunOS 4.1.1 cc rejects this. */ | |
1405 | char const *const *ccp; | |
1406 | char **p; | |
1407 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1408 | struct point {int x, y;}; | |
1409 | static struct point const zero = {0,0}; | |
1410 | /* AIX XL C 1.02.0.0 rejects this. | |
1411 | It does not let you subtract one const X* pointer from another in an arm | |
1412 | of an if-expression whose if-part is not a constant expression */ | |
1413 | const char *g = "string"; | |
1414 | ccp = &g + (g ? g-g : 0); | |
1415 | /* HPUX 7.0 cc rejects these. */ | |
1416 | ++ccp; | |
1417 | p = (char**) ccp; | |
1418 | ccp = (char const *const *) p; | |
1419 | { /* SCO 3.2v4 cc rejects this. */ | |
1420 | char *t; | |
1421 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1422 | ||
1423 | *t++ = 0; | |
1424 | } | |
1425 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1426 | int x[] = {25, 17}; | |
1427 | const int *foo = &x[0]; | |
1428 | ++foo; | |
1429 | } | |
1430 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1431 | typedef const int *iptr; | |
1432 | iptr p = 0; | |
1433 | ++p; | |
1434 | } | |
1435 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1436 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1437 | struct s { int j; const int *ap[3]; }; | |
1438 | struct s *b; b->j = 5; | |
1439 | } | |
1440 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1441 | const int foo = 10; | |
1442 | } | |
1443 | ||
1444 | ; return 0; } | |
1445 | EOF | |
8bb2c122 | 1446 | if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1447 | rm -rf conftest* |
1448 | ac_cv_c_const=yes | |
1449 | else | |
1450 | echo "configure: failed program was:" >&5 | |
1451 | cat conftest.$ac_ext >&5 | |
1452 | rm -rf conftest* | |
1453 | ac_cv_c_const=no | |
1454 | fi | |
1455 | rm -f conftest* | |
1456 | fi | |
1457 | ||
1458 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1459 | if test $ac_cv_c_const = no; then | |
1460 | cat >> confdefs.h <<\EOF | |
1461 | #define const | |
1462 | EOF | |
1463 | ||
1464 | fi | |
1465 | ||
1466 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
8bb2c122 | 1467 | echo "configure:1468: checking for inline" >&5 |
c906108c SS |
1468 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1469 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1470 | else | |
1471 | ac_cv_c_inline=no | |
1472 | for ac_kw in inline __inline__ __inline; do | |
1473 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1474 | #line 1475 "configure" |
c906108c SS |
1475 | #include "confdefs.h" |
1476 | ||
1477 | int main() { | |
1478 | } $ac_kw foo() { | |
1479 | ; return 0; } | |
1480 | EOF | |
8bb2c122 | 1481 | if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1482 | rm -rf conftest* |
1483 | ac_cv_c_inline=$ac_kw; break | |
1484 | else | |
1485 | echo "configure: failed program was:" >&5 | |
1486 | cat conftest.$ac_ext >&5 | |
1487 | fi | |
1488 | rm -f conftest* | |
1489 | done | |
1490 | ||
1491 | fi | |
1492 | ||
1493 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1494 | case "$ac_cv_c_inline" in | |
1495 | inline | yes) ;; | |
1496 | no) cat >> confdefs.h <<\EOF | |
1497 | #define inline | |
1498 | EOF | |
1499 | ;; | |
1500 | *) cat >> confdefs.h <<EOF | |
1501 | #define inline $ac_cv_c_inline | |
1502 | EOF | |
1503 | ;; | |
1504 | esac | |
1505 | ||
1506 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
8bb2c122 | 1507 | echo "configure:1508: checking for off_t" >&5 |
c906108c SS |
1508 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1510 | else | |
1511 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1512 | #line 1513 "configure" |
c906108c SS |
1513 | #include "confdefs.h" |
1514 | #include <sys/types.h> | |
1515 | #if STDC_HEADERS | |
1516 | #include <stdlib.h> | |
1517 | #include <stddef.h> | |
1518 | #endif | |
1519 | EOF | |
1520 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1521 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1522 | rm -rf conftest* | |
1523 | ac_cv_type_off_t=yes | |
1524 | else | |
1525 | rm -rf conftest* | |
1526 | ac_cv_type_off_t=no | |
1527 | fi | |
1528 | rm -f conftest* | |
1529 | ||
1530 | fi | |
1531 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1532 | if test $ac_cv_type_off_t = no; then | |
1533 | cat >> confdefs.h <<\EOF | |
1534 | #define off_t long | |
1535 | EOF | |
1536 | ||
1537 | fi | |
1538 | ||
1539 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
8bb2c122 | 1540 | echo "configure:1541: checking for size_t" >&5 |
c906108c SS |
1541 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1543 | else | |
1544 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1545 | #line 1546 "configure" |
c906108c SS |
1546 | #include "confdefs.h" |
1547 | #include <sys/types.h> | |
1548 | #if STDC_HEADERS | |
1549 | #include <stdlib.h> | |
1550 | #include <stddef.h> | |
1551 | #endif | |
1552 | EOF | |
1553 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1554 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1555 | rm -rf conftest* | |
1556 | ac_cv_type_size_t=yes | |
1557 | else | |
1558 | rm -rf conftest* | |
1559 | ac_cv_type_size_t=no | |
1560 | fi | |
1561 | rm -f conftest* | |
1562 | ||
1563 | fi | |
1564 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1565 | if test $ac_cv_type_size_t = no; then | |
1566 | cat >> confdefs.h <<\EOF | |
1567 | #define size_t unsigned | |
1568 | EOF | |
1569 | ||
1570 | fi | |
1571 | ||
1572 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1573 | # for constant arguments. Useless! | |
1574 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
8bb2c122 | 1575 | echo "configure:1576: checking for working alloca.h" >&5 |
c906108c SS |
1576 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1577 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1578 | else | |
1579 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1580 | #line 1581 "configure" |
c906108c SS |
1581 | #include "confdefs.h" |
1582 | #include <alloca.h> | |
1583 | int main() { | |
1584 | char *p = alloca(2 * sizeof(int)); | |
1585 | ; return 0; } | |
1586 | EOF | |
8bb2c122 | 1587 | if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1588 | rm -rf conftest* |
1589 | ac_cv_header_alloca_h=yes | |
1590 | else | |
1591 | echo "configure: failed program was:" >&5 | |
1592 | cat conftest.$ac_ext >&5 | |
1593 | rm -rf conftest* | |
1594 | ac_cv_header_alloca_h=no | |
1595 | fi | |
1596 | rm -f conftest* | |
1597 | fi | |
1598 | ||
1599 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1600 | if test $ac_cv_header_alloca_h = yes; then | |
1601 | cat >> confdefs.h <<\EOF | |
1602 | #define HAVE_ALLOCA_H 1 | |
1603 | EOF | |
1604 | ||
1605 | fi | |
1606 | ||
1607 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
8bb2c122 | 1608 | echo "configure:1609: checking for alloca" >&5 |
c906108c SS |
1609 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1611 | else | |
1612 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1613 | #line 1614 "configure" |
c906108c SS |
1614 | #include "confdefs.h" |
1615 | ||
1616 | #ifdef __GNUC__ | |
1617 | # define alloca __builtin_alloca | |
1618 | #else | |
1619 | # ifdef _MSC_VER | |
1620 | # include <malloc.h> | |
1621 | # define alloca _alloca | |
1622 | # else | |
1623 | # if HAVE_ALLOCA_H | |
1624 | # include <alloca.h> | |
1625 | # else | |
1626 | # ifdef _AIX | |
1627 | #pragma alloca | |
1628 | # else | |
1629 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1630 | char *alloca (); | |
1631 | # endif | |
1632 | # endif | |
1633 | # endif | |
1634 | # endif | |
1635 | #endif | |
1636 | ||
1637 | int main() { | |
1638 | char *p = (char *) alloca(1); | |
1639 | ; return 0; } | |
1640 | EOF | |
8bb2c122 | 1641 | if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1642 | rm -rf conftest* |
1643 | ac_cv_func_alloca_works=yes | |
1644 | else | |
1645 | echo "configure: failed program was:" >&5 | |
1646 | cat conftest.$ac_ext >&5 | |
1647 | rm -rf conftest* | |
1648 | ac_cv_func_alloca_works=no | |
1649 | fi | |
1650 | rm -f conftest* | |
1651 | fi | |
1652 | ||
1653 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1654 | if test $ac_cv_func_alloca_works = yes; then | |
1655 | cat >> confdefs.h <<\EOF | |
1656 | #define HAVE_ALLOCA 1 | |
1657 | EOF | |
1658 | ||
1659 | fi | |
1660 | ||
1661 | if test $ac_cv_func_alloca_works = no; then | |
1662 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1663 | # that cause trouble. Some versions do not even contain alloca or | |
1664 | # contain a buggy version. If you still want to use their alloca, | |
1665 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1666 | ALLOCA=alloca.${ac_objext} | |
1667 | cat >> confdefs.h <<\EOF | |
1668 | #define C_ALLOCA 1 | |
1669 | EOF | |
1670 | ||
1671 | ||
1672 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
8bb2c122 | 1673 | echo "configure:1674: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1674 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1676 | else | |
1677 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1678 | #line 1679 "configure" |
c906108c SS |
1679 | #include "confdefs.h" |
1680 | #if defined(CRAY) && ! defined(CRAY2) | |
1681 | webecray | |
1682 | #else | |
1683 | wenotbecray | |
1684 | #endif | |
1685 | ||
1686 | EOF | |
1687 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1688 | egrep "webecray" >/dev/null 2>&1; then | |
1689 | rm -rf conftest* | |
1690 | ac_cv_os_cray=yes | |
1691 | else | |
1692 | rm -rf conftest* | |
1693 | ac_cv_os_cray=no | |
1694 | fi | |
1695 | rm -f conftest* | |
1696 | ||
1697 | fi | |
1698 | ||
1699 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1700 | if test $ac_cv_os_cray = yes; then | |
1701 | for ac_func in _getb67 GETB67 getb67; do | |
1702 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8bb2c122 | 1703 | echo "configure:1704: checking for $ac_func" >&5 |
c906108c SS |
1704 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1705 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1706 | else | |
1707 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1708 | #line 1709 "configure" |
c906108c SS |
1709 | #include "confdefs.h" |
1710 | /* System header to define __stub macros and hopefully few prototypes, | |
1711 | which can conflict with char $ac_func(); below. */ | |
1712 | #include <assert.h> | |
1713 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1714 | /* We use char because int might match the return type of a gcc2 | |
1715 | builtin and then its argument prototype would still apply. */ | |
1716 | char $ac_func(); | |
1717 | ||
1718 | int main() { | |
1719 | ||
1720 | /* The GNU C library defines this for functions which it implements | |
1721 | to always fail with ENOSYS. Some functions are actually named | |
1722 | something starting with __ and the normal name is an alias. */ | |
1723 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1724 | choke me | |
1725 | #else | |
1726 | $ac_func(); | |
1727 | #endif | |
1728 | ||
1729 | ; return 0; } | |
1730 | EOF | |
8bb2c122 | 1731 | if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1732 | rm -rf conftest* |
1733 | eval "ac_cv_func_$ac_func=yes" | |
1734 | else | |
1735 | echo "configure: failed program was:" >&5 | |
1736 | cat conftest.$ac_ext >&5 | |
1737 | rm -rf conftest* | |
1738 | eval "ac_cv_func_$ac_func=no" | |
1739 | fi | |
1740 | rm -f conftest* | |
1741 | fi | |
1742 | ||
1743 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1744 | echo "$ac_t""yes" 1>&6 | |
1745 | cat >> confdefs.h <<EOF | |
1746 | #define CRAY_STACKSEG_END $ac_func | |
1747 | EOF | |
1748 | ||
1749 | break | |
1750 | else | |
1751 | echo "$ac_t""no" 1>&6 | |
1752 | fi | |
1753 | ||
1754 | done | |
1755 | fi | |
1756 | ||
1757 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
8bb2c122 | 1758 | echo "configure:1759: checking stack direction for C alloca" >&5 |
c906108c SS |
1759 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1760 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1761 | else | |
1762 | if test "$cross_compiling" = yes; then | |
1763 | ac_cv_c_stack_direction=0 | |
1764 | else | |
1765 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1766 | #line 1767 "configure" |
c906108c SS |
1767 | #include "confdefs.h" |
1768 | find_stack_direction () | |
1769 | { | |
1770 | static char *addr = 0; | |
1771 | auto char dummy; | |
1772 | if (addr == 0) | |
1773 | { | |
1774 | addr = &dummy; | |
1775 | return find_stack_direction (); | |
1776 | } | |
1777 | else | |
1778 | return (&dummy > addr) ? 1 : -1; | |
1779 | } | |
1780 | main () | |
1781 | { | |
1782 | exit (find_stack_direction() < 0); | |
1783 | } | |
1784 | EOF | |
8bb2c122 | 1785 | if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1786 | then |
1787 | ac_cv_c_stack_direction=1 | |
1788 | else | |
1789 | echo "configure: failed program was:" >&5 | |
1790 | cat conftest.$ac_ext >&5 | |
1791 | rm -fr conftest* | |
1792 | ac_cv_c_stack_direction=-1 | |
1793 | fi | |
1794 | rm -fr conftest* | |
1795 | fi | |
1796 | ||
1797 | fi | |
1798 | ||
1799 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1800 | cat >> confdefs.h <<EOF | |
1801 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1802 | EOF | |
1803 | ||
1804 | fi | |
1805 | ||
c41b7eb1 | 1806 | for ac_hdr in unistd.h |
c906108c SS |
1807 | do |
1808 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1809 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8bb2c122 | 1810 | echo "configure:1811: checking for $ac_hdr" >&5 |
c906108c SS |
1811 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1812 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1813 | else | |
1814 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1815 | #line 1816 "configure" |
c906108c SS |
1816 | #include "confdefs.h" |
1817 | #include <$ac_hdr> | |
1818 | EOF | |
1819 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8bb2c122 | 1820 | { (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1821 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1822 | if test -z "$ac_err"; then | |
1823 | rm -rf conftest* | |
1824 | eval "ac_cv_header_$ac_safe=yes" | |
1825 | else | |
1826 | echo "$ac_err" >&5 | |
1827 | echo "configure: failed program was:" >&5 | |
1828 | cat conftest.$ac_ext >&5 | |
1829 | rm -rf conftest* | |
1830 | eval "ac_cv_header_$ac_safe=no" | |
1831 | fi | |
1832 | rm -f conftest* | |
1833 | fi | |
1834 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1835 | echo "$ac_t""yes" 1>&6 | |
1836 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1837 | cat >> confdefs.h <<EOF | |
1838 | #define $ac_tr_hdr 1 | |
1839 | EOF | |
1840 | ||
1841 | else | |
1842 | echo "$ac_t""no" 1>&6 | |
1843 | fi | |
1844 | done | |
1845 | ||
1846 | for ac_func in getpagesize | |
1847 | do | |
1848 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8bb2c122 | 1849 | echo "configure:1850: checking for $ac_func" >&5 |
c906108c SS |
1850 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1852 | else | |
1853 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1854 | #line 1855 "configure" |
c906108c SS |
1855 | #include "confdefs.h" |
1856 | /* System header to define __stub macros and hopefully few prototypes, | |
1857 | which can conflict with char $ac_func(); below. */ | |
1858 | #include <assert.h> | |
1859 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1860 | /* We use char because int might match the return type of a gcc2 | |
1861 | builtin and then its argument prototype would still apply. */ | |
1862 | char $ac_func(); | |
1863 | ||
1864 | int main() { | |
1865 | ||
1866 | /* The GNU C library defines this for functions which it implements | |
1867 | to always fail with ENOSYS. Some functions are actually named | |
1868 | something starting with __ and the normal name is an alias. */ | |
1869 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1870 | choke me | |
1871 | #else | |
1872 | $ac_func(); | |
1873 | #endif | |
1874 | ||
1875 | ; return 0; } | |
1876 | EOF | |
8bb2c122 | 1877 | if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1878 | rm -rf conftest* |
1879 | eval "ac_cv_func_$ac_func=yes" | |
1880 | else | |
1881 | echo "configure: failed program was:" >&5 | |
1882 | cat conftest.$ac_ext >&5 | |
1883 | rm -rf conftest* | |
1884 | eval "ac_cv_func_$ac_func=no" | |
1885 | fi | |
1886 | rm -f conftest* | |
1887 | fi | |
1888 | ||
1889 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1890 | echo "$ac_t""yes" 1>&6 | |
1891 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1892 | cat >> confdefs.h <<EOF | |
1893 | #define $ac_tr_func 1 | |
1894 | EOF | |
1895 | ||
1896 | else | |
1897 | echo "$ac_t""no" 1>&6 | |
1898 | fi | |
1899 | done | |
1900 | ||
1901 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
8bb2c122 | 1902 | echo "configure:1903: checking for working mmap" >&5 |
c906108c SS |
1903 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1904 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1905 | else | |
1906 | if test "$cross_compiling" = yes; then | |
1907 | ac_cv_func_mmap_fixed_mapped=no | |
1908 | else | |
1909 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 1910 | #line 1911 "configure" |
c906108c SS |
1911 | #include "confdefs.h" |
1912 | ||
1913 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1914 | Here is a matrix of mmap possibilities: | |
1915 | mmap private not fixed | |
1916 | mmap private fixed at somewhere currently unmapped | |
1917 | mmap private fixed at somewhere already mapped | |
1918 | mmap shared not fixed | |
1919 | mmap shared fixed at somewhere currently unmapped | |
1920 | mmap shared fixed at somewhere already mapped | |
1921 | For private mappings, we should verify that changes cannot be read() | |
1922 | back from the file, nor mmap's back from the file at a different | |
1923 | address. (There have been systems where private was not correctly | |
1924 | implemented like the infamous i386 svr4.0, and systems where the | |
1925 | VM page cache was not coherent with the filesystem buffer cache | |
1926 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1927 | For shared mappings, we should conversely verify that changes get | |
1928 | propogated back to all the places they're supposed to be. | |
1929 | ||
1930 | Grep wants private fixed already mapped. | |
1931 | The main things grep needs to know about mmap are: | |
1932 | * does it exist and is it safe to write into the mmap'd area | |
1933 | * how to use it (BSD variants) */ | |
1934 | #include <sys/types.h> | |
1935 | #include <fcntl.h> | |
1936 | #include <sys/mman.h> | |
1937 | ||
1938 | /* This mess was copied from the GNU getpagesize.h. */ | |
1939 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1940 | # ifdef HAVE_UNISTD_H |
1941 | # include <unistd.h> | |
1942 | # endif | |
c906108c SS |
1943 | |
1944 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1945 | # ifndef HAVE_SYS_PARAM_H | |
1946 | # define HAVE_SYS_PARAM_H 1 | |
1947 | # endif | |
1948 | ||
1949 | # ifdef _SC_PAGESIZE | |
1950 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1951 | # else /* no _SC_PAGESIZE */ | |
1952 | # ifdef HAVE_SYS_PARAM_H | |
1953 | # include <sys/param.h> | |
1954 | # ifdef EXEC_PAGESIZE | |
1955 | # define getpagesize() EXEC_PAGESIZE | |
1956 | # else /* no EXEC_PAGESIZE */ | |
1957 | # ifdef NBPG | |
1958 | # define getpagesize() NBPG * CLSIZE | |
1959 | # ifndef CLSIZE | |
1960 | # define CLSIZE 1 | |
1961 | # endif /* no CLSIZE */ | |
1962 | # else /* no NBPG */ | |
1963 | # ifdef NBPC | |
1964 | # define getpagesize() NBPC | |
1965 | # else /* no NBPC */ | |
1966 | # ifdef PAGESIZE | |
1967 | # define getpagesize() PAGESIZE | |
1968 | # endif /* PAGESIZE */ | |
1969 | # endif /* no NBPC */ | |
1970 | # endif /* no NBPG */ | |
1971 | # endif /* no EXEC_PAGESIZE */ | |
1972 | # else /* no HAVE_SYS_PARAM_H */ | |
1973 | # define getpagesize() 8192 /* punt totally */ | |
1974 | # endif /* no HAVE_SYS_PARAM_H */ | |
1975 | # endif /* no _SC_PAGESIZE */ | |
1976 | ||
1977 | #endif /* no HAVE_GETPAGESIZE */ | |
1978 | ||
1979 | #ifdef __cplusplus | |
1980 | extern "C" { void *malloc(unsigned); } | |
1981 | #else | |
1982 | char *malloc(); | |
1983 | #endif | |
1984 | ||
1985 | int | |
1986 | main() | |
1987 | { | |
1988 | char *data, *data2, *data3; | |
1989 | int i, pagesize; | |
1990 | int fd; | |
1991 | ||
1992 | pagesize = getpagesize(); | |
1993 | ||
1994 | /* | |
1995 | * First, make a file with some known garbage in it. | |
1996 | */ | |
1997 | data = malloc(pagesize); | |
1998 | if (!data) | |
1999 | exit(1); | |
2000 | for (i = 0; i < pagesize; ++i) | |
2001 | *(data + i) = rand(); | |
2002 | umask(0); | |
2003 | fd = creat("conftestmmap", 0600); | |
2004 | if (fd < 0) | |
2005 | exit(1); | |
2006 | if (write(fd, data, pagesize) != pagesize) | |
2007 | exit(1); | |
2008 | close(fd); | |
2009 | ||
2010 | /* | |
2011 | * Next, try to mmap the file at a fixed address which | |
2012 | * already has something else allocated at it. If we can, | |
2013 | * also make sure that we see the same garbage. | |
2014 | */ | |
2015 | fd = open("conftestmmap", O_RDWR); | |
2016 | if (fd < 0) | |
2017 | exit(1); | |
2018 | data2 = malloc(2 * pagesize); | |
2019 | if (!data2) | |
2020 | exit(1); | |
2021 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2022 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2023 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2024 | exit(1); | |
2025 | for (i = 0; i < pagesize; ++i) | |
2026 | if (*(data + i) != *(data2 + i)) | |
2027 | exit(1); | |
2028 | ||
2029 | /* | |
2030 | * Finally, make sure that changes to the mapped area | |
2031 | * do not percolate back to the file as seen by read(). | |
2032 | * (This is a bug on some variants of i386 svr4.0.) | |
2033 | */ | |
2034 | for (i = 0; i < pagesize; ++i) | |
2035 | *(data2 + i) = *(data2 + i) + 1; | |
2036 | data3 = malloc(pagesize); | |
2037 | if (!data3) | |
2038 | exit(1); | |
2039 | if (read(fd, data3, pagesize) != pagesize) | |
2040 | exit(1); | |
2041 | for (i = 0; i < pagesize; ++i) | |
2042 | if (*(data + i) != *(data3 + i)) | |
2043 | exit(1); | |
2044 | close(fd); | |
2045 | unlink("conftestmmap"); | |
2046 | exit(0); | |
2047 | } | |
2048 | ||
2049 | EOF | |
8bb2c122 | 2050 | if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2051 | then |
2052 | ac_cv_func_mmap_fixed_mapped=yes | |
2053 | else | |
2054 | echo "configure: failed program was:" >&5 | |
2055 | cat conftest.$ac_ext >&5 | |
2056 | rm -fr conftest* | |
2057 | ac_cv_func_mmap_fixed_mapped=no | |
2058 | fi | |
2059 | rm -fr conftest* | |
2060 | fi | |
2061 | ||
2062 | fi | |
2063 | ||
2064 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2065 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2066 | cat >> confdefs.h <<\EOF | |
2067 | #define HAVE_MMAP 1 | |
2068 | EOF | |
2069 | ||
2070 | fi | |
2071 | ||
2072 | ||
2073 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2074 | unistd.h values.h sys/param.h | |
2075 | do | |
2076 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2077 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8bb2c122 | 2078 | echo "configure:2079: checking for $ac_hdr" >&5 |
c906108c SS |
2079 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2081 | else | |
2082 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2083 | #line 2084 "configure" |
c906108c SS |
2084 | #include "confdefs.h" |
2085 | #include <$ac_hdr> | |
2086 | EOF | |
2087 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8bb2c122 | 2088 | { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2089 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2090 | if test -z "$ac_err"; then | |
2091 | rm -rf conftest* | |
2092 | eval "ac_cv_header_$ac_safe=yes" | |
2093 | else | |
2094 | echo "$ac_err" >&5 | |
2095 | echo "configure: failed program was:" >&5 | |
2096 | cat conftest.$ac_ext >&5 | |
2097 | rm -rf conftest* | |
2098 | eval "ac_cv_header_$ac_safe=no" | |
2099 | fi | |
2100 | rm -f conftest* | |
2101 | fi | |
2102 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2103 | echo "$ac_t""yes" 1>&6 | |
2104 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2105 | cat >> confdefs.h <<EOF | |
2106 | #define $ac_tr_hdr 1 | |
2107 | EOF | |
2108 | ||
2109 | else | |
2110 | echo "$ac_t""no" 1>&6 | |
2111 | fi | |
2112 | done | |
2113 | ||
2114 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2115 | __argz_count __argz_stringify __argz_next | |
2116 | do | |
2117 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8bb2c122 | 2118 | echo "configure:2119: checking for $ac_func" >&5 |
c906108c SS |
2119 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2120 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2121 | else | |
2122 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2123 | #line 2124 "configure" |
c906108c SS |
2124 | #include "confdefs.h" |
2125 | /* System header to define __stub macros and hopefully few prototypes, | |
2126 | which can conflict with char $ac_func(); below. */ | |
2127 | #include <assert.h> | |
2128 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2129 | /* We use char because int might match the return type of a gcc2 | |
2130 | builtin and then its argument prototype would still apply. */ | |
2131 | char $ac_func(); | |
2132 | ||
2133 | int main() { | |
2134 | ||
2135 | /* The GNU C library defines this for functions which it implements | |
2136 | to always fail with ENOSYS. Some functions are actually named | |
2137 | something starting with __ and the normal name is an alias. */ | |
2138 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2139 | choke me | |
2140 | #else | |
2141 | $ac_func(); | |
2142 | #endif | |
2143 | ||
2144 | ; return 0; } | |
2145 | EOF | |
8bb2c122 | 2146 | if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2147 | rm -rf conftest* |
2148 | eval "ac_cv_func_$ac_func=yes" | |
2149 | else | |
2150 | echo "configure: failed program was:" >&5 | |
2151 | cat conftest.$ac_ext >&5 | |
2152 | rm -rf conftest* | |
2153 | eval "ac_cv_func_$ac_func=no" | |
2154 | fi | |
2155 | rm -f conftest* | |
2156 | fi | |
2157 | ||
2158 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2159 | echo "$ac_t""yes" 1>&6 | |
2160 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2161 | cat >> confdefs.h <<EOF | |
2162 | #define $ac_tr_func 1 | |
2163 | EOF | |
2164 | ||
2165 | else | |
2166 | echo "$ac_t""no" 1>&6 | |
2167 | fi | |
2168 | done | |
2169 | ||
2170 | ||
2171 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2172 | for ac_func in stpcpy | |
2173 | do | |
2174 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8bb2c122 | 2175 | echo "configure:2176: checking for $ac_func" >&5 |
c906108c SS |
2176 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2177 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2178 | else | |
2179 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2180 | #line 2181 "configure" |
c906108c SS |
2181 | #include "confdefs.h" |
2182 | /* System header to define __stub macros and hopefully few prototypes, | |
2183 | which can conflict with char $ac_func(); below. */ | |
2184 | #include <assert.h> | |
2185 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2186 | /* We use char because int might match the return type of a gcc2 | |
2187 | builtin and then its argument prototype would still apply. */ | |
2188 | char $ac_func(); | |
2189 | ||
2190 | int main() { | |
2191 | ||
2192 | /* The GNU C library defines this for functions which it implements | |
2193 | to always fail with ENOSYS. Some functions are actually named | |
2194 | something starting with __ and the normal name is an alias. */ | |
2195 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2196 | choke me | |
2197 | #else | |
2198 | $ac_func(); | |
2199 | #endif | |
2200 | ||
2201 | ; return 0; } | |
2202 | EOF | |
8bb2c122 | 2203 | if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2204 | rm -rf conftest* |
2205 | eval "ac_cv_func_$ac_func=yes" | |
2206 | else | |
2207 | echo "configure: failed program was:" >&5 | |
2208 | cat conftest.$ac_ext >&5 | |
2209 | rm -rf conftest* | |
2210 | eval "ac_cv_func_$ac_func=no" | |
2211 | fi | |
2212 | rm -f conftest* | |
2213 | fi | |
2214 | ||
2215 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2216 | echo "$ac_t""yes" 1>&6 | |
2217 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2218 | cat >> confdefs.h <<EOF | |
2219 | #define $ac_tr_func 1 | |
2220 | EOF | |
2221 | ||
2222 | else | |
2223 | echo "$ac_t""no" 1>&6 | |
2224 | fi | |
2225 | done | |
2226 | ||
2227 | fi | |
2228 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2229 | cat >> confdefs.h <<\EOF | |
2230 | #define HAVE_STPCPY 1 | |
2231 | EOF | |
2232 | ||
2233 | fi | |
2234 | ||
2235 | if test $ac_cv_header_locale_h = yes; then | |
2236 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
8bb2c122 | 2237 | echo "configure:2238: checking for LC_MESSAGES" >&5 |
c906108c SS |
2238 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2240 | else | |
2241 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2242 | #line 2243 "configure" |
c906108c SS |
2243 | #include "confdefs.h" |
2244 | #include <locale.h> | |
2245 | int main() { | |
2246 | return LC_MESSAGES | |
2247 | ; return 0; } | |
2248 | EOF | |
8bb2c122 | 2249 | if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2250 | rm -rf conftest* |
2251 | am_cv_val_LC_MESSAGES=yes | |
2252 | else | |
2253 | echo "configure: failed program was:" >&5 | |
2254 | cat conftest.$ac_ext >&5 | |
2255 | rm -rf conftest* | |
2256 | am_cv_val_LC_MESSAGES=no | |
2257 | fi | |
2258 | rm -f conftest* | |
2259 | fi | |
2260 | ||
2261 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2262 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2263 | cat >> confdefs.h <<\EOF | |
2264 | #define HAVE_LC_MESSAGES 1 | |
2265 | EOF | |
2266 | ||
2267 | fi | |
2268 | fi | |
2269 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
8bb2c122 | 2270 | echo "configure:2271: checking whether NLS is requested" >&5 |
c906108c SS |
2271 | # Check whether --enable-nls or --disable-nls was given. |
2272 | if test "${enable_nls+set}" = set; then | |
2273 | enableval="$enable_nls" | |
2274 | USE_NLS=$enableval | |
2275 | else | |
2276 | USE_NLS=yes | |
2277 | fi | |
2278 | ||
2279 | echo "$ac_t""$USE_NLS" 1>&6 | |
2280 | ||
2281 | ||
2282 | USE_INCLUDED_LIBINTL=no | |
2283 | ||
2284 | if test "$USE_NLS" = "yes"; then | |
2285 | cat >> confdefs.h <<\EOF | |
2286 | #define ENABLE_NLS 1 | |
2287 | EOF | |
2288 | ||
2289 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
8bb2c122 | 2290 | echo "configure:2291: checking whether included gettext is requested" >&5 |
c906108c SS |
2291 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2292 | if test "${with_included_gettext+set}" = set; then | |
2293 | withval="$with_included_gettext" | |
2294 | nls_cv_force_use_gnu_gettext=$withval | |
2295 | else | |
2296 | nls_cv_force_use_gnu_gettext=no | |
2297 | fi | |
2298 | ||
2299 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2300 | ||
2301 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2302 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2303 | nls_cv_header_intl= | |
2304 | nls_cv_header_libgt= | |
2305 | CATOBJEXT=NONE | |
2306 | ||
2307 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2308 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
8bb2c122 | 2309 | echo "configure:2310: checking for libintl.h" >&5 |
c906108c SS |
2310 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2311 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2312 | else | |
2313 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2314 | #line 2315 "configure" |
c906108c SS |
2315 | #include "confdefs.h" |
2316 | #include <libintl.h> | |
2317 | EOF | |
2318 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8bb2c122 | 2319 | { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2320 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2321 | if test -z "$ac_err"; then | |
2322 | rm -rf conftest* | |
2323 | eval "ac_cv_header_$ac_safe=yes" | |
2324 | else | |
2325 | echo "$ac_err" >&5 | |
2326 | echo "configure: failed program was:" >&5 | |
2327 | cat conftest.$ac_ext >&5 | |
2328 | rm -rf conftest* | |
2329 | eval "ac_cv_header_$ac_safe=no" | |
2330 | fi | |
2331 | rm -f conftest* | |
2332 | fi | |
2333 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2334 | echo "$ac_t""yes" 1>&6 | |
2335 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
8bb2c122 | 2336 | echo "configure:2337: checking for gettext in libc" >&5 |
c906108c SS |
2337 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2338 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2339 | else | |
2340 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2341 | #line 2342 "configure" |
c906108c SS |
2342 | #include "confdefs.h" |
2343 | #include <libintl.h> | |
2344 | int main() { | |
2345 | return (int) gettext ("") | |
2346 | ; return 0; } | |
2347 | EOF | |
8bb2c122 | 2348 | if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2349 | rm -rf conftest* |
2350 | gt_cv_func_gettext_libc=yes | |
2351 | else | |
2352 | echo "configure: failed program was:" >&5 | |
2353 | cat conftest.$ac_ext >&5 | |
2354 | rm -rf conftest* | |
2355 | gt_cv_func_gettext_libc=no | |
2356 | fi | |
2357 | rm -f conftest* | |
2358 | fi | |
2359 | ||
2360 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2361 | ||
2362 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2363 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
8bb2c122 | 2364 | echo "configure:2365: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2365 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2366 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2367 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2368 | else | |
2369 | ac_save_LIBS="$LIBS" | |
2370 | LIBS="-lintl $LIBS" | |
2371 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2372 | #line 2373 "configure" |
c906108c SS |
2373 | #include "confdefs.h" |
2374 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2375 | /* We use char because int might match the return type of a gcc2 | |
2376 | builtin and then its argument prototype would still apply. */ | |
2377 | char bindtextdomain(); | |
2378 | ||
2379 | int main() { | |
2380 | bindtextdomain() | |
2381 | ; return 0; } | |
2382 | EOF | |
8bb2c122 | 2383 | if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2384 | rm -rf conftest* |
2385 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2386 | else | |
2387 | echo "configure: failed program was:" >&5 | |
2388 | cat conftest.$ac_ext >&5 | |
2389 | rm -rf conftest* | |
2390 | eval "ac_cv_lib_$ac_lib_var=no" | |
2391 | fi | |
2392 | rm -f conftest* | |
2393 | LIBS="$ac_save_LIBS" | |
2394 | ||
2395 | fi | |
2396 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2397 | echo "$ac_t""yes" 1>&6 | |
2398 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
8bb2c122 | 2399 | echo "configure:2400: checking for gettext in libintl" >&5 |
c906108c SS |
2400 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2402 | else | |
2403 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2404 | #line 2405 "configure" |
c906108c SS |
2405 | #include "confdefs.h" |
2406 | ||
2407 | int main() { | |
2408 | return (int) gettext ("") | |
2409 | ; return 0; } | |
2410 | EOF | |
8bb2c122 | 2411 | if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2412 | rm -rf conftest* |
2413 | gt_cv_func_gettext_libintl=yes | |
2414 | else | |
2415 | echo "configure: failed program was:" >&5 | |
2416 | cat conftest.$ac_ext >&5 | |
2417 | rm -rf conftest* | |
2418 | gt_cv_func_gettext_libintl=no | |
2419 | fi | |
2420 | rm -f conftest* | |
2421 | fi | |
2422 | ||
2423 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2424 | else | |
2425 | echo "$ac_t""no" 1>&6 | |
2426 | fi | |
2427 | ||
2428 | fi | |
2429 | ||
2430 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2431 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2432 | cat >> confdefs.h <<\EOF | |
2433 | #define HAVE_GETTEXT 1 | |
2434 | EOF | |
2435 | ||
2436 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2437 | set dummy msgfmt; ac_word=$2 | |
2438 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2439 | echo "configure:2440: checking for $ac_word" >&5 |
c906108c SS |
2440 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2441 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2442 | else | |
2443 | case "$MSGFMT" in | |
2444 | /*) | |
2445 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2446 | ;; | |
2447 | *) | |
2448 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2449 | for ac_dir in $PATH; do | |
2450 | test -z "$ac_dir" && ac_dir=. | |
2451 | if test -f $ac_dir/$ac_word; then | |
2452 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2453 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2454 | break | |
2455 | fi | |
2456 | fi | |
2457 | done | |
2458 | IFS="$ac_save_ifs" | |
2459 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2460 | ;; | |
2461 | esac | |
2462 | fi | |
2463 | MSGFMT="$ac_cv_path_MSGFMT" | |
2464 | if test -n "$MSGFMT"; then | |
2465 | echo "$ac_t""$MSGFMT" 1>&6 | |
2466 | else | |
2467 | echo "$ac_t""no" 1>&6 | |
2468 | fi | |
2469 | if test "$MSGFMT" != "no"; then | |
2470 | for ac_func in dcgettext | |
2471 | do | |
2472 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8bb2c122 | 2473 | echo "configure:2474: checking for $ac_func" >&5 |
c906108c SS |
2474 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2475 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2476 | else | |
2477 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2478 | #line 2479 "configure" |
c906108c SS |
2479 | #include "confdefs.h" |
2480 | /* System header to define __stub macros and hopefully few prototypes, | |
2481 | which can conflict with char $ac_func(); below. */ | |
2482 | #include <assert.h> | |
2483 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2484 | /* We use char because int might match the return type of a gcc2 | |
2485 | builtin and then its argument prototype would still apply. */ | |
2486 | char $ac_func(); | |
2487 | ||
2488 | int main() { | |
2489 | ||
2490 | /* The GNU C library defines this for functions which it implements | |
2491 | to always fail with ENOSYS. Some functions are actually named | |
2492 | something starting with __ and the normal name is an alias. */ | |
2493 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2494 | choke me | |
2495 | #else | |
2496 | $ac_func(); | |
2497 | #endif | |
2498 | ||
2499 | ; return 0; } | |
2500 | EOF | |
8bb2c122 | 2501 | if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2502 | rm -rf conftest* |
2503 | eval "ac_cv_func_$ac_func=yes" | |
2504 | else | |
2505 | echo "configure: failed program was:" >&5 | |
2506 | cat conftest.$ac_ext >&5 | |
2507 | rm -rf conftest* | |
2508 | eval "ac_cv_func_$ac_func=no" | |
2509 | fi | |
2510 | rm -f conftest* | |
2511 | fi | |
2512 | ||
2513 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2514 | echo "$ac_t""yes" 1>&6 | |
2515 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2516 | cat >> confdefs.h <<EOF | |
2517 | #define $ac_tr_func 1 | |
2518 | EOF | |
2519 | ||
2520 | else | |
2521 | echo "$ac_t""no" 1>&6 | |
2522 | fi | |
2523 | done | |
2524 | ||
2525 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2526 | set dummy gmsgfmt; ac_word=$2 | |
2527 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2528 | echo "configure:2529: checking for $ac_word" >&5 |
c906108c SS |
2529 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2530 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2531 | else | |
2532 | case "$GMSGFMT" in | |
2533 | /*) | |
2534 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2535 | ;; | |
2536 | ?:/*) | |
2537 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2538 | ;; | |
2539 | *) | |
2540 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2541 | ac_dummy="$PATH" | |
2542 | for ac_dir in $ac_dummy; do | |
2543 | test -z "$ac_dir" && ac_dir=. | |
2544 | if test -f $ac_dir/$ac_word; then | |
2545 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2546 | break | |
2547 | fi | |
2548 | done | |
2549 | IFS="$ac_save_ifs" | |
2550 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2551 | ;; | |
2552 | esac | |
2553 | fi | |
2554 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2555 | if test -n "$GMSGFMT"; then | |
2556 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2557 | else | |
2558 | echo "$ac_t""no" 1>&6 | |
2559 | fi | |
2560 | ||
2561 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2562 | set dummy xgettext; ac_word=$2 | |
2563 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2564 | echo "configure:2565: checking for $ac_word" >&5 |
c906108c SS |
2565 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2566 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2567 | else | |
2568 | case "$XGETTEXT" in | |
2569 | /*) | |
2570 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2571 | ;; | |
2572 | *) | |
2573 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2574 | for ac_dir in $PATH; do | |
2575 | test -z "$ac_dir" && ac_dir=. | |
2576 | if test -f $ac_dir/$ac_word; then | |
2577 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2578 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2579 | break | |
2580 | fi | |
2581 | fi | |
2582 | done | |
2583 | IFS="$ac_save_ifs" | |
2584 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2585 | ;; | |
2586 | esac | |
2587 | fi | |
2588 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2589 | if test -n "$XGETTEXT"; then | |
2590 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2591 | else | |
2592 | echo "$ac_t""no" 1>&6 | |
2593 | fi | |
2594 | ||
2595 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2596 | #line 2597 "configure" |
c906108c SS |
2597 | #include "confdefs.h" |
2598 | ||
2599 | int main() { | |
2600 | extern int _nl_msg_cat_cntr; | |
2601 | return _nl_msg_cat_cntr | |
2602 | ; return 0; } | |
2603 | EOF | |
8bb2c122 | 2604 | if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2605 | rm -rf conftest* |
2606 | CATOBJEXT=.gmo | |
2607 | DATADIRNAME=share | |
2608 | else | |
2609 | echo "configure: failed program was:" >&5 | |
2610 | cat conftest.$ac_ext >&5 | |
2611 | rm -rf conftest* | |
2612 | CATOBJEXT=.mo | |
2613 | DATADIRNAME=lib | |
2614 | fi | |
2615 | rm -f conftest* | |
2616 | INSTOBJEXT=.mo | |
2617 | fi | |
2618 | fi | |
2619 | ||
2620 | else | |
2621 | echo "$ac_t""no" 1>&6 | |
2622 | fi | |
2623 | ||
2624 | ||
2625 | ||
2626 | if test "$CATOBJEXT" = "NONE"; then | |
2627 | nls_cv_use_gnu_gettext=yes | |
2628 | fi | |
2629 | fi | |
2630 | ||
2631 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2632 | INTLOBJS="\$(GETTOBJS)" | |
2633 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2634 | set dummy msgfmt; ac_word=$2 | |
2635 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2636 | echo "configure:2637: checking for $ac_word" >&5 |
c906108c SS |
2637 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2639 | else | |
2640 | case "$MSGFMT" in | |
2641 | /*) | |
2642 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2643 | ;; | |
2644 | *) | |
2645 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2646 | for ac_dir in $PATH; do | |
2647 | test -z "$ac_dir" && ac_dir=. | |
2648 | if test -f $ac_dir/$ac_word; then | |
2649 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2650 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2651 | break | |
2652 | fi | |
2653 | fi | |
2654 | done | |
2655 | IFS="$ac_save_ifs" | |
2656 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2657 | ;; | |
2658 | esac | |
2659 | fi | |
2660 | MSGFMT="$ac_cv_path_MSGFMT" | |
2661 | if test -n "$MSGFMT"; then | |
2662 | echo "$ac_t""$MSGFMT" 1>&6 | |
2663 | else | |
2664 | echo "$ac_t""no" 1>&6 | |
2665 | fi | |
2666 | ||
2667 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2668 | set dummy gmsgfmt; ac_word=$2 | |
2669 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2670 | echo "configure:2671: checking for $ac_word" >&5 |
c906108c SS |
2671 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2672 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2673 | else | |
2674 | case "$GMSGFMT" in | |
2675 | /*) | |
2676 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2677 | ;; | |
2678 | ?:/*) | |
2679 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2680 | ;; | |
2681 | *) | |
2682 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2683 | ac_dummy="$PATH" | |
2684 | for ac_dir in $ac_dummy; do | |
2685 | test -z "$ac_dir" && ac_dir=. | |
2686 | if test -f $ac_dir/$ac_word; then | |
2687 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2688 | break | |
2689 | fi | |
2690 | done | |
2691 | IFS="$ac_save_ifs" | |
2692 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2693 | ;; | |
2694 | esac | |
2695 | fi | |
2696 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2697 | if test -n "$GMSGFMT"; then | |
2698 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2699 | else | |
2700 | echo "$ac_t""no" 1>&6 | |
2701 | fi | |
2702 | ||
2703 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2704 | set dummy xgettext; ac_word=$2 | |
2705 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2706 | echo "configure:2707: checking for $ac_word" >&5 |
c906108c SS |
2707 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2709 | else | |
2710 | case "$XGETTEXT" in | |
2711 | /*) | |
2712 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2713 | ;; | |
2714 | *) | |
2715 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2716 | for ac_dir in $PATH; do | |
2717 | test -z "$ac_dir" && ac_dir=. | |
2718 | if test -f $ac_dir/$ac_word; then | |
2719 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2720 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2721 | break | |
2722 | fi | |
2723 | fi | |
2724 | done | |
2725 | IFS="$ac_save_ifs" | |
2726 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2727 | ;; | |
2728 | esac | |
2729 | fi | |
2730 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2731 | if test -n "$XGETTEXT"; then | |
2732 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2733 | else | |
2734 | echo "$ac_t""no" 1>&6 | |
2735 | fi | |
2736 | ||
2737 | ||
2738 | USE_INCLUDED_LIBINTL=yes | |
2739 | CATOBJEXT=.gmo | |
2740 | INSTOBJEXT=.mo | |
2741 | DATADIRNAME=share | |
2742 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2743 | INTLLIBS=$INTLDEPS | |
2744 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2745 | nls_cv_header_intl=libintl.h | |
2746 | nls_cv_header_libgt=libgettext.h | |
2747 | fi | |
2748 | ||
2749 | if test "$XGETTEXT" != ":"; then | |
2750 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2751 | : ; | |
2752 | else | |
2753 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2754 | XGETTEXT=":" | |
2755 | fi | |
2756 | fi | |
2757 | ||
2758 | # We need to process the po/ directory. | |
2759 | POSUB=po | |
2760 | else | |
2761 | DATADIRNAME=share | |
2762 | nls_cv_header_intl=libintl.h | |
2763 | nls_cv_header_libgt=libgettext.h | |
2764 | fi | |
2765 | ||
2766 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2767 | # because some of the sources are only built for this goal. | |
2768 | if test "$PACKAGE" = gettext; then | |
2769 | USE_NLS=yes | |
2770 | USE_INCLUDED_LIBINTL=yes | |
2771 | fi | |
2772 | ||
2773 | for lang in $ALL_LINGUAS; do | |
2774 | GMOFILES="$GMOFILES $lang.gmo" | |
2775 | POFILES="$POFILES $lang.po" | |
2776 | done | |
2777 | ||
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | if test "x$CATOBJEXT" != "x"; then | |
2792 | if test "x$ALL_LINGUAS" = "x"; then | |
2793 | LINGUAS= | |
2794 | else | |
2795 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
8bb2c122 | 2796 | echo "configure:2797: checking for catalogs to be installed" >&5 |
c906108c SS |
2797 | NEW_LINGUAS= |
2798 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2799 | case "$ALL_LINGUAS" in | |
2800 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2801 | esac | |
2802 | done | |
2803 | LINGUAS=$NEW_LINGUAS | |
2804 | echo "$ac_t""$LINGUAS" 1>&6 | |
2805 | fi | |
2806 | ||
2807 | if test -n "$LINGUAS"; then | |
2808 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2809 | fi | |
2810 | fi | |
2811 | ||
2812 | if test $ac_cv_header_locale_h = yes; then | |
2813 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2814 | else | |
2815 | INCLUDE_LOCALE_H="\ | |
2816 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2817 | fi | |
2818 | ||
2819 | ||
2820 | if test -f $srcdir/po2tbl.sed.in; then | |
2821 | if test "$CATOBJEXT" = ".cat"; then | |
2822 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2823 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
8bb2c122 | 2824 | echo "configure:2825: checking for linux/version.h" >&5 |
c906108c SS |
2825 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2827 | else | |
2828 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 2829 | #line 2830 "configure" |
c906108c SS |
2830 | #include "confdefs.h" |
2831 | #include <linux/version.h> | |
2832 | EOF | |
2833 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8bb2c122 | 2834 | { (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2835 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2836 | if test -z "$ac_err"; then | |
2837 | rm -rf conftest* | |
2838 | eval "ac_cv_header_$ac_safe=yes" | |
2839 | else | |
2840 | echo "$ac_err" >&5 | |
2841 | echo "configure: failed program was:" >&5 | |
2842 | cat conftest.$ac_ext >&5 | |
2843 | rm -rf conftest* | |
2844 | eval "ac_cv_header_$ac_safe=no" | |
2845 | fi | |
2846 | rm -f conftest* | |
2847 | fi | |
2848 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2849 | echo "$ac_t""yes" 1>&6 | |
2850 | msgformat=linux | |
2851 | else | |
2852 | echo "$ac_t""no" 1>&6 | |
2853 | msgformat=xopen | |
2854 | fi | |
2855 | ||
2856 | ||
2857 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2858 | fi | |
2859 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2860 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2861 | fi | |
2862 | ||
2863 | if test "$PACKAGE" = "gettext"; then | |
2864 | GT_NO="#NO#" | |
2865 | GT_YES= | |
2866 | else | |
2867 | GT_NO= | |
2868 | GT_YES="#YES#" | |
2869 | fi | |
2870 | ||
2871 | ||
2872 | ||
2873 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2874 | ||
2875 | ||
2876 | l= | |
2877 | ||
2878 | ||
4536bbc6 | 2879 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2880 | test -d po || mkdir po |
2881 | if test "x$srcdir" != "x."; then | |
2882 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2883 | posrcprefix="$srcdir/" | |
2884 | else | |
2885 | posrcprefix="../$srcdir/" | |
2886 | fi | |
2887 | else | |
2888 | posrcprefix="../" | |
2889 | fi | |
2890 | rm -f po/POTFILES | |
2891 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2892 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2893 | fi | |
2894 | ||
0fbb3da7 TT |
2895 | cat >> confdefs.h <<\EOF |
2896 | #define PACKAGE "gdb" | |
2897 | EOF | |
2898 | ||
2899 | ||
c906108c SS |
2900 | |
2901 | ||
2902 | CONFIG_OBS= | |
66b965bb | 2903 | CONFIG_LIB_OBS= |
c906108c SS |
2904 | CONFIG_DEPS= |
2905 | CONFIG_SRCS= | |
fb40c209 AC |
2906 | CONFIG_INITS= |
2907 | ENABLE_CFLAGS= | |
b3a90332 AC |
2908 | CONFIG_ALL= |
2909 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2910 | CONFIG_INSTALL= |
2911 | CONFIG_UNINSTALL= | |
c906108c | 2912 | |
ffc6a242 | 2913 | SUBDIRS="doc testsuite nlm" |
c906108c SS |
2914 | configdirs="doc testsuite" |
2915 | ||
96baa820 JM |
2916 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2917 | if test "${enable_multi_ice+set}" = set; then | |
2918 | enableval="$enable_multi_ice" | |
2919 | case "${enableval}" in | |
2920 | yes ) enable_multi_ice="yes" ;; | |
2921 | no) enable_multi_ice="no" ;; | |
2922 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2923 | esac | |
2924 | ||
2925 | fi | |
2926 | ||
2927 | ||
2928 | if test "${enable_multi_ice}" = "yes"; then | |
2929 | configdirs="${configdirs} multi-ice" | |
2930 | fi | |
2931 | ||
c906108c SS |
2932 | |
2933 | . ${srcdir}/configure.host | |
2934 | ||
2935 | . ${srcdir}/configure.tgt | |
2936 | ||
1ba607ad AC |
2937 | targ=${target} ; . ${srcdir}/../bfd/config.bfd |
2938 | ||
2939 | ||
2940 | targ=${target} | |
2941 | . ${srcdir}/../bfd/config.bfd | |
5c8cc331 AC |
2942 | |
2943 | targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` | |
2944 | ||
1ba607ad AC |
2945 | if test x"${targ_archs}" != x ; then |
2946 | cat >> confdefs.h <<EOF | |
2947 | #define DEFAULT_BFD_ARCH ${targ_archs} | |
2948 | EOF | |
2949 | ||
2950 | fi | |
2951 | if test x"${targ_defvec}" != x ; then | |
2952 | cat >> confdefs.h <<EOF | |
2953 | #define DEFAULT_BFD_VEC ${targ_defvec} | |
2954 | EOF | |
2955 | ||
2956 | fi | |
c906108c | 2957 | |
8bb2c122 MK |
2958 | if test "$program_transform_name" = s,x,x,; then |
2959 | program_transform_name= | |
2960 | else | |
2961 | # Double any \ or $. echo might interpret backslashes. | |
2962 | cat <<\EOF_SED > conftestsed | |
2963 | s,\\,\\\\,g; s,\$,$$,g | |
2964 | EOF_SED | |
2965 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2966 | rm -f conftestsed | |
2967 | fi | |
2968 | test "$program_prefix" != NONE && | |
2969 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2970 | # Use a double $ so make ignores it. | |
2971 | test "$program_suffix" != NONE && | |
2972 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2973 | ||
2974 | # sed with no file args requires a program. | |
2975 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2976 | ||
2977 | ||
2978 | # --------------------- # | |
2979 | # Checks for programs. # | |
2980 | # --------------------- # | |
2981 | ||
c41b7eb1 | 2982 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
2983 | do |
2984 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2985 | set dummy $ac_prog; ac_word=$2 | |
2986 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 2987 | echo "configure:2988: checking for $ac_word" >&5 |
7a292a7a SS |
2988 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2990 | else | |
2991 | if test -n "$AWK"; then | |
2992 | ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" | |
3000 | break | |
3001 | fi | |
3002 | done | |
3003 | IFS="$ac_save_ifs" | |
3004 | fi | |
3005 | fi | |
3006 | AWK="$ac_cv_prog_AWK" | |
3007 | if test -n "$AWK"; then | |
3008 | echo "$ac_t""$AWK" 1>&6 | |
3009 | else | |
3010 | echo "$ac_t""no" 1>&6 | |
3011 | fi | |
3012 | ||
3013 | test -n "$AWK" && break | |
3014 | done | |
3015 | ||
c906108c SS |
3016 | # Find a good install program. We prefer a C program (faster), |
3017 | # so one script is as good as another. But avoid the broken or | |
3018 | # incompatible versions: | |
3019 | # SysV /etc/install, /usr/sbin/install | |
3020 | # SunOS /usr/etc/install | |
3021 | # IRIX /sbin/install | |
3022 | # AIX /bin/install | |
3023 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3024 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3025 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3026 | # ./install, which can be erroneously created by make from ./install.sh. | |
3027 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
8bb2c122 | 3028 | echo "configure:3029: checking for a BSD compatible install" >&5 |
c906108c SS |
3029 | if test -z "$INSTALL"; then |
3030 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3031 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3032 | else | |
3033 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3034 | for ac_dir in $PATH; do | |
3035 | # Account for people who put trailing slashes in PATH elements. | |
3036 | case "$ac_dir/" in | |
3037 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3038 | *) | |
3039 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3040 | # Don't use installbsd from OSF since it installs stuff as root | |
3041 | # by default. | |
3042 | for ac_prog in ginstall scoinst install; do | |
3043 | if test -f $ac_dir/$ac_prog; then | |
3044 | if test $ac_prog = install && | |
3045 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3046 | # AIX install. It has an incompatible calling convention. | |
3047 | : | |
3048 | else | |
3049 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3050 | break 2 | |
3051 | fi | |
3052 | fi | |
3053 | done | |
3054 | ;; | |
3055 | esac | |
3056 | done | |
3057 | IFS="$ac_save_IFS" | |
3058 | ||
3059 | fi | |
3060 | if test "${ac_cv_path_install+set}" = set; then | |
3061 | INSTALL="$ac_cv_path_install" | |
3062 | else | |
3063 | # As a last resort, use the slow shell script. We don't cache a | |
3064 | # path for INSTALL within a source directory, because that will | |
3065 | # break other packages using the cache if that directory is | |
3066 | # removed, or if the path is relative. | |
3067 | INSTALL="$ac_install_sh" | |
3068 | fi | |
3069 | fi | |
3070 | echo "$ac_t""$INSTALL" 1>&6 | |
3071 | ||
3072 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3073 | # It thinks the first close brace ends the variable substitution. | |
3074 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3075 | ||
3076 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3077 | ||
3078 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3079 | ||
8bb2c122 MK |
3080 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
3081 | echo "configure:3082: checking whether ln -s works" >&5 | |
3082 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then | |
3083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3084 | else |
8bb2c122 MK |
3085 | rm -f conftestdata |
3086 | if ln -s X conftestdata 2>/dev/null | |
3087 | then | |
3088 | rm -f conftestdata | |
3089 | ac_cv_prog_LN_S="ln -s" | |
3090 | else | |
3091 | ac_cv_prog_LN_S=ln | |
3092 | fi | |
3093 | fi | |
3094 | LN_S="$ac_cv_prog_LN_S" | |
3095 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3096 | echo "$ac_t""yes" 1>&6 | |
3097 | else | |
3098 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3099 | fi |
3100 | ||
8bb2c122 MK |
3101 | # Extract the first word of "ranlib", so it can be a program name with args. |
3102 | set dummy ranlib; ac_word=$2 | |
c906108c | 3103 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8bb2c122 MK |
3104 | echo "configure:3105: checking for $ac_word" >&5 |
3105 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
c906108c SS |
3106 | echo $ac_n "(cached) $ac_c" 1>&6 |
3107 | else | |
8bb2c122 MK |
3108 | if test -n "$RANLIB"; then |
3109 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3110 | else |
3111 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3112 | ac_dummy="$PATH" | |
3113 | for ac_dir in $ac_dummy; do | |
3114 | test -z "$ac_dir" && ac_dir=. | |
3115 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3116 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3117 | break |
3118 | fi | |
3119 | done | |
3120 | IFS="$ac_save_ifs" | |
8bb2c122 | 3121 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3122 | fi |
3123 | fi | |
8bb2c122 MK |
3124 | RANLIB="$ac_cv_prog_RANLIB" |
3125 | if test -n "$RANLIB"; then | |
3126 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3127 | else |
3128 | echo "$ac_t""no" 1>&6 | |
3129 | fi | |
3130 | ||
8bb2c122 MK |
3131 | for ac_prog in 'bison -y' byacc |
3132 | do | |
3133 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3134 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3135 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8bb2c122 MK |
3136 | echo "configure:3137: checking for $ac_word" >&5 |
3137 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then | |
c906108c SS |
3138 | echo $ac_n "(cached) $ac_c" 1>&6 |
3139 | else | |
8bb2c122 MK |
3140 | if test -n "$YACC"; then |
3141 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3142 | else |
3143 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3144 | ac_dummy="$PATH" | |
3145 | for ac_dir in $ac_dummy; do | |
3146 | test -z "$ac_dir" && ac_dir=. | |
3147 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3148 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3149 | break |
3150 | fi | |
3151 | done | |
3152 | IFS="$ac_save_ifs" | |
3153 | fi | |
3154 | fi | |
8bb2c122 MK |
3155 | YACC="$ac_cv_prog_YACC" |
3156 | if test -n "$YACC"; then | |
3157 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3158 | else |
3159 | echo "$ac_t""no" 1>&6 | |
3160 | fi | |
3161 | ||
8bb2c122 MK |
3162 | test -n "$YACC" && break |
3163 | done | |
3164 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3165 | |
8bb2c122 MK |
3166 | |
3167 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3168 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3169 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8bb2c122 MK |
3170 | echo "configure:3171: checking for $ac_word" >&5 |
3171 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then | |
c906108c SS |
3172 | echo $ac_n "(cached) $ac_c" 1>&6 |
3173 | else | |
8bb2c122 MK |
3174 | if test -n "$AR"; then |
3175 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3176 | else |
3177 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3178 | ac_dummy="$PATH" | |
3179 | for ac_dir in $ac_dummy; do | |
3180 | test -z "$ac_dir" && ac_dir=. | |
3181 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3182 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3183 | break |
3184 | fi | |
3185 | done | |
3186 | IFS="$ac_save_ifs" | |
8bb2c122 | 3187 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3188 | fi |
3189 | fi | |
8bb2c122 MK |
3190 | AR="$ac_cv_prog_AR" |
3191 | if test -n "$AR"; then | |
3192 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3193 | else |
3194 | echo "$ac_t""no" 1>&6 | |
3195 | fi | |
3196 | ||
8bb2c122 | 3197 | |
c906108c | 3198 | |
95ca63c4 CF |
3199 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3200 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3201 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 3202 | echo "configure:3203: checking for $ac_word" >&5 |
95ca63c4 CF |
3203 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3205 | else | |
3206 | if test -n "$DLLTOOL"; then | |
3207 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3208 | else | |
3209 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3210 | ac_dummy="$PATH" | |
3211 | for ac_dir in $ac_dummy; do | |
3212 | test -z "$ac_dir" && ac_dir=. | |
3213 | if test -f $ac_dir/$ac_word; then | |
3214 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3215 | break | |
3216 | fi | |
3217 | done | |
3218 | IFS="$ac_save_ifs" | |
3219 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3220 | fi | |
3221 | fi | |
3222 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3223 | if test -n "$DLLTOOL"; then | |
3224 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3225 | else | |
3226 | echo "$ac_t""no" 1>&6 | |
3227 | fi | |
3228 | ||
3229 | ||
3230 | ||
3231 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3232 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3233 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 3234 | echo "configure:3235: checking for $ac_word" >&5 |
95ca63c4 CF |
3235 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3237 | else | |
3238 | if test -n "$WINDRES"; then | |
3239 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3240 | else | |
3241 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3242 | ac_dummy="$PATH" | |
3243 | for ac_dir in $ac_dummy; do | |
3244 | test -z "$ac_dir" && ac_dir=. | |
3245 | if test -f $ac_dir/$ac_word; then | |
3246 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3247 | break | |
3248 | fi | |
3249 | done | |
3250 | IFS="$ac_save_ifs" | |
3251 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3252 | fi | |
3253 | fi | |
3254 | WINDRES="$ac_cv_prog_WINDRES" | |
3255 | if test -n "$WINDRES"; then | |
3256 | echo "$ac_t""$WINDRES" 1>&6 | |
3257 | else | |
3258 | echo "$ac_t""no" 1>&6 | |
3259 | fi | |
3260 | ||
3261 | ||
3262 | ||
c906108c | 3263 | |
8bb2c122 | 3264 | # Needed for GNU/Hurd. |
75c6e08a MK |
3265 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3266 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3267 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8bb2c122 | 3268 | echo "configure:3269: checking for $ac_word" >&5 |
75c6e08a MK |
3269 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3271 | else | |
3272 | if test -n "$MIG"; then | |
3273 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3274 | else | |
3275 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3276 | ac_dummy="$PATH" | |
3277 | for ac_dir in $ac_dummy; do | |
3278 | test -z "$ac_dir" && ac_dir=. | |
3279 | if test -f $ac_dir/$ac_word; then | |
3280 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3281 | break | |
3282 | fi | |
3283 | done | |
3284 | IFS="$ac_save_ifs" | |
3285 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3286 | fi | |
3287 | fi | |
3288 | MIG="$ac_cv_prog_MIG" | |
3289 | if test -n "$MIG"; then | |
3290 | echo "$ac_t""$MIG" 1>&6 | |
3291 | else | |
3292 | echo "$ac_t""no" 1>&6 | |
3293 | fi | |
3294 | ||
3295 | ||
3296 | ||
3297 | ||
9a156167 MK |
3298 | # ---------------------- # |
3299 | # Checks for libraries. # | |
3300 | # ---------------------- # | |
3301 | ||
3302 | # We might need to link with -lm; most simulators need it. | |
3303 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
8bb2c122 | 3304 | echo "configure:3305: checking for main in -lm" >&5 |
9a156167 MK |
3305 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3306 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3308 | else | |
3309 | ac_save_LIBS="$LIBS" | |
3310 | LIBS="-lm $LIBS" | |
3311 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 3312 | #line 3313 "configure" |
9a156167 MK |
3313 | #include "confdefs.h" |
3314 | ||
3315 | int main() { | |
3316 | main() | |
3317 | ; return 0; } | |
3318 | EOF | |
8bb2c122 | 3319 | if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3320 | rm -rf conftest* |
3321 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3322 | else | |
3323 | echo "configure: failed program was:" >&5 | |
3324 | cat conftest.$ac_ext >&5 | |
3325 | rm -rf conftest* | |
3326 | eval "ac_cv_lib_$ac_lib_var=no" | |
3327 | fi | |
3328 | rm -f conftest* | |
3329 | LIBS="$ac_save_LIBS" | |
3330 | ||
3331 | fi | |
3332 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3333 | echo "$ac_t""yes" 1>&6 | |
3334 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3335 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3336 | cat >> confdefs.h <<EOF | |
3337 | #define $ac_tr_lib 1 | |
3338 | EOF | |
3339 | ||
3340 | LIBS="-lm $LIBS" | |
3341 | ||
3342 | else | |
3343 | echo "$ac_t""no" 1>&6 | |
3344 | fi | |
3345 | ||
3346 | ||
3347 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3348 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3349 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3350 | # is known to have this problem). Therefore we avoid libw if we can. | |
3351 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
8bb2c122 | 3352 | echo "configure:3353: checking for wctype" >&5 |
9a156167 MK |
3353 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3355 | else | |
3356 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 3357 | #line 3358 "configure" |
9a156167 MK |
3358 | #include "confdefs.h" |
3359 | /* System header to define __stub macros and hopefully few prototypes, | |
3360 | which can conflict with char wctype(); below. */ | |
3361 | #include <assert.h> | |
3362 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3363 | /* We use char because int might match the return type of a gcc2 | |
3364 | builtin and then its argument prototype would still apply. */ | |
3365 | char wctype(); | |
3366 | ||
3367 | int main() { | |
3368 | ||
3369 | /* The GNU C library defines this for functions which it implements | |
3370 | to always fail with ENOSYS. Some functions are actually named | |
3371 | something starting with __ and the normal name is an alias. */ | |
3372 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3373 | choke me | |
3374 | #else | |
3375 | wctype(); | |
3376 | #endif | |
3377 | ||
3378 | ; return 0; } | |
3379 | EOF | |
8bb2c122 | 3380 | if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3381 | rm -rf conftest* |
3382 | eval "ac_cv_func_wctype=yes" | |
3383 | else | |
3384 | echo "configure: failed program was:" >&5 | |
3385 | cat conftest.$ac_ext >&5 | |
3386 | rm -rf conftest* | |
3387 | eval "ac_cv_func_wctype=no" | |
3388 | fi | |
3389 | rm -f conftest* | |
3390 | fi | |
3391 | ||
3392 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3393 | echo "$ac_t""yes" 1>&6 | |
3394 | : | |
3395 | else | |
3396 | echo "$ac_t""no" 1>&6 | |
3397 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
8bb2c122 | 3398 | echo "configure:3399: checking for wctype in -lw" >&5 |
9a156167 MK |
3399 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3400 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3402 | else | |
3403 | ac_save_LIBS="$LIBS" | |
3404 | LIBS="-lw $LIBS" | |
3405 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 3406 | #line 3407 "configure" |
9a156167 MK |
3407 | #include "confdefs.h" |
3408 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3409 | /* We use char because int might match the return type of a gcc2 | |
3410 | builtin and then its argument prototype would still apply. */ | |
3411 | char wctype(); | |
3412 | ||
3413 | int main() { | |
3414 | wctype() | |
3415 | ; return 0; } | |
3416 | EOF | |
8bb2c122 | 3417 | if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3418 | rm -rf conftest* |
3419 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3420 | else | |
3421 | echo "configure: failed program was:" >&5 | |
3422 | cat conftest.$ac_ext >&5 | |
3423 | rm -rf conftest* | |
3424 | eval "ac_cv_lib_$ac_lib_var=no" | |
3425 | fi | |
3426 | rm -f conftest* | |
3427 | LIBS="$ac_save_LIBS" | |
3428 | ||
3429 | fi | |
3430 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3431 | echo "$ac_t""yes" 1>&6 | |
3432 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3433 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3434 | cat >> confdefs.h <<EOF | |
3435 | #define $ac_tr_lib 1 | |
3436 | EOF | |
3437 | ||
3438 | LIBS="-lw $LIBS" | |
3439 | ||
3440 | else | |
3441 | echo "$ac_t""no" 1>&6 | |
3442 | fi | |
3443 | ||
3444 | fi | |
3445 | ||
3446 | ||
3447 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3448 | ||
3449 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
8bb2c122 | 3450 | echo "configure:3451: checking for library containing socketpair" >&5 |
9a156167 MK |
3451 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3452 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3453 | else | |
3454 | ac_func_search_save_LIBS="$LIBS" | |
3455 | ac_cv_search_socketpair="no" | |
3456 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 3457 | #line 3458 "configure" |
9a156167 MK |
3458 | #include "confdefs.h" |
3459 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3460 | /* We use char because int might match the return type of a gcc2 | |
3461 | builtin and then its argument prototype would still apply. */ | |
3462 | char socketpair(); | |
3463 | ||
3464 | int main() { | |
3465 | socketpair() | |
3466 | ; return 0; } | |
3467 | EOF | |
8bb2c122 | 3468 | if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3469 | rm -rf conftest* |
3470 | ac_cv_search_socketpair="none required" | |
3471 | else | |
3472 | echo "configure: failed program was:" >&5 | |
3473 | cat conftest.$ac_ext >&5 | |
3474 | fi | |
3475 | rm -f conftest* | |
3476 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3477 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3478 | cat > conftest.$ac_ext <<EOF | |
8bb2c122 | 3479 | #line 3480 "configure" |
9a156167 MK |
3480 | #include "confdefs.h" |
3481 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3482 | /* We use char because int might match the return type of a gcc2 | |
3483 | builtin and then its argument prototype would still apply. */ | |
3484 | char socketpair(); | |
3485 | ||
3486 | int main() { | |
3487 | socketpair() | |
3488 | ; return 0; } | |
3489 | EOF | |
8bb2c122 | 3490 | if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3491 | rm -rf conftest* |
3492 | ac_cv_search_socketpair="-l$i" | |
3493 | break | |
3494 | else | |
3495 | echo "configure: failed program was:" >&5 | |
3496 | cat conftest.$ac_ext >&5 | |
3497 | fi | |
3498 | rm -f conftest* | |
3499 | done | |
3500 | LIBS="$ac_func_search_save_LIBS" | |
3501 | fi | |
3502 | ||
3503 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3504 | if test "$ac_cv_search_socketpair" != "no"; then | |
3505 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3506 | ||
3507 | else : | |
3508 | ||
3509 | fi | |
3510 | ||
5ee754fc MK |
3511 | # ------------------------- # |
3512 | # Checks for header files. # | |
3513 | # ------------------------- # | |
3514 | ||
3515 | ac_header_dirent=no | |
3516 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3517 | do | |
3518 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3519 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
3520 | echo "configure:3521: checking for $ac_hdr that defines DIR" >&5 | |
3521 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then | |
c906108c SS |
3522 | echo $ac_n "(cached) $ac_c" 1>&6 |
3523 | else | |
3524 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 3525 | #line 3526 "configure" |
c906108c SS |
3526 | #include "confdefs.h" |
3527 | #include <sys/types.h> | |
5ee754fc MK |
3528 | #include <$ac_hdr> |
3529 | int main() { | |
3530 | DIR *dirp = 0; | |
3531 | ; return 0; } | |
3532 | EOF | |
3533 | if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
3534 | rm -rf conftest* | |
3535 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3536 | else | |
3537 | echo "configure: failed program was:" >&5 | |
3538 | cat conftest.$ac_ext >&5 | |
3539 | rm -rf conftest* | |
3540 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3541 | fi | |
3542 | rm -f conftest* | |
3543 | fi | |
3544 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3545 | echo "$ac_t""yes" 1>&6 | |
3546 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3547 | cat >> confdefs.h <<EOF | |
3548 | #define $ac_tr_hdr 1 | |
3549 | EOF | |
3550 | ac_header_dirent=$ac_hdr; break | |
3551 | else | |
3552 | echo "$ac_t""no" 1>&6 | |
3553 | fi | |
3554 | done | |
3555 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
3556 | if test $ac_header_dirent = dirent.h; then | |
3557 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
3558 | echo "configure:3559: checking for opendir in -ldir" >&5 | |
3559 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` | |
3560 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3561 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3562 | else | |
3563 | ac_save_LIBS="$LIBS" | |
3564 | LIBS="-ldir $LIBS" | |
3565 | cat > conftest.$ac_ext <<EOF | |
3566 | #line 3567 "configure" | |
3567 | #include "confdefs.h" | |
3568 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3569 | /* We use char because int might match the return type of a gcc2 | |
3570 | builtin and then its argument prototype would still apply. */ | |
3571 | char opendir(); | |
c906108c SS |
3572 | |
3573 | int main() { | |
5ee754fc | 3574 | opendir() |
c906108c SS |
3575 | ; return 0; } |
3576 | EOF | |
5ee754fc | 3577 | if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 3578 | rm -rf conftest* |
5ee754fc | 3579 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
3580 | else |
3581 | echo "configure: failed program was:" >&5 | |
3582 | cat conftest.$ac_ext >&5 | |
3583 | rm -rf conftest* | |
5ee754fc | 3584 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
3585 | fi |
3586 | rm -f conftest* | |
5ee754fc MK |
3587 | LIBS="$ac_save_LIBS" |
3588 | ||
3589 | fi | |
3590 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3591 | echo "$ac_t""yes" 1>&6 | |
3592 | LIBS="$LIBS -ldir" | |
3593 | else | |
3594 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3595 | fi |
3596 | ||
5ee754fc MK |
3597 | else |
3598 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
3599 | echo "configure:3600: checking for opendir in -lx" >&5 | |
3600 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` | |
3601 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3603 | else | |
3604 | ac_save_LIBS="$LIBS" | |
3605 | LIBS="-lx $LIBS" | |
3606 | cat > conftest.$ac_ext <<EOF | |
3607 | #line 3608 "configure" | |
3608 | #include "confdefs.h" | |
3609 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3610 | /* We use char because int might match the return type of a gcc2 | |
3611 | builtin and then its argument prototype would still apply. */ | |
3612 | char opendir(); | |
3613 | ||
3614 | int main() { | |
3615 | opendir() | |
3616 | ; return 0; } | |
c906108c | 3617 | EOF |
5ee754fc MK |
3618 | if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
3619 | rm -rf conftest* | |
3620 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3621 | else | |
3622 | echo "configure: failed program was:" >&5 | |
3623 | cat conftest.$ac_ext >&5 | |
3624 | rm -rf conftest* | |
3625 | eval "ac_cv_lib_$ac_lib_var=no" | |
3626 | fi | |
3627 | rm -f conftest* | |
3628 | LIBS="$ac_save_LIBS" | |
c906108c | 3629 | |
5ee754fc MK |
3630 | fi |
3631 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3632 | echo "$ac_t""yes" 1>&6 | |
3633 | LIBS="$LIBS -lx" | |
3634 | else | |
3635 | echo "$ac_t""no" 1>&6 | |
3636 | fi | |
c906108c | 3637 | |
5ee754fc | 3638 | fi |
c906108c | 3639 | |
5ee754fc MK |
3640 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
3641 | echo "configure:3642: checking whether stat file-mode macros are broken" >&5 | |
3642 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then | |
9608ab8b MK |
3643 | echo $ac_n "(cached) $ac_c" 1>&6 |
3644 | else | |
3645 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 3646 | #line 3647 "configure" |
9608ab8b MK |
3647 | #include "confdefs.h" |
3648 | #include <sys/types.h> | |
5ee754fc MK |
3649 | #include <sys/stat.h> |
3650 | ||
3651 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3652 | # if S_ISBLK (S_IFDIR) | |
3653 | You lose. | |
3654 | # endif | |
3655 | #endif | |
3656 | ||
3657 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3658 | # if S_ISBLK (S_IFCHR) | |
3659 | You lose. | |
3660 | # endif | |
3661 | #endif | |
3662 | ||
3663 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3664 | # if S_ISLNK (S_IFREG) | |
3665 | You lose. | |
3666 | # endif | |
3667 | #endif | |
3668 | ||
3669 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3670 | # if S_ISSOCK (S_IFREG) | |
3671 | You lose. | |
3672 | # endif | |
3673 | #endif | |
3674 | ||
9608ab8b | 3675 | EOF |
5ee754fc MK |
3676 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3677 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 3678 | rm -rf conftest* |
5ee754fc MK |
3679 | ac_cv_header_stat_broken=yes |
3680 | else | |
3681 | rm -rf conftest* | |
3682 | ac_cv_header_stat_broken=no | |
3683 | fi | |
3684 | rm -f conftest* | |
3685 | ||
3686 | fi | |
3687 | ||
3688 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3689 | if test $ac_cv_header_stat_broken = yes; then | |
3690 | cat >> confdefs.h <<\EOF | |
3691 | #define STAT_MACROS_BROKEN 1 | |
3692 | EOF | |
3693 | ||
3694 | fi | |
3695 | ||
3696 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
3697 | echo "configure:3698: checking for ANSI C header files" >&5 | |
3698 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
3699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3700 | else | |
3701 | cat > conftest.$ac_ext <<EOF | |
3702 | #line 3703 "configure" | |
3703 | #include "confdefs.h" | |
3704 | #include <stdlib.h> | |
3705 | #include <stdarg.h> | |
3706 | #include <string.h> | |
3707 | #include <float.h> | |
3708 | EOF | |
3709 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3710 | { (eval echo configure:3711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3711 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3712 | if test -z "$ac_err"; then | |
3713 | rm -rf conftest* | |
3714 | ac_cv_header_stdc=yes | |
3715 | else | |
3716 | echo "$ac_err" >&5 | |
3717 | echo "configure: failed program was:" >&5 | |
3718 | cat conftest.$ac_ext >&5 | |
3719 | rm -rf conftest* | |
3720 | ac_cv_header_stdc=no | |
3721 | fi | |
3722 | rm -f conftest* | |
3723 | ||
3724 | if test $ac_cv_header_stdc = yes; then | |
3725 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3726 | cat > conftest.$ac_ext <<EOF | |
3727 | #line 3728 "configure" | |
3728 | #include "confdefs.h" | |
3729 | #include <string.h> | |
3730 | EOF | |
3731 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3732 | egrep "memchr" >/dev/null 2>&1; then | |
3733 | : | |
3734 | else | |
3735 | rm -rf conftest* | |
3736 | ac_cv_header_stdc=no | |
3737 | fi | |
3738 | rm -f conftest* | |
3739 | ||
3740 | fi | |
3741 | ||
3742 | if test $ac_cv_header_stdc = yes; then | |
3743 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3744 | cat > conftest.$ac_ext <<EOF | |
3745 | #line 3746 "configure" | |
3746 | #include "confdefs.h" | |
3747 | #include <stdlib.h> | |
3748 | EOF | |
3749 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3750 | egrep "free" >/dev/null 2>&1; then | |
3751 | : | |
3752 | else | |
3753 | rm -rf conftest* | |
3754 | ac_cv_header_stdc=no | |
3755 | fi | |
3756 | rm -f conftest* | |
3757 | ||
3758 | fi | |
3759 | ||
3760 | if test $ac_cv_header_stdc = yes; then | |
3761 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3762 | if test "$cross_compiling" = yes; then | |
3763 | : | |
3764 | else | |
3765 | cat > conftest.$ac_ext <<EOF | |
3766 | #line 3767 "configure" | |
3767 | #include "confdefs.h" | |
3768 | #include <ctype.h> | |
3769 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3770 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3771 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3772 | int main () { int i; for (i = 0; i < 256; i++) | |
3773 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3774 | exit (0); } | |
3775 | ||
3776 | EOF | |
3777 | if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
3778 | then | |
3779 | : | |
9608ab8b | 3780 | else |
5ee754fc MK |
3781 | echo "configure: failed program was:" >&5 |
3782 | cat conftest.$ac_ext >&5 | |
3783 | rm -fr conftest* | |
3784 | ac_cv_header_stdc=no | |
3785 | fi | |
3786 | rm -fr conftest* | |
3787 | fi | |
3788 | ||
3789 | fi | |
3790 | fi | |
3791 | ||
3792 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3793 | if test $ac_cv_header_stdc = yes; then | |
3794 | cat >> confdefs.h <<\EOF | |
3795 | #define STDC_HEADERS 1 | |
3796 | EOF | |
3797 | ||
3798 | fi | |
3799 | ||
3800 | for ac_hdr in link.h | |
3801 | do | |
3802 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3803 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3804 | echo "configure:3805: checking for $ac_hdr" >&5 | |
3805 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3807 | else | |
3808 | cat > conftest.$ac_ext <<EOF | |
3809 | #line 3810 "configure" | |
3810 | #include "confdefs.h" | |
3811 | #include <$ac_hdr> | |
3812 | EOF | |
3813 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3814 | { (eval echo configure:3815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3815 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3816 | if test -z "$ac_err"; then | |
3817 | rm -rf conftest* | |
3818 | eval "ac_cv_header_$ac_safe=yes" | |
3819 | else | |
3820 | echo "$ac_err" >&5 | |
3821 | echo "configure: failed program was:" >&5 | |
3822 | cat conftest.$ac_ext >&5 | |
3823 | rm -rf conftest* | |
3824 | eval "ac_cv_header_$ac_safe=no" | |
3825 | fi | |
3826 | rm -f conftest* | |
3827 | fi | |
3828 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3829 | echo "$ac_t""yes" 1>&6 | |
3830 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3831 | cat >> confdefs.h <<EOF | |
3832 | #define $ac_tr_hdr 1 | |
3833 | EOF | |
3834 | ||
3835 | else | |
3836 | echo "$ac_t""no" 1>&6 | |
3837 | fi | |
3838 | done | |
3839 | ||
3840 | for ac_hdr in nlist.h | |
3841 | do | |
3842 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3843 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3844 | echo "configure:3845: checking for $ac_hdr" >&5 | |
3845 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3847 | else | |
3848 | cat > conftest.$ac_ext <<EOF | |
3849 | #line 3850 "configure" | |
3850 | #include "confdefs.h" | |
3851 | #include <$ac_hdr> | |
3852 | EOF | |
3853 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3854 | { (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3855 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3856 | if test -z "$ac_err"; then | |
3857 | rm -rf conftest* | |
3858 | eval "ac_cv_header_$ac_safe=yes" | |
3859 | else | |
3860 | echo "$ac_err" >&5 | |
3861 | echo "configure: failed program was:" >&5 | |
3862 | cat conftest.$ac_ext >&5 | |
3863 | rm -rf conftest* | |
3864 | eval "ac_cv_header_$ac_safe=no" | |
3865 | fi | |
3866 | rm -f conftest* | |
3867 | fi | |
3868 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3869 | echo "$ac_t""yes" 1>&6 | |
3870 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3871 | cat >> confdefs.h <<EOF | |
3872 | #define $ac_tr_hdr 1 | |
3873 | EOF | |
3874 | ||
3875 | else | |
3876 | echo "$ac_t""no" 1>&6 | |
3877 | fi | |
3878 | done | |
3879 | ||
3880 | for ac_hdr in poll.h sys/poll.h | |
3881 | do | |
3882 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3883 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3884 | echo "configure:3885: checking for $ac_hdr" >&5 | |
3885 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3886 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3887 | else | |
3888 | cat > conftest.$ac_ext <<EOF | |
3889 | #line 3890 "configure" | |
3890 | #include "confdefs.h" | |
3891 | #include <$ac_hdr> | |
3892 | EOF | |
3893 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3894 | { (eval echo configure:3895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3895 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3896 | if test -z "$ac_err"; then | |
3897 | rm -rf conftest* | |
3898 | eval "ac_cv_header_$ac_safe=yes" | |
3899 | else | |
3900 | echo "$ac_err" >&5 | |
3901 | echo "configure: failed program was:" >&5 | |
3902 | cat conftest.$ac_ext >&5 | |
3903 | rm -rf conftest* | |
3904 | eval "ac_cv_header_$ac_safe=no" | |
3905 | fi | |
3906 | rm -f conftest* | |
3907 | fi | |
3908 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3909 | echo "$ac_t""yes" 1>&6 | |
3910 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3911 | cat >> confdefs.h <<EOF | |
3912 | #define $ac_tr_hdr 1 | |
3913 | EOF | |
3914 | ||
3915 | else | |
3916 | echo "$ac_t""no" 1>&6 | |
3917 | fi | |
3918 | done | |
3919 | ||
3920 | for ac_hdr in proc_service.h thread_db.h | |
3921 | do | |
3922 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3923 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3924 | echo "configure:3925: checking for $ac_hdr" >&5 | |
3925 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3927 | else | |
3928 | cat > conftest.$ac_ext <<EOF | |
3929 | #line 3930 "configure" | |
3930 | #include "confdefs.h" | |
3931 | #include <$ac_hdr> | |
3932 | EOF | |
3933 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3934 | { (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3935 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3936 | if test -z "$ac_err"; then | |
3937 | rm -rf conftest* | |
3938 | eval "ac_cv_header_$ac_safe=yes" | |
3939 | else | |
3940 | echo "$ac_err" >&5 | |
3941 | echo "configure: failed program was:" >&5 | |
3942 | cat conftest.$ac_ext >&5 | |
3943 | rm -rf conftest* | |
3944 | eval "ac_cv_header_$ac_safe=no" | |
3945 | fi | |
3946 | rm -f conftest* | |
3947 | fi | |
3948 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3949 | echo "$ac_t""yes" 1>&6 | |
3950 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3951 | cat >> confdefs.h <<EOF | |
3952 | #define $ac_tr_hdr 1 | |
3953 | EOF | |
3954 | ||
3955 | else | |
3956 | echo "$ac_t""no" 1>&6 | |
3957 | fi | |
3958 | done | |
3959 | ||
3960 | for ac_hdr in stddef.h | |
3961 | do | |
3962 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3963 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3964 | echo "configure:3965: checking for $ac_hdr" >&5 | |
3965 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3966 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3967 | else | |
3968 | cat > conftest.$ac_ext <<EOF | |
3969 | #line 3970 "configure" | |
3970 | #include "confdefs.h" | |
3971 | #include <$ac_hdr> | |
3972 | EOF | |
3973 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3974 | { (eval echo configure:3975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3975 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3976 | if test -z "$ac_err"; then | |
3977 | rm -rf conftest* | |
3978 | eval "ac_cv_header_$ac_safe=yes" | |
3979 | else | |
3980 | echo "$ac_err" >&5 | |
3981 | echo "configure: failed program was:" >&5 | |
3982 | cat conftest.$ac_ext >&5 | |
3983 | rm -rf conftest* | |
3984 | eval "ac_cv_header_$ac_safe=no" | |
3985 | fi | |
3986 | rm -f conftest* | |
3987 | fi | |
3988 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3989 | echo "$ac_t""yes" 1>&6 | |
3990 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3991 | cat >> confdefs.h <<EOF | |
3992 | #define $ac_tr_hdr 1 | |
3993 | EOF | |
3994 | ||
3995 | else | |
3996 | echo "$ac_t""no" 1>&6 | |
3997 | fi | |
3998 | done | |
3999 | ||
4000 | for ac_hdr in stdlib.h | |
4001 | do | |
4002 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4003 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4004 | echo "configure:4005: checking for $ac_hdr" >&5 | |
4005 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4007 | else | |
4008 | cat > conftest.$ac_ext <<EOF | |
4009 | #line 4010 "configure" | |
4010 | #include "confdefs.h" | |
4011 | #include <$ac_hdr> | |
4012 | EOF | |
4013 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4014 | { (eval echo configure:4015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4015 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4016 | if test -z "$ac_err"; then | |
4017 | rm -rf conftest* | |
4018 | eval "ac_cv_header_$ac_safe=yes" | |
4019 | else | |
4020 | echo "$ac_err" >&5 | |
4021 | echo "configure: failed program was:" >&5 | |
4022 | cat conftest.$ac_ext >&5 | |
4023 | rm -rf conftest* | |
4024 | eval "ac_cv_header_$ac_safe=no" | |
4025 | fi | |
4026 | rm -f conftest* | |
4027 | fi | |
4028 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4029 | echo "$ac_t""yes" 1>&6 | |
4030 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4031 | cat >> confdefs.h <<EOF | |
4032 | #define $ac_tr_hdr 1 | |
4033 | EOF | |
4034 | ||
4035 | else | |
4036 | echo "$ac_t""no" 1>&6 | |
4037 | fi | |
4038 | done | |
4039 | ||
4040 | for ac_hdr in stdint.h | |
4041 | do | |
4042 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4043 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4044 | echo "configure:4045: checking for $ac_hdr" >&5 | |
4045 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4046 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4047 | else | |
4048 | cat > conftest.$ac_ext <<EOF | |
4049 | #line 4050 "configure" | |
4050 | #include "confdefs.h" | |
4051 | #include <$ac_hdr> | |
4052 | EOF | |
4053 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4054 | { (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4055 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4056 | if test -z "$ac_err"; then | |
4057 | rm -rf conftest* | |
4058 | eval "ac_cv_header_$ac_safe=yes" | |
4059 | else | |
4060 | echo "$ac_err" >&5 | |
4061 | echo "configure: failed program was:" >&5 | |
4062 | cat conftest.$ac_ext >&5 | |
4063 | rm -rf conftest* | |
4064 | eval "ac_cv_header_$ac_safe=no" | |
4065 | fi | |
4066 | rm -f conftest* | |
4067 | fi | |
4068 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4069 | echo "$ac_t""yes" 1>&6 | |
4070 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4071 | cat >> confdefs.h <<EOF | |
4072 | #define $ac_tr_hdr 1 | |
4073 | EOF | |
4074 | ||
4075 | else | |
4076 | echo "$ac_t""no" 1>&6 | |
4077 | fi | |
4078 | done | |
4079 | ||
4080 | for ac_hdr in string.h memory.h strings.h | |
4081 | do | |
4082 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4083 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4084 | echo "configure:4085: checking for $ac_hdr" >&5 | |
4085 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4087 | else | |
4088 | cat > conftest.$ac_ext <<EOF | |
4089 | #line 4090 "configure" | |
4090 | #include "confdefs.h" | |
4091 | #include <$ac_hdr> | |
4092 | EOF | |
4093 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4094 | { (eval echo configure:4095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4095 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4096 | if test -z "$ac_err"; then | |
4097 | rm -rf conftest* | |
4098 | eval "ac_cv_header_$ac_safe=yes" | |
4099 | else | |
4100 | echo "$ac_err" >&5 | |
4101 | echo "configure: failed program was:" >&5 | |
4102 | cat conftest.$ac_ext >&5 | |
4103 | rm -rf conftest* | |
4104 | eval "ac_cv_header_$ac_safe=no" | |
4105 | fi | |
4106 | rm -f conftest* | |
4107 | fi | |
4108 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4109 | echo "$ac_t""yes" 1>&6 | |
4110 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4111 | cat >> confdefs.h <<EOF | |
4112 | #define $ac_tr_hdr 1 | |
4113 | EOF | |
4114 | ||
4115 | else | |
4116 | echo "$ac_t""no" 1>&6 | |
4117 | fi | |
4118 | done | |
4119 | ||
4120 | for ac_hdr in sys/fault.h | |
4121 | do | |
4122 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4123 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4124 | echo "configure:4125: checking for $ac_hdr" >&5 | |
4125 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4126 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4127 | else | |
4128 | cat > conftest.$ac_ext <<EOF | |
4129 | #line 4130 "configure" | |
4130 | #include "confdefs.h" | |
4131 | #include <$ac_hdr> | |
4132 | EOF | |
4133 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4134 | { (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4135 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4136 | if test -z "$ac_err"; then | |
4137 | rm -rf conftest* | |
4138 | eval "ac_cv_header_$ac_safe=yes" | |
4139 | else | |
4140 | echo "$ac_err" >&5 | |
4141 | echo "configure: failed program was:" >&5 | |
4142 | cat conftest.$ac_ext >&5 | |
4143 | rm -rf conftest* | |
4144 | eval "ac_cv_header_$ac_safe=no" | |
4145 | fi | |
4146 | rm -f conftest* | |
4147 | fi | |
4148 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4149 | echo "$ac_t""yes" 1>&6 | |
4150 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4151 | cat >> confdefs.h <<EOF | |
4152 | #define $ac_tr_hdr 1 | |
4153 | EOF | |
4154 | ||
4155 | else | |
4156 | echo "$ac_t""no" 1>&6 | |
4157 | fi | |
4158 | done | |
4159 | ||
4160 | for ac_hdr in sys/file.h | |
4161 | do | |
4162 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4163 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4164 | echo "configure:4165: checking for $ac_hdr" >&5 | |
4165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4167 | else | |
4168 | cat > conftest.$ac_ext <<EOF | |
4169 | #line 4170 "configure" | |
4170 | #include "confdefs.h" | |
4171 | #include <$ac_hdr> | |
4172 | EOF | |
4173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4174 | { (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4176 | if test -z "$ac_err"; then | |
4177 | rm -rf conftest* | |
4178 | eval "ac_cv_header_$ac_safe=yes" | |
4179 | else | |
4180 | echo "$ac_err" >&5 | |
4181 | echo "configure: failed program was:" >&5 | |
4182 | cat conftest.$ac_ext >&5 | |
4183 | rm -rf conftest* | |
4184 | eval "ac_cv_header_$ac_safe=no" | |
4185 | fi | |
4186 | rm -f conftest* | |
4187 | fi | |
4188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4189 | echo "$ac_t""yes" 1>&6 | |
4190 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4191 | cat >> confdefs.h <<EOF | |
4192 | #define $ac_tr_hdr 1 | |
4193 | EOF | |
4194 | ||
4195 | else | |
4196 | echo "$ac_t""no" 1>&6 | |
4197 | fi | |
4198 | done | |
4199 | ||
4200 | for ac_hdr in sys/filio.h | |
4201 | do | |
4202 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4203 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4204 | echo "configure:4205: checking for $ac_hdr" >&5 | |
4205 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4206 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4207 | else | |
4208 | cat > conftest.$ac_ext <<EOF | |
4209 | #line 4210 "configure" | |
4210 | #include "confdefs.h" | |
4211 | #include <$ac_hdr> | |
4212 | EOF | |
4213 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4214 | { (eval echo configure:4215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4215 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4216 | if test -z "$ac_err"; then | |
4217 | rm -rf conftest* | |
4218 | eval "ac_cv_header_$ac_safe=yes" | |
4219 | else | |
4220 | echo "$ac_err" >&5 | |
4221 | echo "configure: failed program was:" >&5 | |
4222 | cat conftest.$ac_ext >&5 | |
4223 | rm -rf conftest* | |
4224 | eval "ac_cv_header_$ac_safe=no" | |
4225 | fi | |
4226 | rm -f conftest* | |
4227 | fi | |
4228 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4229 | echo "$ac_t""yes" 1>&6 | |
4230 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4231 | cat >> confdefs.h <<EOF | |
4232 | #define $ac_tr_hdr 1 | |
4233 | EOF | |
4234 | ||
4235 | else | |
4236 | echo "$ac_t""no" 1>&6 | |
4237 | fi | |
4238 | done | |
4239 | ||
4240 | for ac_hdr in sys/ioctl.h | |
4241 | do | |
4242 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4243 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4244 | echo "configure:4245: checking for $ac_hdr" >&5 | |
4245 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4247 | else | |
4248 | cat > conftest.$ac_ext <<EOF | |
4249 | #line 4250 "configure" | |
4250 | #include "confdefs.h" | |
4251 | #include <$ac_hdr> | |
4252 | EOF | |
4253 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4254 | { (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4255 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4256 | if test -z "$ac_err"; then | |
4257 | rm -rf conftest* | |
4258 | eval "ac_cv_header_$ac_safe=yes" | |
4259 | else | |
4260 | echo "$ac_err" >&5 | |
4261 | echo "configure: failed program was:" >&5 | |
4262 | cat conftest.$ac_ext >&5 | |
4263 | rm -rf conftest* | |
4264 | eval "ac_cv_header_$ac_safe=no" | |
4265 | fi | |
4266 | rm -f conftest* | |
4267 | fi | |
4268 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4269 | echo "$ac_t""yes" 1>&6 | |
4270 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4271 | cat >> confdefs.h <<EOF | |
4272 | #define $ac_tr_hdr 1 | |
4273 | EOF | |
4274 | ||
4275 | else | |
4276 | echo "$ac_t""no" 1>&6 | |
4277 | fi | |
4278 | done | |
4279 | ||
4280 | for ac_hdr in sys/param.h | |
4281 | do | |
4282 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4283 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4284 | echo "configure:4285: checking for $ac_hdr" >&5 | |
4285 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4287 | else | |
4288 | cat > conftest.$ac_ext <<EOF | |
4289 | #line 4290 "configure" | |
4290 | #include "confdefs.h" | |
4291 | #include <$ac_hdr> | |
4292 | EOF | |
4293 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4294 | { (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4295 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4296 | if test -z "$ac_err"; then | |
4297 | rm -rf conftest* | |
4298 | eval "ac_cv_header_$ac_safe=yes" | |
4299 | else | |
4300 | echo "$ac_err" >&5 | |
4301 | echo "configure: failed program was:" >&5 | |
4302 | cat conftest.$ac_ext >&5 | |
4303 | rm -rf conftest* | |
4304 | eval "ac_cv_header_$ac_safe=no" | |
4305 | fi | |
4306 | rm -f conftest* | |
4307 | fi | |
4308 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4309 | echo "$ac_t""yes" 1>&6 | |
4310 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4311 | cat >> confdefs.h <<EOF | |
4312 | #define $ac_tr_hdr 1 | |
4313 | EOF | |
4314 | ||
4315 | else | |
4316 | echo "$ac_t""no" 1>&6 | |
4317 | fi | |
4318 | done | |
4319 | ||
4320 | for ac_hdr in sys/proc.h | |
4321 | do | |
4322 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4323 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4324 | echo "configure:4325: checking for $ac_hdr" >&5 | |
4325 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4327 | else | |
4328 | cat > conftest.$ac_ext <<EOF | |
4329 | #line 4330 "configure" | |
4330 | #include "confdefs.h" | |
4331 | #include <$ac_hdr> | |
4332 | EOF | |
4333 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4334 | { (eval echo configure:4335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4335 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4336 | if test -z "$ac_err"; then | |
4337 | rm -rf conftest* | |
4338 | eval "ac_cv_header_$ac_safe=yes" | |
4339 | else | |
4340 | echo "$ac_err" >&5 | |
4341 | echo "configure: failed program was:" >&5 | |
4342 | cat conftest.$ac_ext >&5 | |
4343 | rm -rf conftest* | |
4344 | eval "ac_cv_header_$ac_safe=no" | |
4345 | fi | |
4346 | rm -f conftest* | |
4347 | fi | |
4348 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4349 | echo "$ac_t""yes" 1>&6 | |
4350 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4351 | cat >> confdefs.h <<EOF | |
4352 | #define $ac_tr_hdr 1 | |
4353 | EOF | |
4354 | ||
4355 | else | |
4356 | echo "$ac_t""no" 1>&6 | |
4357 | fi | |
4358 | done | |
4359 | ||
4360 | for ac_hdr in sys/procfs.h | |
4361 | do | |
4362 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4363 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4364 | echo "configure:4365: checking for $ac_hdr" >&5 | |
4365 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4367 | else | |
4368 | cat > conftest.$ac_ext <<EOF | |
4369 | #line 4370 "configure" | |
4370 | #include "confdefs.h" | |
4371 | #include <$ac_hdr> | |
4372 | EOF | |
4373 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4374 | { (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4375 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4376 | if test -z "$ac_err"; then | |
4377 | rm -rf conftest* | |
4378 | eval "ac_cv_header_$ac_safe=yes" | |
4379 | else | |
4380 | echo "$ac_err" >&5 | |
4381 | echo "configure: failed program was:" >&5 | |
4382 | cat conftest.$ac_ext >&5 | |
4383 | rm -rf conftest* | |
4384 | eval "ac_cv_header_$ac_safe=no" | |
4385 | fi | |
4386 | rm -f conftest* | |
4387 | fi | |
4388 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4389 | echo "$ac_t""yes" 1>&6 | |
4390 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4391 | cat >> confdefs.h <<EOF | |
4392 | #define $ac_tr_hdr 1 | |
4393 | EOF | |
4394 | ||
4395 | else | |
4396 | echo "$ac_t""no" 1>&6 | |
4397 | fi | |
4398 | done | |
4399 | ||
4400 | for ac_hdr in sys/ptrace.h ptrace.h | |
4401 | do | |
4402 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4403 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4404 | echo "configure:4405: checking for $ac_hdr" >&5 | |
4405 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4407 | else | |
4408 | cat > conftest.$ac_ext <<EOF | |
4409 | #line 4410 "configure" | |
4410 | #include "confdefs.h" | |
4411 | #include <$ac_hdr> | |
4412 | EOF | |
4413 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4414 | { (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4415 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4416 | if test -z "$ac_err"; then | |
4417 | rm -rf conftest* | |
4418 | eval "ac_cv_header_$ac_safe=yes" | |
4419 | else | |
4420 | echo "$ac_err" >&5 | |
4421 | echo "configure: failed program was:" >&5 | |
4422 | cat conftest.$ac_ext >&5 | |
4423 | rm -rf conftest* | |
4424 | eval "ac_cv_header_$ac_safe=no" | |
4425 | fi | |
4426 | rm -f conftest* | |
4427 | fi | |
4428 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4429 | echo "$ac_t""yes" 1>&6 | |
4430 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4431 | cat >> confdefs.h <<EOF | |
4432 | #define $ac_tr_hdr 1 | |
4433 | EOF | |
4434 | ||
4435 | else | |
4436 | echo "$ac_t""no" 1>&6 | |
4437 | fi | |
4438 | done | |
4439 | ||
4440 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4441 | do | |
4442 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4443 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4444 | echo "configure:4445: checking for $ac_hdr" >&5 | |
4445 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4447 | else | |
4448 | cat > conftest.$ac_ext <<EOF | |
4449 | #line 4450 "configure" | |
4450 | #include "confdefs.h" | |
4451 | #include <$ac_hdr> | |
4452 | EOF | |
4453 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4454 | { (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4455 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4456 | if test -z "$ac_err"; then | |
4457 | rm -rf conftest* | |
4458 | eval "ac_cv_header_$ac_safe=yes" | |
4459 | else | |
4460 | echo "$ac_err" >&5 | |
4461 | echo "configure: failed program was:" >&5 | |
4462 | cat conftest.$ac_ext >&5 | |
4463 | rm -rf conftest* | |
4464 | eval "ac_cv_header_$ac_safe=no" | |
4465 | fi | |
4466 | rm -f conftest* | |
4467 | fi | |
4468 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4469 | echo "$ac_t""yes" 1>&6 | |
4470 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4471 | cat >> confdefs.h <<EOF | |
4472 | #define $ac_tr_hdr 1 | |
4473 | EOF | |
4474 | ||
4475 | else | |
4476 | echo "$ac_t""no" 1>&6 | |
4477 | fi | |
4478 | done | |
4479 | ||
4480 | for ac_hdr in sys/select.h | |
4481 | do | |
4482 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4483 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4484 | echo "configure:4485: checking for $ac_hdr" >&5 | |
4485 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4487 | else | |
4488 | cat > conftest.$ac_ext <<EOF | |
4489 | #line 4490 "configure" | |
4490 | #include "confdefs.h" | |
4491 | #include <$ac_hdr> | |
4492 | EOF | |
4493 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4494 | { (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4495 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4496 | if test -z "$ac_err"; then | |
4497 | rm -rf conftest* | |
4498 | eval "ac_cv_header_$ac_safe=yes" | |
4499 | else | |
4500 | echo "$ac_err" >&5 | |
4501 | echo "configure: failed program was:" >&5 | |
4502 | cat conftest.$ac_ext >&5 | |
4503 | rm -rf conftest* | |
4504 | eval "ac_cv_header_$ac_safe=no" | |
4505 | fi | |
4506 | rm -f conftest* | |
4507 | fi | |
4508 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4509 | echo "$ac_t""yes" 1>&6 | |
4510 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4511 | cat >> confdefs.h <<EOF | |
4512 | #define $ac_tr_hdr 1 | |
4513 | EOF | |
4514 | ||
4515 | else | |
4516 | echo "$ac_t""no" 1>&6 | |
4517 | fi | |
4518 | done | |
4519 | ||
4520 | for ac_hdr in sys/syscall.h | |
4521 | do | |
4522 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4523 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4524 | echo "configure:4525: checking for $ac_hdr" >&5 | |
4525 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4527 | else | |
4528 | cat > conftest.$ac_ext <<EOF | |
4529 | #line 4530 "configure" | |
4530 | #include "confdefs.h" | |
4531 | #include <$ac_hdr> | |
4532 | EOF | |
4533 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4534 | { (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4535 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4536 | if test -z "$ac_err"; then | |
4537 | rm -rf conftest* | |
4538 | eval "ac_cv_header_$ac_safe=yes" | |
4539 | else | |
4540 | echo "$ac_err" >&5 | |
4541 | echo "configure: failed program was:" >&5 | |
4542 | cat conftest.$ac_ext >&5 | |
4543 | rm -rf conftest* | |
4544 | eval "ac_cv_header_$ac_safe=no" | |
4545 | fi | |
4546 | rm -f conftest* | |
4547 | fi | |
4548 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4549 | echo "$ac_t""yes" 1>&6 | |
4550 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4551 | cat >> confdefs.h <<EOF | |
4552 | #define $ac_tr_hdr 1 | |
4553 | EOF | |
4554 | ||
4555 | else | |
4556 | echo "$ac_t""no" 1>&6 | |
4557 | fi | |
4558 | done | |
4559 | ||
4560 | for ac_hdr in sys/user.h | |
4561 | do | |
4562 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4563 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4564 | echo "configure:4565: checking for $ac_hdr" >&5 | |
4565 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4566 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4567 | else | |
4568 | cat > conftest.$ac_ext <<EOF | |
4569 | #line 4570 "configure" | |
4570 | #include "confdefs.h" | |
4571 | #include <$ac_hdr> | |
4572 | EOF | |
4573 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4574 | { (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4575 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4576 | if test -z "$ac_err"; then | |
4577 | rm -rf conftest* | |
4578 | eval "ac_cv_header_$ac_safe=yes" | |
4579 | else | |
4580 | echo "$ac_err" >&5 | |
4581 | echo "configure: failed program was:" >&5 | |
4582 | cat conftest.$ac_ext >&5 | |
4583 | rm -rf conftest* | |
4584 | eval "ac_cv_header_$ac_safe=no" | |
4585 | fi | |
4586 | rm -f conftest* | |
4587 | fi | |
4588 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4589 | echo "$ac_t""yes" 1>&6 | |
4590 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4591 | cat >> confdefs.h <<EOF | |
4592 | #define $ac_tr_hdr 1 | |
4593 | EOF | |
4594 | ||
4595 | else | |
4596 | echo "$ac_t""no" 1>&6 | |
4597 | fi | |
4598 | done | |
4599 | ||
4600 | for ac_hdr in sys/wait.h wait.h | |
4601 | do | |
4602 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4603 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4604 | echo "configure:4605: checking for $ac_hdr" >&5 | |
4605 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4606 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4607 | else | |
4608 | cat > conftest.$ac_ext <<EOF | |
4609 | #line 4610 "configure" | |
4610 | #include "confdefs.h" | |
4611 | #include <$ac_hdr> | |
4612 | EOF | |
4613 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4614 | { (eval echo configure:4615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4615 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4616 | if test -z "$ac_err"; then | |
4617 | rm -rf conftest* | |
4618 | eval "ac_cv_header_$ac_safe=yes" | |
4619 | else | |
4620 | echo "$ac_err" >&5 | |
9608ab8b MK |
4621 | echo "configure: failed program was:" >&5 |
4622 | cat conftest.$ac_ext >&5 | |
4623 | rm -rf conftest* | |
5ee754fc | 4624 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4625 | fi |
4626 | rm -f conftest* | |
4627 | fi | |
5ee754fc | 4628 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
4629 | echo "$ac_t""yes" 1>&6 |
4630 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4631 | cat >> confdefs.h <<EOF | |
4632 | #define $ac_tr_hdr 1 | |
4633 | EOF | |
5ee754fc | 4634 | |
9608ab8b MK |
4635 | else |
4636 | echo "$ac_t""no" 1>&6 | |
4637 | fi | |
4638 | done | |
5ee754fc MK |
4639 | |
4640 | for ac_hdr in termios.h termio.h sgtty.h | |
4641 | do | |
4642 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4643 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4644 | echo "configure:4645: checking for $ac_hdr" >&5 | |
4645 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
9608ab8b MK |
4646 | echo $ac_n "(cached) $ac_c" 1>&6 |
4647 | else | |
5ee754fc MK |
4648 | cat > conftest.$ac_ext <<EOF |
4649 | #line 4650 "configure" | |
9608ab8b | 4650 | #include "confdefs.h" |
5ee754fc | 4651 | #include <$ac_hdr> |
9608ab8b | 4652 | EOF |
5ee754fc MK |
4653 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
4654 | { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4655 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4656 | if test -z "$ac_err"; then | |
9608ab8b | 4657 | rm -rf conftest* |
5ee754fc | 4658 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4659 | else |
5ee754fc | 4660 | echo "$ac_err" >&5 |
9608ab8b MK |
4661 | echo "configure: failed program was:" >&5 |
4662 | cat conftest.$ac_ext >&5 | |
4663 | rm -rf conftest* | |
5ee754fc | 4664 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4665 | fi |
4666 | rm -f conftest* | |
9608ab8b | 4667 | fi |
5ee754fc | 4668 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4669 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4670 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4671 | cat >> confdefs.h <<EOF | |
4672 | #define $ac_tr_hdr 1 | |
4673 | EOF | |
4674 | ||
9608ab8b MK |
4675 | else |
4676 | echo "$ac_t""no" 1>&6 | |
4677 | fi | |
5ee754fc | 4678 | done |
9608ab8b | 4679 | |
5ee754fc MK |
4680 | for ac_hdr in unistd.h |
4681 | do | |
4682 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4683 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4684 | echo "configure:4685: checking for $ac_hdr" >&5 | |
4685 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
9608ab8b MK |
4686 | echo $ac_n "(cached) $ac_c" 1>&6 |
4687 | else | |
5ee754fc MK |
4688 | cat > conftest.$ac_ext <<EOF |
4689 | #line 4690 "configure" | |
9608ab8b | 4690 | #include "confdefs.h" |
5ee754fc | 4691 | #include <$ac_hdr> |
9608ab8b | 4692 | EOF |
5ee754fc MK |
4693 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
4694 | { (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4695 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4696 | if test -z "$ac_err"; then | |
9608ab8b | 4697 | rm -rf conftest* |
5ee754fc | 4698 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4699 | else |
5ee754fc | 4700 | echo "$ac_err" >&5 |
9608ab8b MK |
4701 | echo "configure: failed program was:" >&5 |
4702 | cat conftest.$ac_ext >&5 | |
4703 | rm -rf conftest* | |
5ee754fc | 4704 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4705 | fi |
4706 | rm -f conftest* | |
9608ab8b | 4707 | fi |
5ee754fc | 4708 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4709 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4710 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4711 | cat >> confdefs.h <<EOF | |
4712 | #define $ac_tr_hdr 1 | |
4713 | EOF | |
4714 | ||
9608ab8b MK |
4715 | else |
4716 | echo "$ac_t""no" 1>&6 | |
4717 | fi | |
5ee754fc | 4718 | done |
9608ab8b | 4719 | |
9608ab8b | 4720 | |
5ee754fc MK |
4721 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
4722 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
4723 | # think that we don't have <curses.h> if we're using GCC. | |
4724 | case $host_os in | |
4725 | solaris2.[78]) | |
4726 | if test "$GCC" = yes; then | |
4727 | cat >> confdefs.h <<\EOF | |
4728 | #define _MSE_INT_H 1 | |
4729 | EOF | |
4730 | ||
4731 | fi ;; | |
4732 | esac | |
4733 | for ac_hdr in curses.h ncurses.h term.h | |
4734 | do | |
4735 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4736 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4737 | echo "configure:4738: checking for $ac_hdr" >&5 | |
4738 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
c906108c SS |
4739 | echo $ac_n "(cached) $ac_c" 1>&6 |
4740 | else | |
4741 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 4742 | #line 4743 "configure" |
c906108c | 4743 | #include "confdefs.h" |
5ee754fc | 4744 | #include <$ac_hdr> |
c906108c SS |
4745 | EOF |
4746 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5ee754fc | 4747 | { (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
4748 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4749 | if test -z "$ac_err"; then | |
4750 | rm -rf conftest* | |
5ee754fc | 4751 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
4752 | else |
4753 | echo "$ac_err" >&5 | |
4754 | echo "configure: failed program was:" >&5 | |
4755 | cat conftest.$ac_ext >&5 | |
4756 | rm -rf conftest* | |
5ee754fc | 4757 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
4758 | fi |
4759 | rm -f conftest* | |
c906108c | 4760 | fi |
5ee754fc MK |
4761 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4762 | echo "$ac_t""yes" 1>&6 | |
4763 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4764 | cat >> confdefs.h <<EOF | |
4765 | #define $ac_tr_hdr 1 | |
c906108c | 4766 | EOF |
5ee754fc | 4767 | |
c906108c | 4768 | else |
5ee754fc | 4769 | echo "$ac_t""no" 1>&6 |
c906108c | 4770 | fi |
5ee754fc | 4771 | done |
c906108c SS |
4772 | |
4773 | ||
5ee754fc MK |
4774 | # FIXME: kettenis/20030102: In most cases we include these |
4775 | # unconditionally, so what's the point in checking these? | |
4776 | for ac_hdr in ctype.h time.h | |
c906108c SS |
4777 | do |
4778 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4779 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5ee754fc | 4780 | echo "configure:4781: checking for $ac_hdr" >&5 |
c906108c SS |
4781 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4782 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4783 | else | |
4784 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 4785 | #line 4786 "configure" |
c906108c SS |
4786 | #include "confdefs.h" |
4787 | #include <$ac_hdr> | |
4788 | EOF | |
4789 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5ee754fc | 4790 | { (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
4791 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4792 | if test -z "$ac_err"; then | |
4793 | rm -rf conftest* | |
4794 | eval "ac_cv_header_$ac_safe=yes" | |
4795 | else | |
4796 | echo "$ac_err" >&5 | |
4797 | echo "configure: failed program was:" >&5 | |
4798 | cat conftest.$ac_ext >&5 | |
4799 | rm -rf conftest* | |
4800 | eval "ac_cv_header_$ac_safe=no" | |
4801 | fi | |
4802 | rm -f conftest* | |
4803 | fi | |
4804 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4805 | echo "$ac_t""yes" 1>&6 | |
4806 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4807 | cat >> confdefs.h <<EOF | |
4808 | #define $ac_tr_hdr 1 | |
4809 | EOF | |
4810 | ||
4811 | else | |
4812 | echo "$ac_t""no" 1>&6 | |
4813 | fi | |
4814 | done | |
4815 | ||
5ee754fc MK |
4816 | |
4817 | # ------------------ # | |
4818 | # Checks for types. # | |
4819 | # ------------------ # | |
4820 | ||
4821 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
4822 | echo "configure:4823: checking return type of signal handlers" >&5 | |
4823 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then | |
c906108c SS |
4824 | echo $ac_n "(cached) $ac_c" 1>&6 |
4825 | else | |
4826 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 4827 | #line 4828 "configure" |
c906108c SS |
4828 | #include "confdefs.h" |
4829 | #include <sys/types.h> | |
5ee754fc MK |
4830 | #include <signal.h> |
4831 | #ifdef signal | |
4832 | #undef signal | |
c906108c | 4833 | #endif |
5ee754fc MK |
4834 | #ifdef __cplusplus |
4835 | extern "C" void (*signal (int, void (*)(int)))(int); | |
4836 | #else | |
4837 | void (*signal ()) (); | |
c906108c SS |
4838 | #endif |
4839 | ||
5ee754fc MK |
4840 | int main() { |
4841 | int i; | |
4842 | ; return 0; } | |
c906108c | 4843 | EOF |
5ee754fc | 4844 | if { (eval echo configure:4845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 4845 | rm -rf conftest* |
5ee754fc | 4846 | ac_cv_type_signal=void |
c906108c | 4847 | else |
5ee754fc MK |
4848 | echo "configure: failed program was:" >&5 |
4849 | cat conftest.$ac_ext >&5 | |
c906108c | 4850 | rm -rf conftest* |
5ee754fc | 4851 | ac_cv_type_signal=int |
c906108c SS |
4852 | fi |
4853 | rm -f conftest* | |
c906108c SS |
4854 | fi |
4855 | ||
5ee754fc MK |
4856 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
4857 | cat >> confdefs.h <<EOF | |
4858 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
4859 | EOF |
4860 | ||
c906108c SS |
4861 | |
4862 | ||
5ee754fc MK |
4863 | # ------------------------------------- # |
4864 | # Checks for compiler characteristics. # | |
4865 | # ------------------------------------- # | |
4866 | ||
c906108c | 4867 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
5ee754fc | 4868 | echo "configure:4869: checking for working const" >&5 |
c906108c SS |
4869 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
4870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4871 | else | |
4872 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 4873 | #line 4874 "configure" |
c906108c SS |
4874 | #include "confdefs.h" |
4875 | ||
4876 | int main() { | |
4877 | ||
4878 | /* Ultrix mips cc rejects this. */ | |
4879 | typedef int charset[2]; const charset x; | |
4880 | /* SunOS 4.1.1 cc rejects this. */ | |
4881 | char const *const *ccp; | |
4882 | char **p; | |
4883 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
4884 | struct point {int x, y;}; | |
4885 | static struct point const zero = {0,0}; | |
4886 | /* AIX XL C 1.02.0.0 rejects this. | |
4887 | It does not let you subtract one const X* pointer from another in an arm | |
4888 | of an if-expression whose if-part is not a constant expression */ | |
4889 | const char *g = "string"; | |
4890 | ccp = &g + (g ? g-g : 0); | |
4891 | /* HPUX 7.0 cc rejects these. */ | |
4892 | ++ccp; | |
4893 | p = (char**) ccp; | |
4894 | ccp = (char const *const *) p; | |
4895 | { /* SCO 3.2v4 cc rejects this. */ | |
4896 | char *t; | |
4897 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
4898 | ||
4899 | *t++ = 0; | |
4900 | } | |
4901 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
4902 | int x[] = {25, 17}; | |
4903 | const int *foo = &x[0]; | |
4904 | ++foo; | |
4905 | } | |
4906 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
4907 | typedef const int *iptr; | |
4908 | iptr p = 0; | |
4909 | ++p; | |
4910 | } | |
4911 | { /* AIX XL C 1.02.0.0 rejects this saying | |
4912 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
4913 | struct s { int j; const int *ap[3]; }; | |
4914 | struct s *b; b->j = 5; | |
4915 | } | |
4916 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
4917 | const int foo = 10; | |
4918 | } | |
4919 | ||
4920 | ; return 0; } | |
4921 | EOF | |
5ee754fc | 4922 | if { (eval echo configure:4923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
4923 | rm -rf conftest* |
4924 | ac_cv_c_const=yes | |
4925 | else | |
4926 | echo "configure: failed program was:" >&5 | |
4927 | cat conftest.$ac_ext >&5 | |
4928 | rm -rf conftest* | |
4929 | ac_cv_c_const=no | |
4930 | fi | |
4931 | rm -f conftest* | |
4932 | fi | |
4933 | ||
4934 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
4935 | if test $ac_cv_c_const = no; then | |
4936 | cat >> confdefs.h <<\EOF | |
4937 | #define const | |
4938 | EOF | |
4939 | ||
4940 | fi | |
4941 | ||
bce58c09 | 4942 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
5ee754fc | 4943 | echo "configure:4944: checking for inline" >&5 |
bce58c09 JB |
4944 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
4945 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4946 | else | |
4947 | ac_cv_c_inline=no | |
4948 | for ac_kw in inline __inline__ __inline; do | |
4949 | cat > conftest.$ac_ext <<EOF | |
5ee754fc | 4950 | #line 4951 "configure" |
bce58c09 JB |
4951 | #include "confdefs.h" |
4952 | ||
4953 | int main() { | |
4954 | } $ac_kw foo() { | |
4955 | ; return 0; } | |
4956 | EOF | |
5ee754fc | 4957 | if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
4958 | rm -rf conftest* |
4959 | ac_cv_c_inline=$ac_kw; break | |
4960 | else | |
4961 | echo "configure: failed program was:" >&5 | |
4962 | cat conftest.$ac_ext >&5 | |
4963 | fi | |
4964 | rm -f conftest* | |
4965 | done | |
4966 | ||
4967 | fi | |
4968 | ||
4969 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
4970 | case "$ac_cv_c_inline" in | |
4971 | inline | yes) ;; | |
4972 | no) cat >> confdefs.h <<\EOF | |
4973 | #define inline | |
4974 | EOF | |
4975 | ;; | |
4976 | *) cat >> confdefs.h <<EOF | |
4977 | #define inline $ac_cv_c_inline | |
4978 | EOF | |
4979 | ;; | |
4980 | esac | |
4981 | ||
c906108c | 4982 | |
5ee754fc MK |
4983 | # ------------------------------ # |
4984 | # Checks for library functions. # | |
4985 | # ------------------------------ # | |
4986 | ||
46711df8 MK |
4987 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
4988 | # for constant arguments. Useless! | |
4989 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
97bf5e38 | 4990 | echo "configure:4991: checking for working alloca.h" >&5 |
46711df8 MK |
4991 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
4992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4993 | else | |
4994 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 4995 | #line 4996 "configure" |
46711df8 MK |
4996 | #include "confdefs.h" |
4997 | #include <alloca.h> | |
4998 | int main() { | |
4999 | char *p = alloca(2 * sizeof(int)); | |
5000 | ; return 0; } | |
5001 | EOF | |
97bf5e38 | 5002 | if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5003 | rm -rf conftest* |
5004 | ac_cv_header_alloca_h=yes | |
5005 | else | |
5006 | echo "configure: failed program was:" >&5 | |
5007 | cat conftest.$ac_ext >&5 | |
5008 | rm -rf conftest* | |
5009 | ac_cv_header_alloca_h=no | |
5010 | fi | |
5011 | rm -f conftest* | |
5012 | fi | |
5013 | ||
5014 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5015 | if test $ac_cv_header_alloca_h = yes; then | |
5016 | cat >> confdefs.h <<\EOF | |
5017 | #define HAVE_ALLOCA_H 1 | |
5018 | EOF | |
5019 | ||
5020 | fi | |
5021 | ||
5022 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
97bf5e38 | 5023 | echo "configure:5024: checking for alloca" >&5 |
46711df8 MK |
5024 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5025 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5026 | else | |
5027 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5028 | #line 5029 "configure" |
46711df8 MK |
5029 | #include "confdefs.h" |
5030 | ||
5031 | #ifdef __GNUC__ | |
5032 | # define alloca __builtin_alloca | |
5033 | #else | |
5034 | # ifdef _MSC_VER | |
5035 | # include <malloc.h> | |
5036 | # define alloca _alloca | |
5037 | # else | |
5038 | # if HAVE_ALLOCA_H | |
5039 | # include <alloca.h> | |
5040 | # else | |
5041 | # ifdef _AIX | |
5042 | #pragma alloca | |
5043 | # else | |
5044 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5045 | char *alloca (); | |
5046 | # endif | |
5047 | # endif | |
5048 | # endif | |
5049 | # endif | |
5050 | #endif | |
5051 | ||
5052 | int main() { | |
5053 | char *p = (char *) alloca(1); | |
5054 | ; return 0; } | |
5055 | EOF | |
97bf5e38 | 5056 | if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5057 | rm -rf conftest* |
5058 | ac_cv_func_alloca_works=yes | |
5059 | else | |
5060 | echo "configure: failed program was:" >&5 | |
5061 | cat conftest.$ac_ext >&5 | |
5062 | rm -rf conftest* | |
5063 | ac_cv_func_alloca_works=no | |
5064 | fi | |
5065 | rm -f conftest* | |
5066 | fi | |
5067 | ||
5068 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5069 | if test $ac_cv_func_alloca_works = yes; then | |
5070 | cat >> confdefs.h <<\EOF | |
5071 | #define HAVE_ALLOCA 1 | |
5072 | EOF | |
5073 | ||
5074 | fi | |
5075 | ||
5076 | if test $ac_cv_func_alloca_works = no; then | |
5077 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5078 | # that cause trouble. Some versions do not even contain alloca or | |
5079 | # contain a buggy version. If you still want to use their alloca, | |
5080 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5081 | ALLOCA=alloca.${ac_objext} | |
5082 | cat >> confdefs.h <<\EOF | |
5083 | #define C_ALLOCA 1 | |
5084 | EOF | |
5085 | ||
5086 | ||
5087 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
97bf5e38 | 5088 | echo "configure:5089: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5089 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5091 | else | |
5092 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5093 | #line 5094 "configure" |
46711df8 MK |
5094 | #include "confdefs.h" |
5095 | #if defined(CRAY) && ! defined(CRAY2) | |
5096 | webecray | |
5097 | #else | |
5098 | wenotbecray | |
5099 | #endif | |
5100 | ||
5101 | EOF | |
5102 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5103 | egrep "webecray" >/dev/null 2>&1; then | |
5104 | rm -rf conftest* | |
5105 | ac_cv_os_cray=yes | |
5106 | else | |
5107 | rm -rf conftest* | |
5108 | ac_cv_os_cray=no | |
5109 | fi | |
5110 | rm -f conftest* | |
5111 | ||
5112 | fi | |
5113 | ||
5114 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5115 | if test $ac_cv_os_cray = yes; then | |
5116 | for ac_func in _getb67 GETB67 getb67; do | |
5117 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
97bf5e38 | 5118 | echo "configure:5119: checking for $ac_func" >&5 |
46711df8 MK |
5119 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5120 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5121 | else | |
5122 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5123 | #line 5124 "configure" |
46711df8 MK |
5124 | #include "confdefs.h" |
5125 | /* System header to define __stub macros and hopefully few prototypes, | |
5126 | which can conflict with char $ac_func(); below. */ | |
5127 | #include <assert.h> | |
5128 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5129 | /* We use char because int might match the return type of a gcc2 | |
5130 | builtin and then its argument prototype would still apply. */ | |
5131 | char $ac_func(); | |
5132 | ||
5133 | int main() { | |
5134 | ||
5135 | /* The GNU C library defines this for functions which it implements | |
5136 | to always fail with ENOSYS. Some functions are actually named | |
5137 | something starting with __ and the normal name is an alias. */ | |
5138 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5139 | choke me | |
5140 | #else | |
5141 | $ac_func(); | |
5142 | #endif | |
5143 | ||
5144 | ; return 0; } | |
5145 | EOF | |
97bf5e38 | 5146 | if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5147 | rm -rf conftest* |
5148 | eval "ac_cv_func_$ac_func=yes" | |
5149 | else | |
5150 | echo "configure: failed program was:" >&5 | |
5151 | cat conftest.$ac_ext >&5 | |
5152 | rm -rf conftest* | |
5153 | eval "ac_cv_func_$ac_func=no" | |
5154 | fi | |
5155 | rm -f conftest* | |
5156 | fi | |
5157 | ||
5158 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5159 | echo "$ac_t""yes" 1>&6 | |
5160 | cat >> confdefs.h <<EOF | |
5161 | #define CRAY_STACKSEG_END $ac_func | |
5162 | EOF | |
5163 | ||
5164 | break | |
5165 | else | |
5166 | echo "$ac_t""no" 1>&6 | |
5167 | fi | |
5168 | ||
5169 | done | |
5170 | fi | |
5171 | ||
5172 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
97bf5e38 | 5173 | echo "configure:5174: checking stack direction for C alloca" >&5 |
46711df8 MK |
5174 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5176 | else | |
5177 | if test "$cross_compiling" = yes; then | |
5178 | ac_cv_c_stack_direction=0 | |
5179 | else | |
5180 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5181 | #line 5182 "configure" |
46711df8 MK |
5182 | #include "confdefs.h" |
5183 | find_stack_direction () | |
5184 | { | |
5185 | static char *addr = 0; | |
5186 | auto char dummy; | |
5187 | if (addr == 0) | |
5188 | { | |
5189 | addr = &dummy; | |
5190 | return find_stack_direction (); | |
5191 | } | |
5192 | else | |
5193 | return (&dummy > addr) ? 1 : -1; | |
5194 | } | |
5195 | main () | |
5196 | { | |
5197 | exit (find_stack_direction() < 0); | |
5198 | } | |
5199 | EOF | |
97bf5e38 | 5200 | if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5201 | then |
5202 | ac_cv_c_stack_direction=1 | |
5203 | else | |
5204 | echo "configure: failed program was:" >&5 | |
5205 | cat conftest.$ac_ext >&5 | |
5206 | rm -fr conftest* | |
5207 | ac_cv_c_stack_direction=-1 | |
5208 | fi | |
5209 | rm -fr conftest* | |
5210 | fi | |
5211 | ||
5212 | fi | |
5213 | ||
5214 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5215 | cat >> confdefs.h <<EOF | |
5216 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5217 | EOF | |
5218 | ||
5219 | fi | |
5220 | ||
97bf5e38 MK |
5221 | for ac_hdr in unistd.h |
5222 | do | |
5223 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5224 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5225 | echo "configure:5226: checking for $ac_hdr" >&5 | |
74c1b268 AC |
5226 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5227 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5228 | else | |
5229 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5230 | #line 5231 "configure" |
74c1b268 | 5231 | #include "confdefs.h" |
97bf5e38 | 5232 | #include <$ac_hdr> |
74c1b268 AC |
5233 | EOF |
5234 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
97bf5e38 | 5235 | { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5236 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5237 | if test -z "$ac_err"; then | |
5238 | rm -rf conftest* | |
5239 | eval "ac_cv_header_$ac_safe=yes" | |
5240 | else | |
5241 | echo "$ac_err" >&5 | |
5242 | echo "configure: failed program was:" >&5 | |
5243 | cat conftest.$ac_ext >&5 | |
5244 | rm -rf conftest* | |
5245 | eval "ac_cv_header_$ac_safe=no" | |
5246 | fi | |
5247 | rm -f conftest* | |
5248 | fi | |
5249 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5250 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5251 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5252 | cat >> confdefs.h <<EOF | |
5253 | #define $ac_tr_hdr 1 | |
74c1b268 | 5254 | EOF |
97bf5e38 | 5255 | |
74c1b268 AC |
5256 | else |
5257 | echo "$ac_t""no" 1>&6 | |
5258 | fi | |
97bf5e38 | 5259 | done |
74c1b268 | 5260 | |
97bf5e38 MK |
5261 | for ac_func in getpagesize |
5262 | do | |
5263 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5264 | echo "configure:5265: checking for $ac_func" >&5 | |
5265 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
74c1b268 AC |
5266 | echo $ac_n "(cached) $ac_c" 1>&6 |
5267 | else | |
5268 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5269 | #line 5270 "configure" |
74c1b268 AC |
5270 | #include "confdefs.h" |
5271 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5272 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5273 | #include <assert.h> |
5274 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5275 | /* We use char because int might match the return type of a gcc2 | |
5276 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5277 | char $ac_func(); |
74c1b268 AC |
5278 | |
5279 | int main() { | |
5280 | ||
5281 | /* The GNU C library defines this for functions which it implements | |
5282 | to always fail with ENOSYS. Some functions are actually named | |
5283 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5284 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5285 | choke me |
5286 | #else | |
97bf5e38 | 5287 | $ac_func(); |
74c1b268 AC |
5288 | #endif |
5289 | ||
5290 | ; return 0; } | |
5291 | EOF | |
97bf5e38 | 5292 | if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5293 | rm -rf conftest* |
97bf5e38 | 5294 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5295 | else |
5296 | echo "configure: failed program was:" >&5 | |
5297 | cat conftest.$ac_ext >&5 | |
5298 | rm -rf conftest* | |
97bf5e38 | 5299 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5300 | fi |
5301 | rm -f conftest* | |
5302 | fi | |
5303 | ||
97bf5e38 | 5304 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5305 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5306 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5307 | cat >> confdefs.h <<EOF | |
5308 | #define $ac_tr_func 1 | |
5309 | EOF | |
5310 | ||
74c1b268 AC |
5311 | else |
5312 | echo "$ac_t""no" 1>&6 | |
5313 | fi | |
97bf5e38 | 5314 | done |
74c1b268 | 5315 | |
97bf5e38 MK |
5316 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
5317 | echo "configure:5318: checking for working mmap" >&5 | |
5318 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then | |
5319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5320 | else | |
5321 | if test "$cross_compiling" = yes; then | |
5322 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5323 | else |
5324 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5325 | #line 5326 "configure" |
74c1b268 | 5326 | #include "confdefs.h" |
97bf5e38 MK |
5327 | |
5328 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5329 | Here is a matrix of mmap possibilities: | |
5330 | mmap private not fixed | |
5331 | mmap private fixed at somewhere currently unmapped | |
5332 | mmap private fixed at somewhere already mapped | |
5333 | mmap shared not fixed | |
5334 | mmap shared fixed at somewhere currently unmapped | |
5335 | mmap shared fixed at somewhere already mapped | |
5336 | For private mappings, we should verify that changes cannot be read() | |
5337 | back from the file, nor mmap's back from the file at a different | |
5338 | address. (There have been systems where private was not correctly | |
5339 | implemented like the infamous i386 svr4.0, and systems where the | |
5340 | VM page cache was not coherent with the filesystem buffer cache | |
5341 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5342 | For shared mappings, we should conversely verify that changes get | |
5343 | propogated back to all the places they're supposed to be. | |
5344 | ||
5345 | Grep wants private fixed already mapped. | |
5346 | The main things grep needs to know about mmap are: | |
5347 | * does it exist and is it safe to write into the mmap'd area | |
5348 | * how to use it (BSD variants) */ | |
74c1b268 | 5349 | #include <sys/types.h> |
97bf5e38 MK |
5350 | #include <fcntl.h> |
5351 | #include <sys/mman.h> | |
5352 | ||
5353 | /* This mess was copied from the GNU getpagesize.h. */ | |
5354 | #ifndef HAVE_GETPAGESIZE | |
5355 | # ifdef HAVE_UNISTD_H | |
5356 | # include <unistd.h> | |
5357 | # endif | |
5358 | ||
5359 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5360 | # ifndef HAVE_SYS_PARAM_H | |
5361 | # define HAVE_SYS_PARAM_H 1 | |
5362 | # endif | |
5363 | ||
5364 | # ifdef _SC_PAGESIZE | |
5365 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5366 | # else /* no _SC_PAGESIZE */ | |
5367 | # ifdef HAVE_SYS_PARAM_H | |
5368 | # include <sys/param.h> | |
5369 | # ifdef EXEC_PAGESIZE | |
5370 | # define getpagesize() EXEC_PAGESIZE | |
5371 | # else /* no EXEC_PAGESIZE */ | |
5372 | # ifdef NBPG | |
5373 | # define getpagesize() NBPG * CLSIZE | |
5374 | # ifndef CLSIZE | |
5375 | # define CLSIZE 1 | |
5376 | # endif /* no CLSIZE */ | |
5377 | # else /* no NBPG */ | |
5378 | # ifdef NBPC | |
5379 | # define getpagesize() NBPC | |
5380 | # else /* no NBPC */ | |
5381 | # ifdef PAGESIZE | |
5382 | # define getpagesize() PAGESIZE | |
5383 | # endif /* PAGESIZE */ | |
5384 | # endif /* no NBPC */ | |
5385 | # endif /* no NBPG */ | |
5386 | # endif /* no EXEC_PAGESIZE */ | |
5387 | # else /* no HAVE_SYS_PARAM_H */ | |
5388 | # define getpagesize() 8192 /* punt totally */ | |
5389 | # endif /* no HAVE_SYS_PARAM_H */ | |
5390 | # endif /* no _SC_PAGESIZE */ | |
5391 | ||
5392 | #endif /* no HAVE_GETPAGESIZE */ | |
5393 | ||
74c1b268 | 5394 | #ifdef __cplusplus |
97bf5e38 | 5395 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5396 | #else |
97bf5e38 | 5397 | char *malloc(); |
74c1b268 | 5398 | #endif |
74c1b268 | 5399 | |
97bf5e38 MK |
5400 | int |
5401 | main() | |
5402 | { | |
5403 | char *data, *data2, *data3; | |
5404 | int i, pagesize; | |
5405 | int fd; | |
74c1b268 | 5406 | |
97bf5e38 | 5407 | pagesize = getpagesize(); |
74c1b268 | 5408 | |
97bf5e38 MK |
5409 | /* |
5410 | * First, make a file with some known garbage in it. | |
5411 | */ | |
5412 | data = malloc(pagesize); | |
5413 | if (!data) | |
5414 | exit(1); | |
5415 | for (i = 0; i < pagesize; ++i) | |
5416 | *(data + i) = rand(); | |
5417 | umask(0); | |
5418 | fd = creat("conftestmmap", 0600); | |
5419 | if (fd < 0) | |
5420 | exit(1); | |
5421 | if (write(fd, data, pagesize) != pagesize) | |
5422 | exit(1); | |
5423 | close(fd); | |
74c1b268 | 5424 | |
97bf5e38 MK |
5425 | /* |
5426 | * Next, try to mmap the file at a fixed address which | |
5427 | * already has something else allocated at it. If we can, | |
5428 | * also make sure that we see the same garbage. | |
5429 | */ | |
5430 | fd = open("conftestmmap", O_RDWR); | |
5431 | if (fd < 0) | |
5432 | exit(1); | |
5433 | data2 = malloc(2 * pagesize); | |
5434 | if (!data2) | |
5435 | exit(1); | |
5436 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5437 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5438 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5439 | exit(1); | |
5440 | for (i = 0; i < pagesize; ++i) | |
5441 | if (*(data + i) != *(data2 + i)) | |
5442 | exit(1); | |
74c1b268 | 5443 | |
97bf5e38 MK |
5444 | /* |
5445 | * Finally, make sure that changes to the mapped area | |
5446 | * do not percolate back to the file as seen by read(). | |
5447 | * (This is a bug on some variants of i386 svr4.0.) | |
5448 | */ | |
5449 | for (i = 0; i < pagesize; ++i) | |
5450 | *(data2 + i) = *(data2 + i) + 1; | |
5451 | data3 = malloc(pagesize); | |
5452 | if (!data3) | |
5453 | exit(1); | |
5454 | if (read(fd, data3, pagesize) != pagesize) | |
5455 | exit(1); | |
5456 | for (i = 0; i < pagesize; ++i) | |
5457 | if (*(data + i) != *(data3 + i)) | |
5458 | exit(1); | |
5459 | close(fd); | |
5460 | unlink("conftestmmap"); | |
5461 | exit(0); | |
74c1b268 | 5462 | } |
97bf5e38 | 5463 | |
74c1b268 | 5464 | EOF |
97bf5e38 | 5465 | if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5466 | then |
97bf5e38 | 5467 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5468 | else |
5469 | echo "configure: failed program was:" >&5 | |
5470 | cat conftest.$ac_ext >&5 | |
5471 | rm -fr conftest* | |
97bf5e38 | 5472 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5473 | fi |
5474 | rm -fr conftest* | |
5475 | fi | |
5476 | ||
5477 | fi | |
5478 | ||
97bf5e38 MK |
5479 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5480 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5481 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5482 | #define HAVE_MMAP 1 |
74c1b268 AC |
5483 | EOF |
5484 | ||
5485 | fi | |
5486 | ||
97bf5e38 MK |
5487 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
5488 | echo "configure:5489: checking for pid_t" >&5 | |
5489 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then | |
0200359f | 5490 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5491 | else |
5492 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5493 | #line 5494 "configure" |
0200359f | 5494 | #include "confdefs.h" |
97bf5e38 MK |
5495 | #include <sys/types.h> |
5496 | #if STDC_HEADERS | |
5497 | #include <stdlib.h> | |
5498 | #include <stddef.h> | |
0200359f | 5499 | #endif |
0200359f | 5500 | EOF |
97bf5e38 MK |
5501 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5502 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5503 | rm -rf conftest* | |
5504 | ac_cv_type_pid_t=yes | |
0200359f | 5505 | else |
97bf5e38 MK |
5506 | rm -rf conftest* |
5507 | ac_cv_type_pid_t=no | |
0200359f | 5508 | fi |
97bf5e38 | 5509 | rm -f conftest* |
0200359f MK |
5510 | |
5511 | fi | |
97bf5e38 MK |
5512 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5513 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5514 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5515 | #define pid_t int |
0200359f MK |
5516 | EOF |
5517 | ||
5518 | fi | |
5519 | ||
97bf5e38 MK |
5520 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5521 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
5522 | echo "configure:5523: checking for vfork.h" >&5 | |
5523 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
72473524 DJ |
5524 | echo $ac_n "(cached) $ac_c" 1>&6 |
5525 | else | |
5526 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5527 | #line 5528 "configure" |
72473524 | 5528 | #include "confdefs.h" |
97bf5e38 | 5529 | #include <vfork.h> |
72473524 | 5530 | EOF |
97bf5e38 MK |
5531 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5532 | { (eval echo configure:5533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
5533 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5534 | if test -z "$ac_err"; then | |
72473524 | 5535 | rm -rf conftest* |
97bf5e38 | 5536 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5537 | else |
97bf5e38 | 5538 | echo "$ac_err" >&5 |
72473524 DJ |
5539 | echo "configure: failed program was:" >&5 |
5540 | cat conftest.$ac_ext >&5 | |
5541 | rm -rf conftest* | |
97bf5e38 | 5542 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5543 | fi |
5544 | rm -f conftest* | |
5545 | fi | |
97bf5e38 MK |
5546 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5547 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5548 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5549 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5550 | EOF |
5551 | ||
97bf5e38 MK |
5552 | else |
5553 | echo "$ac_t""no" 1>&6 | |
72473524 | 5554 | fi |
c906108c | 5555 | |
97bf5e38 MK |
5556 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
5557 | echo "configure:5558: checking for working vfork" >&5 | |
5558 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then | |
5559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5560 | else | |
5561 | if test "$cross_compiling" = yes; then | |
5562 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
5563 | echo "configure:5564: checking for vfork" >&5 | |
5564 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then | |
2b2d558c MK |
5565 | echo $ac_n "(cached) $ac_c" 1>&6 |
5566 | else | |
5567 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5568 | #line 5569 "configure" |
2b2d558c | 5569 | #include "confdefs.h" |
97bf5e38 MK |
5570 | /* System header to define __stub macros and hopefully few prototypes, |
5571 | which can conflict with char vfork(); below. */ | |
5572 | #include <assert.h> | |
5573 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5574 | /* We use char because int might match the return type of a gcc2 | |
5575 | builtin and then its argument prototype would still apply. */ | |
5576 | char vfork(); | |
2b2d558c MK |
5577 | |
5578 | int main() { | |
97bf5e38 MK |
5579 | |
5580 | /* The GNU C library defines this for functions which it implements | |
5581 | to always fail with ENOSYS. Some functions are actually named | |
5582 | something starting with __ and the normal name is an alias. */ | |
5583 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
5584 | choke me | |
5585 | #else | |
5586 | vfork(); | |
5587 | #endif | |
5588 | ||
2b2d558c MK |
5589 | ; return 0; } |
5590 | EOF | |
97bf5e38 | 5591 | if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 5592 | rm -rf conftest* |
97bf5e38 | 5593 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
5594 | else |
5595 | echo "configure: failed program was:" >&5 | |
5596 | cat conftest.$ac_ext >&5 | |
5597 | rm -rf conftest* | |
97bf5e38 | 5598 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
5599 | fi |
5600 | rm -f conftest* | |
5601 | fi | |
5602 | ||
97bf5e38 MK |
5603 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
5604 | echo "$ac_t""yes" 1>&6 | |
5605 | : | |
5606 | else | |
5607 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
5608 | fi |
5609 | ||
97bf5e38 | 5610 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
5611 | else |
5612 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5613 | #line 5614 "configure" |
7dfa765c | 5614 | #include "confdefs.h" |
97bf5e38 MK |
5615 | /* Thanks to Paul Eggert for this test. */ |
5616 | #include <stdio.h> | |
5617 | #include <sys/types.h> | |
5618 | #include <sys/stat.h> | |
5619 | #ifdef HAVE_UNISTD_H | |
5620 | #include <unistd.h> | |
5621 | #endif | |
5622 | #ifdef HAVE_VFORK_H | |
5623 | #include <vfork.h> | |
5624 | #endif | |
5625 | /* On some sparc systems, changes by the child to local and incoming | |
5626 | argument registers are propagated back to the parent. | |
5627 | The compiler is told about this with #include <vfork.h>, | |
5628 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
5629 | Test for this by using a static variable whose address | |
5630 | is put into a register that is clobbered by the vfork. */ | |
5631 | static | |
5632 | #ifdef __cplusplus | |
5633 | sparc_address_test (int arg) | |
5634 | #else | |
5635 | sparc_address_test (arg) int arg; | |
5636 | #endif | |
5637 | { | |
5638 | static pid_t child; | |
5639 | if (!child) { | |
5640 | child = vfork (); | |
5641 | if (child < 0) { | |
5642 | perror ("vfork"); | |
5643 | _exit(2); | |
5644 | } | |
5645 | if (!child) { | |
5646 | arg = getpid(); | |
5647 | write(-1, "", 0); | |
5648 | _exit (arg); | |
5649 | } | |
5650 | } | |
5651 | } | |
5652 | main() { | |
5653 | pid_t parent = getpid (); | |
5654 | pid_t child; | |
7dfa765c | 5655 | |
97bf5e38 | 5656 | sparc_address_test (); |
7dfa765c | 5657 | |
97bf5e38 | 5658 | child = vfork (); |
7dfa765c | 5659 | |
97bf5e38 MK |
5660 | if (child == 0) { |
5661 | /* Here is another test for sparc vfork register problems. | |
5662 | This test uses lots of local variables, at least | |
5663 | as many local variables as main has allocated so far | |
5664 | including compiler temporaries. 4 locals are enough for | |
5665 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
5666 | A buggy compiler should reuse the register of parent | |
5667 | for one of the local variables, since it will think that | |
5668 | parent can't possibly be used any more in this routine. | |
5669 | Assigning to the local variable will thus munge parent | |
5670 | in the parent process. */ | |
5671 | pid_t | |
5672 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5673 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5674 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5675 | use the same hardware register for all 8 local variables. */ | |
5676 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5677 | || p != p5 || p != p6 || p != p7) | |
5678 | _exit(1); | |
7dfa765c | 5679 | |
97bf5e38 MK |
5680 | /* On some systems (e.g. IRIX 3.3), |
5681 | vfork doesn't separate parent from child file descriptors. | |
5682 | If the child closes a descriptor before it execs or exits, | |
5683 | this munges the parent's descriptor as well. | |
5684 | Test for this by closing stdout in the child. */ | |
5685 | _exit(close(fileno(stdout)) != 0); | |
5686 | } else { | |
5687 | int status; | |
5688 | struct stat st; | |
64bb1671 | 5689 | |
97bf5e38 MK |
5690 | while (wait(&status) != child) |
5691 | ; | |
5692 | exit( | |
5693 | /* Was there some problem with vforking? */ | |
5694 | child < 0 | |
64bb1671 | 5695 | |
97bf5e38 MK |
5696 | /* Did the child fail? (This shouldn't happen.) */ |
5697 | || status | |
64bb1671 | 5698 | |
97bf5e38 MK |
5699 | /* Did the vfork/compiler bug occur? */ |
5700 | || parent != getpid() | |
5701 | ||
5702 | /* Did the file descriptor bug occur? */ | |
5703 | || fstat(fileno(stdout), &st) != 0 | |
5704 | ); | |
5705 | } | |
5706 | } | |
5c44784c | 5707 | EOF |
97bf5e38 MK |
5708 | if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5709 | then | |
5710 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
5711 | else |
5712 | echo "configure: failed program was:" >&5 | |
5713 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
5714 | rm -fr conftest* |
5715 | ac_cv_func_vfork_works=no | |
5c44784c | 5716 | fi |
97bf5e38 | 5717 | rm -fr conftest* |
5c44784c JM |
5718 | fi |
5719 | ||
0afdd437 MK |
5720 | fi |
5721 | ||
97bf5e38 MK |
5722 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
5723 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 5724 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5725 | #define vfork fork |
0afdd437 MK |
5726 | EOF |
5727 | ||
5728 | fi | |
5729 | ||
97bf5e38 MK |
5730 | for ac_func in canonicalize_file_name realpath |
5731 | do | |
5732 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5733 | echo "configure:5734: checking for $ac_func" >&5 | |
5734 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
7e89e357 JT |
5735 | echo $ac_n "(cached) $ac_c" 1>&6 |
5736 | else | |
5737 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5738 | #line 5739 "configure" |
7e89e357 | 5739 | #include "confdefs.h" |
97bf5e38 MK |
5740 | /* System header to define __stub macros and hopefully few prototypes, |
5741 | which can conflict with char $ac_func(); below. */ | |
5742 | #include <assert.h> | |
5743 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5744 | /* We use char because int might match the return type of a gcc2 | |
5745 | builtin and then its argument prototype would still apply. */ | |
5746 | char $ac_func(); | |
5747 | ||
7e89e357 | 5748 | int main() { |
97bf5e38 MK |
5749 | |
5750 | /* The GNU C library defines this for functions which it implements | |
5751 | to always fail with ENOSYS. Some functions are actually named | |
5752 | something starting with __ and the normal name is an alias. */ | |
5753 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5754 | choke me | |
5755 | #else | |
5756 | $ac_func(); | |
5757 | #endif | |
5758 | ||
7e89e357 JT |
5759 | ; return 0; } |
5760 | EOF | |
97bf5e38 | 5761 | if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 5762 | rm -rf conftest* |
97bf5e38 | 5763 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
5764 | else |
5765 | echo "configure: failed program was:" >&5 | |
5766 | cat conftest.$ac_ext >&5 | |
5767 | rm -rf conftest* | |
97bf5e38 | 5768 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
5769 | fi |
5770 | rm -f conftest* | |
5771 | fi | |
5772 | ||
97bf5e38 MK |
5773 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5774 | echo "$ac_t""yes" 1>&6 | |
5775 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5776 | cat >> confdefs.h <<EOF | |
5777 | #define $ac_tr_func 1 | |
7e89e357 | 5778 | EOF |
97bf5e38 MK |
5779 | |
5780 | else | |
5781 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 5782 | fi |
97bf5e38 | 5783 | done |
7e89e357 | 5784 | |
97bf5e38 | 5785 | for ac_func in poll |
7be570e7 JM |
5786 | do |
5787 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
97bf5e38 | 5788 | echo "configure:5789: checking for $ac_func" >&5 |
7be570e7 JM |
5789 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5790 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5791 | else | |
5792 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5793 | #line 5794 "configure" |
7be570e7 JM |
5794 | #include "confdefs.h" |
5795 | /* System header to define __stub macros and hopefully few prototypes, | |
5796 | which can conflict with char $ac_func(); below. */ | |
5797 | #include <assert.h> | |
5798 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5799 | /* We use char because int might match the return type of a gcc2 | |
5800 | builtin and then its argument prototype would still apply. */ | |
5801 | char $ac_func(); | |
5802 | ||
5803 | int main() { | |
5804 | ||
5805 | /* The GNU C library defines this for functions which it implements | |
5806 | to always fail with ENOSYS. Some functions are actually named | |
5807 | something starting with __ and the normal name is an alias. */ | |
5808 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5809 | choke me | |
5810 | #else | |
5811 | $ac_func(); | |
5812 | #endif | |
5813 | ||
5814 | ; return 0; } | |
5815 | EOF | |
97bf5e38 | 5816 | if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
5817 | rm -rf conftest* |
5818 | eval "ac_cv_func_$ac_func=yes" | |
5819 | else | |
5820 | echo "configure: failed program was:" >&5 | |
5821 | cat conftest.$ac_ext >&5 | |
5822 | rm -rf conftest* | |
5823 | eval "ac_cv_func_$ac_func=no" | |
5824 | fi | |
5825 | rm -f conftest* | |
5826 | fi | |
5827 | ||
5828 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5829 | echo "$ac_t""yes" 1>&6 | |
5830 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5831 | cat >> confdefs.h <<EOF | |
5832 | #define $ac_tr_func 1 | |
5833 | EOF | |
5834 | ||
5835 | else | |
5836 | echo "$ac_t""no" 1>&6 | |
5837 | fi | |
5838 | done | |
5839 | ||
97bf5e38 MK |
5840 | for ac_func in sbrk |
5841 | do | |
5842 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5843 | echo "configure:5844: checking for $ac_func" >&5 | |
5844 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
c906108c SS |
5845 | echo $ac_n "(cached) $ac_c" 1>&6 |
5846 | else | |
5847 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5848 | #line 5849 "configure" |
c906108c | 5849 | #include "confdefs.h" |
97bf5e38 MK |
5850 | /* System header to define __stub macros and hopefully few prototypes, |
5851 | which can conflict with char $ac_func(); below. */ | |
5852 | #include <assert.h> | |
5853 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5854 | /* We use char because int might match the return type of a gcc2 | |
5855 | builtin and then its argument prototype would still apply. */ | |
5856 | char $ac_func(); | |
c906108c | 5857 | |
97bf5e38 MK |
5858 | int main() { |
5859 | ||
5860 | /* The GNU C library defines this for functions which it implements | |
5861 | to always fail with ENOSYS. Some functions are actually named | |
5862 | something starting with __ and the normal name is an alias. */ | |
5863 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5864 | choke me | |
c906108c | 5865 | #else |
97bf5e38 | 5866 | $ac_func(); |
c906108c | 5867 | #endif |
97bf5e38 | 5868 | |
c906108c SS |
5869 | ; return 0; } |
5870 | EOF | |
97bf5e38 | 5871 | if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 5872 | rm -rf conftest* |
97bf5e38 | 5873 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
5874 | else |
5875 | echo "configure: failed program was:" >&5 | |
5876 | cat conftest.$ac_ext >&5 | |
5877 | rm -rf conftest* | |
97bf5e38 | 5878 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
5879 | fi |
5880 | rm -f conftest* | |
5881 | fi | |
5882 | ||
97bf5e38 MK |
5883 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5884 | echo "$ac_t""yes" 1>&6 | |
5885 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5886 | cat >> confdefs.h <<EOF | |
5887 | #define $ac_tr_func 1 | |
c906108c | 5888 | EOF |
97bf5e38 MK |
5889 | |
5890 | else | |
5891 | echo "$ac_t""no" 1>&6 | |
c906108c | 5892 | fi |
97bf5e38 | 5893 | done |
c906108c | 5894 | |
97bf5e38 MK |
5895 | for ac_func in setpgid setpgrp |
5896 | do | |
5897 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5898 | echo "configure:5899: checking for $ac_func" >&5 | |
5899 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
c906108c SS |
5900 | echo $ac_n "(cached) $ac_c" 1>&6 |
5901 | else | |
5902 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5903 | #line 5904 "configure" |
c906108c | 5904 | #include "confdefs.h" |
97bf5e38 MK |
5905 | /* System header to define __stub macros and hopefully few prototypes, |
5906 | which can conflict with char $ac_func(); below. */ | |
5907 | #include <assert.h> | |
5908 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5909 | /* We use char because int might match the return type of a gcc2 | |
5910 | builtin and then its argument prototype would still apply. */ | |
5911 | char $ac_func(); | |
c906108c | 5912 | |
97bf5e38 MK |
5913 | int main() { |
5914 | ||
5915 | /* The GNU C library defines this for functions which it implements | |
5916 | to always fail with ENOSYS. Some functions are actually named | |
5917 | something starting with __ and the normal name is an alias. */ | |
5918 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5919 | choke me | |
c906108c | 5920 | #else |
97bf5e38 | 5921 | $ac_func(); |
c906108c | 5922 | #endif |
97bf5e38 | 5923 | |
c906108c SS |
5924 | ; return 0; } |
5925 | EOF | |
97bf5e38 | 5926 | if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 5927 | rm -rf conftest* |
97bf5e38 | 5928 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
5929 | else |
5930 | echo "configure: failed program was:" >&5 | |
5931 | cat conftest.$ac_ext >&5 | |
5932 | rm -rf conftest* | |
97bf5e38 | 5933 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
5934 | fi |
5935 | rm -f conftest* | |
5936 | fi | |
5937 | ||
97bf5e38 MK |
5938 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5939 | echo "$ac_t""yes" 1>&6 | |
5940 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5941 | cat >> confdefs.h <<EOF | |
5942 | #define $ac_tr_func 1 | |
c906108c | 5943 | EOF |
97bf5e38 MK |
5944 | |
5945 | else | |
5946 | echo "$ac_t""no" 1>&6 | |
c906108c | 5947 | fi |
97bf5e38 | 5948 | done |
c906108c | 5949 | |
97bf5e38 MK |
5950 | for ac_func in sigaction sigprocmask |
5951 | do | |
5952 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5953 | echo "configure:5954: checking for $ac_func" >&5 | |
5954 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
c906108c SS |
5955 | echo $ac_n "(cached) $ac_c" 1>&6 |
5956 | else | |
5957 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 5958 | #line 5959 "configure" |
c906108c | 5959 | #include "confdefs.h" |
97bf5e38 MK |
5960 | /* System header to define __stub macros and hopefully few prototypes, |
5961 | which can conflict with char $ac_func(); below. */ | |
5962 | #include <assert.h> | |
5963 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5964 | /* We use char because int might match the return type of a gcc2 | |
5965 | builtin and then its argument prototype would still apply. */ | |
5966 | char $ac_func(); | |
c906108c | 5967 | |
97bf5e38 MK |
5968 | int main() { |
5969 | ||
5970 | /* The GNU C library defines this for functions which it implements | |
5971 | to always fail with ENOSYS. Some functions are actually named | |
5972 | something starting with __ and the normal name is an alias. */ | |
5973 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5974 | choke me | |
c906108c | 5975 | #else |
97bf5e38 | 5976 | $ac_func(); |
c906108c | 5977 | #endif |
97bf5e38 | 5978 | |
c906108c SS |
5979 | ; return 0; } |
5980 | EOF | |
97bf5e38 | 5981 | if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 5982 | rm -rf conftest* |
97bf5e38 | 5983 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
5984 | else |
5985 | echo "configure: failed program was:" >&5 | |
5986 | cat conftest.$ac_ext >&5 | |
5987 | rm -rf conftest* | |
97bf5e38 | 5988 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
5989 | fi |
5990 | rm -f conftest* | |
5991 | fi | |
5992 | ||
97bf5e38 MK |
5993 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5994 | echo "$ac_t""yes" 1>&6 | |
5995 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5996 | cat >> confdefs.h <<EOF | |
5997 | #define $ac_tr_func 1 | |
c906108c | 5998 | EOF |
97bf5e38 MK |
5999 | sigsetmask |
6000 | else | |
6001 | echo "$ac_t""no" 1>&6 | |
c906108c | 6002 | fi |
97bf5e38 | 6003 | done |
c906108c | 6004 | |
97bf5e38 MK |
6005 | for ac_func in socketpair |
6006 | do | |
6007 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6008 | echo "configure:6009: checking for $ac_func" >&5 | |
6009 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
c906108c SS |
6010 | echo $ac_n "(cached) $ac_c" 1>&6 |
6011 | else | |
6012 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6013 | #line 6014 "configure" |
c906108c | 6014 | #include "confdefs.h" |
97bf5e38 MK |
6015 | /* System header to define __stub macros and hopefully few prototypes, |
6016 | which can conflict with char $ac_func(); below. */ | |
6017 | #include <assert.h> | |
6018 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6019 | /* We use char because int might match the return type of a gcc2 | |
6020 | builtin and then its argument prototype would still apply. */ | |
6021 | char $ac_func(); | |
c906108c | 6022 | |
97bf5e38 MK |
6023 | int main() { |
6024 | ||
6025 | /* The GNU C library defines this for functions which it implements | |
6026 | to always fail with ENOSYS. Some functions are actually named | |
6027 | something starting with __ and the normal name is an alias. */ | |
6028 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6029 | choke me | |
c906108c | 6030 | #else |
97bf5e38 | 6031 | $ac_func(); |
c906108c | 6032 | #endif |
97bf5e38 | 6033 | |
c906108c SS |
6034 | ; return 0; } |
6035 | EOF | |
97bf5e38 | 6036 | if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6037 | rm -rf conftest* |
97bf5e38 | 6038 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6039 | else |
6040 | echo "configure: failed program was:" >&5 | |
6041 | cat conftest.$ac_ext >&5 | |
6042 | rm -rf conftest* | |
97bf5e38 | 6043 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6044 | fi |
6045 | rm -f conftest* | |
6046 | fi | |
6047 | ||
97bf5e38 MK |
6048 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6049 | echo "$ac_t""yes" 1>&6 | |
6050 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6051 | cat >> confdefs.h <<EOF | |
6052 | #define $ac_tr_func 1 | |
c906108c | 6053 | EOF |
97bf5e38 MK |
6054 | |
6055 | else | |
6056 | echo "$ac_t""no" 1>&6 | |
c906108c | 6057 | fi |
97bf5e38 | 6058 | done |
c906108c | 6059 | |
97bf5e38 MK |
6060 | |
6061 | if test "$cross_compiling" = no; then | |
6062 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
6063 | echo "configure:6064: checking whether setpgrp takes no argument" >&5 | |
6064 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then | |
c906108c | 6065 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6066 | else |
6067 | if test "$cross_compiling" = yes; then | |
6068 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6069 | else |
6070 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6071 | #line 6072 "configure" |
c906108c SS |
6072 | #include "confdefs.h" |
6073 | ||
c906108c SS |
6074 | #ifdef HAVE_UNISTD_H |
6075 | #include <unistd.h> | |
6076 | #endif | |
97bf5e38 MK |
6077 | |
6078 | /* | |
6079 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6080 | * successfully. | |
6081 | */ | |
6082 | main() | |
6083 | { | |
6084 | if (setpgrp(1,1) == -1) | |
6085 | exit(0); | |
6086 | else | |
6087 | exit(1); | |
6088 | } | |
6089 | ||
c906108c | 6090 | EOF |
97bf5e38 MK |
6091 | if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
6092 | then | |
6093 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6094 | else |
6095 | echo "configure: failed program was:" >&5 | |
6096 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6097 | rm -fr conftest* |
6098 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6099 | fi |
97bf5e38 | 6100 | rm -fr conftest* |
c906108c SS |
6101 | fi |
6102 | ||
97bf5e38 MK |
6103 | |
6104 | fi | |
6105 | ||
6106 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6107 | if test $ac_cv_func_setpgrp_void = yes; then | |
6108 | cat >> confdefs.h <<\EOF | |
6109 | #define SETPGRP_VOID 1 | |
c906108c SS |
6110 | EOF |
6111 | ||
6112 | fi | |
6113 | ||
97bf5e38 MK |
6114 | else |
6115 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
6116 | echo "configure:6117: checking whether setpgrp takes no argument" >&5 | |
6117 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then | |
b83266a0 SS |
6118 | echo $ac_n "(cached) $ac_c" 1>&6 |
6119 | else | |
6120 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6121 | #line 6122 "configure" |
b83266a0 SS |
6122 | #include "confdefs.h" |
6123 | ||
b83266a0 | 6124 | #include <unistd.h> |
97bf5e38 | 6125 | |
b83266a0 | 6126 | int main() { |
97bf5e38 MK |
6127 | |
6128 | if (setpgrp(1,1) == -1) | |
6129 | exit (0); | |
6130 | else | |
6131 | exit (1); | |
6132 | ||
b83266a0 SS |
6133 | ; return 0; } |
6134 | EOF | |
97bf5e38 | 6135 | if { (eval echo configure:6136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6136 | rm -rf conftest* |
97bf5e38 | 6137 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6138 | else |
6139 | echo "configure: failed program was:" >&5 | |
6140 | cat conftest.$ac_ext >&5 | |
6141 | rm -rf conftest* | |
97bf5e38 | 6142 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6143 | fi |
6144 | rm -f conftest* | |
6145 | fi | |
6146 | ||
97bf5e38 MK |
6147 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6148 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6149 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6150 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6151 | EOF |
6152 | ||
97bf5e38 | 6153 | fi |
b83266a0 SS |
6154 | fi |
6155 | ||
97bf5e38 MK |
6156 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6157 | # since sigsetjmp might only be defined as a macro. | |
6158 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
6159 | echo "configure:6160: checking for sigsetjmp" >&5 | |
6160 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then | |
a4db0f07 RH |
6161 | echo $ac_n "(cached) $ac_c" 1>&6 |
6162 | else | |
6163 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6164 | #line 6165 "configure" |
a4db0f07 RH |
6165 | #include "confdefs.h" |
6166 | ||
97bf5e38 MK |
6167 | #include <setjmp.h> |
6168 | ||
a4db0f07 | 6169 | int main() { |
97bf5e38 | 6170 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6171 | ; return 0; } |
6172 | EOF | |
97bf5e38 | 6173 | if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6174 | rm -rf conftest* |
97bf5e38 | 6175 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6176 | else |
6177 | echo "configure: failed program was:" >&5 | |
6178 | cat conftest.$ac_ext >&5 | |
6179 | rm -rf conftest* | |
97bf5e38 | 6180 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6181 | fi |
6182 | rm -f conftest* | |
6183 | fi | |
6184 | ||
97bf5e38 MK |
6185 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6186 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6187 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6188 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6189 | EOF |
6190 | ||
6191 | fi | |
c906108c | 6192 | |
97bf5e38 MK |
6193 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6194 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6195 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
6196 | echo "configure:6197: checking for r_fs in struct reg" >&5 | |
6197 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then | |
6198 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6199 | else | |
6200 | cat > conftest.$ac_ext <<EOF | |
6201 | #line 6202 "configure" | |
c906108c | 6202 | #include "confdefs.h" |
97bf5e38 MK |
6203 | #include <machine/reg.h> |
6204 | int main() { | |
6205 | struct reg r; r.r_fs; | |
6206 | ; return 0; } | |
c906108c | 6207 | EOF |
97bf5e38 | 6208 | if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6209 | rm -rf conftest* |
97bf5e38 | 6210 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6211 | else |
97bf5e38 MK |
6212 | echo "configure: failed program was:" >&5 |
6213 | cat conftest.$ac_ext >&5 | |
c906108c | 6214 | rm -rf conftest* |
97bf5e38 | 6215 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6216 | fi |
6217 | rm -f conftest* | |
97bf5e38 | 6218 | fi |
c906108c | 6219 | |
97bf5e38 MK |
6220 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6221 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6222 | cat >> confdefs.h <<\EOF | |
6223 | #define HAVE_STRUCT_REG_R_FS 1 | |
6224 | EOF | |
6225 | ||
6226 | fi | |
6227 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
6228 | echo "configure:6229: checking for r_gs in struct reg" >&5 | |
6229 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then | |
6230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6231 | else | |
6232 | cat > conftest.$ac_ext <<EOF | |
6233 | #line 6234 "configure" | |
c906108c | 6234 | #include "confdefs.h" |
97bf5e38 MK |
6235 | #include <machine/reg.h> |
6236 | int main() { | |
6237 | struct reg r; r.r_gs; | |
6238 | ; return 0; } | |
c906108c | 6239 | EOF |
97bf5e38 | 6240 | if { (eval echo configure:6241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6241 | rm -rf conftest* |
97bf5e38 | 6242 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6243 | else |
97bf5e38 MK |
6244 | echo "configure: failed program was:" >&5 |
6245 | cat conftest.$ac_ext >&5 | |
c906108c | 6246 | rm -rf conftest* |
97bf5e38 | 6247 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6248 | fi |
6249 | rm -f conftest* | |
c906108c | 6250 | fi |
c906108c | 6251 | |
97bf5e38 MK |
6252 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6253 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6254 | cat >> confdefs.h <<\EOF | |
6255 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6256 | EOF |
6257 | ||
c906108c SS |
6258 | fi |
6259 | ||
97bf5e38 MK |
6260 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6261 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
6262 | echo "configure:6263: checking for PTRACE_GETREGS" >&5 | |
6263 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then | |
c906108c SS |
6264 | echo $ac_n "(cached) $ac_c" 1>&6 |
6265 | else | |
6266 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6267 | #line 6268 "configure" |
c906108c | 6268 | #include "confdefs.h" |
97bf5e38 | 6269 | #include <sys/ptrace.h> |
c906108c | 6270 | int main() { |
97bf5e38 | 6271 | PTRACE_GETREGS; |
c906108c SS |
6272 | ; return 0; } |
6273 | EOF | |
97bf5e38 | 6274 | if { (eval echo configure:6275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6275 | rm -rf conftest* |
97bf5e38 | 6276 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6277 | else |
6278 | echo "configure: failed program was:" >&5 | |
6279 | cat conftest.$ac_ext >&5 | |
6280 | rm -rf conftest* | |
97bf5e38 | 6281 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6282 | fi |
6283 | rm -f conftest* | |
6284 | fi | |
6285 | ||
97bf5e38 MK |
6286 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6287 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6288 | cat >> confdefs.h <<\EOF | |
6289 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6290 | EOF |
6291 | ||
97bf5e38 | 6292 | fi |
c906108c | 6293 | |
97bf5e38 MK |
6294 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6295 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
6296 | echo "configure:6297: checking for PTRACE_GETFPXREGS" >&5 | |
6297 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then | |
c906108c SS |
6298 | echo $ac_n "(cached) $ac_c" 1>&6 |
6299 | else | |
6300 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6301 | #line 6302 "configure" |
c906108c | 6302 | #include "confdefs.h" |
97bf5e38 | 6303 | #include <sys/ptrace.h> |
c906108c | 6304 | int main() { |
97bf5e38 | 6305 | PTRACE_GETFPXREGS; |
c906108c SS |
6306 | ; return 0; } |
6307 | EOF | |
97bf5e38 | 6308 | if { (eval echo configure:6309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6309 | rm -rf conftest* |
97bf5e38 | 6310 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6311 | else |
6312 | echo "configure: failed program was:" >&5 | |
6313 | cat conftest.$ac_ext >&5 | |
6314 | rm -rf conftest* | |
97bf5e38 | 6315 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6316 | fi |
6317 | rm -f conftest* | |
6318 | fi | |
6319 | ||
97bf5e38 MK |
6320 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6321 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6322 | cat >> confdefs.h <<\EOF | |
6323 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6324 | EOF |
6325 | ||
97bf5e38 | 6326 | fi |
c906108c | 6327 | |
97bf5e38 MK |
6328 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6329 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
6330 | echo "configure:6331: checking for PT_GETDBREGS" >&5 | |
6331 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then | |
c906108c SS |
6332 | echo $ac_n "(cached) $ac_c" 1>&6 |
6333 | else | |
6334 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6335 | #line 6336 "configure" |
c906108c | 6336 | #include "confdefs.h" |
97bf5e38 MK |
6337 | #include <sys/types.h> |
6338 | #include <sys/ptrace.h> | |
c906108c | 6339 | int main() { |
97bf5e38 | 6340 | PT_GETDBREGS; |
c906108c SS |
6341 | ; return 0; } |
6342 | EOF | |
97bf5e38 | 6343 | if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6344 | rm -rf conftest* |
97bf5e38 | 6345 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6346 | else |
6347 | echo "configure: failed program was:" >&5 | |
6348 | cat conftest.$ac_ext >&5 | |
6349 | rm -rf conftest* | |
97bf5e38 | 6350 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6351 | fi |
6352 | rm -f conftest* | |
6353 | fi | |
6354 | ||
97bf5e38 MK |
6355 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6356 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6357 | cat >> confdefs.h <<\EOF | |
6358 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6359 | EOF |
6360 | ||
97bf5e38 | 6361 | fi |
c906108c | 6362 | |
97bf5e38 MK |
6363 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6364 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
6365 | echo "configure:6366: checking for PT_GETXMMREGS" >&5 | |
6366 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then | |
c906108c SS |
6367 | echo $ac_n "(cached) $ac_c" 1>&6 |
6368 | else | |
6369 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6370 | #line 6371 "configure" |
c906108c | 6371 | #include "confdefs.h" |
97bf5e38 MK |
6372 | #include <sys/types.h> |
6373 | #include <sys/ptrace.h> | |
c906108c | 6374 | int main() { |
97bf5e38 | 6375 | PT_GETXMMREGS; |
c906108c SS |
6376 | ; return 0; } |
6377 | EOF | |
97bf5e38 | 6378 | if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6379 | rm -rf conftest* |
97bf5e38 | 6380 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6381 | else |
6382 | echo "configure: failed program was:" >&5 | |
6383 | cat conftest.$ac_ext >&5 | |
6384 | rm -rf conftest* | |
97bf5e38 | 6385 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6386 | fi |
6387 | rm -f conftest* | |
6388 | fi | |
6389 | ||
97bf5e38 MK |
6390 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6391 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6392 | cat >> confdefs.h <<\EOF | |
6393 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6394 | EOF |
6395 | ||
97bf5e38 | 6396 | fi |
c906108c | 6397 | |
97bf5e38 MK |
6398 | |
6399 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
6400 | echo "configure:6401: checking whether malloc must be declared" >&5 | |
6401 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then | |
3862412b MK |
6402 | echo $ac_n "(cached) $ac_c" 1>&6 |
6403 | else | |
6404 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6405 | #line 6406 "configure" |
3862412b | 6406 | #include "confdefs.h" |
e17bf198 | 6407 | |
97bf5e38 MK |
6408 | #include <stdio.h> |
6409 | #ifdef HAVE_STRING_H | |
6410 | #include <string.h> | |
6411 | #else | |
6412 | #ifdef HAVE_STRINGS_H | |
6413 | #include <strings.h> | |
6414 | #endif | |
6415 | #endif | |
6416 | #ifdef HAVE_STDLIB_H | |
6417 | #include <stdlib.h> | |
6418 | #endif | |
6419 | #ifdef HAVE_UNISTD_H | |
6420 | #include <unistd.h> | |
6421 | #endif | |
3862412b | 6422 | int main() { |
97bf5e38 | 6423 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6424 | ; return 0; } |
6425 | EOF | |
97bf5e38 | 6426 | if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6427 | rm -rf conftest* |
97bf5e38 | 6428 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6429 | else |
6430 | echo "configure: failed program was:" >&5 | |
6431 | cat conftest.$ac_ext >&5 | |
6432 | rm -rf conftest* | |
97bf5e38 | 6433 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6434 | fi |
6435 | rm -f conftest* | |
6436 | fi | |
6437 | ||
97bf5e38 MK |
6438 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6439 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6440 | cat >> confdefs.h <<\EOF | |
6441 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6442 | EOF |
6443 | ||
97bf5e38 | 6444 | fi |
3862412b | 6445 | |
97bf5e38 MK |
6446 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
6447 | echo "configure:6448: checking whether realloc must be declared" >&5 | |
6448 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then | |
3862412b MK |
6449 | echo $ac_n "(cached) $ac_c" 1>&6 |
6450 | else | |
6451 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6452 | #line 6453 "configure" |
3862412b | 6453 | #include "confdefs.h" |
e17bf198 | 6454 | |
97bf5e38 MK |
6455 | #include <stdio.h> |
6456 | #ifdef HAVE_STRING_H | |
6457 | #include <string.h> | |
6458 | #else | |
6459 | #ifdef HAVE_STRINGS_H | |
6460 | #include <strings.h> | |
6461 | #endif | |
6462 | #endif | |
6463 | #ifdef HAVE_STDLIB_H | |
6464 | #include <stdlib.h> | |
6465 | #endif | |
6466 | #ifdef HAVE_UNISTD_H | |
6467 | #include <unistd.h> | |
6468 | #endif | |
3862412b | 6469 | int main() { |
97bf5e38 | 6470 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
6471 | ; return 0; } |
6472 | EOF | |
97bf5e38 | 6473 | if { (eval echo configure:6474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6474 | rm -rf conftest* |
97bf5e38 | 6475 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
6476 | else |
6477 | echo "configure: failed program was:" >&5 | |
6478 | cat conftest.$ac_ext >&5 | |
6479 | rm -rf conftest* | |
97bf5e38 | 6480 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
6481 | fi |
6482 | rm -f conftest* | |
6483 | fi | |
6484 | ||
97bf5e38 MK |
6485 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
6486 | if test $bfd_cv_decl_needed_realloc = yes; then | |
6487 | cat >> confdefs.h <<\EOF | |
6488 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
6489 | EOF |
6490 | ||
97bf5e38 | 6491 | fi |
3862412b | 6492 | |
97bf5e38 MK |
6493 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
6494 | echo "configure:6495: checking whether free must be declared" >&5 | |
6495 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then | |
451928c5 AC |
6496 | echo $ac_n "(cached) $ac_c" 1>&6 |
6497 | else | |
6498 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6499 | #line 6500 "configure" |
451928c5 | 6500 | #include "confdefs.h" |
e17bf198 | 6501 | |
97bf5e38 MK |
6502 | #include <stdio.h> |
6503 | #ifdef HAVE_STRING_H | |
6504 | #include <string.h> | |
6505 | #else | |
6506 | #ifdef HAVE_STRINGS_H | |
6507 | #include <strings.h> | |
6508 | #endif | |
6509 | #endif | |
6510 | #ifdef HAVE_STDLIB_H | |
6511 | #include <stdlib.h> | |
6512 | #endif | |
6513 | #ifdef HAVE_UNISTD_H | |
6514 | #include <unistd.h> | |
6515 | #endif | |
451928c5 | 6516 | int main() { |
97bf5e38 | 6517 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
6518 | ; return 0; } |
6519 | EOF | |
97bf5e38 | 6520 | if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6521 | rm -rf conftest* |
97bf5e38 | 6522 | bfd_cv_decl_needed_free=no |
451928c5 AC |
6523 | else |
6524 | echo "configure: failed program was:" >&5 | |
6525 | cat conftest.$ac_ext >&5 | |
6526 | rm -rf conftest* | |
97bf5e38 | 6527 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
6528 | fi |
6529 | rm -f conftest* | |
6530 | fi | |
6531 | ||
97bf5e38 MK |
6532 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
6533 | if test $bfd_cv_decl_needed_free = yes; then | |
6534 | cat >> confdefs.h <<\EOF | |
6535 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
6536 | EOF |
6537 | ||
97bf5e38 | 6538 | fi |
451928c5 | 6539 | |
97bf5e38 MK |
6540 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
6541 | echo "configure:6542: checking whether strerror must be declared" >&5 | |
6542 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then | |
451928c5 AC |
6543 | echo $ac_n "(cached) $ac_c" 1>&6 |
6544 | else | |
6545 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6546 | #line 6547 "configure" |
451928c5 | 6547 | #include "confdefs.h" |
e17bf198 | 6548 | |
97bf5e38 MK |
6549 | #include <stdio.h> |
6550 | #ifdef HAVE_STRING_H | |
6551 | #include <string.h> | |
6552 | #else | |
6553 | #ifdef HAVE_STRINGS_H | |
6554 | #include <strings.h> | |
6555 | #endif | |
6556 | #endif | |
6557 | #ifdef HAVE_STDLIB_H | |
6558 | #include <stdlib.h> | |
6559 | #endif | |
6560 | #ifdef HAVE_UNISTD_H | |
6561 | #include <unistd.h> | |
6562 | #endif | |
451928c5 | 6563 | int main() { |
97bf5e38 | 6564 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
6565 | ; return 0; } |
6566 | EOF | |
97bf5e38 | 6567 | if { (eval echo configure:6568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6568 | rm -rf conftest* |
97bf5e38 | 6569 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
6570 | else |
6571 | echo "configure: failed program was:" >&5 | |
6572 | cat conftest.$ac_ext >&5 | |
6573 | rm -rf conftest* | |
97bf5e38 | 6574 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
6575 | fi |
6576 | rm -f conftest* | |
6577 | fi | |
6578 | ||
97bf5e38 MK |
6579 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
6580 | if test $bfd_cv_decl_needed_strerror = yes; then | |
6581 | cat >> confdefs.h <<\EOF | |
6582 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
6583 | EOF |
6584 | ||
97bf5e38 | 6585 | fi |
451928c5 | 6586 | |
97bf5e38 MK |
6587 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
6588 | echo "configure:6589: checking whether strdup must be declared" >&5 | |
6589 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then | |
3862412b MK |
6590 | echo $ac_n "(cached) $ac_c" 1>&6 |
6591 | else | |
6592 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6593 | #line 6594 "configure" |
3862412b | 6594 | #include "confdefs.h" |
e17bf198 | 6595 | |
97bf5e38 MK |
6596 | #include <stdio.h> |
6597 | #ifdef HAVE_STRING_H | |
6598 | #include <string.h> | |
6599 | #else | |
6600 | #ifdef HAVE_STRINGS_H | |
6601 | #include <strings.h> | |
6602 | #endif | |
6603 | #endif | |
6604 | #ifdef HAVE_STDLIB_H | |
6605 | #include <stdlib.h> | |
6606 | #endif | |
6607 | #ifdef HAVE_UNISTD_H | |
6608 | #include <unistd.h> | |
6609 | #endif | |
3862412b | 6610 | int main() { |
97bf5e38 | 6611 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
6612 | ; return 0; } |
6613 | EOF | |
97bf5e38 | 6614 | if { (eval echo configure:6615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6615 | rm -rf conftest* |
97bf5e38 | 6616 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
6617 | else |
6618 | echo "configure: failed program was:" >&5 | |
6619 | cat conftest.$ac_ext >&5 | |
6620 | rm -rf conftest* | |
97bf5e38 | 6621 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
6622 | fi |
6623 | rm -f conftest* | |
6624 | fi | |
6625 | ||
97bf5e38 MK |
6626 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
6627 | if test $bfd_cv_decl_needed_strdup = yes; then | |
6628 | cat >> confdefs.h <<\EOF | |
6629 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
6630 | EOF |
6631 | ||
97bf5e38 | 6632 | fi |
3862412b | 6633 | |
97bf5e38 MK |
6634 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
6635 | echo "configure:6636: checking whether strstr must be declared" >&5 | |
6636 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then | |
3862412b MK |
6637 | echo $ac_n "(cached) $ac_c" 1>&6 |
6638 | else | |
6639 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6640 | #line 6641 "configure" |
3862412b | 6641 | #include "confdefs.h" |
e17bf198 | 6642 | |
97bf5e38 MK |
6643 | #include <stdio.h> |
6644 | #ifdef HAVE_STRING_H | |
6645 | #include <string.h> | |
6646 | #else | |
6647 | #ifdef HAVE_STRINGS_H | |
6648 | #include <strings.h> | |
6649 | #endif | |
6650 | #endif | |
6651 | #ifdef HAVE_STDLIB_H | |
6652 | #include <stdlib.h> | |
6653 | #endif | |
6654 | #ifdef HAVE_UNISTD_H | |
6655 | #include <unistd.h> | |
6656 | #endif | |
3862412b | 6657 | int main() { |
97bf5e38 | 6658 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
6659 | ; return 0; } |
6660 | EOF | |
97bf5e38 | 6661 | if { (eval echo configure:6662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6662 | rm -rf conftest* |
97bf5e38 | 6663 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
6664 | else |
6665 | echo "configure: failed program was:" >&5 | |
6666 | cat conftest.$ac_ext >&5 | |
6667 | rm -rf conftest* | |
97bf5e38 | 6668 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
6669 | fi |
6670 | rm -f conftest* | |
6671 | fi | |
6672 | ||
97bf5e38 MK |
6673 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
6674 | if test $bfd_cv_decl_needed_strstr = yes; then | |
6675 | cat >> confdefs.h <<\EOF | |
6676 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
6677 | EOF |
6678 | ||
97bf5e38 | 6679 | fi |
3862412b | 6680 | |
97bf5e38 MK |
6681 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
6682 | echo "configure:6683: checking whether canonicalize_file_name must be declared" >&5 | |
6683 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then | |
596c9d4b KB |
6684 | echo $ac_n "(cached) $ac_c" 1>&6 |
6685 | else | |
6686 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6687 | #line 6688 "configure" |
596c9d4b KB |
6688 | #include "confdefs.h" |
6689 | ||
97bf5e38 MK |
6690 | #include <stdio.h> |
6691 | #ifdef HAVE_STRING_H | |
6692 | #include <string.h> | |
6693 | #else | |
6694 | #ifdef HAVE_STRINGS_H | |
6695 | #include <strings.h> | |
6696 | #endif | |
6697 | #endif | |
6698 | #ifdef HAVE_STDLIB_H | |
6699 | #include <stdlib.h> | |
6700 | #endif | |
6701 | #ifdef HAVE_UNISTD_H | |
6702 | #include <unistd.h> | |
6703 | #endif | |
596c9d4b | 6704 | int main() { |
97bf5e38 | 6705 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
6706 | ; return 0; } |
6707 | EOF | |
97bf5e38 | 6708 | if { (eval echo configure:6709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 6709 | rm -rf conftest* |
97bf5e38 | 6710 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
6711 | else |
6712 | echo "configure: failed program was:" >&5 | |
6713 | cat conftest.$ac_ext >&5 | |
6714 | rm -rf conftest* | |
97bf5e38 | 6715 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
6716 | fi |
6717 | rm -f conftest* | |
6718 | fi | |
6719 | ||
97bf5e38 MK |
6720 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
6721 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
6722 | cat >> confdefs.h <<\EOF | |
6723 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
6724 | EOF |
6725 | ||
97bf5e38 | 6726 | fi |
596c9d4b | 6727 | |
97bf5e38 MK |
6728 | |
6729 | # The following save_state_t checkery is only necessary for HPUX | |
6730 | # versions earlier than 10.20. When those fade from memory, this | |
6731 | # could be expunged. --jsm 1999-03-22 | |
6732 | ||
6733 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
6734 | echo "configure:6735: checking for HPUX save_state structure" >&5 | |
6735 | cat > conftest.$ac_ext <<EOF | |
6736 | #line 6737 "configure" | |
6737 | #include "confdefs.h" | |
6738 | #include <machine/save_state.h> | |
6739 | EOF | |
6740 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6741 | egrep "save_state_t" >/dev/null 2>&1; then | |
6742 | rm -rf conftest* | |
6743 | gdb_cv_hpux_savestate=yes | |
6744 | else | |
6745 | rm -rf conftest* | |
6746 | gdb_cv_hpux_savestate=no | |
6747 | fi | |
6748 | rm -f conftest* | |
6749 | ||
6750 | cat > conftest.$ac_ext <<EOF | |
6751 | #line 6752 "configure" | |
6752 | #include "confdefs.h" | |
6753 | #include <machine/save_state.h> | |
6754 | EOF | |
6755 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6756 | egrep "ss_wide" >/dev/null 2>&1; then | |
6757 | rm -rf conftest* | |
6758 | gdb_cv_hpux_sswide=yes | |
6759 | else | |
6760 | rm -rf conftest* | |
6761 | gdb_cv_hpux_sswide=no | |
6762 | fi | |
6763 | rm -f conftest* | |
6764 | ||
6765 | if test $gdb_cv_hpux_savestate = yes | |
6766 | then | |
6767 | cat >> confdefs.h <<\EOF | |
6768 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
6769 | EOF | |
6770 | ||
6771 | fi | |
6772 | if test $gdb_cv_hpux_sswide = yes | |
6773 | then | |
6774 | cat >> confdefs.h <<\EOF | |
6775 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
6776 | EOF | |
6777 | ||
6778 | fi | |
6779 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
6780 | ||
6781 | ||
6782 | # If we are configured native on GNU/Linux, work around problems with | |
6783 | # sys/procfs.h | |
6784 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
6785 | ||
6786 | if test "${target}" = "${host}"; then | |
6787 | case "${host}" in | |
6788 | i[3456]86-*-linux*) | |
6789 | cat >> confdefs.h <<\EOF | |
6790 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
6791 | EOF | |
6792 | ||
6793 | cat >> confdefs.h <<\EOF | |
6794 | #define sys_quotactl 1 | |
6795 | EOF | |
6796 | ||
6797 | ;; | |
6798 | ia64-*-aix*) | |
6799 | cat >> confdefs.h <<\EOF | |
6800 | #define NEW_PROC_API 1 | |
6801 | EOF | |
6802 | ||
6803 | ;; | |
6804 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
6805 | cat >> confdefs.h <<\EOF | |
6806 | #define NEW_PROC_API 1 | |
6807 | EOF | |
6808 | ||
6809 | ;; | |
6810 | *-*-solaris2.[678]) | |
6811 | cat >> confdefs.h <<\EOF | |
6812 | #define NEW_PROC_API 1 | |
6813 | EOF | |
6814 | ||
6815 | ;; | |
6816 | esac | |
6817 | fi | |
6818 | ||
6819 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
6820 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
6821 | echo "configure:6822: checking for pstatus_t in sys/procfs.h" >&5 | |
6822 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then | |
596c9d4b KB |
6823 | echo $ac_n "(cached) $ac_c" 1>&6 |
6824 | else | |
6825 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6826 | #line 6827 "configure" |
596c9d4b KB |
6827 | #include "confdefs.h" |
6828 | ||
6829 | #define _SYSCALL32 | |
6830 | #include <sys/procfs.h> | |
6831 | int main() { | |
97bf5e38 | 6832 | pstatus_t avar |
596c9d4b KB |
6833 | ; return 0; } |
6834 | EOF | |
97bf5e38 | 6835 | if { (eval echo configure:6836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 6836 | rm -rf conftest* |
97bf5e38 | 6837 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
6838 | else |
6839 | echo "configure: failed program was:" >&5 | |
6840 | cat conftest.$ac_ext >&5 | |
6841 | rm -rf conftest* | |
97bf5e38 | 6842 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
6843 | |
6844 | fi | |
6845 | rm -f conftest* | |
6846 | fi | |
6847 | ||
97bf5e38 | 6848 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 6849 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6850 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
6851 | EOF |
6852 | ||
6853 | fi | |
97bf5e38 | 6854 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 6855 | |
97bf5e38 MK |
6856 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
6857 | echo "configure:6858: checking for prrun_t in sys/procfs.h" >&5 | |
6858 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then | |
596c9d4b KB |
6859 | echo $ac_n "(cached) $ac_c" 1>&6 |
6860 | else | |
6861 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6862 | #line 6863 "configure" |
596c9d4b KB |
6863 | #include "confdefs.h" |
6864 | ||
6865 | #define _SYSCALL32 | |
6866 | #include <sys/procfs.h> | |
6867 | int main() { | |
97bf5e38 | 6868 | prrun_t avar |
596c9d4b KB |
6869 | ; return 0; } |
6870 | EOF | |
97bf5e38 | 6871 | if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 6872 | rm -rf conftest* |
97bf5e38 | 6873 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
6874 | else |
6875 | echo "configure: failed program was:" >&5 | |
6876 | cat conftest.$ac_ext >&5 | |
6877 | rm -rf conftest* | |
97bf5e38 | 6878 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
6879 | |
6880 | fi | |
6881 | rm -f conftest* | |
6882 | fi | |
6883 | ||
97bf5e38 | 6884 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 6885 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6886 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
6887 | EOF |
6888 | ||
6889 | fi | |
97bf5e38 | 6890 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 6891 | |
97bf5e38 MK |
6892 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
6893 | echo "configure:6894: checking for gregset_t in sys/procfs.h" >&5 | |
6894 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then | |
596c9d4b KB |
6895 | echo $ac_n "(cached) $ac_c" 1>&6 |
6896 | else | |
6897 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6898 | #line 6899 "configure" |
596c9d4b KB |
6899 | #include "confdefs.h" |
6900 | ||
6901 | #define _SYSCALL32 | |
6902 | #include <sys/procfs.h> | |
6903 | int main() { | |
97bf5e38 | 6904 | gregset_t avar |
596c9d4b KB |
6905 | ; return 0; } |
6906 | EOF | |
97bf5e38 | 6907 | if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 6908 | rm -rf conftest* |
97bf5e38 | 6909 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
6910 | else |
6911 | echo "configure: failed program was:" >&5 | |
6912 | cat conftest.$ac_ext >&5 | |
6913 | rm -rf conftest* | |
97bf5e38 | 6914 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
6915 | |
6916 | fi | |
6917 | rm -f conftest* | |
6918 | fi | |
6919 | ||
97bf5e38 | 6920 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 6921 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6922 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
6923 | EOF |
6924 | ||
6925 | fi | |
97bf5e38 | 6926 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 6927 | |
97bf5e38 MK |
6928 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
6929 | echo "configure:6930: checking for fpregset_t in sys/procfs.h" >&5 | |
6930 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then | |
d84dd0c5 | 6931 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
6932 | else |
6933 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6934 | #line 6935 "configure" |
d84dd0c5 | 6935 | #include "confdefs.h" |
97bf5e38 MK |
6936 | |
6937 | #define _SYSCALL32 | |
d84dd0c5 | 6938 | #include <sys/procfs.h> |
97bf5e38 MK |
6939 | int main() { |
6940 | fpregset_t avar | |
6941 | ; return 0; } | |
d84dd0c5 | 6942 | EOF |
97bf5e38 MK |
6943 | if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6944 | rm -rf conftest* | |
6945 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
6946 | else |
6947 | echo "configure: failed program was:" >&5 | |
6948 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6949 | rm -rf conftest* |
6950 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
6951 | ||
d84dd0c5 | 6952 | fi |
97bf5e38 | 6953 | rm -f conftest* |
d84dd0c5 MK |
6954 | fi |
6955 | ||
97bf5e38 MK |
6956 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
6957 | cat >> confdefs.h <<\EOF | |
6958 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
6959 | EOF |
6960 | ||
97bf5e38 MK |
6961 | fi |
6962 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 6963 | |
97bf5e38 MK |
6964 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
6965 | echo "configure:6966: checking for prgregset_t in sys/procfs.h" >&5 | |
6966 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then | |
c906108c SS |
6967 | echo $ac_n "(cached) $ac_c" 1>&6 |
6968 | else | |
6969 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 6970 | #line 6971 "configure" |
c906108c | 6971 | #include "confdefs.h" |
c906108c | 6972 | |
97bf5e38 MK |
6973 | #define _SYSCALL32 |
6974 | #include <sys/procfs.h> | |
c906108c | 6975 | int main() { |
97bf5e38 | 6976 | prgregset_t avar |
c906108c SS |
6977 | ; return 0; } |
6978 | EOF | |
97bf5e38 | 6979 | if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6980 | rm -rf conftest* |
97bf5e38 | 6981 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
6982 | else |
6983 | echo "configure: failed program was:" >&5 | |
6984 | cat conftest.$ac_ext >&5 | |
6985 | rm -rf conftest* | |
97bf5e38 MK |
6986 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
6987 | ||
c906108c SS |
6988 | fi |
6989 | rm -f conftest* | |
6990 | fi | |
6991 | ||
97bf5e38 MK |
6992 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
6993 | cat >> confdefs.h <<\EOF | |
6994 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
6995 | EOF |
6996 | ||
97bf5e38 MK |
6997 | fi |
6998 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 6999 | |
97bf5e38 MK |
7000 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
7001 | echo "configure:7002: checking for prfpregset_t in sys/procfs.h" >&5 | |
7002 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then | |
d45fe813 KB |
7003 | echo $ac_n "(cached) $ac_c" 1>&6 |
7004 | else | |
7005 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7006 | #line 7007 "configure" |
d45fe813 | 7007 | #include "confdefs.h" |
97bf5e38 MK |
7008 | |
7009 | #define _SYSCALL32 | |
7010 | #include <sys/procfs.h> | |
d45fe813 | 7011 | int main() { |
97bf5e38 | 7012 | prfpregset_t avar |
d45fe813 KB |
7013 | ; return 0; } |
7014 | EOF | |
97bf5e38 | 7015 | if { (eval echo configure:7016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7016 | rm -rf conftest* |
97bf5e38 | 7017 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7018 | else |
7019 | echo "configure: failed program was:" >&5 | |
7020 | cat conftest.$ac_ext >&5 | |
7021 | rm -rf conftest* | |
97bf5e38 MK |
7022 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7023 | ||
d45fe813 KB |
7024 | fi |
7025 | rm -f conftest* | |
7026 | fi | |
7027 | ||
97bf5e38 MK |
7028 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7029 | cat >> confdefs.h <<\EOF | |
7030 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7031 | EOF |
7032 | ||
97bf5e38 MK |
7033 | fi |
7034 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7035 | |
97bf5e38 MK |
7036 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
7037 | echo "configure:7038: checking for prgregset32_t in sys/procfs.h" >&5 | |
7038 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then | |
d45fe813 KB |
7039 | echo $ac_n "(cached) $ac_c" 1>&6 |
7040 | else | |
7041 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7042 | #line 7043 "configure" |
d45fe813 | 7043 | #include "confdefs.h" |
97bf5e38 MK |
7044 | |
7045 | #define _SYSCALL32 | |
7046 | #include <sys/procfs.h> | |
d45fe813 | 7047 | int main() { |
97bf5e38 | 7048 | prgregset32_t avar |
d45fe813 KB |
7049 | ; return 0; } |
7050 | EOF | |
97bf5e38 | 7051 | if { (eval echo configure:7052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7052 | rm -rf conftest* |
97bf5e38 | 7053 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7054 | else |
7055 | echo "configure: failed program was:" >&5 | |
7056 | cat conftest.$ac_ext >&5 | |
7057 | rm -rf conftest* | |
97bf5e38 MK |
7058 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7059 | ||
d45fe813 KB |
7060 | fi |
7061 | rm -f conftest* | |
7062 | fi | |
7063 | ||
97bf5e38 MK |
7064 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7065 | cat >> confdefs.h <<\EOF | |
7066 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7067 | EOF |
7068 | ||
97bf5e38 MK |
7069 | fi |
7070 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7071 | |
97bf5e38 MK |
7072 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
7073 | echo "configure:7074: checking for prfpregset32_t in sys/procfs.h" >&5 | |
7074 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then | |
d45fe813 KB |
7075 | echo $ac_n "(cached) $ac_c" 1>&6 |
7076 | else | |
7077 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7078 | #line 7079 "configure" |
d45fe813 | 7079 | #include "confdefs.h" |
97bf5e38 MK |
7080 | |
7081 | #define _SYSCALL32 | |
7082 | #include <sys/procfs.h> | |
d45fe813 | 7083 | int main() { |
97bf5e38 | 7084 | prfpregset32_t avar |
d45fe813 KB |
7085 | ; return 0; } |
7086 | EOF | |
97bf5e38 | 7087 | if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7088 | rm -rf conftest* |
97bf5e38 | 7089 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7090 | else |
7091 | echo "configure: failed program was:" >&5 | |
7092 | cat conftest.$ac_ext >&5 | |
7093 | rm -rf conftest* | |
97bf5e38 MK |
7094 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7095 | ||
d45fe813 KB |
7096 | fi |
7097 | rm -f conftest* | |
7098 | fi | |
7099 | ||
97bf5e38 MK |
7100 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7101 | cat >> confdefs.h <<\EOF | |
7102 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7103 | EOF |
7104 | ||
97bf5e38 MK |
7105 | fi |
7106 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7107 | |
97bf5e38 MK |
7108 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
7109 | echo "configure:7110: checking for lwpid_t in sys/procfs.h" >&5 | |
7110 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then | |
d45fe813 KB |
7111 | echo $ac_n "(cached) $ac_c" 1>&6 |
7112 | else | |
7113 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7114 | #line 7115 "configure" |
d45fe813 | 7115 | #include "confdefs.h" |
97bf5e38 | 7116 | |
d45fe813 | 7117 | #define _SYSCALL32 |
97bf5e38 | 7118 | #include <sys/procfs.h> |
d45fe813 | 7119 | int main() { |
97bf5e38 | 7120 | lwpid_t avar |
d45fe813 KB |
7121 | ; return 0; } |
7122 | EOF | |
97bf5e38 | 7123 | if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7124 | rm -rf conftest* |
97bf5e38 | 7125 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7126 | else |
7127 | echo "configure: failed program was:" >&5 | |
7128 | cat conftest.$ac_ext >&5 | |
7129 | rm -rf conftest* | |
97bf5e38 MK |
7130 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7131 | ||
d45fe813 KB |
7132 | fi |
7133 | rm -f conftest* | |
7134 | fi | |
7135 | ||
97bf5e38 MK |
7136 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7137 | cat >> confdefs.h <<\EOF | |
7138 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7139 | EOF |
7140 | ||
97bf5e38 MK |
7141 | fi |
7142 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7143 | |
97bf5e38 MK |
7144 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
7145 | echo "configure:7146: checking for psaddr_t in sys/procfs.h" >&5 | |
7146 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then | |
c906108c SS |
7147 | echo $ac_n "(cached) $ac_c" 1>&6 |
7148 | else | |
7149 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7150 | #line 7151 "configure" |
c906108c SS |
7151 | #include "confdefs.h" |
7152 | ||
97bf5e38 MK |
7153 | #define _SYSCALL32 |
7154 | #include <sys/procfs.h> | |
c906108c | 7155 | int main() { |
97bf5e38 | 7156 | psaddr_t avar |
c906108c SS |
7157 | ; return 0; } |
7158 | EOF | |
97bf5e38 | 7159 | if { (eval echo configure:7160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7160 | rm -rf conftest* |
97bf5e38 | 7161 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7162 | else |
7163 | echo "configure: failed program was:" >&5 | |
7164 | cat conftest.$ac_ext >&5 | |
7165 | rm -rf conftest* | |
97bf5e38 MK |
7166 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7167 | ||
c906108c SS |
7168 | fi |
7169 | rm -f conftest* | |
7170 | fi | |
7171 | ||
97bf5e38 MK |
7172 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7173 | cat >> confdefs.h <<\EOF | |
7174 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7175 | EOF |
7176 | ||
97bf5e38 MK |
7177 | fi |
7178 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7179 | |
97bf5e38 MK |
7180 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
7181 | echo "configure:7182: checking for prsysent_t in sys/procfs.h" >&5 | |
7182 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then | |
c906108c | 7183 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7184 | else |
7185 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7186 | #line 7187 "configure" |
c906108c SS |
7187 | #include "confdefs.h" |
7188 | ||
97bf5e38 MK |
7189 | #define _SYSCALL32 |
7190 | #include <sys/procfs.h> | |
7191 | int main() { | |
7192 | prsysent_t avar | |
7193 | ; return 0; } | |
c906108c | 7194 | EOF |
97bf5e38 MK |
7195 | if { (eval echo configure:7196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7196 | rm -rf conftest* | |
7197 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7198 | else |
7199 | echo "configure: failed program was:" >&5 | |
7200 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7201 | rm -rf conftest* |
7202 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7203 | ||
c906108c | 7204 | fi |
97bf5e38 | 7205 | rm -f conftest* |
c906108c SS |
7206 | fi |
7207 | ||
97bf5e38 MK |
7208 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7209 | cat >> confdefs.h <<\EOF | |
7210 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7211 | EOF |
7212 | ||
97bf5e38 MK |
7213 | fi |
7214 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7215 | |
97bf5e38 MK |
7216 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
7217 | echo "configure:7218: checking for pr_sigset_t in sys/procfs.h" >&5 | |
7218 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then | |
c906108c SS |
7219 | echo $ac_n "(cached) $ac_c" 1>&6 |
7220 | else | |
7221 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7222 | #line 7223 "configure" |
c906108c SS |
7223 | #include "confdefs.h" |
7224 | ||
97bf5e38 MK |
7225 | #define _SYSCALL32 |
7226 | #include <sys/procfs.h> | |
c906108c | 7227 | int main() { |
97bf5e38 | 7228 | pr_sigset_t avar |
c906108c SS |
7229 | ; return 0; } |
7230 | EOF | |
97bf5e38 | 7231 | if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7232 | rm -rf conftest* |
97bf5e38 | 7233 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7234 | else |
7235 | echo "configure: failed program was:" >&5 | |
7236 | cat conftest.$ac_ext >&5 | |
7237 | rm -rf conftest* | |
97bf5e38 MK |
7238 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7239 | ||
c906108c SS |
7240 | fi |
7241 | rm -f conftest* | |
7242 | fi | |
7243 | ||
97bf5e38 MK |
7244 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7245 | cat >> confdefs.h <<\EOF | |
7246 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7247 | EOF |
7248 | ||
97bf5e38 MK |
7249 | fi |
7250 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7251 | |
97bf5e38 MK |
7252 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
7253 | echo "configure:7254: checking for pr_sigaction64_t in sys/procfs.h" >&5 | |
7254 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then | |
c906108c | 7255 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7256 | else |
7257 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7258 | #line 7259 "configure" |
c906108c SS |
7259 | #include "confdefs.h" |
7260 | ||
97bf5e38 MK |
7261 | #define _SYSCALL32 |
7262 | #include <sys/procfs.h> | |
7263 | int main() { | |
7264 | pr_sigaction64_t avar | |
7265 | ; return 0; } | |
c906108c | 7266 | EOF |
97bf5e38 MK |
7267 | if { (eval echo configure:7268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7268 | rm -rf conftest* | |
7269 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7270 | else |
7271 | echo "configure: failed program was:" >&5 | |
7272 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7273 | rm -rf conftest* |
7274 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7275 | ||
c906108c | 7276 | fi |
97bf5e38 | 7277 | rm -f conftest* |
c906108c SS |
7278 | fi |
7279 | ||
97bf5e38 MK |
7280 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7281 | cat >> confdefs.h <<\EOF | |
7282 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7283 | EOF |
7284 | ||
97bf5e38 MK |
7285 | fi |
7286 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7287 | ||
7288 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
7289 | echo "configure:7290: checking for pr_siginfo64_t in sys/procfs.h" >&5 | |
7290 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then | |
7291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7292 | else | |
7293 | cat > conftest.$ac_ext <<EOF | |
7294 | #line 7295 "configure" | |
7295 | #include "confdefs.h" | |
7296 | ||
7297 | #define _SYSCALL32 | |
7298 | #include <sys/procfs.h> | |
7299 | int main() { | |
7300 | pr_siginfo64_t avar | |
7301 | ; return 0; } | |
7302 | EOF | |
7303 | if { (eval echo configure:7304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7304 | rm -rf conftest* | |
7305 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7306 | else | |
7307 | echo "configure: failed program was:" >&5 | |
7308 | cat conftest.$ac_ext >&5 | |
7309 | rm -rf conftest* | |
7310 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7311 | ||
7312 | fi | |
7313 | rm -f conftest* | |
c906108c | 7314 | fi |
c906108c | 7315 | |
97bf5e38 MK |
7316 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7317 | cat >> confdefs.h <<\EOF | |
7318 | #define HAVE_PR_SIGINFO64_T 1 | |
7319 | EOF | |
c906108c | 7320 | |
97bf5e38 MK |
7321 | fi |
7322 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7323 | ||
7324 | ||
7325 | ||
7326 | ||
7327 | ||
7328 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7329 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
7330 | echo "configure:7331: checking whether prfpregset_t type is broken" >&5 | |
7331 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then | |
c906108c SS |
7332 | echo $ac_n "(cached) $ac_c" 1>&6 |
7333 | else | |
7334 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7335 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7336 | else |
7337 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7338 | #line 7339 "configure" |
c906108c | 7339 | #include "confdefs.h" |
97bf5e38 MK |
7340 | #include <sys/procfs.h> |
7341 | int main () | |
7342 | { | |
7343 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7344 | return 1; | |
7345 | return 0; | |
7346 | } | |
c906108c | 7347 | EOF |
97bf5e38 | 7348 | if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7349 | then |
97bf5e38 | 7350 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7351 | else |
7352 | echo "configure: failed program was:" >&5 | |
7353 | cat conftest.$ac_ext >&5 | |
7354 | rm -fr conftest* | |
97bf5e38 | 7355 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7356 | fi |
7357 | rm -fr conftest* | |
7358 | fi | |
7359 | ||
7360 | fi | |
7361 | ||
97bf5e38 MK |
7362 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7363 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7364 | cat >> confdefs.h <<\EOF | |
7365 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7366 | EOF |
7367 | ||
97bf5e38 MK |
7368 | fi |
7369 | fi | |
c906108c | 7370 | |
97bf5e38 MK |
7371 | |
7372 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
7373 | echo "configure:7374: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 | |
7374 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then | |
c906108c SS |
7375 | echo $ac_n "(cached) $ac_c" 1>&6 |
7376 | else | |
7377 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7378 | #line 7379 "configure" |
c906108c | 7379 | #include "confdefs.h" |
97bf5e38 MK |
7380 | #include <unistd.h> |
7381 | #include <sys/types.h> | |
7382 | #include <sys/procfs.h> | |
7383 | ||
7384 | int main() { | |
7385 | ||
7386 | int dummy;; | |
7387 | dummy = ioctl(0, PIOCSET, &dummy); | |
7388 | ||
7389 | ; return 0; } | |
c906108c | 7390 | EOF |
97bf5e38 | 7391 | if { (eval echo configure:7392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7392 | rm -rf conftest* |
97bf5e38 | 7393 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7394 | else |
c906108c SS |
7395 | echo "configure: failed program was:" >&5 |
7396 | cat conftest.$ac_ext >&5 | |
7397 | rm -rf conftest* | |
97bf5e38 | 7398 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7399 | fi |
7400 | rm -f conftest* | |
7401 | fi | |
97bf5e38 MK |
7402 | |
7403 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7404 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7405 | cat >> confdefs.h <<\EOF | |
7406 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7407 | EOF |
97bf5e38 MK |
7408 | |
7409 | fi | |
c906108c | 7410 | fi |
c906108c | 7411 | |
97bf5e38 MK |
7412 | if test ${host} = ${target} ; then |
7413 | ||
7414 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
7415 | echo "configure:7416: checking for member l_addr in struct link_map" >&5 | |
7416 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then | |
c906108c SS |
7417 | echo $ac_n "(cached) $ac_c" 1>&6 |
7418 | else | |
7419 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7420 | #line 7421 "configure" |
c906108c | 7421 | #include "confdefs.h" |
97bf5e38 | 7422 | #include <link.h> |
c906108c | 7423 | int main() { |
97bf5e38 | 7424 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7425 | ; return 0; } |
7426 | EOF | |
97bf5e38 | 7427 | if { (eval echo configure:7428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7428 | rm -rf conftest* |
97bf5e38 | 7429 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7430 | else |
7431 | echo "configure: failed program was:" >&5 | |
7432 | cat conftest.$ac_ext >&5 | |
7433 | rm -rf conftest* | |
97bf5e38 | 7434 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7435 | fi |
7436 | rm -f conftest* | |
7437 | fi | |
7438 | ||
97bf5e38 MK |
7439 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7440 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7441 | cat >> confdefs.h <<\EOF | |
7442 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7443 | EOF |
97bf5e38 MK |
7444 | |
7445 | fi | |
7446 | ||
7447 | ||
7448 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
7449 | echo "configure:7450: checking for member lm_addr in struct link_map" >&5 | |
7450 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then | |
7451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 7452 | else |
97bf5e38 MK |
7453 | cat > conftest.$ac_ext <<EOF |
7454 | #line 7455 "configure" | |
7455 | #include "confdefs.h" | |
7456 | #include <sys/types.h> | |
7457 | #include <link.h> | |
7458 | int main() { | |
7459 | struct link_map lm; (void) lm.lm_addr; | |
7460 | ; return 0; } | |
7461 | EOF | |
7462 | if { (eval echo configure:7463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7463 | rm -rf conftest* | |
7464 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
7465 | else | |
7466 | echo "configure: failed program was:" >&5 | |
7467 | cat conftest.$ac_ext >&5 | |
7468 | rm -rf conftest* | |
7469 | gdb_cv_have_struct_link_map_with_lm_members=no | |
7470 | fi | |
7471 | rm -f conftest* | |
c906108c | 7472 | fi |
c906108c | 7473 | |
97bf5e38 MK |
7474 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
7475 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
7476 | cat >> confdefs.h <<\EOF | |
7477 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
7478 | EOF | |
7479 | ||
7480 | fi | |
7481 | ||
7482 | ||
7483 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
7484 | echo "configure:7485: checking for member som_addr in struct so_map" >&5 | |
7485 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then | |
c906108c | 7486 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7487 | else |
7488 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7489 | #line 7490 "configure" |
c906108c | 7490 | #include "confdefs.h" |
97bf5e38 MK |
7491 | #include <sys/types.h> |
7492 | #ifdef HAVE_NLIST_H | |
7493 | #include <nlist.h> | |
7494 | #endif | |
7495 | #include <link.h> | |
7496 | int main() { | |
7497 | struct so_map lm; (void) lm.som_addr; | |
7498 | ; return 0; } | |
7499 | EOF | |
7500 | if { (eval echo configure:7501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7501 | rm -rf conftest* | |
7502 | gdb_cv_have_struct_so_map_with_som_members=yes | |
7503 | else | |
7504 | echo "configure: failed program was:" >&5 | |
7505 | cat conftest.$ac_ext >&5 | |
7506 | rm -rf conftest* | |
7507 | gdb_cv_have_struct_so_map_with_som_members=no | |
7508 | fi | |
7509 | rm -f conftest* | |
7510 | fi | |
c906108c | 7511 | |
97bf5e38 MK |
7512 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
7513 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
7514 | cat >> confdefs.h <<\EOF | |
7515 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
7516 | EOF | |
c906108c | 7517 | |
97bf5e38 | 7518 | fi |
c906108c | 7519 | |
97bf5e38 MK |
7520 | |
7521 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
7522 | echo "configure:7523: checking for struct link_map32 in sys/link.h" >&5 | |
7523 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then | |
7524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7525 | else | |
7526 | cat > conftest.$ac_ext <<EOF | |
7527 | #line 7528 "configure" | |
7528 | #include "confdefs.h" | |
7529 | #define _SYSCALL32 | |
7530 | #include <sys/link.h> | |
7531 | int main() { | |
7532 | struct link_map32 l; | |
7533 | ; return 0; } | |
7534 | EOF | |
7535 | if { (eval echo configure:7536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7536 | rm -rf conftest* | |
7537 | gdb_cv_have_struct_link_map32=yes | |
7538 | else | |
7539 | echo "configure: failed program was:" >&5 | |
7540 | cat conftest.$ac_ext >&5 | |
7541 | rm -rf conftest* | |
7542 | gdb_cv_have_struct_link_map32=no | |
7543 | fi | |
7544 | rm -f conftest* | |
7545 | fi | |
c906108c | 7546 | |
97bf5e38 MK |
7547 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
7548 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
7549 | cat >> confdefs.h <<\EOF | |
7550 | #define HAVE_STRUCT_LINK_MAP32 1 | |
7551 | EOF | |
c906108c | 7552 | |
97bf5e38 MK |
7553 | cat >> confdefs.h <<\EOF |
7554 | #define _SYSCALL32 1 | |
7555 | EOF | |
c906108c | 7556 | |
97bf5e38 MK |
7557 | fi |
7558 | fi | |
c906108c | 7559 | |
c906108c | 7560 | |
97bf5e38 MK |
7561 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
7562 | echo "configure:7563: checking for long long support in compiler" >&5 | |
7563 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then | |
7564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7565 | else | |
7566 | cat > conftest.$ac_ext <<EOF | |
7567 | #line 7568 "configure" | |
7568 | #include "confdefs.h" | |
c906108c | 7569 | |
97bf5e38 | 7570 | int main() { |
c906108c | 7571 | |
97bf5e38 MK |
7572 | extern long long foo; |
7573 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 7574 | |
97bf5e38 MK |
7575 | ; return 0; } |
7576 | EOF | |
7577 | if { (eval echo configure:7578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7578 | rm -rf conftest* | |
7579 | gdb_cv_c_long_long=yes | |
7580 | else | |
7581 | echo "configure: failed program was:" >&5 | |
7582 | cat conftest.$ac_ext >&5 | |
7583 | rm -rf conftest* | |
7584 | gdb_cv_c_long_long=no | |
7585 | fi | |
7586 | rm -f conftest* | |
7587 | fi | |
c906108c | 7588 | |
97bf5e38 MK |
7589 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
7590 | if test $gdb_cv_c_long_long = yes; then | |
7591 | cat >> confdefs.h <<\EOF | |
7592 | #define CC_HAS_LONG_LONG 1 | |
7593 | EOF | |
7594 | ||
7595 | fi | |
7596 | ||
7597 | ||
7598 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
7599 | echo "configure:7600: checking for long long support in printf" >&5 | |
7600 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then | |
7601 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7602 | else | |
7603 | if test "$cross_compiling" = yes; then | |
7604 | gdb_cv_printf_has_long_long=no | |
7605 | else | |
7606 | cat > conftest.$ac_ext <<EOF | |
7607 | #line 7608 "configure" | |
7608 | #include "confdefs.h" | |
7609 | ||
7610 | int main () { | |
7611 | char buf[32]; | |
7612 | long long l = 0; | |
7613 | l = (l << 16) + 0x0123; | |
7614 | l = (l << 16) + 0x4567; | |
7615 | l = (l << 16) + 0x89ab; | |
7616 | l = (l << 16) + 0xcdef; | |
7617 | sprintf (buf, "0x%016llx", l); | |
7618 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 7619 | } |
97bf5e38 MK |
7620 | EOF |
7621 | if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
7622 | then | |
7623 | gdb_cv_printf_has_long_long=yes | |
7624 | else | |
7625 | echo "configure: failed program was:" >&5 | |
7626 | cat conftest.$ac_ext >&5 | |
7627 | rm -fr conftest* | |
7628 | gdb_cv_printf_has_long_long=no | |
7629 | fi | |
7630 | rm -fr conftest* | |
7631 | fi | |
7632 | ||
7633 | fi | |
7634 | ||
7635 | if test $gdb_cv_printf_has_long_long = yes; then | |
7636 | cat >> confdefs.h <<\EOF | |
7637 | #define PRINTF_HAS_LONG_LONG 1 | |
7638 | EOF | |
7639 | ||
7640 | fi | |
7641 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
7642 | ||
7643 | ||
7644 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
7645 | echo "configure:7646: checking for long double support in compiler" >&5 | |
7646 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then | |
7647 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7648 | else | |
7649 | cat > conftest.$ac_ext <<EOF | |
7650 | #line 7651 "configure" | |
7651 | #include "confdefs.h" | |
7652 | ||
7653 | int main() { | |
7654 | long double foo; | |
7655 | ; return 0; } | |
7656 | EOF | |
7657 | if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7658 | rm -rf conftest* | |
7659 | ac_cv_c_long_double=yes | |
7660 | else | |
7661 | echo "configure: failed program was:" >&5 | |
7662 | cat conftest.$ac_ext >&5 | |
7663 | rm -rf conftest* | |
7664 | ac_cv_c_long_double=no | |
7665 | fi | |
7666 | rm -f conftest* | |
7667 | fi | |
c906108c | 7668 | |
97bf5e38 MK |
7669 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
7670 | if test $ac_cv_c_long_double = yes; then | |
7671 | cat >> confdefs.h <<\EOF | |
7672 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 7673 | EOF |
97bf5e38 MK |
7674 | |
7675 | fi | |
7676 | ||
7677 | ||
7678 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
7679 | echo "configure:7680: checking for long double support in printf" >&5 | |
7680 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then | |
7681 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7682 | else | |
7683 | if test "$cross_compiling" = yes; then | |
7684 | gdb_cv_printf_has_long_double=no | |
7685 | else | |
7686 | cat > conftest.$ac_ext <<EOF | |
7687 | #line 7688 "configure" | |
7688 | #include "confdefs.h" | |
7689 | ||
7690 | int main () { | |
7691 | char buf[16]; | |
7692 | long double f = 3.141592653; | |
7693 | sprintf (buf, "%Lg", f); | |
7694 | return (strncmp ("3.14159", buf, 7)); | |
7695 | } | |
7696 | EOF | |
7697 | if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
c906108c | 7698 | then |
97bf5e38 | 7699 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
7700 | else |
7701 | echo "configure: failed program was:" >&5 | |
7702 | cat conftest.$ac_ext >&5 | |
7703 | rm -fr conftest* | |
97bf5e38 | 7704 | gdb_cv_printf_has_long_double=no |
c906108c SS |
7705 | fi |
7706 | rm -fr conftest* | |
7707 | fi | |
7708 | ||
7709 | fi | |
7710 | ||
97bf5e38 | 7711 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 7712 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
7713 | #define PRINTF_HAS_LONG_DOUBLE 1 |
7714 | EOF | |
7715 | ||
7716 | fi | |
7717 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
7718 | ||
7719 | ||
7720 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
7721 | echo "configure:7722: checking for long double support in scanf" >&5 | |
7722 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then | |
7723 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7724 | else | |
7725 | if test "$cross_compiling" = yes; then | |
7726 | gdb_cv_scanf_has_long_double=no | |
7727 | else | |
7728 | cat > conftest.$ac_ext <<EOF | |
7729 | #line 7730 "configure" | |
7730 | #include "confdefs.h" | |
7731 | ||
7732 | int main () { | |
7733 | char *buf = "3.141592653"; | |
7734 | long double f = 0; | |
7735 | sscanf (buf, "%Lg", &f); | |
7736 | return !(f > 3.14159 && f < 3.14160); | |
7737 | } | |
c906108c | 7738 | EOF |
97bf5e38 MK |
7739 | if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
7740 | then | |
7741 | gdb_cv_scanf_has_long_double=yes | |
7742 | else | |
7743 | echo "configure: failed program was:" >&5 | |
7744 | cat conftest.$ac_ext >&5 | |
7745 | rm -fr conftest* | |
7746 | gdb_cv_scanf_has_long_double=no | |
7747 | fi | |
7748 | rm -fr conftest* | |
7749 | fi | |
c906108c SS |
7750 | |
7751 | fi | |
7752 | ||
97bf5e38 MK |
7753 | if test $gdb_cv_scanf_has_long_double = yes; then |
7754 | cat >> confdefs.h <<\EOF | |
7755 | #define SCANF_HAS_LONG_DOUBLE 1 | |
7756 | EOF | |
7757 | ||
7758 | fi | |
7759 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 7760 | |
438013df AO |
7761 | case ${host_os} in |
7762 | aix*) | |
7763 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
97bf5e38 | 7764 | echo "configure:7765: checking for -bbigtoc option" >&5 |
438013df AO |
7765 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
7766 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7767 | else | |
7768 | ||
7769 | SAVE_LDFLAGS=$LDFLAGS | |
7770 | ||
7771 | case $GCC in | |
7772 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
7773 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
7774 | esac | |
7775 | ||
7776 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
7777 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7778 | #line 7779 "configure" |
438013df AO |
7779 | #include "confdefs.h" |
7780 | ||
7781 | int main() { | |
7782 | int i; | |
7783 | ; return 0; } | |
7784 | EOF | |
97bf5e38 | 7785 | if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
7786 | : |
7787 | else | |
7788 | echo "configure: failed program was:" >&5 | |
7789 | cat conftest.$ac_ext >&5 | |
7790 | rm -rf conftest* | |
7791 | gdb_cv_bigtoc= | |
7792 | fi | |
7793 | rm -f conftest* | |
7794 | ||
7795 | fi | |
7796 | ||
7797 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
7798 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
7799 | ;; | |
7800 | esac | |
7801 | ||
c906108c SS |
7802 | |
7803 | ||
7804 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
7805 | case ${host_os} in | |
7806 | hpux*) | |
7807 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
97bf5e38 | 7808 | echo "configure:7809: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
7809 | if test -f /usr/include/dce/cma_config.h ; then |
7810 | if test "$GCC" = "yes" ; then | |
7811 | echo "$ac_t""yes" 1>&6 | |
7812 | cat >> confdefs.h <<\EOF | |
7813 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
7814 | EOF | |
7815 | ||
66b965bb | 7816 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
7817 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
7818 | else | |
7819 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
7820 | fi | |
7821 | else | |
7822 | echo "$ac_t""no" 1>&6 | |
7823 | fi | |
7824 | ;; | |
7825 | solaris*) | |
d92419e5 JB |
7826 | # See if thread_db library is around for Solaris thread debugging. |
7827 | # Note that we must explicitly test for version 1 of the library | |
7828 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
7829 | # the same API. | |
c906108c | 7830 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
97bf5e38 | 7831 | echo "configure:7832: checking for Solaris thread debugging library" >&5 |
c906108c SS |
7832 | if test -f /usr/lib/libthread_db.so.1 ; then |
7833 | echo "$ac_t""yes" 1>&6 | |
7834 | cat >> confdefs.h <<\EOF | |
7835 | #define HAVE_THREAD_DB_LIB 1 | |
7836 | EOF | |
7837 | ||
66b965bb | 7838 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
7839 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
7840 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
97bf5e38 | 7841 | echo "configure:7842: checking for dlopen in -ldl" >&5 |
c906108c SS |
7842 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
7843 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
7844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7845 | else | |
7846 | ac_save_LIBS="$LIBS" | |
7847 | LIBS="-ldl $LIBS" | |
7848 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7849 | #line 7850 "configure" |
c906108c SS |
7850 | #include "confdefs.h" |
7851 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7852 | /* We use char because int might match the return type of a gcc2 | |
7853 | builtin and then its argument prototype would still apply. */ | |
7854 | char dlopen(); | |
7855 | ||
7856 | int main() { | |
7857 | dlopen() | |
7858 | ; return 0; } | |
7859 | EOF | |
97bf5e38 | 7860 | if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7861 | rm -rf conftest* |
7862 | eval "ac_cv_lib_$ac_lib_var=yes" | |
7863 | else | |
7864 | echo "configure: failed program was:" >&5 | |
7865 | cat conftest.$ac_ext >&5 | |
7866 | rm -rf conftest* | |
7867 | eval "ac_cv_lib_$ac_lib_var=no" | |
7868 | fi | |
7869 | rm -f conftest* | |
7870 | LIBS="$ac_save_LIBS" | |
7871 | ||
7872 | fi | |
7873 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
7874 | echo "$ac_t""yes" 1>&6 | |
7875 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
7876 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
7877 | cat >> confdefs.h <<EOF | |
7878 | #define $ac_tr_lib 1 | |
7879 | EOF | |
7880 | ||
7881 | LIBS="-ldl $LIBS" | |
7882 | ||
7883 | else | |
7884 | echo "$ac_t""no" 1>&6 | |
7885 | fi | |
7886 | ||
7887 | if test "$GCC" = "yes" ; then | |
7888 | # The GNU linker requires the -export-dynamic option to make | |
7889 | # all symbols visible in the dynamic symbol table. | |
7890 | hold_ldflags=$LDFLAGS | |
7891 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
97bf5e38 | 7892 | echo "configure:7893: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
7893 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
7894 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7895 | #line 7896 "configure" |
c906108c SS |
7896 | #include "confdefs.h" |
7897 | ||
7898 | int main() { | |
7899 | int i; | |
7900 | ; return 0; } | |
7901 | EOF | |
97bf5e38 | 7902 | if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
7903 | rm -rf conftest* |
7904 | found=yes | |
7905 | else | |
7906 | echo "configure: failed program was:" >&5 | |
7907 | cat conftest.$ac_ext >&5 | |
7908 | rm -rf conftest* | |
7909 | found=no | |
7910 | fi | |
7911 | rm -f conftest* | |
7912 | LDFLAGS=$hold_ldflags | |
7913 | echo "$ac_t""$found" 1>&6 | |
7914 | if test $found = yes; then | |
7915 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
7916 | fi | |
7917 | fi | |
7918 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
7919 | # at one point. | |
7920 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
97bf5e38 | 7921 | echo "configure:7922: checking if <proc_service.h> is old" >&5 |
c906108c SS |
7922 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
7923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7924 | else | |
7925 | ||
7926 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7927 | #line 7928 "configure" |
c906108c SS |
7928 | #include "confdefs.h" |
7929 | ||
7930 | #include <proc_service.h> | |
7931 | ps_err_e ps_pdwrite | |
7932 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
7933 | ||
7934 | int main() { | |
7935 | ||
7936 | ; return 0; } | |
7937 | EOF | |
97bf5e38 | 7938 | if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
7939 | rm -rf conftest* |
7940 | gdb_cv_proc_service_is_old=no | |
7941 | else | |
7942 | echo "configure: failed program was:" >&5 | |
7943 | cat conftest.$ac_ext >&5 | |
7944 | rm -rf conftest* | |
7945 | gdb_cv_proc_service_is_old=yes | |
7946 | fi | |
7947 | rm -f conftest* | |
7948 | ||
7949 | fi | |
7950 | ||
7951 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
7952 | if test $gdb_cv_proc_service_is_old = yes; then | |
7953 | cat >> confdefs.h <<\EOF | |
7954 | #define PROC_SERVICE_IS_OLD 1 | |
7955 | EOF | |
7956 | ||
7957 | fi | |
7958 | else | |
7959 | echo "$ac_t""no" 1>&6 | |
7960 | fi | |
7961 | ;; | |
d92419e5 JB |
7962 | aix*) |
7963 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
97bf5e38 | 7964 | echo "configure:7965: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
7965 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
7966 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7967 | else | |
7968 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 7969 | #line 7970 "configure" |
d92419e5 JB |
7970 | #include "confdefs.h" |
7971 | #include <sys/pthdebug.h> | |
7972 | int main() { | |
7973 | #ifndef PTHDB_VERSION_3 | |
7974 | #error | |
7975 | #endif | |
7976 | ; return 0; } | |
7977 | EOF | |
97bf5e38 | 7978 | if { (eval echo configure:7979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
7979 | rm -rf conftest* |
7980 | gdb_cv_have_aix_thread_debug=yes | |
7981 | else | |
7982 | echo "configure: failed program was:" >&5 | |
7983 | cat conftest.$ac_ext >&5 | |
7984 | rm -rf conftest* | |
7985 | gdb_cv_have_aix_thread_debug=no | |
7986 | fi | |
7987 | rm -f conftest* | |
7988 | fi | |
7989 | ||
7990 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
7991 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
7992 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
7993 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
7994 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
7995 | fi | |
7996 | ;; | |
c906108c SS |
7997 | esac |
7998 | ||
7999 | fi | |
8000 | ||
3f47be5c EZ |
8001 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8002 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
97bf5e38 | 8003 | echo "configure:8004: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8004 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8005 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8006 | else | |
8007 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8008 | #line 8009 "configure" |
3f47be5c EZ |
8009 | #include "confdefs.h" |
8010 | #include <thread_db.h> | |
8011 | int main() { | |
8012 | int i = TD_NOTALLOC; | |
8013 | ; return 0; } | |
8014 | EOF | |
97bf5e38 | 8015 | if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8016 | rm -rf conftest* |
8017 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8018 | else | |
8019 | echo "configure: failed program was:" >&5 | |
8020 | cat conftest.$ac_ext >&5 | |
8021 | rm -rf conftest* | |
8022 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8023 | ||
8024 | fi | |
8025 | rm -f conftest* | |
8026 | ||
8027 | fi | |
8028 | ||
8029 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8030 | fi | |
8031 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8032 | cat >> confdefs.h <<\EOF | |
8033 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8034 | EOF | |
8035 | ||
8036 | fi | |
8037 | ||
eb784848 DJ |
8038 | if test $host = $target; then |
8039 | case $target in | |
8040 | *-linux*) | |
8041 | save_CFLAGS=$CFLAGS | |
8042 | CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8043 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8044 | #line 8045 "configure" |
eb784848 DJ |
8045 | #include "confdefs.h" |
8046 | #include <unistd.h> | |
8047 | int main() { | |
8048 | pread64 (0, NULL, 0, 0); | |
8049 | ; return 0; } | |
8050 | EOF | |
97bf5e38 | 8051 | if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
eb784848 DJ |
8052 | rm -rf conftest* |
8053 | ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8054 | cat >> confdefs.h <<\EOF | |
8055 | #define HAVE_PREAD64 1 | |
8056 | EOF | |
8057 | ||
8058 | else | |
8059 | echo "configure: failed program was:" >&5 | |
8060 | cat conftest.$ac_ext >&5 | |
8061 | fi | |
8062 | rm -f conftest* | |
8063 | CFLAGS=$save_CFLAGS | |
8064 | ;; | |
8065 | esac | |
8066 | fi | |
8067 | ||
fb40c209 | 8068 | |
d318976c FN |
8069 | # Check whether --enable-gdbcli or --disable-gdbcli was given. |
8070 | if test "${enable_gdbcli+set}" = set; then | |
8071 | enableval="$enable_gdbcli" | |
8072 | ||
6bad8db2 FN |
8073 | case "${enableval}" in |
8074 | yes) enable_gdbcli=yes ;; | |
8075 | "") enable_gdbcli=yes ;; | |
d318976c FN |
8076 | no) |
8077 | { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; } | |
8078 | ;; | |
8079 | *) | |
6bad8db2 | 8080 | { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; } |
d318976c FN |
8081 | ;; |
8082 | esac | |
8083 | ||
8084 | else | |
8085 | enable_gdbcli=yes | |
8086 | fi | |
8087 | ||
8088 | case ${enable_gdbcli} in | |
8089 | "yes" ) | |
6bad8db2 | 8090 | if test -d "${srcdir}/cli" ; then |
d318976c FN |
8091 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)" |
8092 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)" | |
486697a0 | 8093 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)" |
d318976c FN |
8094 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)" |
8095 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)" | |
8096 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)" | |
8097 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)" | |
8098 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)" | |
8099 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)" | |
8100 | fi | |
8101 | ;; | |
8102 | esac | |
8103 | ||
8104 | ||
fb40c209 AC |
8105 | # Check whether --enable-gdbmi or --disable-gdbmi was given. |
8106 | if test "${enable_gdbmi+set}" = set; then | |
8107 | enableval="$enable_gdbmi" | |
8108 | ||
8109 | case "${enable_gdbmi}" in | |
8110 | yes | no) ;; | |
8111 | "") enable_gdbmi=yes ;; | |
8112 | *) | |
8113 | { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } | |
8114 | ;; | |
8115 | esac | |
8116 | ||
b0e2e90a AC |
8117 | else |
8118 | enable_gdbmi=yes | |
fb40c209 AC |
8119 | fi |
8120 | ||
8121 | case ${enable_gdbmi} in | |
8122 | "yes" ) | |
8123 | if test -d "${srcdir}/mi" ; then | |
8124 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
8125 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
486697a0 | 8126 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)" |
fb40c209 | 8127 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" |
b0b1b869 | 8128 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
b3a90332 AC |
8129 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" |
8130 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" | |
e56ac5c3 AC |
8131 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
8132 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
8133 | fi |
8134 | ;; | |
8135 | esac | |
c906108c | 8136 | |
b4df4f68 FN |
8137 | # Configure UI_OUT by default (before 5.2 it can be disabled) |
8138 | # It must be configured if gdbmi is configured | |
8139 | ||
8140 | UIOUT_CFLAGS= | |
8141 | ||
8142 | ||
8143 | # Check whether --with-uiout or --without-uiout was given. | |
8144 | if test "${with_uiout+set}" = set; then | |
8145 | withval="$with_uiout" | |
8146 | case "${withval}" in | |
8147 | yes) want_uiout=true ;; | |
8148 | no) if test $enable_gdbmi = yes; then | |
8149 | { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; } | |
8150 | else | |
8151 | want_uiout=false | |
8152 | fi ;; | |
8153 | *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;; | |
8154 | esac | |
8155 | else | |
8156 | want_uiout=true | |
8157 | fi | |
8158 | ||
8159 | if test $want_uiout = true; then | |
8160 | UIOUT_CFLAGS="-DUI_OUT=1" | |
8161 | fi | |
8162 | ||
c906108c SS |
8163 | # Check whether --enable-tui or --disable-tui was given. |
8164 | if test "${enable_tui+set}" = set; then | |
8165 | enableval="$enable_tui" | |
8166 | ||
8167 | case "${enable_tui}" in | |
8168 | yes | no) ;; | |
8169 | "") enable_tui=yes ;; | |
8170 | *) | |
8171 | { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } | |
8172 | ;; | |
8173 | esac | |
8174 | ||
8175 | fi | |
8176 | ||
8177 | case ${enable_tui} in | |
8178 | "yes" ) | |
ed952ac5 AC |
8179 | if test -d "${srcdir}/tui" ; then |
8180 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" | |
8181 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" | |
486697a0 | 8182 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)" |
ed952ac5 AC |
8183 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" |
8184 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" | |
8185 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" | |
8186 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" | |
8187 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" | |
8188 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" | |
8189 | fi | |
8190 | ;; | |
c906108c SS |
8191 | esac |
8192 | ||
c906108c SS |
8193 | # Check whether --enable-netrom or --disable-netrom was given. |
8194 | if test "${enable_netrom+set}" = set; then | |
8195 | enableval="$enable_netrom" | |
8196 | case "${enableval}" in | |
8197 | yes) enable_netrom=yes ;; | |
8198 | no) enable_netrom=no ;; | |
8199 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
8200 | esac | |
8201 | fi | |
8202 | ||
8203 | ||
8204 | if test "${enable_netrom}" = "yes"; then | |
66b965bb | 8205 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" |
c906108c SS |
8206 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
8207 | fi | |
8208 | ||
1decb323 | 8209 | |
3b851bce AC |
8210 | # NOTE: Don't add -Wall or -Wunused, they both include |
8211 | # -Wunused-parameter which reports bogus warnings. | |
8212 | # NOTE: If you add to this list, remember to update | |
8213 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8214 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8215 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8216 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8217 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8218 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8219 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8220 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8221 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8222 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8223 | if test "${enable_build_warnings+set}" = set; then | |
8224 | enableval="$enable_build_warnings" | |
1decb323 | 8225 | case "${enableval}" in |
c906108c SS |
8226 | yes) ;; |
8227 | no) build_warnings="-w";; | |
8228 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8229 | build_warnings="${build_warnings} ${t}";; | |
8230 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8231 | build_warnings="${t} ${build_warnings}";; | |
8232 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8233 | esac | |
d4f3574e | 8234 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8235 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8236 | fi |
1decb323 | 8237 | fi |
3b851bce AC |
8238 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8239 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8240 | enableval="$enable_gdb_build_warnings" | |
8241 | case "${enableval}" in | |
8242 | yes) ;; | |
8243 | no) build_warnings="-w";; | |
8244 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8245 | build_warnings="${build_warnings} ${t}";; | |
8246 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8247 | build_warnings="${t} ${build_warnings}";; | |
8248 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8249 | esac | |
8250 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8251 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8252 | fi | |
8253 | fi | |
104c1213 JM |
8254 | WARN_CFLAGS="" |
8255 | WERROR_CFLAGS="" | |
c906108c SS |
8256 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8257 | then | |
746a987d | 8258 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
97bf5e38 | 8259 | echo "configure:8260: checking compiler warning flags" >&5 |
746a987d AC |
8260 | # Separate out the -Werror flag as some files just cannot be |
8261 | # compiled with it enabled. | |
8262 | for w in ${build_warnings}; do | |
8263 | case $w in | |
8264 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8265 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8266 | saved_CFLAGS="$CFLAGS" |
8267 | CFLAGS="$CFLAGS $w" | |
8268 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8269 | #line 8270 "configure" |
4536bbc6 AC |
8270 | #include "confdefs.h" |
8271 | ||
8272 | int main() { | |
8273 | ||
8274 | ; return 0; } | |
8275 | EOF | |
97bf5e38 | 8276 | if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8277 | rm -rf conftest* |
8278 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8279 | else | |
8280 | echo "configure: failed program was:" >&5 | |
8281 | cat conftest.$ac_ext >&5 | |
8282 | fi | |
8283 | rm -f conftest* | |
8284 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8285 | esac |
8286 | done | |
8287 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8288 | fi |
8289 | ||
8290 | ||
104c1213 | 8291 | |
c906108c SS |
8292 | MMALLOC_CFLAGS= |
8293 | MMALLOC= | |
8294 | ||
8295 | ||
8296 | ||
8297 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8298 | if test "${with_mmalloc+set}" = set; then | |
8299 | withval="$with_mmalloc" | |
8300 | case "${withval}" in | |
8301 | yes) want_mmalloc=true ;; | |
8302 | no) want_mmalloc=false;; | |
8303 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8304 | esac | |
8305 | else | |
8306 | want_mmalloc=false | |
8307 | fi | |
8308 | ||
8309 | if test x$want_mmalloc = xtrue; then | |
8310 | cat >> confdefs.h <<\EOF | |
8311 | #define USE_MMALLOC 1 | |
8312 | EOF | |
8313 | ||
8314 | cat >> confdefs.h <<\EOF | |
8315 | #define MMCHECK_FORCE 1 | |
8316 | EOF | |
8317 | ||
8318 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8319 | MMALLOC='../mmalloc/libmmalloc.a' | |
8320 | fi | |
8321 | ||
88987551 L |
8322 | # Check whether --with-included-regex or --without-included-regex was given. |
8323 | if test "${with_included_regex+set}" = set; then | |
8324 | withval="$with_included_regex" | |
8325 | case "${withval}" in | |
8326 | yes) want_included_regex=true ;; | |
8327 | no) want_included_regex=false;; | |
8328 | *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; | |
8329 | esac | |
8330 | else | |
8331 | want_included_regex=true | |
8332 | fi | |
8333 | ||
88987551 L |
8334 | if test $want_included_regex = false; then |
8335 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
97bf5e38 | 8336 | echo "configure:8337: checking for GNU regex" >&5 |
88987551 L |
8337 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
8338 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8339 | else | |
8340 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8341 | #line 8342 "configure" |
88987551 L |
8342 | #include "confdefs.h" |
8343 | #include <gnu-versions.h> | |
8344 | #include <sys/types.h> | |
8345 | #include <regex.h> | |
8346 | int main() { | |
8347 | #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 | |
8348 | #error No valid GNU regex. | |
8349 | #endif | |
8350 | ||
8351 | ; return 0; } | |
8352 | EOF | |
97bf5e38 | 8353 | if { (eval echo configure:8354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
88987551 L |
8354 | rm -rf conftest* |
8355 | gdb_cv_have_gnu_regex=yes | |
8356 | else | |
8357 | echo "configure: failed program was:" >&5 | |
8358 | cat conftest.$ac_ext >&5 | |
8359 | rm -rf conftest* | |
8360 | gdb_cv_have_gnu_regex=no | |
8361 | fi | |
8362 | rm -f conftest* | |
8363 | fi | |
8364 | ||
8365 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
e48f66e4 AC |
8366 | if test $gdb_cv_have_gnu_regex = no; then |
8367 | want_included_regex=true | |
88987551 L |
8368 | fi |
8369 | fi | |
8370 | ||
e48f66e4 AC |
8371 | if test x${want_included_regex} = xtrue; then |
8372 | REGEX="gnu-regex.o" | |
8373 | cat >> confdefs.h <<\EOF | |
8374 | #define USE_INCLUDED_REGEX 1 | |
8375 | EOF | |
8376 | ||
8377 | fi | |
88987551 | 8378 | |
7a292a7a SS |
8379 | |
8380 | # In the Cygwin environment, we need some additional flags. | |
8381 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
97bf5e38 | 8382 | echo "configure:8383: checking for cygwin" >&5 |
7a292a7a SS |
8383 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8384 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8385 | else | |
8386 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8387 | #line 8388 "configure" |
7a292a7a SS |
8388 | #include "confdefs.h" |
8389 | ||
8390 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8391 | lose | |
8392 | #endif | |
8393 | EOF | |
8394 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8395 | egrep "lose" >/dev/null 2>&1; then | |
8396 | rm -rf conftest* | |
8397 | gdb_cv_os_cygwin=yes | |
8398 | else | |
8399 | rm -rf conftest* | |
8400 | gdb_cv_os_cygwin=no | |
8401 | fi | |
8402 | rm -f conftest* | |
8403 | ||
8404 | fi | |
8405 | ||
8406 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8407 | ||
aff38e61 AC |
8408 | |
8409 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8410 | case ${host} in | |
95cbc983 AC |
8411 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8412 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8413 | esac |
8414 | ||
8415 | ||
8416 | ||
b83266a0 SS |
8417 | if test x$gdb_host = xgo32; then |
8418 | TERM_LIB= | |
8419 | else | |
c906108c SS |
8420 | if test x$gdb_cv_os_cygwin = xyes; then |
8421 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
8422 | else | |
8423 | TERM_LIB= | |
8424 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 | |
97bf5e38 | 8425 | echo "configure:8426: checking for tgetent in -lncurses" >&5 |
c906108c SS |
8426 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
8427 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8428 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8429 | else | |
8430 | ac_save_LIBS="$LIBS" | |
8431 | LIBS="-lncurses $LIBS" | |
8432 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8433 | #line 8434 "configure" |
c906108c SS |
8434 | #include "confdefs.h" |
8435 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8436 | /* We use char because int might match the return type of a gcc2 | |
8437 | builtin and then its argument prototype would still apply. */ | |
8438 | char tgetent(); | |
8439 | ||
8440 | int main() { | |
8441 | tgetent() | |
8442 | ; return 0; } | |
8443 | EOF | |
97bf5e38 | 8444 | if { (eval echo configure:8445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8445 | rm -rf conftest* |
8446 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8447 | else | |
8448 | echo "configure: failed program was:" >&5 | |
8449 | cat conftest.$ac_ext >&5 | |
8450 | rm -rf conftest* | |
8451 | eval "ac_cv_lib_$ac_lib_var=no" | |
8452 | fi | |
8453 | rm -f conftest* | |
8454 | LIBS="$ac_save_LIBS" | |
8455 | ||
8456 | fi | |
8457 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8458 | echo "$ac_t""yes" 1>&6 | |
8459 | TERM_LIB=-lncurses | |
8460 | else | |
8461 | echo "$ac_t""no" 1>&6 | |
8462 | echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 | |
97bf5e38 | 8463 | echo "configure:8464: checking for tgetent in -lHcurses" >&5 |
c906108c SS |
8464 | ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` |
8465 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8466 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8467 | else | |
8468 | ac_save_LIBS="$LIBS" | |
8469 | LIBS="-lHcurses $LIBS" | |
8470 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8471 | #line 8472 "configure" |
c906108c SS |
8472 | #include "confdefs.h" |
8473 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8474 | /* We use char because int might match the return type of a gcc2 | |
8475 | builtin and then its argument prototype would still apply. */ | |
8476 | char tgetent(); | |
8477 | ||
8478 | int main() { | |
8479 | tgetent() | |
8480 | ; return 0; } | |
8481 | EOF | |
97bf5e38 | 8482 | if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8483 | rm -rf conftest* |
8484 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8485 | else | |
8486 | echo "configure: failed program was:" >&5 | |
8487 | cat conftest.$ac_ext >&5 | |
8488 | rm -rf conftest* | |
8489 | eval "ac_cv_lib_$ac_lib_var=no" | |
8490 | fi | |
8491 | rm -f conftest* | |
8492 | LIBS="$ac_save_LIBS" | |
8493 | ||
8494 | fi | |
8495 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8496 | echo "$ac_t""yes" 1>&6 | |
8497 | TERM_LIB=-lHcurses | |
8498 | else | |
8499 | echo "$ac_t""no" 1>&6 | |
8500 | echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 | |
97bf5e38 | 8501 | echo "configure:8502: checking for tgetent in -ltermlib" >&5 |
c906108c SS |
8502 | ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` |
8503 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8504 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8505 | else | |
8506 | ac_save_LIBS="$LIBS" | |
8507 | LIBS="-ltermlib $LIBS" | |
8508 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8509 | #line 8510 "configure" |
c906108c SS |
8510 | #include "confdefs.h" |
8511 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8512 | /* We use char because int might match the return type of a gcc2 | |
8513 | builtin and then its argument prototype would still apply. */ | |
8514 | char tgetent(); | |
8515 | ||
8516 | int main() { | |
8517 | tgetent() | |
8518 | ; return 0; } | |
8519 | EOF | |
97bf5e38 | 8520 | if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8521 | rm -rf conftest* |
8522 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8523 | else | |
8524 | echo "configure: failed program was:" >&5 | |
8525 | cat conftest.$ac_ext >&5 | |
8526 | rm -rf conftest* | |
8527 | eval "ac_cv_lib_$ac_lib_var=no" | |
8528 | fi | |
8529 | rm -f conftest* | |
8530 | LIBS="$ac_save_LIBS" | |
8531 | ||
8532 | fi | |
8533 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8534 | echo "$ac_t""yes" 1>&6 | |
8535 | TERM_LIB=-ltermlib | |
8536 | else | |
8537 | echo "$ac_t""no" 1>&6 | |
8538 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 | |
97bf5e38 | 8539 | echo "configure:8540: checking for tgetent in -ltermcap" >&5 |
c906108c SS |
8540 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
8541 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8543 | else | |
8544 | ac_save_LIBS="$LIBS" | |
8545 | LIBS="-ltermcap $LIBS" | |
8546 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8547 | #line 8548 "configure" |
c906108c SS |
8548 | #include "confdefs.h" |
8549 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8550 | /* We use char because int might match the return type of a gcc2 | |
8551 | builtin and then its argument prototype would still apply. */ | |
8552 | char tgetent(); | |
8553 | ||
8554 | int main() { | |
8555 | tgetent() | |
8556 | ; return 0; } | |
8557 | EOF | |
97bf5e38 | 8558 | if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8559 | rm -rf conftest* |
8560 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8561 | else | |
8562 | echo "configure: failed program was:" >&5 | |
8563 | cat conftest.$ac_ext >&5 | |
8564 | rm -rf conftest* | |
8565 | eval "ac_cv_lib_$ac_lib_var=no" | |
8566 | fi | |
8567 | rm -f conftest* | |
8568 | LIBS="$ac_save_LIBS" | |
8569 | ||
8570 | fi | |
8571 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8572 | echo "$ac_t""yes" 1>&6 | |
8573 | TERM_LIB=-ltermcap | |
8574 | else | |
8575 | echo "$ac_t""no" 1>&6 | |
8576 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 | |
97bf5e38 | 8577 | echo "configure:8578: checking for tgetent in -lcurses" >&5 |
c906108c SS |
8578 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
8579 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8581 | else | |
8582 | ac_save_LIBS="$LIBS" | |
8583 | LIBS="-lcurses $LIBS" | |
8584 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8585 | #line 8586 "configure" |
c906108c SS |
8586 | #include "confdefs.h" |
8587 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8588 | /* We use char because int might match the return type of a gcc2 | |
8589 | builtin and then its argument prototype would still apply. */ | |
8590 | char tgetent(); | |
8591 | ||
8592 | int main() { | |
8593 | tgetent() | |
8594 | ; return 0; } | |
8595 | EOF | |
97bf5e38 | 8596 | if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8597 | rm -rf conftest* |
8598 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8599 | else | |
8600 | echo "configure: failed program was:" >&5 | |
8601 | cat conftest.$ac_ext >&5 | |
8602 | rm -rf conftest* | |
8603 | eval "ac_cv_lib_$ac_lib_var=no" | |
8604 | fi | |
8605 | rm -f conftest* | |
8606 | LIBS="$ac_save_LIBS" | |
8607 | ||
8608 | fi | |
8609 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8610 | echo "$ac_t""yes" 1>&6 | |
8611 | TERM_LIB=-lcurses | |
8612 | else | |
8613 | echo "$ac_t""no" 1>&6 | |
8614 | echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 | |
97bf5e38 | 8615 | echo "configure:8616: checking for tgetent in -lterminfo" >&5 |
c906108c SS |
8616 | ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` |
8617 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8618 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8619 | else | |
8620 | ac_save_LIBS="$LIBS" | |
8621 | LIBS="-lterminfo $LIBS" | |
8622 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 8623 | #line 8624 "configure" |
c906108c SS |
8624 | #include "confdefs.h" |
8625 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8626 | /* We use char because int might match the return type of a gcc2 | |
8627 | builtin and then its argument prototype would still apply. */ | |
8628 | char tgetent(); | |
8629 | ||
8630 | int main() { | |
8631 | tgetent() | |
8632 | ; return 0; } | |
8633 | EOF | |
97bf5e38 | 8634 | if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8635 | rm -rf conftest* |
8636 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8637 | else | |
8638 | echo "configure: failed program was:" >&5 | |
8639 | cat conftest.$ac_ext >&5 | |
8640 | rm -rf conftest* | |
8641 | eval "ac_cv_lib_$ac_lib_var=no" | |
8642 | fi | |
8643 | rm -f conftest* | |
8644 | LIBS="$ac_save_LIBS" | |
8645 | ||
8646 | fi | |
8647 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8648 | echo "$ac_t""yes" 1>&6 | |
8649 | TERM_LIB=-lterminfo | |
8650 | else | |
8651 | echo "$ac_t""no" 1>&6 | |
8652 | fi | |
8653 | ||
8654 | fi | |
8655 | ||
8656 | fi | |
8657 | ||
8658 | fi | |
8659 | ||
8660 | fi | |
8661 | ||
8662 | fi | |
8663 | ||
8664 | ||
8665 | if test "x$TERM_LIB" = x | |
8666 | then | |
8667 | { echo "configure: error: Could not find a term library" 1>&2; exit 1; } | |
8668 | fi | |
8669 | fi | |
b83266a0 | 8670 | fi |
c906108c SS |
8671 | |
8672 | ||
cd0fc7c3 SS |
8673 | # libreadline needs libuser32.a in a cygwin environment |
8674 | WIN32LIBS= | |
8675 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8676 | WIN32LIBS="-luser32" |
8677 | case "${target}" in | |
8678 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8679 | ;; | |
8680 | esac | |
cd0fc7c3 | 8681 | fi |
c906108c | 8682 | |
7a292a7a | 8683 | |
3fc11d3e JM |
8684 | LIBGUI="../libgui/src/libgui.a" |
8685 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8686 | ||
8687 | ||
7a292a7a | 8688 | |
8b93c638 JM |
8689 | # Check whether --with-cpu or --without-cpu was given. |
8690 | if test "${with_cpu+set}" = set; then | |
8691 | withval="$with_cpu" | |
8692 | case "${target}" in | |
8693 | powerpc-* | powerpcle-* ) | |
8694 | ## It would be nice to keep this table in sync with the one in | |
8695 | ## gcc/configure. | |
8696 | case "${with_cpu}" in | |
8697 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
8698 | | 604 | 750 ) | |
8699 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
8700 | ;; | |
8701 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
8702 | ## These are all RS6000 variants, as far as GDB is concerned. | |
8703 | with_cpu=rs6000 | |
8704 | ;; | |
8705 | 603e | ec603e ) | |
8706 | with_cpu=603 | |
8707 | ;; | |
8708 | 604e ) | |
8709 | with_cpu=604 | |
8710 | ;; | |
8711 | * ) | |
8712 | echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 | |
8713 | with_cpu=ppc-uisa | |
8714 | ;; | |
8715 | esac | |
8716 | ;; | |
8717 | * ) | |
8718 | echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 | |
8719 | ;; | |
8720 | esac | |
8721 | cat >> confdefs.h <<EOF | |
8722 | #define TARGET_CPU_DEFAULT "${with_cpu}" | |
8723 | EOF | |
8724 | ||
8725 | ||
8726 | fi | |
8727 | ||
8728 | ||
8729 | ||
3fc11d3e JM |
8730 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
8731 | if test "${enable_gdbtk+set}" = set; then | |
8732 | enableval="$enable_gdbtk" | |
8733 | case "${enableval}" in | |
8734 | yes) | |
8735 | case "$host" in | |
8736 | *go32*) | |
8737 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8738 | enable_gdbtk=no ;; | |
8739 | *windows*) | |
8740 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8741 | enable_gdbtk=no ;; | |
8742 | *) | |
8743 | enable_gdbtk=yes ;; | |
8744 | esac ;; | |
8745 | no) | |
8746 | enable_gdbtk=no ;; | |
8747 | *) | |
8748 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
8749 | esac | |
8750 | else | |
8751 | ||
8752 | # Default is on for everything but go32 and Cygwin | |
8753 | case "$host" in | |
8754 | *go32* | *windows*) | |
8755 | ;; | |
8756 | *) | |
379d6434 AC |
8757 | if test -d "${srcdir}/gdbtk" ; then |
8758 | enable_gdbtk=yes | |
8759 | fi | |
8760 | ;; | |
8761 | esac | |
3fc11d3e JM |
8762 | |
8763 | fi | |
8764 | ||
8765 | ||
8766 | WIN32LDAPP= | |
8767 | ||
8768 | ||
8769 | ||
8770 | configdir="unix" | |
8771 | ||
8772 | GDBTKLIBS= | |
8773 | if test "${enable_gdbtk}" = "yes"; then | |
8774 | ||
d1c3b63a KS |
8775 | # Gdbtk must have an absolute path to srcdir in order to run |
8776 | # properly when not installed. | |
8777 | here=`pwd` | |
8778 | cd ${srcdir} | |
8779 | GDBTK_SRC_DIR=`pwd` | |
8780 | cd $here | |
8781 | ||
3fc11d3e JM |
8782 | |
8783 | # | |
8784 | # Ok, lets find the tcl configuration | |
8785 | # First, look for one uninstalled. | |
8786 | # the alternative search directory is invoked by --with-tclconfig | |
8787 | # | |
8788 | ||
8789 | if test x"${no_tcl}" = x ; then | |
8790 | # we reset no_tcl in case something fails here | |
8791 | no_tcl=true | |
8792 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8793 | if test "${with_tclconfig+set}" = set; then | |
8794 | withval="$with_tclconfig" | |
8795 | with_tclconfig=${withval} | |
8796 | fi | |
8797 | ||
8798 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
97bf5e38 | 8799 | echo "configure:8800: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8800 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8801 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8802 | else | |
8803 | ||
8804 | ||
8805 | # First check to see if --with-tclconfig was specified. | |
8806 | if test x"${with_tclconfig}" != x ; then | |
8807 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8808 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8809 | else | |
8810 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8811 | fi | |
8812 | fi | |
8813 | ||
8814 | # then check for a private Tcl installation | |
8815 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8816 | for i in \ | |
8817 | ../tcl \ | |
8818 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8819 | ../../tcl \ | |
8820 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8821 | ../../../tcl \ | |
8822 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8823 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8824 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8825 | break | |
8826 | fi | |
8827 | done | |
8828 | fi | |
8829 | # check in a few common install locations | |
8830 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8831 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8832 | if test -f "$i/tclConfig.sh" ; then | |
8833 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8834 | break | |
8835 | fi | |
8836 | done | |
8837 | fi | |
8838 | # check in a few other private locations | |
8839 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8840 | for i in \ | |
8841 | ${srcdir}/../tcl \ | |
8842 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8843 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8844 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8845 | break | |
8846 | fi | |
8847 | done | |
8848 | fi | |
8849 | ||
8850 | fi | |
8851 | ||
8852 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8853 | TCLCONFIG="# no Tcl configs found" | |
8854 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8855 | else | |
8856 | no_tcl= | |
8857 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8858 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8859 | fi | |
8860 | fi | |
8861 | ||
8862 | if test -z "${no_tcl}"; then | |
8863 | ||
8864 | . $TCLCONFIG | |
8865 | ||
8866 | ||
8867 | ||
8868 | ||
8869 | ||
8870 | ||
8871 | ||
8872 | ||
8873 | ||
8874 | ||
8875 | ||
8876 | ||
8877 | ||
8878 | ||
8879 | ||
8880 | ||
8881 | ||
8882 | ||
8883 | ||
8884 | ||
8885 | ||
8886 | ||
8887 | ||
8888 | ||
8889 | ||
8890 | ||
8891 | # | |
8892 | # Ok, lets find the tk configuration | |
8893 | # First, look for one uninstalled. | |
8894 | # the alternative search directory is invoked by --with-tkconfig | |
8895 | # | |
8896 | ||
8897 | if test x"${no_tk}" = x ; then | |
8898 | # we reset no_tk in case something fails here | |
8899 | no_tk=true | |
8900 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8901 | if test "${with_tkconfig+set}" = set; then | |
8902 | withval="$with_tkconfig" | |
8903 | with_tkconfig=${withval} | |
8904 | fi | |
8905 | ||
8906 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
97bf5e38 | 8907 | echo "configure:8908: checking for Tk configuration" >&5 |
3fc11d3e JM |
8908 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8910 | else | |
8911 | ||
8912 | ||
8913 | # First check to see if --with-tkconfig was specified. | |
8914 | if test x"${with_tkconfig}" != x ; then | |
8915 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8916 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8917 | else | |
8918 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8919 | fi | |
8920 | fi | |
8921 | ||
8922 | # then check for a private Tk library | |
8923 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8924 | for i in \ | |
8925 | ../tk \ | |
8926 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8927 | ../../tk \ | |
8928 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8929 | ../../../tk \ | |
8930 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8931 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8932 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8933 | break | |
8934 | fi | |
8935 | done | |
8936 | fi | |
8937 | # check in a few common install locations | |
8938 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8939 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8940 | if test -f "$i/tkConfig.sh" ; then | |
8941 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8942 | break | |
8943 | fi | |
8944 | done | |
8945 | fi | |
8946 | # check in a few other private locations | |
8947 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8948 | for i in \ | |
8949 | ${srcdir}/../tk \ | |
8950 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8951 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8952 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8953 | break | |
8954 | fi | |
8955 | done | |
8956 | fi | |
8957 | ||
8958 | fi | |
8959 | ||
8960 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8961 | TKCONFIG="# no Tk configs found" | |
8962 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8963 | else | |
8964 | no_tk= | |
8965 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8966 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8967 | fi | |
8968 | fi | |
8969 | ||
8970 | ||
8971 | ||
dd2504ab JM |
8972 | # now look for Tcl library stuff |
8973 | ||
8974 | case "${host}" in | |
8975 | *-*-cygwin*) | |
8976 | tcldir=../tcl/win/ | |
8977 | ;; | |
8978 | *) | |
8979 | tcldir=../tcl/unix/ | |
8980 | ;; | |
8981 | esac | |
8982 | ||
8983 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
8984 | ||
3fc11d3e JM |
8985 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
8986 | # point to doing Tcl. | |
8987 | if test -z "${no_tk}"; then | |
8988 | ||
8989 | if test -f "$TKCONFIG" ; then | |
8990 | . $TKCONFIG | |
8991 | fi | |
8992 | ||
8993 | ||
8994 | ||
8995 | ||
8996 | ||
8997 | ||
8998 | ||
8999 | ||
9000 | ||
9001 | ||
9002 | ||
9003 | ||
9004 | ||
9005 | ||
9006 | # | |
9007 | # Ok, lets find the tcl source trees so we can use the headers | |
9008 | # Warning: transition of version 9 to 10 will break this algorithm | |
9009 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9010 | # be careful that we don't match stuff like tclX by accident. | |
9011 | # the alternative search directory is involked by --with-tclinclude | |
9012 | # | |
9013 | ||
9014 | no_tcl=true | |
9015 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
97bf5e38 | 9016 | echo "configure:9017: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9017 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9018 | if test "${with_tclinclude+set}" = set; then | |
9019 | withval="$with_tclinclude" | |
9020 | with_tclinclude=${withval} | |
9021 | fi | |
9022 | ||
9023 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9025 | else | |
9026 | ||
9027 | # first check to see if --with-tclinclude was specified | |
9028 | if test x"${with_tclinclude}" != x ; then | |
9029 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9030 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9031 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9032 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9033 | else | |
9034 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9035 | fi | |
9036 | fi | |
9037 | ||
9038 | # next check if it came with Tcl configuration file | |
9039 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9040 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9041 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9042 | fi | |
9043 | fi | |
9044 | ||
9045 | # next check in private source directory | |
9046 | # | |
9047 | # since ls returns lowest version numbers first, reverse its output | |
9048 | if test x"${ac_cv_c_tclh}" = x ; then | |
9049 | for i in \ | |
9050 | ${srcdir}/../tcl \ | |
9051 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9052 | ${srcdir}/../../tcl \ | |
9053 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9054 | ${srcdir}/../../../tcl \ | |
9055 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9056 | if test -f $i/generic/tclInt.h ; then | |
9057 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9058 | break | |
9059 | fi | |
9060 | done | |
9061 | fi | |
9062 | # finally check in a few common install locations | |
9063 | # | |
9064 | # since ls returns lowest version numbers first, reverse its output | |
9065 | if test x"${ac_cv_c_tclh}" = x ; then | |
9066 | for i in \ | |
9067 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9068 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9069 | /usr/local/src/tcl \ | |
9070 | /usr/local/lib/tcl \ | |
9071 | ${prefix}/include ; do | |
9072 | if test -f $i/generic/tclInt.h ; then | |
9073 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9074 | break | |
9075 | fi | |
9076 | done | |
9077 | fi | |
9078 | # see if one is installed | |
9079 | if test x"${ac_cv_c_tclh}" = x ; then | |
9080 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9081 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
97bf5e38 | 9082 | echo "configure:9083: checking for tclInt.h" >&5 |
3fc11d3e JM |
9083 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9084 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9085 | else | |
9086 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 9087 | #line 9088 "configure" |
3fc11d3e JM |
9088 | #include "confdefs.h" |
9089 | #include <tclInt.h> | |
9090 | EOF | |
9091 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
97bf5e38 | 9092 | { (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9093 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9094 | if test -z "$ac_err"; then | |
9095 | rm -rf conftest* | |
9096 | eval "ac_cv_header_$ac_safe=yes" | |
9097 | else | |
9098 | echo "$ac_err" >&5 | |
9099 | echo "configure: failed program was:" >&5 | |
9100 | cat conftest.$ac_ext >&5 | |
9101 | rm -rf conftest* | |
9102 | eval "ac_cv_header_$ac_safe=no" | |
9103 | fi | |
9104 | rm -f conftest* | |
9105 | fi | |
9106 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9107 | echo "$ac_t""yes" 1>&6 | |
9108 | ac_cv_c_tclh=installed | |
9109 | else | |
9110 | echo "$ac_t""no" 1>&6 | |
9111 | ac_cv_c_tclh="" | |
9112 | fi | |
9113 | ||
9114 | fi | |
9115 | ||
9116 | fi | |
9117 | ||
9118 | if test x"${ac_cv_c_tclh}" = x ; then | |
9119 | TCLHDIR="# no Tcl private headers found" | |
9120 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9121 | fi | |
9122 | if test x"${ac_cv_c_tclh}" != x ; then | |
9123 | no_tcl="" | |
9124 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9125 | echo "$ac_t""is installed" 1>&6 | |
9126 | TCLHDIR="" | |
9127 | else | |
9128 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9129 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9130 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9131 | fi | |
9132 | fi | |
9133 | ||
9134 | ||
9135 | ||
9136 | ||
9137 | # | |
9138 | # Ok, lets find the tk source trees so we can use the headers | |
9139 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9140 | # in preference to any others. Same logic is used when choosing library | |
9141 | # and again with Tcl. The search order is the best place to look first, then in | |
9142 | # decreasing significance. The loop breaks if the trigger file is found. | |
9143 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9144 | # directory. This converts the path from a relative to an absolute, so | |
9145 | # recursive cache variables for the path will work right. We check all | |
9146 | # the possible paths in one loop rather than many seperate loops to speed | |
9147 | # things up. | |
9148 | # the alternative search directory is involked by --with-tkinclude | |
9149 | # | |
9150 | no_tk=true | |
9151 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
97bf5e38 | 9152 | echo "configure:9153: checking for Tk private headers" >&5 |
3fc11d3e JM |
9153 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9154 | if test "${with_tkinclude+set}" = set; then | |
9155 | withval="$with_tkinclude" | |
9156 | with_tkinclude=${withval} | |
9157 | fi | |
9158 | ||
9159 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9161 | else | |
9162 | ||
9163 | # first check to see if --with-tkinclude was specified | |
9164 | if test x"${with_tkinclude}" != x ; then | |
9165 | if test -f ${with_tkinclude}/tk.h ; then | |
9166 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9167 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9168 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9169 | else | |
9170 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9171 | fi | |
9172 | fi | |
9173 | ||
9174 | # next check if it came with Tk configuration file | |
9175 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9176 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9177 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9178 | fi | |
9179 | fi | |
9180 | ||
9181 | # next check in private source directory | |
9182 | # | |
9183 | # since ls returns lowest version numbers first, reverse its output | |
9184 | if test x"${ac_cv_c_tkh}" = x ; then | |
9185 | for i in \ | |
9186 | ${srcdir}/../tk \ | |
9187 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9188 | ${srcdir}/../../tk \ | |
9189 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9190 | ${srcdir}/../../../tk \ | |
9191 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9192 | if test -f $i/generic/tk.h ; then | |
9193 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9194 | break | |
9195 | fi | |
9196 | done | |
9197 | fi | |
9198 | # finally check in a few common install locations | |
9199 | # | |
9200 | # since ls returns lowest version numbers first, reverse its output | |
9201 | if test x"${ac_cv_c_tkh}" = x ; then | |
9202 | for i in \ | |
9203 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9204 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9205 | /usr/local/src/tk \ | |
9206 | /usr/local/lib/tk \ | |
9207 | ${prefix}/include ; do | |
9208 | if test -f $i/generic/tk.h ; then | |
9209 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9210 | break | |
9211 | fi | |
9212 | done | |
9213 | fi | |
9214 | # see if one is installed | |
9215 | if test x"${ac_cv_c_tkh}" = x ; then | |
9216 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9217 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
97bf5e38 | 9218 | echo "configure:9219: checking for tk.h" >&5 |
3fc11d3e JM |
9219 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9221 | else | |
9222 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 9223 | #line 9224 "configure" |
3fc11d3e JM |
9224 | #include "confdefs.h" |
9225 | #include <tk.h> | |
9226 | EOF | |
9227 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
97bf5e38 | 9228 | { (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9229 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9230 | if test -z "$ac_err"; then | |
9231 | rm -rf conftest* | |
9232 | eval "ac_cv_header_$ac_safe=yes" | |
9233 | else | |
9234 | echo "$ac_err" >&5 | |
9235 | echo "configure: failed program was:" >&5 | |
9236 | cat conftest.$ac_ext >&5 | |
9237 | rm -rf conftest* | |
9238 | eval "ac_cv_header_$ac_safe=no" | |
9239 | fi | |
9240 | rm -f conftest* | |
9241 | fi | |
9242 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9243 | echo "$ac_t""yes" 1>&6 | |
9244 | ac_cv_c_tkh=installed | |
9245 | else | |
9246 | echo "$ac_t""no" 1>&6 | |
9247 | ac_cv_c_tkh="" | |
9248 | fi | |
9249 | ||
9250 | fi | |
9251 | ||
9252 | fi | |
9253 | ||
9254 | if test x"${ac_cv_c_tkh}" != x ; then | |
9255 | no_tk="" | |
9256 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9257 | echo "$ac_t""is installed" 1>&6 | |
9258 | TKHDIR="" | |
9259 | else | |
9260 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9261 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9262 | TKHDIR="-I${ac_cv_c_tkh}" | |
9263 | fi | |
9264 | else | |
9265 | TKHDIR="# no Tk directory found" | |
9266 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9267 | no_tk=true | |
9268 | fi | |
9269 | ||
9270 | ||
9271 | ||
9272 | ||
9273 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
97bf5e38 | 9274 | echo "configure:9275: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9275 | if test x"${ac_cv_c_itclh}" = x ; then |
9276 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9277 | if test -f $i/generic/itcl.h ; then | |
9278 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9279 | break | |
9280 | fi | |
9281 | done | |
9282 | fi | |
9283 | if test x"${ac_cv_c_itclh}" = x ; then | |
9284 | ITCLHDIR="# no Itcl private headers found" | |
9285 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9286 | fi | |
9287 | if test x"${ac_cv_c_itclh}" != x ; then | |
9288 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9289 | fi | |
9290 | # should always be here | |
9291 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9292 | ||
9293 | #AC_SUBST(ITCLLIB) | |
9294 | ||
9295 | ||
9296 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
97bf5e38 | 9297 | echo "configure:9298: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9298 | if test x"${ac_cv_c_itkh}" = x ; then |
9299 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9300 | if test -f $i/generic/itk.h ; then | |
9301 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9302 | break | |
9303 | fi | |
9304 | done | |
9305 | fi | |
9306 | if test x"${ac_cv_c_itkh}" = x ; then | |
9307 | ITKHDIR="# no Itk private headers found" | |
9308 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9309 | fi | |
9310 | if test x"${ac_cv_c_itkh}" != x ; then | |
9311 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9312 | fi | |
9313 | # should always be here | |
9314 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9315 | ||
9316 | #AC_SUBST(ITKLIB) | |
9317 | ||
3fc11d3e | 9318 | |
dd2504ab JM |
9319 | |
9320 | # now look for Tk library stuff | |
9321 | ||
9322 | case "${host}" in | |
9323 | *-*-cygwin*) | |
9324 | tkdir=../tk/win/ | |
9325 | ;; | |
9326 | *) | |
9327 | tkdir=../tk/unix/ | |
9328 | ;; | |
9329 | esac | |
9330 | ||
9331 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9332 | ||
3fc11d3e JM |
9333 | # now look for Itcl library stuff |
9334 | ||
9335 | ||
9336 | # | |
9337 | # Ok, lets find the itcl configuration | |
9338 | # First, look for one uninstalled. | |
9339 | # the alternative search directory is invoked by --with-itclconfig | |
9340 | # | |
9341 | ||
9342 | if test x"${no_itcl}" = x ; then | |
9343 | # we reset no_itcl in case something fails here | |
9344 | no_itcl=true | |
9345 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9346 | if test "${with_itclconfig+set}" = set; then | |
9347 | withval="$with_itclconfig" | |
9348 | with_itclconfig=${withval} | |
9349 | fi | |
9350 | ||
9351 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
97bf5e38 | 9352 | echo "configure:9353: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9353 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9354 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9355 | else | |
9356 | ||
9357 | ||
9358 | # First check to see if --with-itclconfig was specified. | |
9359 | if test x"${with_itclconfig}" != x ; then | |
9360 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9361 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9362 | else | |
9363 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9364 | fi | |
9365 | fi | |
9366 | ||
9367 | # then check for a private Itcl library | |
9368 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9369 | for i in \ | |
9370 | ../itcl/itcl \ | |
9371 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9372 | ../../itcl \ | |
9373 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9374 | ../../../itcl \ | |
9375 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9376 | if test -f "$i/itclConfig.sh" ; then | |
9377 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9378 | break | |
9379 | fi | |
9380 | done | |
9381 | fi | |
9382 | # check in a few common install locations | |
9383 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9384 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9385 | if test -f "$i/itclConfig.sh" ; then | |
9386 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9387 | break | |
9388 | fi | |
9389 | done | |
9390 | fi | |
9391 | # check in a few other private locations | |
9392 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9393 | for i in \ | |
9394 | ${srcdir}/../itcl/itcl \ | |
9395 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9396 | if test -f "$i/itclConfig.sh" ; then | |
9397 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9398 | break | |
9399 | fi | |
9400 | done | |
9401 | fi | |
9402 | ||
9403 | fi | |
9404 | ||
9405 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9406 | ITCLCONFIG="# no Itcl configs found" | |
9407 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9408 | else | |
9409 | no_itcl= | |
9410 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9411 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9412 | fi | |
9413 | fi | |
9414 | ||
9415 | if test -z "${no_itcl}"; then | |
9416 | ||
9417 | if test -f "$ITCLCONFIG" ; then | |
9418 | . $ITCLCONFIG | |
9419 | fi | |
9420 | ||
9421 | ||
9422 | ||
9423 | ||
9424 | ||
9425 | ||
9426 | ||
9427 | ||
9428 | ||
9429 | ||
3fc11d3e JM |
9430 | |
9431 | ||
9432 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9433 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9434 | fi |
9435 | ||
9436 | ||
9437 | # now look for Itk library stuff | |
9438 | ||
9439 | # | |
9440 | # Ok, lets find the itk configuration | |
9441 | # First, look for one uninstalled. | |
9442 | # the alternative search directory is invoked by --with-itkconfig | |
9443 | # | |
9444 | ||
9445 | if test x"${no_itk}" = x ; then | |
9446 | # we reset no_itk in case something fails here | |
9447 | no_itk=true | |
9448 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9449 | if test "${with_itkconfig+set}" = set; then | |
9450 | withval="$with_itkconfig" | |
9451 | with_itkconfig=${withval} | |
9452 | fi | |
9453 | ||
9454 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
97bf5e38 | 9455 | echo "configure:9456: checking for Itk configuration" >&5 |
3fc11d3e JM |
9456 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9458 | else | |
9459 | ||
9460 | ||
9461 | # First check to see if --with-itkconfig was specified. | |
9462 | if test x"${with_itkconfig}" != x ; then | |
9463 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9464 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9465 | else | |
9466 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9467 | fi | |
9468 | fi | |
9469 | ||
9470 | # then check for a private Itk library | |
9471 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9472 | for i in \ | |
9473 | ../itcl/itk \ | |
9474 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9475 | ../../itk \ | |
9476 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9477 | ../../../itk \ | |
9478 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9479 | if test -f "$i/itkConfig.sh" ; then | |
9480 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9481 | break | |
9482 | fi | |
9483 | done | |
9484 | fi | |
9485 | # check in a few common install locations | |
9486 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9487 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9488 | if test -f "$i/itkConfig.sh" ; then | |
9489 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9490 | break | |
9491 | fi | |
9492 | done | |
9493 | fi | |
9494 | # check in a few other private locations | |
9495 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9496 | for i in \ | |
9497 | ${srcdir}/../itcl/itk \ | |
9498 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9499 | if test -f "$i/itkConfig.sh" ; then | |
9500 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9501 | break | |
9502 | fi | |
9503 | done | |
9504 | fi | |
9505 | ||
9506 | fi | |
9507 | ||
9508 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9509 | ITKCONFIG="# no Itk configs found" | |
9510 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9511 | else | |
9512 | no_itk= | |
9513 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9514 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9515 | fi | |
9516 | fi | |
9517 | ||
9518 | ||
9519 | if test -z "${no_itcl}"; then | |
9520 | ||
9521 | if test -f "$ITKCONFIG" ; then | |
9522 | . $ITKCONFIG | |
9523 | fi | |
9524 | ||
9525 | ||
9526 | ||
9527 | ||
9528 | ||
9529 | ||
9530 | ||
9531 | ||
9532 | ||
9533 | ||
9534 | ||
9535 | ||
3fc11d3e | 9536 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9537 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9538 | fi |
9539 | ||
4226a5a5 | 9540 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9541 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9542 | # know whether 8.2 will or not, but I bet it will. | |
9543 | # I don't have to worry about 7.x since we don't support it. | |
9544 | GDBTK_CFLAGS="" | |
9545 | if test "$GCC" = "yes"; then | |
9546 | if test "$TCL_VERSION" != "8.0" ; then | |
9547 | GDBTK_CFLAGS="-fwritable-strings" | |
9548 | fi | |
9549 | fi | |
9550 | ||
9551 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9552 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9553 | # Yes, the ordering seems wrong here. But it isn't. |
9554 | # TK_LIBS is the list of libraries that need to be linked | |
9555 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9556 | # were in LIBS then any link tests after this point would | |
9557 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9558 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9559 | |
9560 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9561 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9562 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9563 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9564 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9565 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9566 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9567 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9568 | |
9569 | if test x$gdb_cv_os_cygwin = xyes; then | |
9570 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9571 | WIN32LDAPP="-Wl,--subsystem,console" | |
9572 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9573 | fi | |
9574 | fi | |
9575 | fi | |
ffc6a242 KS |
9576 | |
9577 | SUBDIRS="${SUBDIRS} gdbtk" | |
9578 | configdirs="${configdirs} gdbtk" | |
3fc11d3e JM |
9579 | fi |
9580 | ||
9581 | ||
9582 | ||
9583 | ||
9584 | ||
9585 | ||
9586 | ||
9587 | ||
9588 | ||
9589 | ||
9590 | ||
9591 | ||
9592 | ||
dd2504ab | 9593 | |
c906108c SS |
9594 | # If we find X, set shell vars x_includes and x_libraries to the |
9595 | # paths, otherwise set no_x=yes. | |
9596 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9597 | # --without-x overrides everything else, but does not touch the cache. | |
9598 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
97bf5e38 | 9599 | echo "configure:9600: checking for X" >&5 |
c906108c SS |
9600 | |
9601 | # Check whether --with-x or --without-x was given. | |
9602 | if test "${with_x+set}" = set; then | |
9603 | withval="$with_x" | |
9604 | : | |
9605 | fi | |
9606 | ||
9607 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9608 | if test "x$with_x" = xno; then | |
9609 | # The user explicitly disabled X. | |
9610 | have_x=disabled | |
9611 | else | |
9612 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9613 | # Both variables are already set. | |
9614 | have_x=yes | |
9615 | else | |
9616 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9618 | else | |
9619 | # One or both of the vars are not set, and there is no cached value. | |
9620 | ac_x_includes=NO ac_x_libraries=NO | |
9621 | rm -fr conftestdir | |
9622 | if mkdir conftestdir; then | |
9623 | cd conftestdir | |
9624 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9625 | cat > Imakefile <<'EOF' | |
9626 | acfindx: | |
9627 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9628 | EOF | |
9629 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9630 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9631 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9632 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9633 | for ac_extension in a so sl; do | |
9634 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9635 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9636 | ac_im_usrlibdir=$ac_im_libdir; break | |
9637 | fi | |
9638 | done | |
9639 | # Screen out bogus values from the imake configuration. They are | |
9640 | # bogus both because they are the default anyway, and because | |
9641 | # using them would break gcc on systems where it needs fixed includes. | |
9642 | case "$ac_im_incroot" in | |
9643 | /usr/include) ;; | |
9644 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9645 | esac | |
9646 | case "$ac_im_usrlibdir" in | |
9647 | /usr/lib | /lib) ;; | |
9648 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9649 | esac | |
9650 | fi | |
9651 | cd .. | |
9652 | rm -fr conftestdir | |
9653 | fi | |
9654 | ||
9655 | if test "$ac_x_includes" = NO; then | |
9656 | # Guess where to find include files, by looking for this one X11 .h file. | |
9657 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9658 | ||
9659 | # First, try using that file with no special directory specified. | |
9660 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 9661 | #line 9662 "configure" |
c906108c SS |
9662 | #include "confdefs.h" |
9663 | #include <$x_direct_test_include> | |
9664 | EOF | |
9665 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
97bf5e38 | 9666 | { (eval echo configure:9667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9667 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9668 | if test -z "$ac_err"; then | |
9669 | rm -rf conftest* | |
9670 | # We can compile using X headers with no special include directory. | |
9671 | ac_x_includes= | |
9672 | else | |
9673 | echo "$ac_err" >&5 | |
9674 | echo "configure: failed program was:" >&5 | |
9675 | cat conftest.$ac_ext >&5 | |
9676 | rm -rf conftest* | |
9677 | # Look for the header file in a standard set of common directories. | |
9678 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9679 | for ac_dir in \ | |
9680 | /usr/X11/include \ | |
9681 | /usr/X11R6/include \ | |
9682 | /usr/X11R5/include \ | |
9683 | /usr/X11R4/include \ | |
9684 | \ | |
9685 | /usr/include/X11 \ | |
9686 | /usr/include/X11R6 \ | |
9687 | /usr/include/X11R5 \ | |
9688 | /usr/include/X11R4 \ | |
9689 | \ | |
9690 | /usr/local/X11/include \ | |
9691 | /usr/local/X11R6/include \ | |
9692 | /usr/local/X11R5/include \ | |
9693 | /usr/local/X11R4/include \ | |
9694 | \ | |
9695 | /usr/local/include/X11 \ | |
9696 | /usr/local/include/X11R6 \ | |
9697 | /usr/local/include/X11R5 \ | |
9698 | /usr/local/include/X11R4 \ | |
9699 | \ | |
9700 | /usr/X386/include \ | |
9701 | /usr/x386/include \ | |
9702 | /usr/XFree86/include/X11 \ | |
9703 | \ | |
9704 | /usr/include \ | |
9705 | /usr/local/include \ | |
9706 | /usr/unsupported/include \ | |
9707 | /usr/athena/include \ | |
9708 | /usr/local/x11r5/include \ | |
9709 | /usr/lpp/Xamples/include \ | |
9710 | \ | |
9711 | /usr/openwin/include \ | |
9712 | /usr/openwin/share/include \ | |
9713 | ; \ | |
9714 | do | |
9715 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9716 | ac_x_includes=$ac_dir | |
9717 | break | |
9718 | fi | |
9719 | done | |
9720 | fi | |
9721 | rm -f conftest* | |
9722 | fi # $ac_x_includes = NO | |
9723 | ||
9724 | if test "$ac_x_libraries" = NO; then | |
9725 | # Check for the libraries. | |
9726 | ||
9727 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9728 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9729 | ||
9730 | # See if we find them without any special options. | |
9731 | # Don't add to $LIBS permanently. | |
9732 | ac_save_LIBS="$LIBS" | |
9733 | LIBS="-l$x_direct_test_library $LIBS" | |
9734 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 9735 | #line 9736 "configure" |
c906108c SS |
9736 | #include "confdefs.h" |
9737 | ||
9738 | int main() { | |
9739 | ${x_direct_test_function}() | |
9740 | ; return 0; } | |
9741 | EOF | |
97bf5e38 | 9742 | if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9743 | rm -rf conftest* |
9744 | LIBS="$ac_save_LIBS" | |
9745 | # We can link X programs with no special library path. | |
9746 | ac_x_libraries= | |
9747 | else | |
9748 | echo "configure: failed program was:" >&5 | |
9749 | cat conftest.$ac_ext >&5 | |
9750 | rm -rf conftest* | |
9751 | LIBS="$ac_save_LIBS" | |
9752 | # First see if replacing the include by lib works. | |
9753 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9754 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9755 | /usr/X11/lib \ | |
9756 | /usr/X11R6/lib \ | |
9757 | /usr/X11R5/lib \ | |
9758 | /usr/X11R4/lib \ | |
9759 | \ | |
9760 | /usr/lib/X11 \ | |
9761 | /usr/lib/X11R6 \ | |
9762 | /usr/lib/X11R5 \ | |
9763 | /usr/lib/X11R4 \ | |
9764 | \ | |
9765 | /usr/local/X11/lib \ | |
9766 | /usr/local/X11R6/lib \ | |
9767 | /usr/local/X11R5/lib \ | |
9768 | /usr/local/X11R4/lib \ | |
9769 | \ | |
9770 | /usr/local/lib/X11 \ | |
9771 | /usr/local/lib/X11R6 \ | |
9772 | /usr/local/lib/X11R5 \ | |
9773 | /usr/local/lib/X11R4 \ | |
9774 | \ | |
9775 | /usr/X386/lib \ | |
9776 | /usr/x386/lib \ | |
9777 | /usr/XFree86/lib/X11 \ | |
9778 | \ | |
9779 | /usr/lib \ | |
9780 | /usr/local/lib \ | |
9781 | /usr/unsupported/lib \ | |
9782 | /usr/athena/lib \ | |
9783 | /usr/local/x11r5/lib \ | |
9784 | /usr/lpp/Xamples/lib \ | |
9785 | /lib/usr/lib/X11 \ | |
9786 | \ | |
9787 | /usr/openwin/lib \ | |
9788 | /usr/openwin/share/lib \ | |
9789 | ; \ | |
9790 | do | |
9791 | for ac_extension in a so sl; do | |
9792 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9793 | ac_x_libraries=$ac_dir | |
9794 | break 2 | |
9795 | fi | |
9796 | done | |
9797 | done | |
9798 | fi | |
9799 | rm -f conftest* | |
9800 | fi # $ac_x_libraries = NO | |
9801 | ||
9802 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9803 | # Didn't find X anywhere. Cache the known absence of X. | |
9804 | ac_cv_have_x="have_x=no" | |
9805 | else | |
9806 | # Record where we found X for the cache. | |
9807 | ac_cv_have_x="have_x=yes \ | |
9808 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9809 | fi | |
9810 | fi | |
9811 | fi | |
9812 | eval "$ac_cv_have_x" | |
9813 | fi # $with_x != no | |
9814 | ||
9815 | if test "$have_x" != yes; then | |
9816 | echo "$ac_t""$have_x" 1>&6 | |
9817 | no_x=yes | |
9818 | else | |
9819 | # If each of the values was on the command line, it overrides each guess. | |
9820 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9821 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9822 | # Update the cache value to reflect the command line values. | |
9823 | ac_cv_have_x="have_x=yes \ | |
9824 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9825 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9826 | fi | |
9827 | ||
9828 | ||
7a292a7a SS |
9829 | |
9830 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9831 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9832 | # This code just checks for a few cases where we'd like to ignore those | |
9833 | # definitions, even when they're present in the '.mt' file. These cases | |
9834 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9835 | # not part of the source tree. |
7a292a7a SS |
9836 | # |
9837 | # Check whether --enable-sim or --disable-sim was given. | |
9838 | if test "${enable_sim+set}" = set; then | |
9839 | enableval="$enable_sim" | |
9840 | echo "enable_sim = $enable_sim"; | |
9841 | echo "enableval = ${enableval}"; | |
9842 | case "${enableval}" in | |
9843 | yes) ignore_sim=false ;; | |
9844 | no) ignore_sim=true ;; | |
9845 | *) ignore_sim=false ;; | |
9846 | esac | |
9847 | else | |
9848 | ignore_sim=false | |
9849 | fi | |
9850 | ||
9851 | ||
9852 | if test ! -d "${srcdir}/../sim"; then | |
9853 | ignore_sim=true | |
9854 | fi | |
9855 | ||
9856 | if test "${ignore_sim}" = "true"; then | |
9857 | IGNORE_SIM="SIM=" | |
9858 | IGNORE_SIM_OBS="SIM_OBS=" | |
9859 | else | |
9860 | IGNORE_SIM="" | |
9861 | IGNORE_SIM_OBS="" | |
9862 | cat >> confdefs.h <<\EOF | |
9863 | #define WITH_SIM 1 | |
9864 | EOF | |
9865 | ||
9866 | fi | |
9867 | ||
9868 | ||
9869 | ||
c906108c SS |
9870 | |
9871 | ||
9872 | ||
9873 | ||
9874 | ||
9875 | ||
dfcd3bfb | 9876 | |
e56ac5c3 AC |
9877 | |
9878 | ||
b3a90332 AC |
9879 | |
9880 | ||
b46cd165 | 9881 | |
c906108c SS |
9882 | # Begin stuff to support --enable-shared |
9883 | # Check whether --enable-shared or --disable-shared was given. | |
9884 | if test "${enable_shared+set}" = set; then | |
9885 | enableval="$enable_shared" | |
9886 | case "${enableval}" in | |
9887 | yes) shared=true ;; | |
9888 | no) shared=false ;; | |
9889 | *) shared=true ;; | |
9890 | esac | |
9891 | fi | |
9892 | ||
9893 | HLDFLAGS= | |
9894 | HLDENV= | |
9895 | # If we have shared libraries, try to set rpath reasonably. | |
9896 | if test "${shared}" = "true"; then | |
9897 | case "${host}" in | |
9898 | *-*-hpux*) | |
9899 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
9900 | ;; | |
9901 | *-*-irix5* | *-*-irix6*) | |
9902 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
9903 | ;; | |
9904 | *-*-linux*aout*) | |
9905 | ;; | |
88987551 | 9906 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
9907 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
9908 | ;; | |
9909 | *-*-solaris*) | |
9910 | HLDFLAGS='-R $(libdir)' | |
9911 | ;; | |
9912 | *-*-sysv4*) | |
9913 | 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;' | |
9914 | ;; | |
9915 | esac | |
9916 | fi | |
9917 | ||
9918 | # On SunOS, if the linker supports the -rpath option, use it to | |
9919 | # prevent ../bfd and ../opcodes from being included in the run time | |
9920 | # search path. | |
9921 | case "${host}" in | |
9922 | *-*-sunos*) | |
9923 | echo 'main () { }' > conftest.c | |
9924 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
9925 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
9926 | : | |
9927 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
9928 | : | |
9929 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
9930 | : | |
9931 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
9932 | : | |
9933 | elif test "${shared}" = "true"; then | |
9934 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
9935 | else | |
9936 | HLDFLAGS='-Wl,-rpath=' | |
9937 | fi | |
9938 | rm -f conftest.t conftest.c conftest | |
9939 | ;; | |
9940 | esac | |
9941 | ||
9942 | ||
9943 | # End stuff to support --enable-shared | |
9944 | ||
9945 | # target_subdir is used by the testsuite to find the target libraries. | |
9946 | target_subdir= | |
9947 | if test "${host}" != "${target}"; then | |
9948 | target_subdir="${target_alias}/" | |
9949 | fi | |
9950 | ||
9951 | ||
9952 | frags= | |
9953 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9954 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9955 | # When building a native debuger the .mh file containing things |
9956 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9957 | # since it no longer contains anything useful. | |
9958 | if test "${target}" = "${host}"; then | |
9959 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9960 | else | |
9961 | host_makefile_frag=/dev/null | |
9962 | fi | |
c906108c SS |
9963 | fi |
9964 | frags="$frags $host_makefile_frag" | |
9965 | ||
9966 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9967 | if test ! -f ${target_makefile_frag}; then | |
9968 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9969 | fi | |
9970 | frags="$frags $target_makefile_frag" | |
9971 | ||
9972 | ||
9973 | ||
9974 | ||
9975 | ||
9976 | hostfile=`sed -n ' | |
9977 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9978 | ' ${host_makefile_frag}` | |
9979 | ||
9980 | targetfile=`sed -n ' | |
9981 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9982 | ' ${target_makefile_frag}` | |
9983 | ||
6166d547 AC |
9984 | GDB_MULTI_ARCH=`sed -n ' |
9985 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9986 | ' ${target_makefile_frag}` | |
9987 | ||
c906108c | 9988 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9989 | # We pick this up from the host configuration file (.mh) because we |
9990 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9991 | nativefile=`sed -n ' |
9992 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9993 | ' ${host_makefile_frag}` | |
c906108c SS |
9994 | fi |
9995 | ||
9996 | ||
6166d547 AC |
9997 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9998 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9999 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
10000 | # will be the default. | |
10001 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
10002 | case "${gdb_multi_arch}" in | |
10003 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
10004 | no ) GDB_MULTI_ARCH=0 ;; | |
10005 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
10006 | esac | |
10007 | fi | |
10008 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
10009 | cat >> confdefs.h <<EOF | |
10010 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
10011 | EOF | |
10012 | ||
10013 | fi | |
6c5cfe5b | 10014 | # Warn the user when they use an old practice |
6166d547 AC |
10015 | case "${GDB_MULTI_ARCH}" in |
10016 | "" ) ;; | |
10017 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
10018 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
10019 | GDB_MULTI_ARCH_PURE ) | |
10020 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 10021 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 10022 | targetfile="" |
6166d547 AC |
10023 | fi ;; |
10024 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
10025 | esac | |
10026 | ||
96baa820 JM |
10027 | if test "${enable_multi_ice}" = "yes"; then |
10028 | SUBDIRS="${SUBDIRS} multi-ice" | |
10029 | fi | |
10030 | ||
a85f51e7 DJ |
10031 | # ``gdbserver'' can only be built in a native configuration. |
10032 | if test x"${target}" = x"${host}"; then | |
10033 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
97bf5e38 | 10034 | echo "configure:10035: checking whether gdbserver is supported on this host" >&5 |
a85f51e7 DJ |
10035 | if test x"${build_gdbserver}" = xyes ; then |
10036 | configdirs="${configdirs} gdbserver" | |
10037 | SUBDIRS="${SUBDIRS} gdbserver" | |
10038 | echo "$ac_t""yes" 1>&6 | |
10039 | else | |
10040 | echo "$ac_t""no" 1>&6 | |
10041 | fi | |
10042 | fi | |
10043 | ||
96baa820 JM |
10044 | |
10045 | ||
c906108c | 10046 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10047 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10048 | # version. | |
c906108c SS |
10049 | |
10050 | files= | |
10051 | links= | |
5a2402b8 | 10052 | |
c906108c | 10053 | rm -f xm.h |
5a2402b8 | 10054 | xm_h="" |
c906108c | 10055 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10056 | xm_h=xm.h |
10057 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10058 | files="${files} ${GDB_XM_FILE}" | |
10059 | links="${links} xm.h" | |
10060 | cat >> confdefs.h <<EOF | |
10061 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10062 | EOF | |
10063 | ||
c906108c | 10064 | fi |
5a2402b8 AC |
10065 | |
10066 | ||
c906108c | 10067 | rm -f tm.h |
5a2402b8 | 10068 | tm_h="" |
c906108c | 10069 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10070 | tm_h=tm.h |
10071 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10072 | files="${files} ${GDB_TM_FILE}" | |
10073 | links="${links} tm.h" | |
10074 | cat >> confdefs.h <<EOF | |
10075 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10076 | EOF | |
10077 | ||
c906108c | 10078 | fi |
5a2402b8 AC |
10079 | |
10080 | ||
c906108c | 10081 | rm -f nm.h |
5a2402b8 | 10082 | nm_h="" |
c906108c | 10083 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10084 | nm_h=nm.h |
10085 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10086 | files="${files} ${GDB_NM_FILE}" | |
10087 | links="${links} nm.h" | |
10088 | cat >> confdefs.h <<EOF | |
10089 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10090 | EOF | |
10091 | ||
c906108c | 10092 | fi |
5a2402b8 AC |
10093 | |
10094 | ||
c906108c SS |
10095 | |
10096 | ||
10097 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
97bf5e38 | 10098 | echo "configure:10099: checking for Cygwin environment" >&5 |
c906108c SS |
10099 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10101 | else | |
10102 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 10103 | #line 10104 "configure" |
c906108c SS |
10104 | #include "confdefs.h" |
10105 | ||
10106 | int main() { | |
10107 | ||
10108 | #ifndef __CYGWIN__ | |
10109 | #define __CYGWIN__ __CYGWIN32__ | |
10110 | #endif | |
10111 | return __CYGWIN__; | |
10112 | ; return 0; } | |
10113 | EOF | |
97bf5e38 | 10114 | if { (eval echo configure:10115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10115 | rm -rf conftest* |
10116 | ac_cv_cygwin=yes | |
10117 | else | |
10118 | echo "configure: failed program was:" >&5 | |
10119 | cat conftest.$ac_ext >&5 | |
10120 | rm -rf conftest* | |
10121 | ac_cv_cygwin=no | |
10122 | fi | |
10123 | rm -f conftest* | |
10124 | rm -f conftest* | |
10125 | fi | |
10126 | ||
10127 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10128 | CYGWIN= | |
10129 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10130 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
97bf5e38 | 10131 | echo "configure:10132: checking for mingw32 environment" >&5 |
c906108c SS |
10132 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10134 | else | |
10135 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 10136 | #line 10137 "configure" |
c906108c SS |
10137 | #include "confdefs.h" |
10138 | ||
10139 | int main() { | |
10140 | return __MINGW32__; | |
10141 | ; return 0; } | |
10142 | EOF | |
97bf5e38 | 10143 | if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10144 | rm -rf conftest* |
10145 | ac_cv_mingw32=yes | |
10146 | else | |
10147 | echo "configure: failed program was:" >&5 | |
10148 | cat conftest.$ac_ext >&5 | |
10149 | rm -rf conftest* | |
10150 | ac_cv_mingw32=no | |
10151 | fi | |
10152 | rm -f conftest* | |
10153 | rm -f conftest* | |
10154 | fi | |
10155 | ||
10156 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10157 | MINGW32= | |
10158 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10159 | ||
10160 | ||
10161 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
97bf5e38 | 10162 | echo "configure:10163: checking for executable suffix" >&5 |
c906108c SS |
10163 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10165 | else | |
10166 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10167 | ac_cv_exeext=.exe | |
10168 | else | |
10169 | rm -f conftest* | |
10170 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10171 | ac_cv_exeext= | |
97bf5e38 | 10172 | if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10173 | for file in conftest.*; do |
10174 | case $file in | |
9608ab8b | 10175 | *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10176 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10177 | esac | |
10178 | done | |
10179 | else | |
10180 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10181 | fi | |
10182 | rm -f conftest* | |
10183 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10184 | fi | |
10185 | fi | |
10186 | ||
10187 | EXEEXT="" | |
10188 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10189 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10190 | ac_exeext=$EXEEXT | |
10191 | ||
10192 | ||
234b45d4 KB |
10193 | |
10194 | cat >> confdefs.h <<\EOF | |
10195 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10196 | EOF | |
10197 | ||
10198 | ||
10199 | ||
10200 | ||
10201 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10202 | if test "${with_libiconv_prefix+set}" = set; then | |
10203 | withval="$with_libiconv_prefix" | |
10204 | ||
10205 | for dir in `echo "$withval" | tr : ' '`; do | |
10206 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10207 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10208 | done | |
10209 | ||
10210 | fi | |
10211 | ||
10212 | ||
10213 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
97bf5e38 | 10214 | echo "configure:10215: checking for iconv" >&5 |
234b45d4 KB |
10215 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10217 | else | |
10218 | ||
10219 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10220 | am_cv_lib_iconv=no | |
10221 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 10222 | #line 10223 "configure" |
234b45d4 KB |
10223 | #include "confdefs.h" |
10224 | #include <stdlib.h> | |
10225 | #include <iconv.h> | |
10226 | int main() { | |
10227 | iconv_t cd = iconv_open("",""); | |
10228 | iconv(cd,NULL,NULL,NULL,NULL); | |
10229 | iconv_close(cd); | |
10230 | ; return 0; } | |
10231 | EOF | |
97bf5e38 | 10232 | if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10233 | rm -rf conftest* |
10234 | am_cv_func_iconv=yes | |
10235 | else | |
10236 | echo "configure: failed program was:" >&5 | |
10237 | cat conftest.$ac_ext >&5 | |
10238 | fi | |
10239 | rm -f conftest* | |
10240 | if test "$am_cv_func_iconv" != yes; then | |
10241 | am_save_LIBS="$LIBS" | |
10242 | LIBS="$LIBS -liconv" | |
10243 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 10244 | #line 10245 "configure" |
234b45d4 KB |
10245 | #include "confdefs.h" |
10246 | #include <stdlib.h> | |
10247 | #include <iconv.h> | |
10248 | int main() { | |
10249 | iconv_t cd = iconv_open("",""); | |
10250 | iconv(cd,NULL,NULL,NULL,NULL); | |
10251 | iconv_close(cd); | |
10252 | ; return 0; } | |
10253 | EOF | |
97bf5e38 | 10254 | if { (eval echo configure:10255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10255 | rm -rf conftest* |
10256 | am_cv_lib_iconv=yes | |
10257 | am_cv_func_iconv=yes | |
10258 | else | |
10259 | echo "configure: failed program was:" >&5 | |
10260 | cat conftest.$ac_ext >&5 | |
10261 | fi | |
10262 | rm -f conftest* | |
10263 | LIBS="$am_save_LIBS" | |
10264 | fi | |
10265 | ||
10266 | fi | |
10267 | ||
10268 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10269 | if test "$am_cv_func_iconv" = yes; then | |
10270 | cat >> confdefs.h <<\EOF | |
10271 | #define HAVE_ICONV 1 | |
10272 | EOF | |
10273 | ||
10274 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
97bf5e38 | 10275 | echo "configure:10276: checking for iconv declaration" >&5 |
234b45d4 KB |
10276 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10277 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10278 | else | |
10279 | ||
10280 | cat > conftest.$ac_ext <<EOF | |
97bf5e38 | 10281 | #line 10282 "configure" |
234b45d4 KB |
10282 | #include "confdefs.h" |
10283 | ||
10284 | #include <stdlib.h> | |
10285 | #include <iconv.h> | |
10286 | extern | |
10287 | #ifdef __cplusplus | |
10288 | "C" | |
10289 | #endif | |
10290 | #if defined(__STDC__) || defined(__cplusplus) | |
10291 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10292 | #else | |
10293 | size_t iconv(); | |
10294 | #endif | |
10295 | ||
10296 | int main() { | |
10297 | ||
10298 | ; return 0; } | |
10299 | EOF | |
97bf5e38 | 10300 | if { (eval echo configure:10301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10301 | rm -rf conftest* |
10302 | am_cv_proto_iconv_arg1="" | |
10303 | else | |
10304 | echo "configure: failed program was:" >&5 | |
10305 | cat conftest.$ac_ext >&5 | |
10306 | rm -rf conftest* | |
10307 | am_cv_proto_iconv_arg1="const" | |
10308 | fi | |
10309 | rm -f conftest* | |
10310 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" | |
10311 | fi | |
10312 | ||
10313 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10314 | echo "$ac_t""${ac_t:- | |
10315 | }$am_cv_proto_iconv" 1>&6 | |
10316 | cat >> confdefs.h <<EOF | |
10317 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10318 | EOF | |
10319 | ||
10320 | fi | |
10321 | LIBICONV= | |
10322 | if test "$am_cv_lib_iconv" = yes; then | |
10323 | LIBICONV="-liconv" | |
10324 | fi | |
10325 | ||
10326 | ||
10327 | ||
c906108c SS |
10328 | subdirs="$configdirs" |
10329 | ||
10330 | trap '' 1 2 15 | |
10331 | cat > confcache <<\EOF | |
10332 | # This file is a shell script that caches the results of configure | |
10333 | # tests run on this system so they can be shared between configure | |
10334 | # scripts and configure runs. It is not useful on other systems. | |
10335 | # If it contains results you don't want to keep, you may remove or edit it. | |
10336 | # | |
10337 | # By default, configure uses ./config.cache as the cache file, | |
10338 | # creating it if it does not exist already. You can give configure | |
10339 | # the --cache-file=FILE option to use a different cache file; that is | |
10340 | # what configure does when it calls configure scripts in | |
10341 | # subdirectories, so they share the cache. | |
10342 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10343 | # config.status only pays attention to the cache file if you give it the | |
10344 | # --recheck option to rerun configure. | |
10345 | # | |
10346 | EOF | |
10347 | # The following way of writing the cache mishandles newlines in values, | |
10348 | # but we know of no workaround that is simple, portable, and efficient. | |
10349 | # So, don't put newlines in cache variables' values. | |
10350 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10351 | # and sets the high bit in the cache file unless we assign to the vars. | |
10352 | (set) 2>&1 | | |
10353 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10354 | *ac_space=\ *) | |
10355 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10356 | # turns \\\\ into \\, and sed turns \\ into \). | |
10357 | sed -n \ | |
10358 | -e "s/'/'\\\\''/g" \ | |
10359 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10360 | ;; | |
10361 | *) | |
10362 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10363 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10364 | ;; | |
10365 | esac >> confcache | |
10366 | if cmp -s $cache_file confcache; then | |
10367 | : | |
10368 | else | |
10369 | if test -w $cache_file; then | |
10370 | echo "updating cache $cache_file" | |
10371 | cat confcache > $cache_file | |
10372 | else | |
10373 | echo "not updating unwritable cache $cache_file" | |
10374 | fi | |
10375 | fi | |
10376 | rm -f confcache | |
10377 | ||
10378 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10379 | ||
10380 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10381 | # Let make expand exec_prefix. | |
10382 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10383 | ||
10384 | # Any assignment to VPATH causes Sun make to only execute | |
10385 | # the first set of double-colon rules, so remove it if not needed. | |
10386 | # If there is a colon in the path, we need to keep it. | |
10387 | if test "x$srcdir" = x.; then | |
10388 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10389 | fi | |
10390 | ||
10391 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10392 | ||
10393 | DEFS=-DHAVE_CONFIG_H | |
10394 | ||
10395 | # Without the "./", some shells look in PATH for config.status. | |
10396 | : ${CONFIG_STATUS=./config.status} | |
10397 | ||
10398 | echo creating $CONFIG_STATUS | |
10399 | rm -f $CONFIG_STATUS | |
10400 | cat > $CONFIG_STATUS <<EOF | |
10401 | #! /bin/sh | |
10402 | # Generated automatically by configure. | |
10403 | # Run this file to recreate the current configuration. | |
10404 | # This directory was configured as follows, | |
10405 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10406 | # | |
10407 | # $0 $ac_configure_args | |
10408 | # | |
10409 | # Compiler output produced by configure, useful for debugging | |
10410 | # configure, is in ./config.log if it exists. | |
10411 | ||
10412 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10413 | for ac_option | |
10414 | do | |
10415 | case "\$ac_option" in | |
10416 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10417 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10418 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10419 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10420 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10421 | exit 0 ;; | |
10422 | -help | --help | --hel | --he | --h) | |
10423 | echo "\$ac_cs_usage"; exit 0 ;; | |
10424 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10425 | esac | |
10426 | done | |
10427 | ||
10428 | ac_given_srcdir=$srcdir | |
10429 | ac_given_INSTALL="$INSTALL" | |
10430 | ||
ed952ac5 | 10431 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10432 | EOF |
10433 | cat >> $CONFIG_STATUS <<EOF | |
10434 | ||
10435 | # Protect against being on the right side of a sed subst in config.status. | |
10436 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10437 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10438 | $ac_vpsub | |
10439 | $extrasub | |
10440 | s%@SHELL@%$SHELL%g | |
10441 | s%@CFLAGS@%$CFLAGS%g | |
10442 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10443 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10444 | s%@FFLAGS@%$FFLAGS%g | |
10445 | s%@DEFS@%$DEFS%g | |
10446 | s%@LDFLAGS@%$LDFLAGS%g | |
10447 | s%@LIBS@%$LIBS%g | |
10448 | s%@exec_prefix@%$exec_prefix%g | |
10449 | s%@prefix@%$prefix%g | |
10450 | s%@program_transform_name@%$program_transform_name%g | |
10451 | s%@bindir@%$bindir%g | |
10452 | s%@sbindir@%$sbindir%g | |
10453 | s%@libexecdir@%$libexecdir%g | |
10454 | s%@datadir@%$datadir%g | |
10455 | s%@sysconfdir@%$sysconfdir%g | |
10456 | s%@sharedstatedir@%$sharedstatedir%g | |
10457 | s%@localstatedir@%$localstatedir%g | |
10458 | s%@libdir@%$libdir%g | |
10459 | s%@includedir@%$includedir%g | |
10460 | s%@oldincludedir@%$oldincludedir%g | |
10461 | s%@infodir@%$infodir%g | |
10462 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10463 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10464 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10465 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10466 | s%@CC@%$CC%g |
10467 | s%@CPP@%$CPP%g | |
10468 | s%@host@%$host%g | |
10469 | s%@host_alias@%$host_alias%g | |
10470 | s%@host_cpu@%$host_cpu%g | |
10471 | s%@host_vendor@%$host_vendor%g | |
10472 | s%@host_os@%$host_os%g | |
10473 | s%@target@%$target%g | |
10474 | s%@target_alias@%$target_alias%g | |
10475 | s%@target_cpu@%$target_cpu%g | |
10476 | s%@target_vendor@%$target_vendor%g | |
10477 | s%@target_os@%$target_os%g | |
10478 | s%@build@%$build%g | |
10479 | s%@build_alias@%$build_alias%g | |
10480 | s%@build_cpu@%$build_cpu%g | |
10481 | s%@build_vendor@%$build_vendor%g | |
10482 | s%@build_os@%$build_os%g | |
c906108c | 10483 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10484 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10485 | s%@ALLOCA@%$ALLOCA%g |
10486 | s%@USE_NLS@%$USE_NLS%g | |
10487 | s%@MSGFMT@%$MSGFMT%g | |
10488 | s%@GMSGFMT@%$GMSGFMT%g | |
10489 | s%@XGETTEXT@%$XGETTEXT%g | |
10490 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10491 | s%@CATALOGS@%$CATALOGS%g | |
10492 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10493 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10494 | s%@GMOFILES@%$GMOFILES%g | |
10495 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10496 | s%@INTLDEPS@%$INTLDEPS%g | |
10497 | s%@INTLLIBS@%$INTLLIBS%g | |
10498 | s%@INTLOBJS@%$INTLOBJS%g | |
10499 | s%@POFILES@%$POFILES%g | |
10500 | s%@POSUB@%$POSUB%g | |
10501 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10502 | s%@GT_NO@%$GT_NO%g | |
10503 | s%@GT_YES@%$GT_YES%g | |
10504 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10505 | s%@l@%$l%g | |
7a292a7a | 10506 | s%@AWK@%$AWK%g |
c906108c SS |
10507 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10508 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10509 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10510 | s%@LN_S@%$LN_S%g |
10511 | s%@YACC@%$YACC%g | |
c906108c | 10512 | s%@AR@%$AR%g |
95ca63c4 CF |
10513 | s%@DLLTOOL@%$DLLTOOL%g |
10514 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10515 | s%@MIG@%$MIG%g |
c906108c | 10516 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
b4df4f68 | 10517 | s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g |
c906108c | 10518 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10519 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10520 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10521 | s%@MMALLOC@%$MMALLOC%g | |
88987551 | 10522 | s%@REGEX@%$REGEX%g |
aff38e61 | 10523 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
c906108c | 10524 | s%@TERM_LIB@%$TERM_LIB%g |
cd0fc7c3 | 10525 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10526 | s%@LIBGUI@%$LIBGUI%g |
10527 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10528 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10529 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10530 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10531 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10532 | s%@TCL_CC@%$TCL_CC%g | |
10533 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10534 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10535 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10536 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10537 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10538 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10539 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10540 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10541 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10542 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10543 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10544 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10545 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10546 | s%@TK_VERSION@%$TK_VERSION%g | |
10547 | s%@TK_DEFS@%$TK_DEFS%g | |
10548 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10549 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10550 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10551 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10552 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10553 | s%@TCLHDIR@%$TCLHDIR%g | |
10554 | s%@TKHDIR@%$TKHDIR%g | |
10555 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10556 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10557 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10558 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10559 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10560 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10561 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10562 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10563 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10564 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10565 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10566 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10567 | s%@X_CFLAGS@%$X_CFLAGS%g |
10568 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10569 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10570 | s%@TCL_DEPS@%$TCL_DEPS%g |
10571 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10572 | s%@ITCLLIB@%$ITCLLIB%g |
10573 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10574 | s%@ITKLIB@%$ITKLIB%g | |
10575 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10576 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10577 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10578 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10579 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10580 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
10581 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
10582 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 10583 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10584 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10585 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10586 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10587 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10588 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10589 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10590 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10591 | s%@HLDFLAGS@%$HLDFLAGS%g |
10592 | s%@HLDENV@%$HLDENV%g | |
10593 | s%@target_subdir@%$target_subdir%g | |
10594 | /@host_makefile_frag@/r $host_makefile_frag | |
10595 | s%@host_makefile_frag@%%g | |
10596 | /@target_makefile_frag@/r $target_makefile_frag | |
10597 | s%@target_makefile_frag@%%g | |
10598 | s%@frags@%$frags%g | |
96baa820 | 10599 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
10600 | s%@xm_h@%$xm_h%g |
10601 | s%@tm_h@%$tm_h%g | |
10602 | s%@nm_h@%$nm_h%g | |
c906108c | 10603 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10604 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10605 | s%@subdirs@%$subdirs%g |
10606 | ||
10607 | CEOF | |
10608 | EOF | |
10609 | ||
10610 | cat >> $CONFIG_STATUS <<\EOF | |
10611 | ||
10612 | # Split the substitutions into bite-sized pieces for seds with | |
10613 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10614 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10615 | ac_file=1 # Number of current file. |
10616 | ac_beg=1 # First line for current file. | |
10617 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10618 | ac_more_lines=: | |
10619 | ac_sed_cmds="" | |
10620 | while $ac_more_lines; do | |
10621 | if test $ac_beg -gt 1; then | |
10622 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10623 | else | |
10624 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10625 | fi | |
10626 | if test ! -s conftest.s$ac_file; then | |
10627 | ac_more_lines=false | |
10628 | rm -f conftest.s$ac_file | |
10629 | else | |
10630 | if test -z "$ac_sed_cmds"; then | |
10631 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10632 | else | |
10633 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10634 | fi | |
10635 | ac_file=`expr $ac_file + 1` | |
10636 | ac_beg=$ac_end | |
10637 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10638 | fi | |
10639 | done | |
10640 | if test -z "$ac_sed_cmds"; then | |
10641 | ac_sed_cmds=cat | |
10642 | fi | |
10643 | EOF | |
10644 | ||
10645 | cat >> $CONFIG_STATUS <<EOF | |
10646 | ||
ed952ac5 | 10647 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10648 | EOF |
10649 | cat >> $CONFIG_STATUS <<\EOF | |
10650 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10651 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10652 | case "$ac_file" in | |
10653 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10654 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10655 | *) ac_file_in="${ac_file}.in" ;; | |
10656 | esac | |
10657 | ||
10658 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10659 | ||
10660 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10661 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10662 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10663 | # The file is in a subdirectory. | |
10664 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10665 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10666 | # A "../" for each directory in $ac_dir_suffix. | |
10667 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10668 | else | |
10669 | ac_dir_suffix= ac_dots= | |
10670 | fi | |
10671 | ||
10672 | case "$ac_given_srcdir" in | |
10673 | .) srcdir=. | |
10674 | if test -z "$ac_dots"; then top_srcdir=. | |
10675 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10676 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10677 | *) # Relative path. | |
10678 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10679 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10680 | esac | |
10681 | ||
10682 | case "$ac_given_INSTALL" in | |
10683 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10684 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10685 | esac | |
10686 | ||
10687 | echo creating "$ac_file" | |
10688 | rm -f "$ac_file" | |
10689 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10690 | case "$ac_file" in | |
10691 | *Makefile*) ac_comsub="1i\\ | |
10692 | # $configure_input" ;; | |
10693 | *) ac_comsub= ;; | |
10694 | esac | |
10695 | ||
10696 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10697 | sed -e "$ac_comsub | |
10698 | s%@configure_input@%$configure_input%g | |
10699 | s%@srcdir@%$srcdir%g | |
10700 | s%@top_srcdir@%$top_srcdir%g | |
10701 | s%@INSTALL@%$INSTALL%g | |
10702 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10703 | fi; done | |
10704 | rm -f conftest.s* | |
10705 | ||
10706 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10707 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10708 | # | |
10709 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10710 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10711 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10712 | ac_dC='\3' | |
10713 | ac_dD='%g' | |
10714 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10715 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10716 | ac_uB='\([ ]\)%\1#\2define\3' | |
10717 | ac_uC=' ' | |
10718 | ac_uD='\4%g' | |
10719 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10720 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10721 | ac_eB='$%\1#\2define\3' | |
10722 | ac_eC=' ' | |
10723 | ac_eD='%g' | |
10724 | ||
10725 | if test "${CONFIG_HEADERS+set}" != set; then | |
10726 | EOF | |
10727 | cat >> $CONFIG_STATUS <<EOF | |
10728 | CONFIG_HEADERS="config.h:config.in" | |
10729 | EOF | |
10730 | cat >> $CONFIG_STATUS <<\EOF | |
10731 | fi | |
10732 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10733 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10734 | case "$ac_file" in | |
10735 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10736 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10737 | *) ac_file_in="${ac_file}.in" ;; | |
10738 | esac | |
10739 | ||
10740 | echo creating $ac_file | |
10741 | ||
10742 | rm -f conftest.frag conftest.in conftest.out | |
10743 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10744 | cat $ac_file_inputs > conftest.in | |
10745 | ||
10746 | EOF | |
10747 | ||
10748 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10749 | # the proper values into config.h.in to produce config.h. And first: | |
10750 | # Protect against being on the right side of a sed subst in config.status. | |
10751 | # Protect against being in an unquoted here document in config.status. | |
10752 | rm -f conftest.vals | |
10753 | cat > conftest.hdr <<\EOF | |
10754 | s/[\\&%]/\\&/g | |
10755 | s%[\\$`]%\\&%g | |
10756 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10757 | s%ac_d%ac_u%gp | |
10758 | s%ac_u%ac_e%gp | |
10759 | EOF | |
10760 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10761 | rm -f conftest.hdr | |
10762 | ||
10763 | # This sed command replaces #undef with comments. This is necessary, for | |
10764 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10765 | # on some systems where configure will not decide to define it. | |
10766 | cat >> conftest.vals <<\EOF | |
10767 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10768 | EOF | |
10769 | ||
10770 | # Break up conftest.vals because some shells have a limit on | |
10771 | # the size of here documents, and old seds have small limits too. | |
10772 | ||
10773 | rm -f conftest.tail | |
10774 | while : | |
10775 | do | |
10776 | ac_lines=`grep -c . conftest.vals` | |
10777 | # grep -c gives empty output for an empty file on some AIX systems. | |
10778 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10779 | # Write a limited-size here document to conftest.frag. | |
10780 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10781 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10782 | echo 'CEOF | |
10783 | sed -f conftest.frag conftest.in > conftest.out | |
10784 | rm -f conftest.in | |
10785 | mv conftest.out conftest.in | |
10786 | ' >> $CONFIG_STATUS | |
10787 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10788 | rm -f conftest.vals | |
10789 | mv conftest.tail conftest.vals | |
10790 | done | |
10791 | rm -f conftest.vals | |
10792 | ||
10793 | cat >> $CONFIG_STATUS <<\EOF | |
10794 | rm -f conftest.frag conftest.h | |
10795 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10796 | cat conftest.in >> conftest.h | |
10797 | rm -f conftest.in | |
10798 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10799 | echo "$ac_file is unchanged" | |
10800 | rm -f conftest.h | |
10801 | else | |
10802 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10803 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10804 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10805 | # The file is in a subdirectory. | |
10806 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10807 | fi | |
10808 | rm -f $ac_file | |
10809 | mv conftest.h $ac_file | |
10810 | fi | |
10811 | fi; done | |
10812 | ||
10813 | EOF | |
10814 | ||
10815 | cat >> $CONFIG_STATUS <<EOF | |
10816 | ac_sources="$files" | |
10817 | ac_dests="$links" | |
10818 | EOF | |
10819 | ||
10820 | cat >> $CONFIG_STATUS <<\EOF | |
10821 | srcdir=$ac_given_srcdir | |
10822 | while test -n "$ac_sources"; do | |
10823 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10824 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10825 | ||
10826 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10827 | ||
10828 | if test ! -r $srcdir/$ac_source; then | |
10829 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10830 | fi | |
10831 | rm -f $ac_dest | |
10832 | ||
10833 | # Make relative symlinks. | |
10834 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10835 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10836 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10837 | # The dest file is in a subdirectory. | |
10838 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10839 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10840 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10841 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10842 | else | |
10843 | ac_dest_dir_suffix= ac_dots= | |
10844 | fi | |
10845 | ||
10846 | case "$srcdir" in | |
10847 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10848 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10849 | esac | |
10850 | ||
10851 | # Make a symlink if possible; otherwise try a hard link. | |
10852 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10853 | ln $srcdir/$ac_source $ac_dest; then : | |
10854 | else | |
10855 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10856 | fi | |
10857 | done | |
10858 | EOF | |
10859 | cat >> $CONFIG_STATUS <<EOF | |
10860 | ||
10861 | gdb_host_cpu=$gdb_host_cpu | |
10862 | gdb_target_cpu=$gdb_target_cpu | |
10863 | nativefile=$nativefile | |
10864 | ||
10865 | EOF | |
10866 | cat >> $CONFIG_STATUS <<\EOF | |
10867 | ||
10868 | if test "${nativefile}" = ""; then | |
c4620205 | 10869 | < Makefile \ |
e27da16d JT |
10870 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10871 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10872 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10873 | > Makefile.tem | |
c906108c SS |
10874 | mv -f Makefile.tem Makefile |
10875 | fi | |
10876 | ||
10877 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10878 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10879 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10880 | mv -f Makefile.tmp Makefile | |
10881 | ||
2acceee2 | 10882 | |
c906108c SS |
10883 | case x$CONFIG_HEADERS in |
10884 | xconfig.h:config.in) | |
10885 | echo > stamp-h ;; | |
10886 | esac | |
10887 | ||
10888 | exit 0 | |
10889 | EOF | |
10890 | chmod +x $CONFIG_STATUS | |
10891 | rm -fr confdefs* $ac_clean_files | |
10892 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10893 | ||
10894 | if test "$no_recursion" != yes; then | |
10895 | ||
10896 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10897 | ac_sub_configure_args= | |
10898 | ac_prev= | |
10899 | for ac_arg in $ac_configure_args; do | |
10900 | if test -n "$ac_prev"; then | |
10901 | ac_prev= | |
10902 | continue | |
10903 | fi | |
10904 | case "$ac_arg" in | |
10905 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10906 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10907 | ac_prev=cache_file ;; | |
10908 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10909 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10910 | ;; | |
10911 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10912 | ac_prev=srcdir ;; | |
10913 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10914 | ;; | |
10915 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10916 | esac | |
10917 | done | |
10918 | ||
10919 | for ac_config_dir in $configdirs; do | |
10920 | ||
10921 | # Do not complain, so a configure script can configure whichever | |
10922 | # parts of a large source tree are present. | |
10923 | if test ! -d $srcdir/$ac_config_dir; then | |
10924 | continue | |
10925 | fi | |
10926 | ||
10927 | echo configuring in $ac_config_dir | |
10928 | ||
10929 | case "$srcdir" in | |
10930 | .) ;; | |
10931 | *) | |
10932 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10933 | else | |
10934 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10935 | fi | |
10936 | ;; | |
10937 | esac | |
10938 | ||
10939 | ac_popdir=`pwd` | |
10940 | cd $ac_config_dir | |
10941 | ||
10942 | # A "../" for each directory in /$ac_config_dir. | |
10943 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10944 | ||
10945 | case "$srcdir" in | |
10946 | .) # No --srcdir option. We are building in place. | |
10947 | ac_sub_srcdir=$srcdir ;; | |
10948 | /*) # Absolute path. | |
10949 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10950 | *) # Relative path. | |
10951 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10952 | esac | |
10953 | ||
10954 | # Check for guested configure; otherwise get Cygnus style configure. | |
10955 | if test -f $ac_sub_srcdir/configure; then | |
10956 | ac_sub_configure=$ac_sub_srcdir/configure | |
10957 | elif test -f $ac_sub_srcdir/configure.in; then | |
10958 | ac_sub_configure=$ac_configure | |
10959 | else | |
10960 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10961 | ac_sub_configure= | |
10962 | fi | |
10963 | ||
10964 | # The recursion is here. | |
10965 | if test -n "$ac_sub_configure"; then | |
10966 | ||
10967 | # Make the cache file name correct relative to the subdirectory. | |
10968 | case "$cache_file" in | |
10969 | /*) ac_sub_cache_file=$cache_file ;; | |
10970 | *) # Relative path. | |
10971 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10972 | esac | |
10973 | case "$ac_given_INSTALL" in | |
10974 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10975 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10976 | esac | |
10977 | ||
10978 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10979 | # The eval makes quoting arguments work. | |
10980 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10981 | then : | |
10982 | else | |
10983 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10984 | fi | |
10985 | fi | |
10986 | ||
10987 | cd $ac_popdir | |
10988 | done | |
10989 | fi | |
10990 | ||
10991 | ||
10992 | exit 0 |