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" | |
627af7ea MK |
21 | ac_help="$ac_help |
22 | --disable-gdbcli disable command-line interface (CLI)" | |
23 | ac_help="$ac_help | |
24 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
25 | ac_help="$ac_help |
26 | --enable-tui enable full-screen terminal user interface (TUI)" | |
27 | ac_help="$ac_help | |
28 | --without-included-regex don't use included regex; this is the default | |
29 | on systems with version 2 of the GNU C library | |
30 | (use with caution on other system)" | |
c906108c SS |
31 | ac_help="$ac_help |
32 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
33 | ac_help="$ac_help |
34 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
35 | ac_help="$ac_help |
36 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
37 | ac_help="$ac_help |
38 | --enable-gdbtk Enable GDBTK GUI front end" | |
39 | ac_help="$ac_help | |
40 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
41 | ac_help="$ac_help | |
42 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tclinclude=DIR Directory where tcl private headers are" | |
45 | ac_help="$ac_help | |
46 | --with-tkinclude=DIR Directory where tk private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
51 | ac_help="$ac_help |
52 | --with-x use the X Window System" | |
7a292a7a SS |
53 | ac_help="$ac_help |
54 | --enable-sim Link gdb with simulator" | |
c906108c SS |
55 | ac_help="$ac_help |
56 | --enable-shared Use shared libraries" | |
8dcde887 MK |
57 | ac_help="$ac_help |
58 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
59 | ac_help="$ac_help |
60 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
61 | |
62 | # Initialize some variables set by options. | |
63 | # The variables have the same names as the options, with | |
64 | # dashes changed to underlines. | |
65 | build=NONE | |
66 | cache_file=./config.cache | |
67 | exec_prefix=NONE | |
68 | host=NONE | |
69 | no_create= | |
70 | nonopt=NONE | |
71 | no_recursion= | |
72 | prefix=NONE | |
73 | program_prefix=NONE | |
74 | program_suffix=NONE | |
75 | program_transform_name=s,x,x, | |
76 | silent= | |
77 | site= | |
c41b7eb1 | 78 | sitefile= |
c906108c SS |
79 | srcdir= |
80 | target=NONE | |
81 | verbose= | |
82 | x_includes=NONE | |
83 | x_libraries=NONE | |
84 | bindir='${exec_prefix}/bin' | |
85 | sbindir='${exec_prefix}/sbin' | |
86 | libexecdir='${exec_prefix}/libexec' | |
87 | datadir='${prefix}/share' | |
88 | sysconfdir='${prefix}/etc' | |
89 | sharedstatedir='${prefix}/com' | |
90 | localstatedir='${prefix}/var' | |
91 | libdir='${exec_prefix}/lib' | |
92 | includedir='${prefix}/include' | |
93 | oldincludedir='/usr/include' | |
94 | infodir='${prefix}/info' | |
95 | mandir='${prefix}/man' | |
96 | ||
97 | # Initialize some other variables. | |
98 | subdirs= | |
99 | MFLAGS= MAKEFLAGS= | |
100 | SHELL=${CONFIG_SHELL-/bin/sh} | |
101 | # Maximum number of lines to put in a shell here document. | |
102 | ac_max_here_lines=12 | |
103 | ||
104 | ac_prev= | |
105 | for ac_option | |
106 | do | |
107 | ||
108 | # If the previous option needs an argument, assign it. | |
109 | if test -n "$ac_prev"; then | |
110 | eval "$ac_prev=\$ac_option" | |
111 | ac_prev= | |
112 | continue | |
113 | fi | |
114 | ||
115 | case "$ac_option" in | |
116 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
117 | *) ac_optarg= ;; | |
118 | esac | |
119 | ||
120 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
121 | ||
122 | case "$ac_option" in | |
123 | ||
124 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
125 | ac_prev=bindir ;; | |
126 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
127 | bindir="$ac_optarg" ;; | |
128 | ||
129 | -build | --build | --buil | --bui | --bu) | |
130 | ac_prev=build ;; | |
131 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
132 | build="$ac_optarg" ;; | |
133 | ||
134 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
135 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
136 | ac_prev=cache_file ;; | |
137 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
138 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
139 | cache_file="$ac_optarg" ;; | |
140 | ||
141 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
142 | ac_prev=datadir ;; | |
143 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
144 | | --da=*) | |
145 | datadir="$ac_optarg" ;; | |
146 | ||
147 | -disable-* | --disable-*) | |
148 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
149 | # Reject names that are not valid shell variable names. | |
150 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
151 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
152 | fi | |
153 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
154 | eval "enable_${ac_feature}=no" ;; | |
155 | ||
156 | -enable-* | --enable-*) | |
157 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
158 | # Reject names that are not valid shell variable names. | |
159 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
160 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
161 | fi | |
162 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
163 | case "$ac_option" in | |
164 | *=*) ;; | |
165 | *) ac_optarg=yes ;; | |
166 | esac | |
167 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
168 | ||
169 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
170 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
171 | | --exec | --exe | --ex) | |
172 | ac_prev=exec_prefix ;; | |
173 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
174 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
175 | | --exec=* | --exe=* | --ex=*) | |
176 | exec_prefix="$ac_optarg" ;; | |
177 | ||
178 | -gas | --gas | --ga | --g) | |
179 | # Obsolete; use --with-gas. | |
180 | with_gas=yes ;; | |
181 | ||
182 | -help | --help | --hel | --he) | |
183 | # Omit some internal or obsolete options to make the list less imposing. | |
184 | # This message is too long to be a string in the A/UX 3.1 sh. | |
185 | cat << EOF | |
186 | Usage: configure [options] [host] | |
187 | Options: [defaults in brackets after descriptions] | |
188 | Configuration: | |
189 | --cache-file=FILE cache test results in FILE | |
190 | --help print this message | |
191 | --no-create do not create output files | |
192 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 193 | --site-file=FILE use FILE as the site file |
c906108c SS |
194 | --version print the version of autoconf that created configure |
195 | Directory and file names: | |
196 | --prefix=PREFIX install architecture-independent files in PREFIX | |
197 | [$ac_default_prefix] | |
198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
199 | [same as prefix] | |
200 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
203 | --datadir=DIR read-only architecture-independent data in DIR | |
204 | [PREFIX/share] | |
205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
207 | [PREFIX/com] | |
208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
210 | --includedir=DIR C header files in DIR [PREFIX/include] | |
211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
212 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
213 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
214 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
215 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
216 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
217 | --program-transform-name=PROGRAM | |
218 | run sed PROGRAM on installed program names | |
219 | EOF | |
220 | cat << EOF | |
221 | Host type: | |
222 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
223 | --host=HOST configure for HOST [guessed] | |
224 | --target=TARGET configure for TARGET [TARGET=HOST] | |
225 | Features and packages: | |
226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
230 | --x-includes=DIR X include files are in DIR | |
231 | --x-libraries=DIR X library files are in DIR | |
232 | EOF | |
233 | if test -n "$ac_help"; then | |
234 | echo "--enable and --with options recognized:$ac_help" | |
235 | fi | |
236 | exit 0 ;; | |
237 | ||
238 | -host | --host | --hos | --ho) | |
239 | ac_prev=host ;; | |
240 | -host=* | --host=* | --hos=* | --ho=*) | |
241 | host="$ac_optarg" ;; | |
242 | ||
243 | -includedir | --includedir | --includedi | --included | --include \ | |
244 | | --includ | --inclu | --incl | --inc) | |
245 | ac_prev=includedir ;; | |
246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
247 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
248 | includedir="$ac_optarg" ;; | |
249 | ||
250 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
251 | ac_prev=infodir ;; | |
252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
253 | infodir="$ac_optarg" ;; | |
254 | ||
255 | -libdir | --libdir | --libdi | --libd) | |
256 | ac_prev=libdir ;; | |
257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
258 | libdir="$ac_optarg" ;; | |
259 | ||
260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
261 | | --libexe | --libex | --libe) | |
262 | ac_prev=libexecdir ;; | |
263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
264 | | --libexe=* | --libex=* | --libe=*) | |
265 | libexecdir="$ac_optarg" ;; | |
266 | ||
267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
268 | | --localstate | --localstat | --localsta | --localst \ | |
269 | | --locals | --local | --loca | --loc | --lo) | |
270 | ac_prev=localstatedir ;; | |
271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
274 | localstatedir="$ac_optarg" ;; | |
275 | ||
276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
277 | ac_prev=mandir ;; | |
278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
279 | mandir="$ac_optarg" ;; | |
280 | ||
281 | -nfp | --nfp | --nf) | |
282 | # Obsolete; use --without-fp. | |
283 | with_fp=no ;; | |
284 | ||
285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
286 | | --no-cr | --no-c) | |
287 | no_create=yes ;; | |
288 | ||
289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
291 | no_recursion=yes ;; | |
292 | ||
293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
295 | | --oldin | --oldi | --old | --ol | --o) | |
296 | ac_prev=oldincludedir ;; | |
297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
300 | oldincludedir="$ac_optarg" ;; | |
301 | ||
302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
303 | ac_prev=prefix ;; | |
304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
305 | prefix="$ac_optarg" ;; | |
306 | ||
307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
308 | | --program-pre | --program-pr | --program-p) | |
309 | ac_prev=program_prefix ;; | |
310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
312 | program_prefix="$ac_optarg" ;; | |
313 | ||
314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
315 | | --program-suf | --program-su | --program-s) | |
316 | ac_prev=program_suffix ;; | |
317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
319 | program_suffix="$ac_optarg" ;; | |
320 | ||
321 | -program-transform-name | --program-transform-name \ | |
322 | | --program-transform-nam | --program-transform-na \ | |
323 | | --program-transform-n | --program-transform- \ | |
324 | | --program-transform | --program-transfor \ | |
325 | | --program-transfo | --program-transf \ | |
326 | | --program-trans | --program-tran \ | |
327 | | --progr-tra | --program-tr | --program-t) | |
328 | ac_prev=program_transform_name ;; | |
329 | -program-transform-name=* | --program-transform-name=* \ | |
330 | | --program-transform-nam=* | --program-transform-na=* \ | |
331 | | --program-transform-n=* | --program-transform-=* \ | |
332 | | --program-transform=* | --program-transfor=* \ | |
333 | | --program-transfo=* | --program-transf=* \ | |
334 | | --program-trans=* | --program-tran=* \ | |
335 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
336 | program_transform_name="$ac_optarg" ;; | |
337 | ||
338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
339 | | -silent | --silent | --silen | --sile | --sil) | |
340 | silent=yes ;; | |
341 | ||
342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
343 | ac_prev=sbindir ;; | |
344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
345 | | --sbi=* | --sb=*) | |
346 | sbindir="$ac_optarg" ;; | |
347 | ||
348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
350 | | --sharedst | --shareds | --shared | --share | --shar \ | |
351 | | --sha | --sh) | |
352 | ac_prev=sharedstatedir ;; | |
353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
356 | | --sha=* | --sh=*) | |
357 | sharedstatedir="$ac_optarg" ;; | |
358 | ||
359 | -site | --site | --sit) | |
360 | ac_prev=site ;; | |
361 | -site=* | --site=* | --sit=*) | |
362 | site="$ac_optarg" ;; | |
363 | ||
c41b7eb1 JB |
364 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
365 | ac_prev=sitefile ;; | |
366 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
367 | sitefile="$ac_optarg" ;; | |
368 | ||
c906108c SS |
369 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
370 | ac_prev=srcdir ;; | |
371 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
372 | srcdir="$ac_optarg" ;; | |
373 | ||
374 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
375 | | --syscon | --sysco | --sysc | --sys | --sy) | |
376 | ac_prev=sysconfdir ;; | |
377 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
378 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
379 | sysconfdir="$ac_optarg" ;; | |
380 | ||
381 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
382 | ac_prev=target ;; | |
383 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
384 | target="$ac_optarg" ;; | |
385 | ||
386 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
387 | verbose=yes ;; | |
388 | ||
389 | -version | --version | --versio | --versi | --vers) | |
390 | echo "configure generated by autoconf version 2.13" | |
391 | exit 0 ;; | |
392 | ||
393 | -with-* | --with-*) | |
394 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
395 | # Reject names that are not valid shell variable names. | |
396 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
397 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
398 | fi | |
399 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
400 | case "$ac_option" in | |
401 | *=*) ;; | |
402 | *) ac_optarg=yes ;; | |
403 | esac | |
404 | eval "with_${ac_package}='$ac_optarg'" ;; | |
405 | ||
406 | -without-* | --without-*) | |
407 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
408 | # Reject names that are not valid shell variable names. | |
409 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
410 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
411 | fi | |
412 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
413 | eval "with_${ac_package}=no" ;; | |
414 | ||
415 | --x) | |
416 | # Obsolete; use --with-x. | |
417 | with_x=yes ;; | |
418 | ||
419 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
420 | | --x-incl | --x-inc | --x-in | --x-i) | |
421 | ac_prev=x_includes ;; | |
422 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
423 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
424 | x_includes="$ac_optarg" ;; | |
425 | ||
426 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
427 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
428 | ac_prev=x_libraries ;; | |
429 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
430 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
431 | x_libraries="$ac_optarg" ;; | |
432 | ||
433 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
434 | ;; | |
435 | ||
436 | *) | |
437 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
438 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
439 | fi | |
440 | if test "x$nonopt" != xNONE; then | |
441 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
442 | fi | |
443 | nonopt="$ac_option" | |
444 | ;; | |
445 | ||
446 | esac | |
447 | done | |
448 | ||
449 | if test -n "$ac_prev"; then | |
450 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
451 | fi | |
452 | ||
453 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
454 | ||
455 | # File descriptor usage: | |
456 | # 0 standard input | |
457 | # 1 file creation | |
458 | # 2 errors and warnings | |
459 | # 3 some systems may open it to /dev/tty | |
460 | # 4 used on the Kubota Titan | |
461 | # 6 checking for... messages and results | |
462 | # 5 compiler messages saved in config.log | |
463 | if test "$silent" = yes; then | |
464 | exec 6>/dev/null | |
465 | else | |
466 | exec 6>&1 | |
467 | fi | |
468 | exec 5>./config.log | |
469 | ||
470 | echo "\ | |
471 | This file contains any messages produced by compilers while | |
472 | running configure, to aid debugging if configure makes a mistake. | |
473 | " 1>&5 | |
474 | ||
475 | # Strip out --no-create and --no-recursion so they do not pile up. | |
476 | # Also quote any args containing shell metacharacters. | |
477 | ac_configure_args= | |
478 | for ac_arg | |
479 | do | |
480 | case "$ac_arg" in | |
481 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
482 | | --no-cr | --no-c) ;; | |
483 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
484 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
485 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
486 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
487 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
488 | esac | |
489 | done | |
490 | ||
491 | # NLS nuisances. | |
492 | # Only set these to C if already set. These must not be set unconditionally | |
493 | # because not all systems understand e.g. LANG=C (notably SCO). | |
494 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
495 | # Non-C LC_CTYPE values break the ctype check. | |
496 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
497 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
498 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
499 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
500 | ||
501 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
502 | rm -rf conftest* confdefs.h | |
503 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
504 | echo > confdefs.h | |
505 | ||
506 | # A filename unique to this package, relative to the directory that | |
507 | # configure is in, which we can look for to find out if srcdir is correct. | |
508 | ac_unique_file=main.c | |
509 | ||
510 | # Find the source files, if location was not specified. | |
511 | if test -z "$srcdir"; then | |
512 | ac_srcdir_defaulted=yes | |
513 | # Try the directory containing this script, then its parent. | |
514 | ac_prog=$0 | |
515 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
516 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
517 | srcdir=$ac_confdir | |
518 | if test ! -r $srcdir/$ac_unique_file; then | |
519 | srcdir=.. | |
520 | fi | |
521 | else | |
522 | ac_srcdir_defaulted=no | |
523 | fi | |
524 | if test ! -r $srcdir/$ac_unique_file; then | |
525 | if test "$ac_srcdir_defaulted" = yes; then | |
526 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
527 | else | |
528 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
529 | fi | |
530 | fi | |
531 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
532 | ||
533 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
534 | if test -z "$sitefile"; then |
535 | if test -z "$CONFIG_SITE"; then | |
536 | if test "x$prefix" != xNONE; then | |
537 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
538 | else | |
539 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
540 | fi | |
c906108c | 541 | fi |
c41b7eb1 JB |
542 | else |
543 | CONFIG_SITE="$sitefile" | |
c906108c SS |
544 | fi |
545 | for ac_site_file in $CONFIG_SITE; do | |
546 | if test -r "$ac_site_file"; then | |
547 | echo "loading site script $ac_site_file" | |
548 | . "$ac_site_file" | |
549 | fi | |
550 | done | |
551 | ||
552 | if test -r "$cache_file"; then | |
553 | echo "loading cache $cache_file" | |
554 | . $cache_file | |
555 | else | |
556 | echo "creating cache $cache_file" | |
557 | > $cache_file | |
558 | fi | |
559 | ||
560 | ac_ext=c | |
561 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
562 | ac_cpp='$CPP $CPPFLAGS' | |
563 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
564 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
565 | cross_compiling=$ac_cv_prog_cc_cross | |
566 | ||
567 | ac_exeext= | |
568 | ac_objext=o | |
569 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
570 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
571 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
572 | ac_n= ac_c=' | |
573 | ' ac_t=' ' | |
574 | else | |
575 | ac_n=-n ac_c= ac_t= | |
576 | fi | |
577 | else | |
578 | ac_n= ac_c='\c' ac_t= | |
579 | fi | |
580 | ||
581 | ||
582 | ||
413ccac7 | 583 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
91151a06 | 584 | echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
585 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
586 | if test "${enable_maintainer_mode+set}" = set; then | |
587 | enableval="$enable_maintainer_mode" | |
588 | USE_MAINTAINER_MODE=$enableval | |
589 | else | |
590 | USE_MAINTAINER_MODE=no | |
591 | fi | |
592 | ||
593 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
594 | ||
595 | ||
596 | if test $USE_MAINTAINER_MODE = yes; then | |
597 | MAINTAINER_MODE_TRUE= | |
598 | MAINTAINER_MODE_FALSE='#' | |
599 | else | |
600 | MAINTAINER_MODE_TRUE='#' | |
601 | MAINTAINER_MODE_FALSE= | |
602 | fi | |
603 | MAINT=$MAINTAINER_MODE_TRUE | |
604 | ||
605 | ||
c906108c SS |
606 | |
607 | # Extract the first word of "gcc", so it can be a program name with args. | |
608 | set dummy gcc; ac_word=$2 | |
609 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 610 | echo "configure:611: checking for $ac_word" >&5 |
c906108c SS |
611 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
613 | else | |
614 | if test -n "$CC"; then | |
615 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
616 | else | |
617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
618 | ac_dummy="$PATH" | |
619 | for ac_dir in $ac_dummy; do | |
620 | test -z "$ac_dir" && ac_dir=. | |
621 | if test -f $ac_dir/$ac_word; then | |
622 | ac_cv_prog_CC="gcc" | |
623 | break | |
624 | fi | |
625 | done | |
626 | IFS="$ac_save_ifs" | |
627 | fi | |
628 | fi | |
629 | CC="$ac_cv_prog_CC" | |
630 | if test -n "$CC"; then | |
631 | echo "$ac_t""$CC" 1>&6 | |
632 | else | |
633 | echo "$ac_t""no" 1>&6 | |
634 | fi | |
635 | ||
636 | if test -z "$CC"; then | |
637 | # Extract the first word of "cc", so it can be a program name with args. | |
638 | set dummy cc; ac_word=$2 | |
639 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 640 | echo "configure:641: checking for $ac_word" >&5 |
c906108c SS |
641 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
643 | else | |
644 | if test -n "$CC"; then | |
645 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
646 | else | |
647 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
648 | ac_prog_rejected=no | |
649 | ac_dummy="$PATH" | |
650 | for ac_dir in $ac_dummy; do | |
651 | test -z "$ac_dir" && ac_dir=. | |
652 | if test -f $ac_dir/$ac_word; then | |
653 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
654 | ac_prog_rejected=yes | |
655 | continue | |
656 | fi | |
657 | ac_cv_prog_CC="cc" | |
658 | break | |
659 | fi | |
660 | done | |
661 | IFS="$ac_save_ifs" | |
662 | if test $ac_prog_rejected = yes; then | |
663 | # We found a bogon in the path, so make sure we never use it. | |
664 | set dummy $ac_cv_prog_CC | |
665 | shift | |
666 | if test $# -gt 0; then | |
667 | # We chose a different compiler from the bogus one. | |
668 | # However, it has the same basename, so the bogon will be chosen | |
669 | # first if we set CC to just the basename; use the full file name. | |
670 | shift | |
671 | set dummy "$ac_dir/$ac_word" "$@" | |
672 | shift | |
673 | ac_cv_prog_CC="$@" | |
674 | fi | |
675 | fi | |
676 | fi | |
677 | fi | |
678 | CC="$ac_cv_prog_CC" | |
679 | if test -n "$CC"; then | |
680 | echo "$ac_t""$CC" 1>&6 | |
681 | else | |
682 | echo "$ac_t""no" 1>&6 | |
683 | fi | |
684 | ||
685 | if test -z "$CC"; then | |
686 | case "`uname -s`" in | |
687 | *win32* | *WIN32*) | |
688 | # Extract the first word of "cl", so it can be a program name with args. | |
689 | set dummy cl; ac_word=$2 | |
690 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 691 | echo "configure:692: checking for $ac_word" >&5 |
c906108c SS |
692 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
694 | else | |
695 | if test -n "$CC"; then | |
696 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
697 | else | |
698 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
699 | ac_dummy="$PATH" | |
700 | for ac_dir in $ac_dummy; do | |
701 | test -z "$ac_dir" && ac_dir=. | |
702 | if test -f $ac_dir/$ac_word; then | |
703 | ac_cv_prog_CC="cl" | |
704 | break | |
705 | fi | |
706 | done | |
707 | IFS="$ac_save_ifs" | |
708 | fi | |
709 | fi | |
710 | CC="$ac_cv_prog_CC" | |
711 | if test -n "$CC"; then | |
712 | echo "$ac_t""$CC" 1>&6 | |
713 | else | |
714 | echo "$ac_t""no" 1>&6 | |
715 | fi | |
716 | ;; | |
717 | esac | |
718 | fi | |
719 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
720 | fi | |
721 | ||
722 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
91151a06 | 723 | echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
724 | |
725 | ac_ext=c | |
726 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
727 | ac_cpp='$CPP $CPPFLAGS' | |
728 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
729 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
730 | cross_compiling=$ac_cv_prog_cc_cross | |
731 | ||
732 | cat > conftest.$ac_ext << EOF | |
733 | ||
91151a06 | 734 | #line 735 "configure" |
c906108c SS |
735 | #include "confdefs.h" |
736 | ||
737 | main(){return(0);} | |
738 | EOF | |
91151a06 | 739 | if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
740 | ac_cv_prog_cc_works=yes |
741 | # If we can't run a trivial program, we are probably using a cross compiler. | |
742 | if (./conftest; exit) 2>/dev/null; then | |
743 | ac_cv_prog_cc_cross=no | |
744 | else | |
745 | ac_cv_prog_cc_cross=yes | |
746 | fi | |
747 | else | |
748 | echo "configure: failed program was:" >&5 | |
749 | cat conftest.$ac_ext >&5 | |
750 | ac_cv_prog_cc_works=no | |
751 | fi | |
752 | rm -fr conftest* | |
753 | ac_ext=c | |
754 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
755 | ac_cpp='$CPP $CPPFLAGS' | |
756 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
757 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
758 | cross_compiling=$ac_cv_prog_cc_cross | |
759 | ||
760 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
761 | if test $ac_cv_prog_cc_works = no; then | |
762 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
763 | fi | |
764 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
91151a06 | 765 | echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
766 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
767 | cross_compiling=$ac_cv_prog_cc_cross | |
768 | ||
769 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
91151a06 | 770 | echo "configure:771: checking whether we are using GNU C" >&5 |
c906108c SS |
771 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftest.c <<EOF | |
775 | #ifdef __GNUC__ | |
776 | yes; | |
777 | #endif | |
778 | EOF | |
91151a06 | 779 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
780 | ac_cv_prog_gcc=yes |
781 | else | |
782 | ac_cv_prog_gcc=no | |
783 | fi | |
784 | fi | |
785 | ||
786 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
787 | ||
788 | if test $ac_cv_prog_gcc = yes; then | |
789 | GCC=yes | |
790 | else | |
791 | GCC= | |
792 | fi | |
793 | ||
794 | ac_test_CFLAGS="${CFLAGS+set}" | |
795 | ac_save_CFLAGS="$CFLAGS" | |
796 | CFLAGS= | |
797 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
91151a06 | 798 | echo "configure:799: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
799 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
801 | else | |
802 | echo 'void f(){}' > conftest.c | |
803 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
804 | ac_cv_prog_cc_g=yes | |
805 | else | |
806 | ac_cv_prog_cc_g=no | |
807 | fi | |
808 | rm -f conftest* | |
809 | ||
810 | fi | |
811 | ||
812 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
813 | if test "$ac_test_CFLAGS" = set; then | |
814 | CFLAGS="$ac_save_CFLAGS" | |
815 | elif test $ac_cv_prog_cc_g = yes; then | |
816 | if test "$GCC" = yes; then | |
817 | CFLAGS="-g -O2" | |
818 | else | |
819 | CFLAGS="-g" | |
820 | fi | |
821 | else | |
822 | if test "$GCC" = yes; then | |
823 | CFLAGS="-O2" | |
824 | else | |
825 | CFLAGS= | |
826 | fi | |
827 | fi | |
828 | ||
829 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
91151a06 | 830 | echo "configure:831: checking how to run the C preprocessor" >&5 |
c906108c SS |
831 | # On Suns, sometimes $CPP names a directory. |
832 | if test -n "$CPP" && test -d "$CPP"; then | |
833 | CPP= | |
834 | fi | |
835 | if test -z "$CPP"; then | |
836 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
838 | else | |
839 | # This must be in double quotes, not single quotes, because CPP may get | |
840 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
841 | CPP="${CC-cc} -E" | |
842 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
843 | # not just through cpp. | |
844 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 845 | #line 846 "configure" |
c906108c SS |
846 | #include "confdefs.h" |
847 | #include <assert.h> | |
848 | Syntax Error | |
849 | EOF | |
850 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 851 | { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
852 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
853 | if test -z "$ac_err"; then | |
854 | : | |
855 | else | |
856 | echo "$ac_err" >&5 | |
857 | echo "configure: failed program was:" >&5 | |
858 | cat conftest.$ac_ext >&5 | |
859 | rm -rf conftest* | |
860 | CPP="${CC-cc} -E -traditional-cpp" | |
861 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 862 | #line 863 "configure" |
c906108c SS |
863 | #include "confdefs.h" |
864 | #include <assert.h> | |
865 | Syntax Error | |
866 | EOF | |
867 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 868 | { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
869 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
870 | if test -z "$ac_err"; then | |
871 | : | |
872 | else | |
873 | echo "$ac_err" >&5 | |
874 | echo "configure: failed program was:" >&5 | |
875 | cat conftest.$ac_ext >&5 | |
876 | rm -rf conftest* | |
877 | CPP="${CC-cc} -nologo -E" | |
878 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 879 | #line 880 "configure" |
c906108c SS |
880 | #include "confdefs.h" |
881 | #include <assert.h> | |
882 | Syntax Error | |
883 | EOF | |
884 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 885 | { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
886 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
887 | if test -z "$ac_err"; then | |
888 | : | |
889 | else | |
890 | echo "$ac_err" >&5 | |
891 | echo "configure: failed program was:" >&5 | |
892 | cat conftest.$ac_ext >&5 | |
893 | rm -rf conftest* | |
894 | CPP=/lib/cpp | |
895 | fi | |
896 | rm -f conftest* | |
897 | fi | |
898 | rm -f conftest* | |
899 | fi | |
900 | rm -f conftest* | |
901 | ac_cv_prog_CPP="$CPP" | |
902 | fi | |
903 | CPP="$ac_cv_prog_CPP" | |
904 | else | |
905 | ac_cv_prog_CPP="$CPP" | |
906 | fi | |
907 | echo "$ac_t""$CPP" 1>&6 | |
908 | ||
909 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
91151a06 | 910 | echo "configure:911: checking for AIX" >&5 |
c906108c | 911 | cat > conftest.$ac_ext <<EOF |
91151a06 | 912 | #line 913 "configure" |
c906108c SS |
913 | #include "confdefs.h" |
914 | #ifdef _AIX | |
915 | yes | |
916 | #endif | |
917 | ||
918 | EOF | |
919 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
920 | egrep "yes" >/dev/null 2>&1; then | |
921 | rm -rf conftest* | |
922 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
923 | #define _ALL_SOURCE 1 | |
924 | EOF | |
925 | ||
926 | else | |
927 | rm -rf conftest* | |
928 | echo "$ac_t""no" 1>&6 | |
929 | fi | |
930 | rm -f conftest* | |
931 | ||
932 | ||
56157b4a | 933 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
91151a06 | 934 | echo "configure:935: checking for POSIXized ISC" >&5 |
56157b4a AC |
935 | if test -d /etc/conf/kconfig.d && |
936 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
937 | then | |
938 | echo "$ac_t""yes" 1>&6 | |
939 | ISC=yes # If later tests want to check for ISC. | |
940 | cat >> confdefs.h <<\EOF | |
941 | #define _POSIX_SOURCE 1 | |
c906108c SS |
942 | EOF |
943 | ||
56157b4a AC |
944 | if test "$GCC" = yes; then |
945 | CC="$CC -posix" | |
946 | else | |
947 | CC="$CC -Xp" | |
948 | fi | |
c906108c SS |
949 | else |
950 | echo "$ac_t""no" 1>&6 | |
56157b4a | 951 | ISC= |
c906108c SS |
952 | fi |
953 | ||
954 | ||
955 | ||
956 | ||
957 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
91151a06 | 958 | echo "configure:959: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
959 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
961 | else | |
962 | am_cv_prog_cc_stdc=no | |
963 | ac_save_CC="$CC" | |
964 | # Don't try gcc -ansi; that turns off useful extensions and | |
965 | # breaks some systems' header files. | |
966 | # AIX -qlanglvl=ansi | |
967 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
968 | # HP-UX 10.20 and later -Ae |
969 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 970 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 971 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
972 | do |
973 | CC="$ac_save_CC $ac_arg" | |
974 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 975 | #line 976 "configure" |
c906108c SS |
976 | #include "confdefs.h" |
977 | #include <stdarg.h> | |
978 | #include <stdio.h> | |
979 | #include <sys/types.h> | |
980 | #include <sys/stat.h> | |
981 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
982 | struct buf { int x; }; | |
983 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
984 | static char *e (p, i) | |
985 | char **p; | |
986 | int i; | |
987 | { | |
988 | return p[i]; | |
989 | } | |
990 | static char *f (char * (*g) (char **, int), char **p, ...) | |
991 | { | |
992 | char *s; | |
993 | va_list v; | |
994 | va_start (v,p); | |
995 | s = g (p, va_arg (v,int)); | |
996 | va_end (v); | |
997 | return s; | |
998 | } | |
999 | int test (int i, double x); | |
1000 | struct s1 {int (*f) (int a);}; | |
1001 | struct s2 {int (*f) (double a);}; | |
1002 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1003 | int argc; | |
1004 | char **argv; | |
1005 | ||
1006 | int main() { | |
1007 | ||
1008 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1009 | ||
1010 | ; return 0; } | |
1011 | EOF | |
91151a06 | 1012 | if { (eval echo configure:1013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1013 | rm -rf conftest* |
1014 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1015 | else | |
1016 | echo "configure: failed program was:" >&5 | |
1017 | cat conftest.$ac_ext >&5 | |
1018 | fi | |
1019 | rm -f conftest* | |
1020 | done | |
1021 | CC="$ac_save_CC" | |
1022 | ||
1023 | fi | |
1024 | ||
1025 | if test -z "$am_cv_prog_cc_stdc"; then | |
1026 | echo "$ac_t""none needed" 1>&6 | |
1027 | else | |
1028 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1029 | fi | |
1030 | case "x$am_cv_prog_cc_stdc" in | |
1031 | x|xno) ;; | |
1032 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1033 | esac | |
1034 | ||
1035 | ||
1036 | ac_aux_dir= | |
1037 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1038 | if test -f $ac_dir/install-sh; then | |
1039 | ac_aux_dir=$ac_dir | |
1040 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1041 | break | |
1042 | elif 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 | fi | |
1047 | done | |
1048 | if test -z "$ac_aux_dir"; then | |
1049 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1050 | fi | |
1051 | ac_config_guess=$ac_aux_dir/config.guess | |
1052 | ac_config_sub=$ac_aux_dir/config.sub | |
1053 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1054 | ||
1055 | ||
1056 | # Do some error checking and defaulting for the host and target type. | |
1057 | # The inputs are: | |
1058 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1059 | # | |
1060 | # The rules are: | |
1061 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1062 | # same time. | |
1063 | # 2. Host defaults to nonopt. | |
1064 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1065 | # as determined by config.guess. | |
1066 | # 4. Target and build default to nonopt. | |
1067 | # 5. If nonopt is not specified, then target and build default to host. | |
1068 | ||
1069 | # The aliases save the names the user supplied, while $host etc. | |
1070 | # will get canonicalized. | |
1071 | case $host---$target---$nonopt in | |
1072 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1073 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1074 | esac | |
1075 | ||
1076 | ||
1077 | # Make sure we can run config.sub. | |
1078 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1079 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1080 | fi | |
1081 | ||
1082 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
91151a06 | 1083 | echo "configure:1084: checking host system type" >&5 |
c906108c SS |
1084 | |
1085 | host_alias=$host | |
1086 | case "$host_alias" in | |
1087 | NONE) | |
1088 | case $nonopt in | |
1089 | NONE) | |
1090 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1091 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1092 | fi ;; | |
1093 | *) host_alias=$nonopt ;; | |
1094 | esac ;; | |
1095 | esac | |
1096 | ||
1097 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1098 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1099 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1100 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1101 | echo "$ac_t""$host" 1>&6 | |
1102 | ||
1103 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
91151a06 | 1104 | echo "configure:1105: checking target system type" >&5 |
c906108c SS |
1105 | |
1106 | target_alias=$target | |
1107 | case "$target_alias" in | |
1108 | NONE) | |
1109 | case $nonopt in | |
1110 | NONE) target_alias=$host_alias ;; | |
1111 | *) target_alias=$nonopt ;; | |
1112 | esac ;; | |
1113 | esac | |
1114 | ||
1115 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1116 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1117 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1118 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1119 | echo "$ac_t""$target" 1>&6 | |
1120 | ||
1121 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
91151a06 | 1122 | echo "configure:1123: checking build system type" >&5 |
c906108c SS |
1123 | |
1124 | build_alias=$build | |
1125 | case "$build_alias" in | |
1126 | NONE) | |
1127 | case $nonopt in | |
1128 | NONE) build_alias=$host_alias ;; | |
1129 | *) build_alias=$nonopt ;; | |
1130 | esac ;; | |
1131 | esac | |
1132 | ||
1133 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1134 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1135 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1136 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1137 | echo "$ac_t""$build" 1>&6 | |
1138 | ||
1139 | test "$host_alias" != "$target_alias" && | |
1140 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1141 | NONENONEs,x,x, && | |
1142 | program_prefix=${target_alias}- | |
1143 | ||
1144 | ||
8bb2c122 MK |
1145 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1146 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1147 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1148 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1149 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1150 | # 2.5x. | |
1151 | if test $host != $build; then | |
1152 | ac_tool_prefix=${host_alias}- | |
1153 | else | |
1154 | ac_tool_prefix= | |
1155 | fi | |
1156 | ||
1157 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1158 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1159 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1160 | echo "configure:1161: checking for $ac_word" >&5 |
8bb2c122 MK |
1161 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1162 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1163 | else | |
1164 | if test -n "$RANLIB"; then | |
1165 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1166 | else | |
1167 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1168 | ac_dummy="$PATH" | |
1169 | for ac_dir in $ac_dummy; do | |
1170 | test -z "$ac_dir" && ac_dir=. | |
1171 | if test -f $ac_dir/$ac_word; then | |
1172 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1173 | break | |
1174 | fi | |
1175 | done | |
1176 | IFS="$ac_save_ifs" | |
1177 | fi | |
1178 | fi | |
1179 | RANLIB="$ac_cv_prog_RANLIB" | |
1180 | if test -n "$RANLIB"; then | |
1181 | echo "$ac_t""$RANLIB" 1>&6 | |
1182 | else | |
1183 | echo "$ac_t""no" 1>&6 | |
1184 | fi | |
1185 | ||
1186 | ||
1187 | if test -z "$ac_cv_prog_RANLIB"; then | |
1188 | if test -n "$ac_tool_prefix"; then | |
1189 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1190 | set dummy ranlib; ac_word=$2 | |
1191 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1192 | echo "configure:1193: checking for $ac_word" >&5 |
8bb2c122 MK |
1193 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1195 | else | |
1196 | if test -n "$RANLIB"; then | |
1197 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1198 | else | |
1199 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1200 | ac_dummy="$PATH" | |
1201 | for ac_dir in $ac_dummy; do | |
1202 | test -z "$ac_dir" && ac_dir=. | |
1203 | if test -f $ac_dir/$ac_word; then | |
1204 | ac_cv_prog_RANLIB="ranlib" | |
1205 | break | |
1206 | fi | |
1207 | done | |
1208 | IFS="$ac_save_ifs" | |
1209 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1210 | fi | |
1211 | fi | |
1212 | RANLIB="$ac_cv_prog_RANLIB" | |
1213 | if test -n "$RANLIB"; then | |
1214 | echo "$ac_t""$RANLIB" 1>&6 | |
1215 | else | |
1216 | echo "$ac_t""no" 1>&6 | |
1217 | fi | |
1218 | ||
1219 | else | |
1220 | RANLIB=":" | |
1221 | fi | |
1222 | fi | |
1223 | ||
1224 | ||
c906108c SS |
1225 | ALL_LINGUAS= |
1226 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
91151a06 | 1227 | echo "configure:1228: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1228 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1229 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1231 | else | |
1232 | cat > conftestmake <<\EOF | |
1233 | all: | |
1234 | @echo 'ac_maketemp="${MAKE}"' | |
1235 | EOF | |
1236 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1237 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1238 | if test -n "$ac_maketemp"; then | |
1239 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1240 | else | |
1241 | eval ac_cv_prog_make_${ac_make}_set=no | |
1242 | fi | |
1243 | rm -f conftestmake | |
1244 | fi | |
1245 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1246 | echo "$ac_t""yes" 1>&6 | |
1247 | SET_MAKE= | |
1248 | else | |
1249 | echo "$ac_t""no" 1>&6 | |
1250 | SET_MAKE="MAKE=${MAKE-make}" | |
1251 | fi | |
1252 | ||
1253 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1254 | set dummy ranlib; ac_word=$2 | |
1255 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1256 | echo "configure:1257: checking for $ac_word" >&5 |
c906108c SS |
1257 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1258 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1259 | else | |
1260 | if test -n "$RANLIB"; then | |
1261 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1262 | else | |
1263 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1264 | ac_dummy="$PATH" | |
1265 | for ac_dir in $ac_dummy; do | |
1266 | test -z "$ac_dir" && ac_dir=. | |
1267 | if test -f $ac_dir/$ac_word; then | |
1268 | ac_cv_prog_RANLIB="ranlib" | |
1269 | break | |
1270 | fi | |
1271 | done | |
1272 | IFS="$ac_save_ifs" | |
1273 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1274 | fi | |
1275 | fi | |
1276 | RANLIB="$ac_cv_prog_RANLIB" | |
1277 | if test -n "$RANLIB"; then | |
1278 | echo "$ac_t""$RANLIB" 1>&6 | |
1279 | else | |
1280 | echo "$ac_t""no" 1>&6 | |
1281 | fi | |
1282 | ||
1283 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
91151a06 | 1284 | echo "configure:1285: checking for ANSI C header files" >&5 |
c906108c SS |
1285 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1287 | else | |
1288 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1289 | #line 1290 "configure" |
c906108c SS |
1290 | #include "confdefs.h" |
1291 | #include <stdlib.h> | |
1292 | #include <stdarg.h> | |
1293 | #include <string.h> | |
1294 | #include <float.h> | |
1295 | EOF | |
1296 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 1297 | { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1298 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1299 | if test -z "$ac_err"; then | |
1300 | rm -rf conftest* | |
1301 | ac_cv_header_stdc=yes | |
1302 | else | |
1303 | echo "$ac_err" >&5 | |
1304 | echo "configure: failed program was:" >&5 | |
1305 | cat conftest.$ac_ext >&5 | |
1306 | rm -rf conftest* | |
1307 | ac_cv_header_stdc=no | |
1308 | fi | |
1309 | rm -f conftest* | |
1310 | ||
1311 | if test $ac_cv_header_stdc = yes; then | |
1312 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1313 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1314 | #line 1315 "configure" |
c906108c SS |
1315 | #include "confdefs.h" |
1316 | #include <string.h> | |
1317 | EOF | |
1318 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1319 | egrep "memchr" >/dev/null 2>&1; then | |
1320 | : | |
1321 | else | |
1322 | rm -rf conftest* | |
1323 | ac_cv_header_stdc=no | |
1324 | fi | |
1325 | rm -f conftest* | |
1326 | ||
1327 | fi | |
1328 | ||
1329 | if test $ac_cv_header_stdc = yes; then | |
1330 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1331 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1332 | #line 1333 "configure" |
c906108c SS |
1333 | #include "confdefs.h" |
1334 | #include <stdlib.h> | |
1335 | EOF | |
1336 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1337 | egrep "free" >/dev/null 2>&1; then | |
1338 | : | |
1339 | else | |
1340 | rm -rf conftest* | |
1341 | ac_cv_header_stdc=no | |
1342 | fi | |
1343 | rm -f conftest* | |
1344 | ||
1345 | fi | |
1346 | ||
1347 | if test $ac_cv_header_stdc = yes; then | |
1348 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1349 | if test "$cross_compiling" = yes; then | |
1350 | : | |
1351 | else | |
1352 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1353 | #line 1354 "configure" |
c906108c SS |
1354 | #include "confdefs.h" |
1355 | #include <ctype.h> | |
1356 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1357 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1358 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1359 | int main () { int i; for (i = 0; i < 256; i++) | |
1360 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1361 | exit (0); } | |
1362 | ||
1363 | EOF | |
91151a06 | 1364 | if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1365 | then |
1366 | : | |
1367 | else | |
1368 | echo "configure: failed program was:" >&5 | |
1369 | cat conftest.$ac_ext >&5 | |
1370 | rm -fr conftest* | |
1371 | ac_cv_header_stdc=no | |
1372 | fi | |
1373 | rm -fr conftest* | |
1374 | fi | |
1375 | ||
1376 | fi | |
1377 | fi | |
1378 | ||
1379 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1380 | if test $ac_cv_header_stdc = yes; then | |
1381 | cat >> confdefs.h <<\EOF | |
1382 | #define STDC_HEADERS 1 | |
1383 | EOF | |
1384 | ||
1385 | fi | |
1386 | ||
1387 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
91151a06 | 1388 | echo "configure:1389: checking for working const" >&5 |
c906108c SS |
1389 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1391 | else | |
1392 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1393 | #line 1394 "configure" |
c906108c SS |
1394 | #include "confdefs.h" |
1395 | ||
1396 | int main() { | |
1397 | ||
1398 | /* Ultrix mips cc rejects this. */ | |
1399 | typedef int charset[2]; const charset x; | |
1400 | /* SunOS 4.1.1 cc rejects this. */ | |
1401 | char const *const *ccp; | |
1402 | char **p; | |
1403 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1404 | struct point {int x, y;}; | |
1405 | static struct point const zero = {0,0}; | |
1406 | /* AIX XL C 1.02.0.0 rejects this. | |
1407 | It does not let you subtract one const X* pointer from another in an arm | |
1408 | of an if-expression whose if-part is not a constant expression */ | |
1409 | const char *g = "string"; | |
1410 | ccp = &g + (g ? g-g : 0); | |
1411 | /* HPUX 7.0 cc rejects these. */ | |
1412 | ++ccp; | |
1413 | p = (char**) ccp; | |
1414 | ccp = (char const *const *) p; | |
1415 | { /* SCO 3.2v4 cc rejects this. */ | |
1416 | char *t; | |
1417 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1418 | ||
1419 | *t++ = 0; | |
1420 | } | |
1421 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1422 | int x[] = {25, 17}; | |
1423 | const int *foo = &x[0]; | |
1424 | ++foo; | |
1425 | } | |
1426 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1427 | typedef const int *iptr; | |
1428 | iptr p = 0; | |
1429 | ++p; | |
1430 | } | |
1431 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1432 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1433 | struct s { int j; const int *ap[3]; }; | |
1434 | struct s *b; b->j = 5; | |
1435 | } | |
1436 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1437 | const int foo = 10; | |
1438 | } | |
1439 | ||
1440 | ; return 0; } | |
1441 | EOF | |
91151a06 | 1442 | if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1443 | rm -rf conftest* |
1444 | ac_cv_c_const=yes | |
1445 | else | |
1446 | echo "configure: failed program was:" >&5 | |
1447 | cat conftest.$ac_ext >&5 | |
1448 | rm -rf conftest* | |
1449 | ac_cv_c_const=no | |
1450 | fi | |
1451 | rm -f conftest* | |
1452 | fi | |
1453 | ||
1454 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1455 | if test $ac_cv_c_const = no; then | |
1456 | cat >> confdefs.h <<\EOF | |
1457 | #define const | |
1458 | EOF | |
1459 | ||
1460 | fi | |
1461 | ||
1462 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
91151a06 | 1463 | echo "configure:1464: checking for inline" >&5 |
c906108c SS |
1464 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1466 | else | |
1467 | ac_cv_c_inline=no | |
1468 | for ac_kw in inline __inline__ __inline; do | |
1469 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1470 | #line 1471 "configure" |
c906108c SS |
1471 | #include "confdefs.h" |
1472 | ||
1473 | int main() { | |
1474 | } $ac_kw foo() { | |
1475 | ; return 0; } | |
1476 | EOF | |
91151a06 | 1477 | if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1478 | rm -rf conftest* |
1479 | ac_cv_c_inline=$ac_kw; break | |
1480 | else | |
1481 | echo "configure: failed program was:" >&5 | |
1482 | cat conftest.$ac_ext >&5 | |
1483 | fi | |
1484 | rm -f conftest* | |
1485 | done | |
1486 | ||
1487 | fi | |
1488 | ||
1489 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1490 | case "$ac_cv_c_inline" in | |
1491 | inline | yes) ;; | |
1492 | no) cat >> confdefs.h <<\EOF | |
1493 | #define inline | |
1494 | EOF | |
1495 | ;; | |
1496 | *) cat >> confdefs.h <<EOF | |
1497 | #define inline $ac_cv_c_inline | |
1498 | EOF | |
1499 | ;; | |
1500 | esac | |
1501 | ||
1502 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
91151a06 | 1503 | echo "configure:1504: checking for off_t" >&5 |
c906108c SS |
1504 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1505 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1506 | else | |
1507 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1508 | #line 1509 "configure" |
c906108c SS |
1509 | #include "confdefs.h" |
1510 | #include <sys/types.h> | |
1511 | #if STDC_HEADERS | |
1512 | #include <stdlib.h> | |
1513 | #include <stddef.h> | |
1514 | #endif | |
1515 | EOF | |
1516 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1517 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1518 | rm -rf conftest* | |
1519 | ac_cv_type_off_t=yes | |
1520 | else | |
1521 | rm -rf conftest* | |
1522 | ac_cv_type_off_t=no | |
1523 | fi | |
1524 | rm -f conftest* | |
1525 | ||
1526 | fi | |
1527 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1528 | if test $ac_cv_type_off_t = no; then | |
1529 | cat >> confdefs.h <<\EOF | |
1530 | #define off_t long | |
1531 | EOF | |
1532 | ||
1533 | fi | |
1534 | ||
1535 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
91151a06 | 1536 | echo "configure:1537: checking for size_t" >&5 |
c906108c SS |
1537 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1538 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1539 | else | |
1540 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1541 | #line 1542 "configure" |
c906108c SS |
1542 | #include "confdefs.h" |
1543 | #include <sys/types.h> | |
1544 | #if STDC_HEADERS | |
1545 | #include <stdlib.h> | |
1546 | #include <stddef.h> | |
1547 | #endif | |
1548 | EOF | |
1549 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1550 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1551 | rm -rf conftest* | |
1552 | ac_cv_type_size_t=yes | |
1553 | else | |
1554 | rm -rf conftest* | |
1555 | ac_cv_type_size_t=no | |
1556 | fi | |
1557 | rm -f conftest* | |
1558 | ||
1559 | fi | |
1560 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1561 | if test $ac_cv_type_size_t = no; then | |
1562 | cat >> confdefs.h <<\EOF | |
1563 | #define size_t unsigned | |
1564 | EOF | |
1565 | ||
1566 | fi | |
1567 | ||
1568 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1569 | # for constant arguments. Useless! | |
1570 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
91151a06 | 1571 | echo "configure:1572: checking for working alloca.h" >&5 |
c906108c SS |
1572 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1574 | else | |
1575 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1576 | #line 1577 "configure" |
c906108c SS |
1577 | #include "confdefs.h" |
1578 | #include <alloca.h> | |
1579 | int main() { | |
1580 | char *p = alloca(2 * sizeof(int)); | |
1581 | ; return 0; } | |
1582 | EOF | |
91151a06 | 1583 | if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1584 | rm -rf conftest* |
1585 | ac_cv_header_alloca_h=yes | |
1586 | else | |
1587 | echo "configure: failed program was:" >&5 | |
1588 | cat conftest.$ac_ext >&5 | |
1589 | rm -rf conftest* | |
1590 | ac_cv_header_alloca_h=no | |
1591 | fi | |
1592 | rm -f conftest* | |
1593 | fi | |
1594 | ||
1595 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1596 | if test $ac_cv_header_alloca_h = yes; then | |
1597 | cat >> confdefs.h <<\EOF | |
1598 | #define HAVE_ALLOCA_H 1 | |
1599 | EOF | |
1600 | ||
1601 | fi | |
1602 | ||
1603 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
91151a06 | 1604 | echo "configure:1605: checking for alloca" >&5 |
c906108c SS |
1605 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1606 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1607 | else | |
1608 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1609 | #line 1610 "configure" |
c906108c SS |
1610 | #include "confdefs.h" |
1611 | ||
1612 | #ifdef __GNUC__ | |
1613 | # define alloca __builtin_alloca | |
1614 | #else | |
1615 | # ifdef _MSC_VER | |
1616 | # include <malloc.h> | |
1617 | # define alloca _alloca | |
1618 | # else | |
1619 | # if HAVE_ALLOCA_H | |
1620 | # include <alloca.h> | |
1621 | # else | |
1622 | # ifdef _AIX | |
1623 | #pragma alloca | |
1624 | # else | |
1625 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1626 | char *alloca (); | |
1627 | # endif | |
1628 | # endif | |
1629 | # endif | |
1630 | # endif | |
1631 | #endif | |
1632 | ||
1633 | int main() { | |
1634 | char *p = (char *) alloca(1); | |
1635 | ; return 0; } | |
1636 | EOF | |
91151a06 | 1637 | if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1638 | rm -rf conftest* |
1639 | ac_cv_func_alloca_works=yes | |
1640 | else | |
1641 | echo "configure: failed program was:" >&5 | |
1642 | cat conftest.$ac_ext >&5 | |
1643 | rm -rf conftest* | |
1644 | ac_cv_func_alloca_works=no | |
1645 | fi | |
1646 | rm -f conftest* | |
1647 | fi | |
1648 | ||
1649 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1650 | if test $ac_cv_func_alloca_works = yes; then | |
1651 | cat >> confdefs.h <<\EOF | |
1652 | #define HAVE_ALLOCA 1 | |
1653 | EOF | |
1654 | ||
1655 | fi | |
1656 | ||
1657 | if test $ac_cv_func_alloca_works = no; then | |
1658 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1659 | # that cause trouble. Some versions do not even contain alloca or | |
1660 | # contain a buggy version. If you still want to use their alloca, | |
1661 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1662 | ALLOCA=alloca.${ac_objext} | |
1663 | cat >> confdefs.h <<\EOF | |
1664 | #define C_ALLOCA 1 | |
1665 | EOF | |
1666 | ||
1667 | ||
1668 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
91151a06 | 1669 | echo "configure:1670: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1670 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1672 | else | |
1673 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1674 | #line 1675 "configure" |
c906108c SS |
1675 | #include "confdefs.h" |
1676 | #if defined(CRAY) && ! defined(CRAY2) | |
1677 | webecray | |
1678 | #else | |
1679 | wenotbecray | |
1680 | #endif | |
1681 | ||
1682 | EOF | |
1683 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1684 | egrep "webecray" >/dev/null 2>&1; then | |
1685 | rm -rf conftest* | |
1686 | ac_cv_os_cray=yes | |
1687 | else | |
1688 | rm -rf conftest* | |
1689 | ac_cv_os_cray=no | |
1690 | fi | |
1691 | rm -f conftest* | |
1692 | ||
1693 | fi | |
1694 | ||
1695 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1696 | if test $ac_cv_os_cray = yes; then | |
1697 | for ac_func in _getb67 GETB67 getb67; do | |
1698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 1699 | echo "configure:1700: checking for $ac_func" >&5 |
c906108c SS |
1700 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1702 | else | |
1703 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1704 | #line 1705 "configure" |
c906108c SS |
1705 | #include "confdefs.h" |
1706 | /* System header to define __stub macros and hopefully few prototypes, | |
1707 | which can conflict with char $ac_func(); below. */ | |
1708 | #include <assert.h> | |
1709 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1710 | /* We use char because int might match the return type of a gcc2 | |
1711 | builtin and then its argument prototype would still apply. */ | |
1712 | char $ac_func(); | |
1713 | ||
1714 | int main() { | |
1715 | ||
1716 | /* The GNU C library defines this for functions which it implements | |
1717 | to always fail with ENOSYS. Some functions are actually named | |
1718 | something starting with __ and the normal name is an alias. */ | |
1719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1720 | choke me | |
1721 | #else | |
1722 | $ac_func(); | |
1723 | #endif | |
1724 | ||
1725 | ; return 0; } | |
1726 | EOF | |
91151a06 | 1727 | if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1728 | rm -rf conftest* |
1729 | eval "ac_cv_func_$ac_func=yes" | |
1730 | else | |
1731 | echo "configure: failed program was:" >&5 | |
1732 | cat conftest.$ac_ext >&5 | |
1733 | rm -rf conftest* | |
1734 | eval "ac_cv_func_$ac_func=no" | |
1735 | fi | |
1736 | rm -f conftest* | |
1737 | fi | |
1738 | ||
1739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1740 | echo "$ac_t""yes" 1>&6 | |
1741 | cat >> confdefs.h <<EOF | |
1742 | #define CRAY_STACKSEG_END $ac_func | |
1743 | EOF | |
1744 | ||
1745 | break | |
1746 | else | |
1747 | echo "$ac_t""no" 1>&6 | |
1748 | fi | |
1749 | ||
1750 | done | |
1751 | fi | |
1752 | ||
1753 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
91151a06 | 1754 | echo "configure:1755: checking stack direction for C alloca" >&5 |
c906108c SS |
1755 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1756 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1757 | else | |
1758 | if test "$cross_compiling" = yes; then | |
1759 | ac_cv_c_stack_direction=0 | |
1760 | else | |
1761 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1762 | #line 1763 "configure" |
c906108c SS |
1763 | #include "confdefs.h" |
1764 | find_stack_direction () | |
1765 | { | |
1766 | static char *addr = 0; | |
1767 | auto char dummy; | |
1768 | if (addr == 0) | |
1769 | { | |
1770 | addr = &dummy; | |
1771 | return find_stack_direction (); | |
1772 | } | |
1773 | else | |
1774 | return (&dummy > addr) ? 1 : -1; | |
1775 | } | |
1776 | main () | |
1777 | { | |
1778 | exit (find_stack_direction() < 0); | |
1779 | } | |
1780 | EOF | |
91151a06 | 1781 | if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1782 | then |
1783 | ac_cv_c_stack_direction=1 | |
1784 | else | |
1785 | echo "configure: failed program was:" >&5 | |
1786 | cat conftest.$ac_ext >&5 | |
1787 | rm -fr conftest* | |
1788 | ac_cv_c_stack_direction=-1 | |
1789 | fi | |
1790 | rm -fr conftest* | |
1791 | fi | |
1792 | ||
1793 | fi | |
1794 | ||
1795 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1796 | cat >> confdefs.h <<EOF | |
1797 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1798 | EOF | |
1799 | ||
1800 | fi | |
1801 | ||
c41b7eb1 | 1802 | for ac_hdr in unistd.h |
c906108c SS |
1803 | do |
1804 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1805 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 1806 | echo "configure:1807: checking for $ac_hdr" >&5 |
c906108c SS |
1807 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1809 | else | |
1810 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1811 | #line 1812 "configure" |
c906108c SS |
1812 | #include "confdefs.h" |
1813 | #include <$ac_hdr> | |
1814 | EOF | |
1815 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 1816 | { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1817 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1818 | if test -z "$ac_err"; then | |
1819 | rm -rf conftest* | |
1820 | eval "ac_cv_header_$ac_safe=yes" | |
1821 | else | |
1822 | echo "$ac_err" >&5 | |
1823 | echo "configure: failed program was:" >&5 | |
1824 | cat conftest.$ac_ext >&5 | |
1825 | rm -rf conftest* | |
1826 | eval "ac_cv_header_$ac_safe=no" | |
1827 | fi | |
1828 | rm -f conftest* | |
1829 | fi | |
1830 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1831 | echo "$ac_t""yes" 1>&6 | |
1832 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1833 | cat >> confdefs.h <<EOF | |
1834 | #define $ac_tr_hdr 1 | |
1835 | EOF | |
1836 | ||
1837 | else | |
1838 | echo "$ac_t""no" 1>&6 | |
1839 | fi | |
1840 | done | |
1841 | ||
1842 | for ac_func in getpagesize | |
1843 | do | |
1844 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 1845 | echo "configure:1846: checking for $ac_func" >&5 |
c906108c SS |
1846 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1848 | else | |
1849 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1850 | #line 1851 "configure" |
c906108c SS |
1851 | #include "confdefs.h" |
1852 | /* System header to define __stub macros and hopefully few prototypes, | |
1853 | which can conflict with char $ac_func(); below. */ | |
1854 | #include <assert.h> | |
1855 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1856 | /* We use char because int might match the return type of a gcc2 | |
1857 | builtin and then its argument prototype would still apply. */ | |
1858 | char $ac_func(); | |
1859 | ||
1860 | int main() { | |
1861 | ||
1862 | /* The GNU C library defines this for functions which it implements | |
1863 | to always fail with ENOSYS. Some functions are actually named | |
1864 | something starting with __ and the normal name is an alias. */ | |
1865 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1866 | choke me | |
1867 | #else | |
1868 | $ac_func(); | |
1869 | #endif | |
1870 | ||
1871 | ; return 0; } | |
1872 | EOF | |
91151a06 | 1873 | if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1874 | rm -rf conftest* |
1875 | eval "ac_cv_func_$ac_func=yes" | |
1876 | else | |
1877 | echo "configure: failed program was:" >&5 | |
1878 | cat conftest.$ac_ext >&5 | |
1879 | rm -rf conftest* | |
1880 | eval "ac_cv_func_$ac_func=no" | |
1881 | fi | |
1882 | rm -f conftest* | |
1883 | fi | |
1884 | ||
1885 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1886 | echo "$ac_t""yes" 1>&6 | |
1887 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1888 | cat >> confdefs.h <<EOF | |
1889 | #define $ac_tr_func 1 | |
1890 | EOF | |
1891 | ||
1892 | else | |
1893 | echo "$ac_t""no" 1>&6 | |
1894 | fi | |
1895 | done | |
1896 | ||
1897 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
91151a06 | 1898 | echo "configure:1899: checking for working mmap" >&5 |
c906108c SS |
1899 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1901 | else | |
1902 | if test "$cross_compiling" = yes; then | |
1903 | ac_cv_func_mmap_fixed_mapped=no | |
1904 | else | |
1905 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1906 | #line 1907 "configure" |
c906108c SS |
1907 | #include "confdefs.h" |
1908 | ||
1909 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1910 | Here is a matrix of mmap possibilities: | |
1911 | mmap private not fixed | |
1912 | mmap private fixed at somewhere currently unmapped | |
1913 | mmap private fixed at somewhere already mapped | |
1914 | mmap shared not fixed | |
1915 | mmap shared fixed at somewhere currently unmapped | |
1916 | mmap shared fixed at somewhere already mapped | |
1917 | For private mappings, we should verify that changes cannot be read() | |
1918 | back from the file, nor mmap's back from the file at a different | |
1919 | address. (There have been systems where private was not correctly | |
1920 | implemented like the infamous i386 svr4.0, and systems where the | |
1921 | VM page cache was not coherent with the filesystem buffer cache | |
1922 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1923 | For shared mappings, we should conversely verify that changes get | |
1924 | propogated back to all the places they're supposed to be. | |
1925 | ||
1926 | Grep wants private fixed already mapped. | |
1927 | The main things grep needs to know about mmap are: | |
1928 | * does it exist and is it safe to write into the mmap'd area | |
1929 | * how to use it (BSD variants) */ | |
1930 | #include <sys/types.h> | |
1931 | #include <fcntl.h> | |
1932 | #include <sys/mman.h> | |
1933 | ||
1934 | /* This mess was copied from the GNU getpagesize.h. */ | |
1935 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1936 | # ifdef HAVE_UNISTD_H |
1937 | # include <unistd.h> | |
1938 | # endif | |
c906108c SS |
1939 | |
1940 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1941 | # ifndef HAVE_SYS_PARAM_H | |
1942 | # define HAVE_SYS_PARAM_H 1 | |
1943 | # endif | |
1944 | ||
1945 | # ifdef _SC_PAGESIZE | |
1946 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1947 | # else /* no _SC_PAGESIZE */ | |
1948 | # ifdef HAVE_SYS_PARAM_H | |
1949 | # include <sys/param.h> | |
1950 | # ifdef EXEC_PAGESIZE | |
1951 | # define getpagesize() EXEC_PAGESIZE | |
1952 | # else /* no EXEC_PAGESIZE */ | |
1953 | # ifdef NBPG | |
1954 | # define getpagesize() NBPG * CLSIZE | |
1955 | # ifndef CLSIZE | |
1956 | # define CLSIZE 1 | |
1957 | # endif /* no CLSIZE */ | |
1958 | # else /* no NBPG */ | |
1959 | # ifdef NBPC | |
1960 | # define getpagesize() NBPC | |
1961 | # else /* no NBPC */ | |
1962 | # ifdef PAGESIZE | |
1963 | # define getpagesize() PAGESIZE | |
1964 | # endif /* PAGESIZE */ | |
1965 | # endif /* no NBPC */ | |
1966 | # endif /* no NBPG */ | |
1967 | # endif /* no EXEC_PAGESIZE */ | |
1968 | # else /* no HAVE_SYS_PARAM_H */ | |
1969 | # define getpagesize() 8192 /* punt totally */ | |
1970 | # endif /* no HAVE_SYS_PARAM_H */ | |
1971 | # endif /* no _SC_PAGESIZE */ | |
1972 | ||
1973 | #endif /* no HAVE_GETPAGESIZE */ | |
1974 | ||
1975 | #ifdef __cplusplus | |
1976 | extern "C" { void *malloc(unsigned); } | |
1977 | #else | |
1978 | char *malloc(); | |
1979 | #endif | |
1980 | ||
1981 | int | |
1982 | main() | |
1983 | { | |
1984 | char *data, *data2, *data3; | |
1985 | int i, pagesize; | |
1986 | int fd; | |
1987 | ||
1988 | pagesize = getpagesize(); | |
1989 | ||
1990 | /* | |
1991 | * First, make a file with some known garbage in it. | |
1992 | */ | |
1993 | data = malloc(pagesize); | |
1994 | if (!data) | |
1995 | exit(1); | |
1996 | for (i = 0; i < pagesize; ++i) | |
1997 | *(data + i) = rand(); | |
1998 | umask(0); | |
1999 | fd = creat("conftestmmap", 0600); | |
2000 | if (fd < 0) | |
2001 | exit(1); | |
2002 | if (write(fd, data, pagesize) != pagesize) | |
2003 | exit(1); | |
2004 | close(fd); | |
2005 | ||
2006 | /* | |
2007 | * Next, try to mmap the file at a fixed address which | |
2008 | * already has something else allocated at it. If we can, | |
2009 | * also make sure that we see the same garbage. | |
2010 | */ | |
2011 | fd = open("conftestmmap", O_RDWR); | |
2012 | if (fd < 0) | |
2013 | exit(1); | |
2014 | data2 = malloc(2 * pagesize); | |
2015 | if (!data2) | |
2016 | exit(1); | |
2017 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2018 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2019 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2020 | exit(1); | |
2021 | for (i = 0; i < pagesize; ++i) | |
2022 | if (*(data + i) != *(data2 + i)) | |
2023 | exit(1); | |
2024 | ||
2025 | /* | |
2026 | * Finally, make sure that changes to the mapped area | |
2027 | * do not percolate back to the file as seen by read(). | |
2028 | * (This is a bug on some variants of i386 svr4.0.) | |
2029 | */ | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | *(data2 + i) = *(data2 + i) + 1; | |
2032 | data3 = malloc(pagesize); | |
2033 | if (!data3) | |
2034 | exit(1); | |
2035 | if (read(fd, data3, pagesize) != pagesize) | |
2036 | exit(1); | |
2037 | for (i = 0; i < pagesize; ++i) | |
2038 | if (*(data + i) != *(data3 + i)) | |
2039 | exit(1); | |
2040 | close(fd); | |
2041 | unlink("conftestmmap"); | |
2042 | exit(0); | |
2043 | } | |
2044 | ||
2045 | EOF | |
91151a06 | 2046 | if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2047 | then |
2048 | ac_cv_func_mmap_fixed_mapped=yes | |
2049 | else | |
2050 | echo "configure: failed program was:" >&5 | |
2051 | cat conftest.$ac_ext >&5 | |
2052 | rm -fr conftest* | |
2053 | ac_cv_func_mmap_fixed_mapped=no | |
2054 | fi | |
2055 | rm -fr conftest* | |
2056 | fi | |
2057 | ||
2058 | fi | |
2059 | ||
2060 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2061 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2062 | cat >> confdefs.h <<\EOF | |
2063 | #define HAVE_MMAP 1 | |
2064 | EOF | |
2065 | ||
2066 | fi | |
2067 | ||
2068 | ||
2069 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2070 | unistd.h values.h sys/param.h | |
2071 | do | |
2072 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2073 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 2074 | echo "configure:2075: checking for $ac_hdr" >&5 |
c906108c SS |
2075 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2076 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2077 | else | |
2078 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2079 | #line 2080 "configure" |
c906108c SS |
2080 | #include "confdefs.h" |
2081 | #include <$ac_hdr> | |
2082 | EOF | |
2083 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2084 | { (eval echo configure:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2085 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2086 | if test -z "$ac_err"; then | |
2087 | rm -rf conftest* | |
2088 | eval "ac_cv_header_$ac_safe=yes" | |
2089 | else | |
2090 | echo "$ac_err" >&5 | |
2091 | echo "configure: failed program was:" >&5 | |
2092 | cat conftest.$ac_ext >&5 | |
2093 | rm -rf conftest* | |
2094 | eval "ac_cv_header_$ac_safe=no" | |
2095 | fi | |
2096 | rm -f conftest* | |
2097 | fi | |
2098 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2099 | echo "$ac_t""yes" 1>&6 | |
2100 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2101 | cat >> confdefs.h <<EOF | |
2102 | #define $ac_tr_hdr 1 | |
2103 | EOF | |
2104 | ||
2105 | else | |
2106 | echo "$ac_t""no" 1>&6 | |
2107 | fi | |
2108 | done | |
2109 | ||
2110 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2111 | __argz_count __argz_stringify __argz_next | |
2112 | do | |
2113 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2114 | echo "configure:2115: checking for $ac_func" >&5 |
c906108c SS |
2115 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2116 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2117 | else | |
2118 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2119 | #line 2120 "configure" |
c906108c SS |
2120 | #include "confdefs.h" |
2121 | /* System header to define __stub macros and hopefully few prototypes, | |
2122 | which can conflict with char $ac_func(); below. */ | |
2123 | #include <assert.h> | |
2124 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2125 | /* We use char because int might match the return type of a gcc2 | |
2126 | builtin and then its argument prototype would still apply. */ | |
2127 | char $ac_func(); | |
2128 | ||
2129 | int main() { | |
2130 | ||
2131 | /* The GNU C library defines this for functions which it implements | |
2132 | to always fail with ENOSYS. Some functions are actually named | |
2133 | something starting with __ and the normal name is an alias. */ | |
2134 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2135 | choke me | |
2136 | #else | |
2137 | $ac_func(); | |
2138 | #endif | |
2139 | ||
2140 | ; return 0; } | |
2141 | EOF | |
91151a06 | 2142 | if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2143 | rm -rf conftest* |
2144 | eval "ac_cv_func_$ac_func=yes" | |
2145 | else | |
2146 | echo "configure: failed program was:" >&5 | |
2147 | cat conftest.$ac_ext >&5 | |
2148 | rm -rf conftest* | |
2149 | eval "ac_cv_func_$ac_func=no" | |
2150 | fi | |
2151 | rm -f conftest* | |
2152 | fi | |
2153 | ||
2154 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2155 | echo "$ac_t""yes" 1>&6 | |
2156 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2157 | cat >> confdefs.h <<EOF | |
2158 | #define $ac_tr_func 1 | |
2159 | EOF | |
2160 | ||
2161 | else | |
2162 | echo "$ac_t""no" 1>&6 | |
2163 | fi | |
2164 | done | |
2165 | ||
2166 | ||
2167 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2168 | for ac_func in stpcpy | |
2169 | do | |
2170 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2171 | echo "configure:2172: checking for $ac_func" >&5 |
c906108c SS |
2172 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2174 | else | |
2175 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2176 | #line 2177 "configure" |
c906108c SS |
2177 | #include "confdefs.h" |
2178 | /* System header to define __stub macros and hopefully few prototypes, | |
2179 | which can conflict with char $ac_func(); below. */ | |
2180 | #include <assert.h> | |
2181 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2182 | /* We use char because int might match the return type of a gcc2 | |
2183 | builtin and then its argument prototype would still apply. */ | |
2184 | char $ac_func(); | |
2185 | ||
2186 | int main() { | |
2187 | ||
2188 | /* The GNU C library defines this for functions which it implements | |
2189 | to always fail with ENOSYS. Some functions are actually named | |
2190 | something starting with __ and the normal name is an alias. */ | |
2191 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2192 | choke me | |
2193 | #else | |
2194 | $ac_func(); | |
2195 | #endif | |
2196 | ||
2197 | ; return 0; } | |
2198 | EOF | |
91151a06 | 2199 | if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2200 | rm -rf conftest* |
2201 | eval "ac_cv_func_$ac_func=yes" | |
2202 | else | |
2203 | echo "configure: failed program was:" >&5 | |
2204 | cat conftest.$ac_ext >&5 | |
2205 | rm -rf conftest* | |
2206 | eval "ac_cv_func_$ac_func=no" | |
2207 | fi | |
2208 | rm -f conftest* | |
2209 | fi | |
2210 | ||
2211 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2212 | echo "$ac_t""yes" 1>&6 | |
2213 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2214 | cat >> confdefs.h <<EOF | |
2215 | #define $ac_tr_func 1 | |
2216 | EOF | |
2217 | ||
2218 | else | |
2219 | echo "$ac_t""no" 1>&6 | |
2220 | fi | |
2221 | done | |
2222 | ||
2223 | fi | |
2224 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2225 | cat >> confdefs.h <<\EOF | |
2226 | #define HAVE_STPCPY 1 | |
2227 | EOF | |
2228 | ||
2229 | fi | |
2230 | ||
2231 | if test $ac_cv_header_locale_h = yes; then | |
2232 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
91151a06 | 2233 | echo "configure:2234: checking for LC_MESSAGES" >&5 |
c906108c SS |
2234 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2236 | else | |
2237 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2238 | #line 2239 "configure" |
c906108c SS |
2239 | #include "confdefs.h" |
2240 | #include <locale.h> | |
2241 | int main() { | |
2242 | return LC_MESSAGES | |
2243 | ; return 0; } | |
2244 | EOF | |
91151a06 | 2245 | if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2246 | rm -rf conftest* |
2247 | am_cv_val_LC_MESSAGES=yes | |
2248 | else | |
2249 | echo "configure: failed program was:" >&5 | |
2250 | cat conftest.$ac_ext >&5 | |
2251 | rm -rf conftest* | |
2252 | am_cv_val_LC_MESSAGES=no | |
2253 | fi | |
2254 | rm -f conftest* | |
2255 | fi | |
2256 | ||
2257 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2258 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2259 | cat >> confdefs.h <<\EOF | |
2260 | #define HAVE_LC_MESSAGES 1 | |
2261 | EOF | |
2262 | ||
2263 | fi | |
2264 | fi | |
2265 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
91151a06 | 2266 | echo "configure:2267: checking whether NLS is requested" >&5 |
c906108c SS |
2267 | # Check whether --enable-nls or --disable-nls was given. |
2268 | if test "${enable_nls+set}" = set; then | |
2269 | enableval="$enable_nls" | |
2270 | USE_NLS=$enableval | |
2271 | else | |
2272 | USE_NLS=yes | |
2273 | fi | |
2274 | ||
2275 | echo "$ac_t""$USE_NLS" 1>&6 | |
2276 | ||
2277 | ||
2278 | USE_INCLUDED_LIBINTL=no | |
2279 | ||
2280 | if test "$USE_NLS" = "yes"; then | |
2281 | cat >> confdefs.h <<\EOF | |
2282 | #define ENABLE_NLS 1 | |
2283 | EOF | |
2284 | ||
2285 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
91151a06 | 2286 | echo "configure:2287: checking whether included gettext is requested" >&5 |
c906108c SS |
2287 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2288 | if test "${with_included_gettext+set}" = set; then | |
2289 | withval="$with_included_gettext" | |
2290 | nls_cv_force_use_gnu_gettext=$withval | |
2291 | else | |
2292 | nls_cv_force_use_gnu_gettext=no | |
2293 | fi | |
2294 | ||
2295 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2296 | ||
2297 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2298 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2299 | nls_cv_header_intl= | |
2300 | nls_cv_header_libgt= | |
2301 | CATOBJEXT=NONE | |
2302 | ||
2303 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2304 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
91151a06 | 2305 | echo "configure:2306: checking for libintl.h" >&5 |
c906108c SS |
2306 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2308 | else | |
2309 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2310 | #line 2311 "configure" |
c906108c SS |
2311 | #include "confdefs.h" |
2312 | #include <libintl.h> | |
2313 | EOF | |
2314 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2315 | { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2316 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2317 | if test -z "$ac_err"; then | |
2318 | rm -rf conftest* | |
2319 | eval "ac_cv_header_$ac_safe=yes" | |
2320 | else | |
2321 | echo "$ac_err" >&5 | |
2322 | echo "configure: failed program was:" >&5 | |
2323 | cat conftest.$ac_ext >&5 | |
2324 | rm -rf conftest* | |
2325 | eval "ac_cv_header_$ac_safe=no" | |
2326 | fi | |
2327 | rm -f conftest* | |
2328 | fi | |
2329 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2330 | echo "$ac_t""yes" 1>&6 | |
2331 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
91151a06 | 2332 | echo "configure:2333: checking for gettext in libc" >&5 |
c906108c SS |
2333 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2335 | else | |
2336 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2337 | #line 2338 "configure" |
c906108c SS |
2338 | #include "confdefs.h" |
2339 | #include <libintl.h> | |
2340 | int main() { | |
2341 | return (int) gettext ("") | |
2342 | ; return 0; } | |
2343 | EOF | |
91151a06 | 2344 | if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2345 | rm -rf conftest* |
2346 | gt_cv_func_gettext_libc=yes | |
2347 | else | |
2348 | echo "configure: failed program was:" >&5 | |
2349 | cat conftest.$ac_ext >&5 | |
2350 | rm -rf conftest* | |
2351 | gt_cv_func_gettext_libc=no | |
2352 | fi | |
2353 | rm -f conftest* | |
2354 | fi | |
2355 | ||
2356 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2357 | ||
2358 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2359 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
91151a06 | 2360 | echo "configure:2361: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2361 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2362 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2364 | else | |
2365 | ac_save_LIBS="$LIBS" | |
2366 | LIBS="-lintl $LIBS" | |
2367 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2368 | #line 2369 "configure" |
c906108c SS |
2369 | #include "confdefs.h" |
2370 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2371 | /* We use char because int might match the return type of a gcc2 | |
2372 | builtin and then its argument prototype would still apply. */ | |
2373 | char bindtextdomain(); | |
2374 | ||
2375 | int main() { | |
2376 | bindtextdomain() | |
2377 | ; return 0; } | |
2378 | EOF | |
91151a06 | 2379 | if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2380 | rm -rf conftest* |
2381 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2382 | else | |
2383 | echo "configure: failed program was:" >&5 | |
2384 | cat conftest.$ac_ext >&5 | |
2385 | rm -rf conftest* | |
2386 | eval "ac_cv_lib_$ac_lib_var=no" | |
2387 | fi | |
2388 | rm -f conftest* | |
2389 | LIBS="$ac_save_LIBS" | |
2390 | ||
2391 | fi | |
2392 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2393 | echo "$ac_t""yes" 1>&6 | |
2394 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
91151a06 | 2395 | echo "configure:2396: checking for gettext in libintl" >&5 |
c906108c SS |
2396 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2398 | else | |
2399 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2400 | #line 2401 "configure" |
c906108c SS |
2401 | #include "confdefs.h" |
2402 | ||
2403 | int main() { | |
2404 | return (int) gettext ("") | |
2405 | ; return 0; } | |
2406 | EOF | |
91151a06 | 2407 | if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2408 | rm -rf conftest* |
2409 | gt_cv_func_gettext_libintl=yes | |
2410 | else | |
2411 | echo "configure: failed program was:" >&5 | |
2412 | cat conftest.$ac_ext >&5 | |
2413 | rm -rf conftest* | |
2414 | gt_cv_func_gettext_libintl=no | |
2415 | fi | |
2416 | rm -f conftest* | |
2417 | fi | |
2418 | ||
2419 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2420 | else | |
2421 | echo "$ac_t""no" 1>&6 | |
2422 | fi | |
2423 | ||
2424 | fi | |
2425 | ||
2426 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2427 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2428 | cat >> confdefs.h <<\EOF | |
2429 | #define HAVE_GETTEXT 1 | |
2430 | EOF | |
2431 | ||
2432 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2433 | set dummy msgfmt; ac_word=$2 | |
2434 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2435 | echo "configure:2436: checking for $ac_word" >&5 |
c906108c SS |
2436 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2437 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2438 | else | |
2439 | case "$MSGFMT" in | |
2440 | /*) | |
2441 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2442 | ;; | |
2443 | *) | |
2444 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2445 | for ac_dir in $PATH; do | |
2446 | test -z "$ac_dir" && ac_dir=. | |
2447 | if test -f $ac_dir/$ac_word; then | |
2448 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2449 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2450 | break | |
2451 | fi | |
2452 | fi | |
2453 | done | |
2454 | IFS="$ac_save_ifs" | |
2455 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2456 | ;; | |
2457 | esac | |
2458 | fi | |
2459 | MSGFMT="$ac_cv_path_MSGFMT" | |
2460 | if test -n "$MSGFMT"; then | |
2461 | echo "$ac_t""$MSGFMT" 1>&6 | |
2462 | else | |
2463 | echo "$ac_t""no" 1>&6 | |
2464 | fi | |
2465 | if test "$MSGFMT" != "no"; then | |
2466 | for ac_func in dcgettext | |
2467 | do | |
2468 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2469 | echo "configure:2470: checking for $ac_func" >&5 |
c906108c SS |
2470 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2471 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2472 | else | |
2473 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2474 | #line 2475 "configure" |
c906108c SS |
2475 | #include "confdefs.h" |
2476 | /* System header to define __stub macros and hopefully few prototypes, | |
2477 | which can conflict with char $ac_func(); below. */ | |
2478 | #include <assert.h> | |
2479 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2480 | /* We use char because int might match the return type of a gcc2 | |
2481 | builtin and then its argument prototype would still apply. */ | |
2482 | char $ac_func(); | |
2483 | ||
2484 | int main() { | |
2485 | ||
2486 | /* The GNU C library defines this for functions which it implements | |
2487 | to always fail with ENOSYS. Some functions are actually named | |
2488 | something starting with __ and the normal name is an alias. */ | |
2489 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2490 | choke me | |
2491 | #else | |
2492 | $ac_func(); | |
2493 | #endif | |
2494 | ||
2495 | ; return 0; } | |
2496 | EOF | |
91151a06 | 2497 | if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2498 | rm -rf conftest* |
2499 | eval "ac_cv_func_$ac_func=yes" | |
2500 | else | |
2501 | echo "configure: failed program was:" >&5 | |
2502 | cat conftest.$ac_ext >&5 | |
2503 | rm -rf conftest* | |
2504 | eval "ac_cv_func_$ac_func=no" | |
2505 | fi | |
2506 | rm -f conftest* | |
2507 | fi | |
2508 | ||
2509 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2510 | echo "$ac_t""yes" 1>&6 | |
2511 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2512 | cat >> confdefs.h <<EOF | |
2513 | #define $ac_tr_func 1 | |
2514 | EOF | |
2515 | ||
2516 | else | |
2517 | echo "$ac_t""no" 1>&6 | |
2518 | fi | |
2519 | done | |
2520 | ||
2521 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2522 | set dummy gmsgfmt; ac_word=$2 | |
2523 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2524 | echo "configure:2525: checking for $ac_word" >&5 |
c906108c SS |
2525 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2527 | else | |
2528 | case "$GMSGFMT" in | |
2529 | /*) | |
2530 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2531 | ;; | |
2532 | ?:/*) | |
2533 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2534 | ;; | |
2535 | *) | |
2536 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2537 | ac_dummy="$PATH" | |
2538 | for ac_dir in $ac_dummy; do | |
2539 | test -z "$ac_dir" && ac_dir=. | |
2540 | if test -f $ac_dir/$ac_word; then | |
2541 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2542 | break | |
2543 | fi | |
2544 | done | |
2545 | IFS="$ac_save_ifs" | |
2546 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2547 | ;; | |
2548 | esac | |
2549 | fi | |
2550 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2551 | if test -n "$GMSGFMT"; then | |
2552 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2553 | else | |
2554 | echo "$ac_t""no" 1>&6 | |
2555 | fi | |
2556 | ||
2557 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2558 | set dummy xgettext; ac_word=$2 | |
2559 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2560 | echo "configure:2561: checking for $ac_word" >&5 |
c906108c SS |
2561 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2563 | else | |
2564 | case "$XGETTEXT" in | |
2565 | /*) | |
2566 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2567 | ;; | |
2568 | *) | |
2569 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2570 | for ac_dir in $PATH; do | |
2571 | test -z "$ac_dir" && ac_dir=. | |
2572 | if test -f $ac_dir/$ac_word; then | |
2573 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2574 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2575 | break | |
2576 | fi | |
2577 | fi | |
2578 | done | |
2579 | IFS="$ac_save_ifs" | |
2580 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2581 | ;; | |
2582 | esac | |
2583 | fi | |
2584 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2585 | if test -n "$XGETTEXT"; then | |
2586 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2587 | else | |
2588 | echo "$ac_t""no" 1>&6 | |
2589 | fi | |
2590 | ||
2591 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2592 | #line 2593 "configure" |
c906108c SS |
2593 | #include "confdefs.h" |
2594 | ||
2595 | int main() { | |
2596 | extern int _nl_msg_cat_cntr; | |
2597 | return _nl_msg_cat_cntr | |
2598 | ; return 0; } | |
2599 | EOF | |
91151a06 | 2600 | if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2601 | rm -rf conftest* |
2602 | CATOBJEXT=.gmo | |
2603 | DATADIRNAME=share | |
2604 | else | |
2605 | echo "configure: failed program was:" >&5 | |
2606 | cat conftest.$ac_ext >&5 | |
2607 | rm -rf conftest* | |
2608 | CATOBJEXT=.mo | |
2609 | DATADIRNAME=lib | |
2610 | fi | |
2611 | rm -f conftest* | |
2612 | INSTOBJEXT=.mo | |
2613 | fi | |
2614 | fi | |
2615 | ||
2616 | else | |
2617 | echo "$ac_t""no" 1>&6 | |
2618 | fi | |
2619 | ||
2620 | ||
2621 | ||
2622 | if test "$CATOBJEXT" = "NONE"; then | |
2623 | nls_cv_use_gnu_gettext=yes | |
2624 | fi | |
2625 | fi | |
2626 | ||
2627 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2628 | INTLOBJS="\$(GETTOBJS)" | |
2629 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2630 | set dummy msgfmt; ac_word=$2 | |
2631 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2632 | echo "configure:2633: checking for $ac_word" >&5 |
c906108c SS |
2633 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2635 | else | |
2636 | case "$MSGFMT" in | |
2637 | /*) | |
2638 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2639 | ;; | |
2640 | *) | |
2641 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2642 | for ac_dir in $PATH; do | |
2643 | test -z "$ac_dir" && ac_dir=. | |
2644 | if test -f $ac_dir/$ac_word; then | |
2645 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2646 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2647 | break | |
2648 | fi | |
2649 | fi | |
2650 | done | |
2651 | IFS="$ac_save_ifs" | |
2652 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2653 | ;; | |
2654 | esac | |
2655 | fi | |
2656 | MSGFMT="$ac_cv_path_MSGFMT" | |
2657 | if test -n "$MSGFMT"; then | |
2658 | echo "$ac_t""$MSGFMT" 1>&6 | |
2659 | else | |
2660 | echo "$ac_t""no" 1>&6 | |
2661 | fi | |
2662 | ||
2663 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2664 | set dummy gmsgfmt; ac_word=$2 | |
2665 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2666 | echo "configure:2667: checking for $ac_word" >&5 |
c906108c SS |
2667 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2669 | else | |
2670 | case "$GMSGFMT" in | |
2671 | /*) | |
2672 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2673 | ;; | |
2674 | ?:/*) | |
2675 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2676 | ;; | |
2677 | *) | |
2678 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2679 | ac_dummy="$PATH" | |
2680 | for ac_dir in $ac_dummy; do | |
2681 | test -z "$ac_dir" && ac_dir=. | |
2682 | if test -f $ac_dir/$ac_word; then | |
2683 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2684 | break | |
2685 | fi | |
2686 | done | |
2687 | IFS="$ac_save_ifs" | |
2688 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2689 | ;; | |
2690 | esac | |
2691 | fi | |
2692 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2693 | if test -n "$GMSGFMT"; then | |
2694 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2695 | else | |
2696 | echo "$ac_t""no" 1>&6 | |
2697 | fi | |
2698 | ||
2699 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2700 | set dummy xgettext; ac_word=$2 | |
2701 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2702 | echo "configure:2703: checking for $ac_word" >&5 |
c906108c SS |
2703 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2705 | else | |
2706 | case "$XGETTEXT" in | |
2707 | /*) | |
2708 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2709 | ;; | |
2710 | *) | |
2711 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2712 | for ac_dir in $PATH; do | |
2713 | test -z "$ac_dir" && ac_dir=. | |
2714 | if test -f $ac_dir/$ac_word; then | |
2715 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2716 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2717 | break | |
2718 | fi | |
2719 | fi | |
2720 | done | |
2721 | IFS="$ac_save_ifs" | |
2722 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2723 | ;; | |
2724 | esac | |
2725 | fi | |
2726 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2727 | if test -n "$XGETTEXT"; then | |
2728 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2729 | else | |
2730 | echo "$ac_t""no" 1>&6 | |
2731 | fi | |
2732 | ||
2733 | ||
2734 | USE_INCLUDED_LIBINTL=yes | |
2735 | CATOBJEXT=.gmo | |
2736 | INSTOBJEXT=.mo | |
2737 | DATADIRNAME=share | |
2738 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2739 | INTLLIBS=$INTLDEPS | |
2740 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2741 | nls_cv_header_intl=libintl.h | |
2742 | nls_cv_header_libgt=libgettext.h | |
2743 | fi | |
2744 | ||
2745 | if test "$XGETTEXT" != ":"; then | |
2746 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2747 | : ; | |
2748 | else | |
2749 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2750 | XGETTEXT=":" | |
2751 | fi | |
2752 | fi | |
2753 | ||
2754 | # We need to process the po/ directory. | |
2755 | POSUB=po | |
2756 | else | |
2757 | DATADIRNAME=share | |
2758 | nls_cv_header_intl=libintl.h | |
2759 | nls_cv_header_libgt=libgettext.h | |
2760 | fi | |
2761 | ||
2762 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2763 | # because some of the sources are only built for this goal. | |
2764 | if test "$PACKAGE" = gettext; then | |
2765 | USE_NLS=yes | |
2766 | USE_INCLUDED_LIBINTL=yes | |
2767 | fi | |
2768 | ||
2769 | for lang in $ALL_LINGUAS; do | |
2770 | GMOFILES="$GMOFILES $lang.gmo" | |
2771 | POFILES="$POFILES $lang.po" | |
2772 | done | |
2773 | ||
2774 | ||
2775 | ||
2776 | ||
2777 | ||
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | if test "x$CATOBJEXT" != "x"; then | |
2788 | if test "x$ALL_LINGUAS" = "x"; then | |
2789 | LINGUAS= | |
2790 | else | |
2791 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
91151a06 | 2792 | echo "configure:2793: checking for catalogs to be installed" >&5 |
c906108c SS |
2793 | NEW_LINGUAS= |
2794 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2795 | case "$ALL_LINGUAS" in | |
2796 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2797 | esac | |
2798 | done | |
2799 | LINGUAS=$NEW_LINGUAS | |
2800 | echo "$ac_t""$LINGUAS" 1>&6 | |
2801 | fi | |
2802 | ||
2803 | if test -n "$LINGUAS"; then | |
2804 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2805 | fi | |
2806 | fi | |
2807 | ||
2808 | if test $ac_cv_header_locale_h = yes; then | |
2809 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2810 | else | |
2811 | INCLUDE_LOCALE_H="\ | |
2812 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2813 | fi | |
2814 | ||
2815 | ||
2816 | if test -f $srcdir/po2tbl.sed.in; then | |
2817 | if test "$CATOBJEXT" = ".cat"; then | |
2818 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2819 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
91151a06 | 2820 | echo "configure:2821: checking for linux/version.h" >&5 |
c906108c SS |
2821 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2822 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2823 | else | |
2824 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2825 | #line 2826 "configure" |
c906108c SS |
2826 | #include "confdefs.h" |
2827 | #include <linux/version.h> | |
2828 | EOF | |
2829 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2830 | { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2831 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2832 | if test -z "$ac_err"; then | |
2833 | rm -rf conftest* | |
2834 | eval "ac_cv_header_$ac_safe=yes" | |
2835 | else | |
2836 | echo "$ac_err" >&5 | |
2837 | echo "configure: failed program was:" >&5 | |
2838 | cat conftest.$ac_ext >&5 | |
2839 | rm -rf conftest* | |
2840 | eval "ac_cv_header_$ac_safe=no" | |
2841 | fi | |
2842 | rm -f conftest* | |
2843 | fi | |
2844 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2845 | echo "$ac_t""yes" 1>&6 | |
2846 | msgformat=linux | |
2847 | else | |
2848 | echo "$ac_t""no" 1>&6 | |
2849 | msgformat=xopen | |
2850 | fi | |
2851 | ||
2852 | ||
2853 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2854 | fi | |
2855 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2856 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2857 | fi | |
2858 | ||
2859 | if test "$PACKAGE" = "gettext"; then | |
2860 | GT_NO="#NO#" | |
2861 | GT_YES= | |
2862 | else | |
2863 | GT_NO= | |
2864 | GT_YES="#YES#" | |
2865 | fi | |
2866 | ||
2867 | ||
2868 | ||
2869 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2870 | ||
2871 | ||
2872 | l= | |
2873 | ||
2874 | ||
4536bbc6 | 2875 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2876 | test -d po || mkdir po |
2877 | if test "x$srcdir" != "x."; then | |
2878 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2879 | posrcprefix="$srcdir/" | |
2880 | else | |
2881 | posrcprefix="../$srcdir/" | |
2882 | fi | |
2883 | else | |
2884 | posrcprefix="../" | |
2885 | fi | |
2886 | rm -f po/POTFILES | |
2887 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2888 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2889 | fi | |
2890 | ||
0fbb3da7 TT |
2891 | cat >> confdefs.h <<\EOF |
2892 | #define PACKAGE "gdb" | |
2893 | EOF | |
2894 | ||
2895 | ||
c906108c SS |
2896 | |
2897 | ||
2898 | CONFIG_OBS= | |
66b965bb | 2899 | CONFIG_LIB_OBS= |
c906108c SS |
2900 | CONFIG_DEPS= |
2901 | CONFIG_SRCS= | |
fb40c209 AC |
2902 | CONFIG_INITS= |
2903 | ENABLE_CFLAGS= | |
b3a90332 AC |
2904 | CONFIG_ALL= |
2905 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2906 | CONFIG_INSTALL= |
2907 | CONFIG_UNINSTALL= | |
c906108c | 2908 | |
8dcde887 | 2909 | subdirs="doc testsuite" |
96baa820 | 2910 | |
8dcde887 | 2911 | configdirs= |
96baa820 | 2912 | |
27e9bf90 | 2913 | . $srcdir/configure.host |
c906108c | 2914 | |
27e9bf90 | 2915 | . $srcdir/configure.tgt |
c906108c | 2916 | |
27e9bf90 MK |
2917 | # Fetch the default architecture and default target vector from BFD. |
2918 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2919 | |
27e9bf90 MK |
2920 | # We only want the first architecture, so strip off the others if |
2921 | # there is more than one. | |
2922 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2923 | |
27e9bf90 MK |
2924 | if test "x$targ_archs" != x; then |
2925 | cat >> confdefs.h <<EOF | |
2926 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2927 | EOF |
2928 | ||
2929 | fi | |
27e9bf90 MK |
2930 | if test "x$targ_defvec" != x; then |
2931 | cat >> confdefs.h <<EOF | |
2932 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2933 | EOF |
2934 | ||
2935 | fi | |
c906108c | 2936 | |
8bb2c122 MK |
2937 | if test "$program_transform_name" = s,x,x,; then |
2938 | program_transform_name= | |
2939 | else | |
2940 | # Double any \ or $. echo might interpret backslashes. | |
2941 | cat <<\EOF_SED > conftestsed | |
2942 | s,\\,\\\\,g; s,\$,$$,g | |
2943 | EOF_SED | |
2944 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2945 | rm -f conftestsed | |
2946 | fi | |
2947 | test "$program_prefix" != NONE && | |
2948 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2949 | # Use a double $ so make ignores it. | |
2950 | test "$program_suffix" != NONE && | |
2951 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2952 | ||
2953 | # sed with no file args requires a program. | |
2954 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2955 | ||
2956 | ||
627af7ea MK |
2957 | # The CLI cannot be disabled yet, but may be in the future. |
2958 | ||
2959 | # Enable CLI. | |
2960 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2961 | if test "${enable_gdbcli+set}" = set; then | |
2962 | enableval="$enable_gdbcli" | |
2963 | case $enableval in | |
2964 | yes) | |
2965 | ;; | |
2966 | no) | |
2967 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2968 | *) | |
2969 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2970 | esac | |
2971 | else | |
2972 | enable_gdbcli=yes | |
2973 | fi | |
2974 | ||
2975 | if test x"$enable_gdbcli" = xyes; then | |
2976 | if test -d $srcdir/cli; then | |
2977 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
2978 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
2979 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
2980 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
2981 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
2982 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
2983 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
2984 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
2985 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
2986 | fi | |
2987 | fi | |
2988 | ||
2989 | # Enable MI. | |
2990 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
2991 | if test "${enable_gdbmi+set}" = set; then | |
2992 | enableval="$enable_gdbmi" | |
2993 | case $enableval in | |
2994 | yes | no) | |
2995 | ;; | |
2996 | *) | |
2997 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
2998 | esac | |
2999 | else | |
3000 | enable_gdbmi=yes | |
3001 | fi | |
3002 | ||
3003 | if test x"$enable_gdbmi" = xyes; then | |
3004 | if test -d $srcdir/mi; then | |
3005 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3006 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3007 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3008 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3009 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3010 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3011 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3012 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3013 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3014 | fi | |
3015 | fi | |
3016 | ||
06825bd1 MK |
3017 | # Enable TUI. |
3018 | # Check whether --enable-tui or --disable-tui was given. | |
3019 | if test "${enable_tui+set}" = set; then | |
3020 | enableval="$enable_tui" | |
3021 | case $enableval in | |
3022 | yes | no) | |
3023 | ;; | |
3024 | *) | |
3025 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3026 | esac | |
3027 | fi | |
3028 | ||
3029 | if test x"$enable_tui" = xyes; then | |
3030 | if test -d $srcdir/tui; then | |
3031 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3032 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3033 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3034 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3035 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3036 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3037 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3038 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3039 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3040 | need_curses=yes | |
3041 | fi | |
3042 | fi | |
3043 | ||
8bb2c122 MK |
3044 | # --------------------- # |
3045 | # Checks for programs. # | |
3046 | # --------------------- # | |
3047 | ||
c41b7eb1 | 3048 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3049 | do |
3050 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3051 | set dummy $ac_prog; ac_word=$2 | |
3052 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8dcde887 | 3053 | echo "configure:3054: checking for $ac_word" >&5 |
7a292a7a SS |
3054 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3056 | else | |
3057 | if test -n "$AWK"; then | |
3058 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3059 | else | |
3060 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3061 | ac_dummy="$PATH" | |
3062 | for ac_dir in $ac_dummy; do | |
3063 | test -z "$ac_dir" && ac_dir=. | |
3064 | if test -f $ac_dir/$ac_word; then | |
3065 | ac_cv_prog_AWK="$ac_prog" | |
3066 | break | |
3067 | fi | |
3068 | done | |
3069 | IFS="$ac_save_ifs" | |
3070 | fi | |
3071 | fi | |
3072 | AWK="$ac_cv_prog_AWK" | |
3073 | if test -n "$AWK"; then | |
3074 | echo "$ac_t""$AWK" 1>&6 | |
3075 | else | |
3076 | echo "$ac_t""no" 1>&6 | |
3077 | fi | |
3078 | ||
3079 | test -n "$AWK" && break | |
3080 | done | |
3081 | ||
c906108c SS |
3082 | # Find a good install program. We prefer a C program (faster), |
3083 | # so one script is as good as another. But avoid the broken or | |
3084 | # incompatible versions: | |
3085 | # SysV /etc/install, /usr/sbin/install | |
3086 | # SunOS /usr/etc/install | |
3087 | # IRIX /sbin/install | |
3088 | # AIX /bin/install | |
3089 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3090 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3091 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3092 | # ./install, which can be erroneously created by make from ./install.sh. | |
3093 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
8dcde887 | 3094 | echo "configure:3095: checking for a BSD compatible install" >&5 |
c906108c SS |
3095 | if test -z "$INSTALL"; then |
3096 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3098 | else | |
3099 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3100 | for ac_dir in $PATH; do | |
3101 | # Account for people who put trailing slashes in PATH elements. | |
3102 | case "$ac_dir/" in | |
3103 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3104 | *) | |
3105 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3106 | # Don't use installbsd from OSF since it installs stuff as root | |
3107 | # by default. | |
3108 | for ac_prog in ginstall scoinst install; do | |
3109 | if test -f $ac_dir/$ac_prog; then | |
3110 | if test $ac_prog = install && | |
3111 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3112 | # AIX install. It has an incompatible calling convention. | |
3113 | : | |
3114 | else | |
3115 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3116 | break 2 | |
3117 | fi | |
3118 | fi | |
3119 | done | |
3120 | ;; | |
3121 | esac | |
3122 | done | |
3123 | IFS="$ac_save_IFS" | |
3124 | ||
3125 | fi | |
3126 | if test "${ac_cv_path_install+set}" = set; then | |
3127 | INSTALL="$ac_cv_path_install" | |
3128 | else | |
3129 | # As a last resort, use the slow shell script. We don't cache a | |
3130 | # path for INSTALL within a source directory, because that will | |
3131 | # break other packages using the cache if that directory is | |
3132 | # removed, or if the path is relative. | |
3133 | INSTALL="$ac_install_sh" | |
3134 | fi | |
3135 | fi | |
3136 | echo "$ac_t""$INSTALL" 1>&6 | |
3137 | ||
3138 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3139 | # It thinks the first close brace ends the variable substitution. | |
3140 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3141 | ||
3142 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3143 | ||
3144 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3145 | ||
8bb2c122 | 3146 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
8dcde887 | 3147 | echo "configure:3148: checking whether ln -s works" >&5 |
8bb2c122 MK |
3148 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3150 | else |
8bb2c122 MK |
3151 | rm -f conftestdata |
3152 | if ln -s X conftestdata 2>/dev/null | |
3153 | then | |
3154 | rm -f conftestdata | |
3155 | ac_cv_prog_LN_S="ln -s" | |
3156 | else | |
3157 | ac_cv_prog_LN_S=ln | |
3158 | fi | |
3159 | fi | |
3160 | LN_S="$ac_cv_prog_LN_S" | |
3161 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3162 | echo "$ac_t""yes" 1>&6 | |
3163 | else | |
3164 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3165 | fi |
3166 | ||
8bb2c122 MK |
3167 | # Extract the first word of "ranlib", so it can be a program name with args. |
3168 | set dummy ranlib; ac_word=$2 | |
c906108c | 3169 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8dcde887 | 3170 | echo "configure:3171: checking for $ac_word" >&5 |
8bb2c122 | 3171 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3172 | echo $ac_n "(cached) $ac_c" 1>&6 |
3173 | else | |
8bb2c122 MK |
3174 | if test -n "$RANLIB"; then |
3175 | ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" |
c906108c SS |
3183 | break |
3184 | fi | |
3185 | done | |
3186 | IFS="$ac_save_ifs" | |
8bb2c122 | 3187 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3188 | fi |
3189 | fi | |
8bb2c122 MK |
3190 | RANLIB="$ac_cv_prog_RANLIB" |
3191 | if test -n "$RANLIB"; then | |
3192 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3193 | else |
3194 | echo "$ac_t""no" 1>&6 | |
3195 | fi | |
3196 | ||
8bb2c122 MK |
3197 | for ac_prog in 'bison -y' byacc |
3198 | do | |
3199 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3200 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3201 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8dcde887 | 3202 | echo "configure:3203: checking for $ac_word" >&5 |
8bb2c122 | 3203 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3204 | echo $ac_n "(cached) $ac_c" 1>&6 |
3205 | else | |
8bb2c122 MK |
3206 | if test -n "$YACC"; then |
3207 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
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 | |
8bb2c122 | 3214 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3215 | break |
3216 | fi | |
3217 | done | |
3218 | IFS="$ac_save_ifs" | |
3219 | fi | |
3220 | fi | |
8bb2c122 MK |
3221 | YACC="$ac_cv_prog_YACC" |
3222 | if test -n "$YACC"; then | |
3223 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3224 | else |
3225 | echo "$ac_t""no" 1>&6 | |
3226 | fi | |
3227 | ||
8bb2c122 MK |
3228 | test -n "$YACC" && break |
3229 | done | |
3230 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3231 | |
8bb2c122 MK |
3232 | |
3233 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3234 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3235 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
8dcde887 | 3236 | echo "configure:3237: checking for $ac_word" >&5 |
8bb2c122 | 3237 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3238 | echo $ac_n "(cached) $ac_c" 1>&6 |
3239 | else | |
8bb2c122 MK |
3240 | if test -n "$AR"; then |
3241 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3242 | else |
3243 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3244 | ac_dummy="$PATH" | |
3245 | for ac_dir in $ac_dummy; do | |
3246 | test -z "$ac_dir" && ac_dir=. | |
3247 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3248 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3249 | break |
3250 | fi | |
3251 | done | |
3252 | IFS="$ac_save_ifs" | |
8bb2c122 | 3253 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3254 | fi |
3255 | fi | |
8bb2c122 MK |
3256 | AR="$ac_cv_prog_AR" |
3257 | if test -n "$AR"; then | |
3258 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3259 | else |
3260 | echo "$ac_t""no" 1>&6 | |
3261 | fi | |
3262 | ||
8bb2c122 | 3263 | |
c906108c | 3264 | |
95ca63c4 CF |
3265 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3266 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3267 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8dcde887 | 3268 | echo "configure:3269: checking for $ac_word" >&5 |
95ca63c4 CF |
3269 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3271 | else | |
3272 | if test -n "$DLLTOOL"; then | |
3273 | ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" | |
3281 | break | |
3282 | fi | |
3283 | done | |
3284 | IFS="$ac_save_ifs" | |
3285 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3286 | fi | |
3287 | fi | |
3288 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3289 | if test -n "$DLLTOOL"; then | |
3290 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3291 | else | |
3292 | echo "$ac_t""no" 1>&6 | |
3293 | fi | |
3294 | ||
3295 | ||
3296 | ||
3297 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3298 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3299 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8dcde887 | 3300 | echo "configure:3301: checking for $ac_word" >&5 |
95ca63c4 CF |
3301 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3302 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3303 | else | |
3304 | if test -n "$WINDRES"; then | |
3305 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3306 | else | |
3307 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3308 | ac_dummy="$PATH" | |
3309 | for ac_dir in $ac_dummy; do | |
3310 | test -z "$ac_dir" && ac_dir=. | |
3311 | if test -f $ac_dir/$ac_word; then | |
3312 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3313 | break | |
3314 | fi | |
3315 | done | |
3316 | IFS="$ac_save_ifs" | |
3317 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3318 | fi | |
3319 | fi | |
3320 | WINDRES="$ac_cv_prog_WINDRES" | |
3321 | if test -n "$WINDRES"; then | |
3322 | echo "$ac_t""$WINDRES" 1>&6 | |
3323 | else | |
3324 | echo "$ac_t""no" 1>&6 | |
3325 | fi | |
3326 | ||
3327 | ||
3328 | ||
c906108c | 3329 | |
8bb2c122 | 3330 | # Needed for GNU/Hurd. |
75c6e08a MK |
3331 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3332 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3333 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8dcde887 | 3334 | echo "configure:3335: checking for $ac_word" >&5 |
75c6e08a MK |
3335 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3336 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3337 | else | |
3338 | if test -n "$MIG"; then | |
3339 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3340 | else | |
3341 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3342 | ac_dummy="$PATH" | |
3343 | for ac_dir in $ac_dummy; do | |
3344 | test -z "$ac_dir" && ac_dir=. | |
3345 | if test -f $ac_dir/$ac_word; then | |
3346 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3347 | break | |
3348 | fi | |
3349 | done | |
3350 | IFS="$ac_save_ifs" | |
3351 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3352 | fi | |
3353 | fi | |
3354 | MIG="$ac_cv_prog_MIG" | |
3355 | if test -n "$MIG"; then | |
3356 | echo "$ac_t""$MIG" 1>&6 | |
3357 | else | |
3358 | echo "$ac_t""no" 1>&6 | |
3359 | fi | |
3360 | ||
3361 | ||
3362 | ||
3363 | ||
9a156167 MK |
3364 | # ---------------------- # |
3365 | # Checks for libraries. # | |
3366 | # ---------------------- # | |
3367 | ||
3368 | # We might need to link with -lm; most simulators need it. | |
3369 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
8dcde887 | 3370 | echo "configure:3371: checking for main in -lm" >&5 |
9a156167 MK |
3371 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3372 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3373 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3374 | else | |
3375 | ac_save_LIBS="$LIBS" | |
3376 | LIBS="-lm $LIBS" | |
3377 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3378 | #line 3379 "configure" |
9a156167 MK |
3379 | #include "confdefs.h" |
3380 | ||
3381 | int main() { | |
3382 | main() | |
3383 | ; return 0; } | |
3384 | EOF | |
8dcde887 | 3385 | if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3386 | rm -rf conftest* |
3387 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3388 | else | |
3389 | echo "configure: failed program was:" >&5 | |
3390 | cat conftest.$ac_ext >&5 | |
3391 | rm -rf conftest* | |
3392 | eval "ac_cv_lib_$ac_lib_var=no" | |
3393 | fi | |
3394 | rm -f conftest* | |
3395 | LIBS="$ac_save_LIBS" | |
3396 | ||
3397 | fi | |
3398 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3399 | echo "$ac_t""yes" 1>&6 | |
3400 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3401 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3402 | cat >> confdefs.h <<EOF | |
3403 | #define $ac_tr_lib 1 | |
3404 | EOF | |
3405 | ||
3406 | LIBS="-lm $LIBS" | |
3407 | ||
3408 | else | |
3409 | echo "$ac_t""no" 1>&6 | |
3410 | fi | |
3411 | ||
3412 | ||
3413 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3414 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3415 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3416 | # is known to have this problem). Therefore we avoid libw if we can. | |
3417 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
8dcde887 | 3418 | echo "configure:3419: checking for wctype" >&5 |
9a156167 MK |
3419 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3420 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3421 | else | |
3422 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3423 | #line 3424 "configure" |
9a156167 MK |
3424 | #include "confdefs.h" |
3425 | /* System header to define __stub macros and hopefully few prototypes, | |
3426 | which can conflict with char wctype(); below. */ | |
3427 | #include <assert.h> | |
3428 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3429 | /* We use char because int might match the return type of a gcc2 | |
3430 | builtin and then its argument prototype would still apply. */ | |
3431 | char wctype(); | |
3432 | ||
3433 | int main() { | |
3434 | ||
3435 | /* The GNU C library defines this for functions which it implements | |
3436 | to always fail with ENOSYS. Some functions are actually named | |
3437 | something starting with __ and the normal name is an alias. */ | |
3438 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3439 | choke me | |
3440 | #else | |
3441 | wctype(); | |
3442 | #endif | |
3443 | ||
3444 | ; return 0; } | |
3445 | EOF | |
8dcde887 | 3446 | if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3447 | rm -rf conftest* |
3448 | eval "ac_cv_func_wctype=yes" | |
3449 | else | |
3450 | echo "configure: failed program was:" >&5 | |
3451 | cat conftest.$ac_ext >&5 | |
3452 | rm -rf conftest* | |
3453 | eval "ac_cv_func_wctype=no" | |
3454 | fi | |
3455 | rm -f conftest* | |
3456 | fi | |
3457 | ||
3458 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3459 | echo "$ac_t""yes" 1>&6 | |
3460 | : | |
3461 | else | |
3462 | echo "$ac_t""no" 1>&6 | |
3463 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
8dcde887 | 3464 | echo "configure:3465: checking for wctype in -lw" >&5 |
9a156167 MK |
3465 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3466 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3467 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3468 | else | |
3469 | ac_save_LIBS="$LIBS" | |
3470 | LIBS="-lw $LIBS" | |
3471 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3472 | #line 3473 "configure" |
9a156167 MK |
3473 | #include "confdefs.h" |
3474 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3475 | /* We use char because int might match the return type of a gcc2 | |
3476 | builtin and then its argument prototype would still apply. */ | |
3477 | char wctype(); | |
3478 | ||
3479 | int main() { | |
3480 | wctype() | |
3481 | ; return 0; } | |
3482 | EOF | |
8dcde887 | 3483 | if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3484 | rm -rf conftest* |
3485 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3486 | else | |
3487 | echo "configure: failed program was:" >&5 | |
3488 | cat conftest.$ac_ext >&5 | |
3489 | rm -rf conftest* | |
3490 | eval "ac_cv_lib_$ac_lib_var=no" | |
3491 | fi | |
3492 | rm -f conftest* | |
3493 | LIBS="$ac_save_LIBS" | |
3494 | ||
3495 | fi | |
3496 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3497 | echo "$ac_t""yes" 1>&6 | |
3498 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3499 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3500 | cat >> confdefs.h <<EOF | |
3501 | #define $ac_tr_lib 1 | |
3502 | EOF | |
3503 | ||
3504 | LIBS="-lw $LIBS" | |
3505 | ||
3506 | else | |
3507 | echo "$ac_t""no" 1>&6 | |
3508 | fi | |
3509 | ||
3510 | fi | |
3511 | ||
3512 | ||
3513 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3514 | ||
3515 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
8dcde887 | 3516 | echo "configure:3517: checking for library containing socketpair" >&5 |
9a156167 MK |
3517 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3518 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3519 | else | |
3520 | ac_func_search_save_LIBS="$LIBS" | |
3521 | ac_cv_search_socketpair="no" | |
3522 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3523 | #line 3524 "configure" |
9a156167 MK |
3524 | #include "confdefs.h" |
3525 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3526 | /* We use char because int might match the return type of a gcc2 | |
3527 | builtin and then its argument prototype would still apply. */ | |
3528 | char socketpair(); | |
3529 | ||
3530 | int main() { | |
3531 | socketpair() | |
3532 | ; return 0; } | |
3533 | EOF | |
8dcde887 | 3534 | if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3535 | rm -rf conftest* |
3536 | ac_cv_search_socketpair="none required" | |
3537 | else | |
3538 | echo "configure: failed program was:" >&5 | |
3539 | cat conftest.$ac_ext >&5 | |
3540 | fi | |
3541 | rm -f conftest* | |
3542 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3543 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3544 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3545 | #line 3546 "configure" |
9a156167 MK |
3546 | #include "confdefs.h" |
3547 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3548 | /* We use char because int might match the return type of a gcc2 | |
3549 | builtin and then its argument prototype would still apply. */ | |
3550 | char socketpair(); | |
3551 | ||
3552 | int main() { | |
3553 | socketpair() | |
3554 | ; return 0; } | |
3555 | EOF | |
8dcde887 | 3556 | if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3557 | rm -rf conftest* |
3558 | ac_cv_search_socketpair="-l$i" | |
3559 | break | |
3560 | else | |
3561 | echo "configure: failed program was:" >&5 | |
3562 | cat conftest.$ac_ext >&5 | |
3563 | fi | |
3564 | rm -f conftest* | |
3565 | done | |
3566 | LIBS="$ac_func_search_save_LIBS" | |
3567 | fi | |
3568 | ||
3569 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3570 | if test "$ac_cv_search_socketpair" != "no"; then | |
3571 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3572 | ||
3573 | else : | |
3574 | ||
3575 | fi | |
3576 | ||
06825bd1 MK |
3577 | # Since GDB uses Readline, we need termcap functionality, so we need |
3578 | # to find a library that provides that. When GDB is configured with | |
3579 | # --enable-tui, we need full curses functionality. | |
3580 | # | |
3581 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3582 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3583 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3584 | # `curses'. I don't see why we should use HP curses if a more | |
3585 | # standard curses is available, except that according to HP's | |
3586 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3587 | # HP-UX 10.10 and 10.20. | |
3588 | ||
3589 | if test "$need_curses" = yes; then | |
3590 | ||
3591 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
8dcde887 | 3592 | echo "configure:3593: checking for library containing initscr" >&5 |
06825bd1 MK |
3593 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3594 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3595 | else | |
3596 | ac_func_search_save_LIBS="$LIBS" | |
3597 | ac_cv_search_initscr="no" | |
3598 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3599 | #line 3600 "configure" |
06825bd1 MK |
3600 | #include "confdefs.h" |
3601 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3602 | /* We use char because int might match the return type of a gcc2 | |
3603 | builtin and then its argument prototype would still apply. */ | |
3604 | char initscr(); | |
3605 | ||
3606 | int main() { | |
3607 | initscr() | |
3608 | ; return 0; } | |
3609 | EOF | |
8dcde887 | 3610 | if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3611 | rm -rf conftest* |
3612 | ac_cv_search_initscr="none required" | |
3613 | else | |
3614 | echo "configure: failed program was:" >&5 | |
3615 | cat conftest.$ac_ext >&5 | |
3616 | fi | |
3617 | rm -f conftest* | |
3618 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3619 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3620 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3621 | #line 3622 "configure" |
06825bd1 MK |
3622 | #include "confdefs.h" |
3623 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3624 | /* We use char because int might match the return type of a gcc2 | |
3625 | builtin and then its argument prototype would still apply. */ | |
3626 | char initscr(); | |
3627 | ||
3628 | int main() { | |
3629 | initscr() | |
3630 | ; return 0; } | |
3631 | EOF | |
8dcde887 | 3632 | if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3633 | rm -rf conftest* |
3634 | ac_cv_search_initscr="-l$i" | |
3635 | break | |
3636 | else | |
3637 | echo "configure: failed program was:" >&5 | |
3638 | cat conftest.$ac_ext >&5 | |
3639 | fi | |
3640 | rm -f conftest* | |
3641 | done | |
3642 | LIBS="$ac_func_search_save_LIBS" | |
3643 | fi | |
3644 | ||
3645 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3646 | if test "$ac_cv_search_initscr" != "no"; then | |
3647 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3648 | ||
3649 | else : | |
3650 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3651 | fi | |
3652 | fi | |
3653 | ||
3654 | case $host_os in | |
3655 | cygwin*) | |
3656 | if test -d $srcdir/libtermcap; then | |
3657 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3658 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3659 | fi ;; | |
3660 | go32*) | |
3661 | # ??? Is this really true? | |
3662 | ac_cv_search_tgetent="none required" | |
3663 | ;; | |
3664 | aix*) | |
3665 | # Readline prefers curses over termcap on AIX. | |
3666 | # ??? Why? | |
3667 | ||
3668 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
8dcde887 | 3669 | echo "configure:3670: checking for library containing tgetent" >&5 |
06825bd1 MK |
3670 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3672 | else | |
3673 | ac_func_search_save_LIBS="$LIBS" | |
3674 | ac_cv_search_tgetent="no" | |
3675 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3676 | #line 3677 "configure" |
06825bd1 MK |
3677 | #include "confdefs.h" |
3678 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3679 | /* We use char because int might match the return type of a gcc2 | |
3680 | builtin and then its argument prototype would still apply. */ | |
3681 | char tgetent(); | |
3682 | ||
3683 | int main() { | |
3684 | tgetent() | |
3685 | ; return 0; } | |
3686 | EOF | |
8dcde887 | 3687 | if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3688 | rm -rf conftest* |
3689 | ac_cv_search_tgetent="none required" | |
3690 | else | |
3691 | echo "configure: failed program was:" >&5 | |
3692 | cat conftest.$ac_ext >&5 | |
3693 | fi | |
3694 | rm -f conftest* | |
3695 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3696 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3697 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3698 | #line 3699 "configure" |
06825bd1 MK |
3699 | #include "confdefs.h" |
3700 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3701 | /* We use char because int might match the return type of a gcc2 | |
3702 | builtin and then its argument prototype would still apply. */ | |
3703 | char tgetent(); | |
3704 | ||
3705 | int main() { | |
3706 | tgetent() | |
3707 | ; return 0; } | |
3708 | EOF | |
8dcde887 | 3709 | if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3710 | rm -rf conftest* |
3711 | ac_cv_search_tgetent="-l$i" | |
3712 | break | |
3713 | else | |
3714 | echo "configure: failed program was:" >&5 | |
3715 | cat conftest.$ac_ext >&5 | |
3716 | fi | |
3717 | rm -f conftest* | |
3718 | done | |
3719 | LIBS="$ac_func_search_save_LIBS" | |
3720 | fi | |
3721 | ||
3722 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3723 | if test "$ac_cv_search_tgetent" != "no"; then | |
3724 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3725 | ||
3726 | else : | |
3727 | ||
3728 | fi | |
3729 | ;; | |
3730 | esac | |
3731 | ||
3732 | # Note: We used to check for libtermlib and libterminfo too, but | |
3733 | # Readline doesn't, so I think we're safe with leaving them out. | |
3734 | ||
3735 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
8dcde887 | 3736 | echo "configure:3737: checking for library containing tgetent" >&5 |
06825bd1 MK |
3737 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3739 | else | |
3740 | ac_func_search_save_LIBS="$LIBS" | |
3741 | ac_cv_search_tgetent="no" | |
3742 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3743 | #line 3744 "configure" |
06825bd1 MK |
3744 | #include "confdefs.h" |
3745 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3746 | /* We use char because int might match the return type of a gcc2 | |
3747 | builtin and then its argument prototype would still apply. */ | |
3748 | char tgetent(); | |
3749 | ||
3750 | int main() { | |
3751 | tgetent() | |
3752 | ; return 0; } | |
3753 | EOF | |
8dcde887 | 3754 | if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3755 | rm -rf conftest* |
3756 | ac_cv_search_tgetent="none required" | |
3757 | else | |
3758 | echo "configure: failed program was:" >&5 | |
3759 | cat conftest.$ac_ext >&5 | |
3760 | fi | |
3761 | rm -f conftest* | |
3762 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3763 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3764 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3765 | #line 3766 "configure" |
06825bd1 MK |
3766 | #include "confdefs.h" |
3767 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3768 | /* We use char because int might match the return type of a gcc2 | |
3769 | builtin and then its argument prototype would still apply. */ | |
3770 | char tgetent(); | |
3771 | ||
3772 | int main() { | |
3773 | tgetent() | |
3774 | ; return 0; } | |
3775 | EOF | |
8dcde887 | 3776 | if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3777 | rm -rf conftest* |
3778 | ac_cv_search_tgetent="-l$i" | |
3779 | break | |
3780 | else | |
3781 | echo "configure: failed program was:" >&5 | |
3782 | cat conftest.$ac_ext >&5 | |
3783 | fi | |
3784 | rm -f conftest* | |
3785 | done | |
3786 | LIBS="$ac_func_search_save_LIBS" | |
3787 | fi | |
3788 | ||
3789 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3790 | if test "$ac_cv_search_tgetent" != "no"; then | |
3791 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3792 | ||
3793 | else : | |
3794 | ||
3795 | fi | |
3796 | ||
3797 | if test "$ac_cv_search_tgetent" = no; then | |
3798 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3799 | fi | |
3800 | ||
5ee754fc MK |
3801 | # ------------------------- # |
3802 | # Checks for header files. # | |
3803 | # ------------------------- # | |
3804 | ||
3805 | ac_header_dirent=no | |
3806 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3807 | do | |
3808 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3809 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
8dcde887 | 3810 | echo "configure:3811: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3811 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3812 | echo $ac_n "(cached) $ac_c" 1>&6 |
3813 | else | |
3814 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3815 | #line 3816 "configure" |
c906108c SS |
3816 | #include "confdefs.h" |
3817 | #include <sys/types.h> | |
5ee754fc MK |
3818 | #include <$ac_hdr> |
3819 | int main() { | |
3820 | DIR *dirp = 0; | |
3821 | ; return 0; } | |
3822 | EOF | |
8dcde887 | 3823 | if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
3824 | rm -rf conftest* |
3825 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3826 | else | |
3827 | echo "configure: failed program was:" >&5 | |
3828 | cat conftest.$ac_ext >&5 | |
3829 | rm -rf conftest* | |
3830 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3831 | fi | |
3832 | rm -f conftest* | |
3833 | fi | |
3834 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3835 | echo "$ac_t""yes" 1>&6 | |
3836 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3837 | cat >> confdefs.h <<EOF | |
3838 | #define $ac_tr_hdr 1 | |
3839 | EOF | |
3840 | ac_header_dirent=$ac_hdr; break | |
3841 | else | |
3842 | echo "$ac_t""no" 1>&6 | |
3843 | fi | |
3844 | done | |
3845 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
3846 | if test $ac_header_dirent = dirent.h; then | |
3847 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
8dcde887 | 3848 | echo "configure:3849: checking for opendir in -ldir" >&5 |
5ee754fc MK |
3849 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
3850 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3852 | else | |
3853 | ac_save_LIBS="$LIBS" | |
3854 | LIBS="-ldir $LIBS" | |
3855 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3856 | #line 3857 "configure" |
5ee754fc MK |
3857 | #include "confdefs.h" |
3858 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3859 | /* We use char because int might match the return type of a gcc2 | |
3860 | builtin and then its argument prototype would still apply. */ | |
3861 | char opendir(); | |
c906108c SS |
3862 | |
3863 | int main() { | |
5ee754fc | 3864 | opendir() |
c906108c SS |
3865 | ; return 0; } |
3866 | EOF | |
8dcde887 | 3867 | if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 3868 | rm -rf conftest* |
5ee754fc | 3869 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
3870 | else |
3871 | echo "configure: failed program was:" >&5 | |
3872 | cat conftest.$ac_ext >&5 | |
3873 | rm -rf conftest* | |
5ee754fc | 3874 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
3875 | fi |
3876 | rm -f conftest* | |
5ee754fc MK |
3877 | LIBS="$ac_save_LIBS" |
3878 | ||
3879 | fi | |
3880 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3881 | echo "$ac_t""yes" 1>&6 | |
3882 | LIBS="$LIBS -ldir" | |
3883 | else | |
3884 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3885 | fi |
3886 | ||
5ee754fc MK |
3887 | else |
3888 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
8dcde887 | 3889 | echo "configure:3890: checking for opendir in -lx" >&5 |
5ee754fc MK |
3890 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
3891 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3892 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3893 | else | |
3894 | ac_save_LIBS="$LIBS" | |
3895 | LIBS="-lx $LIBS" | |
3896 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3897 | #line 3898 "configure" |
5ee754fc MK |
3898 | #include "confdefs.h" |
3899 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3900 | /* We use char because int might match the return type of a gcc2 | |
3901 | builtin and then its argument prototype would still apply. */ | |
3902 | char opendir(); | |
3903 | ||
3904 | int main() { | |
3905 | opendir() | |
3906 | ; return 0; } | |
c906108c | 3907 | EOF |
8dcde887 | 3908 | if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
3909 | rm -rf conftest* |
3910 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3911 | else | |
3912 | echo "configure: failed program was:" >&5 | |
3913 | cat conftest.$ac_ext >&5 | |
3914 | rm -rf conftest* | |
3915 | eval "ac_cv_lib_$ac_lib_var=no" | |
3916 | fi | |
3917 | rm -f conftest* | |
3918 | LIBS="$ac_save_LIBS" | |
c906108c | 3919 | |
5ee754fc MK |
3920 | fi |
3921 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3922 | echo "$ac_t""yes" 1>&6 | |
3923 | LIBS="$LIBS -lx" | |
3924 | else | |
3925 | echo "$ac_t""no" 1>&6 | |
3926 | fi | |
c906108c | 3927 | |
5ee754fc | 3928 | fi |
c906108c | 3929 | |
5ee754fc | 3930 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
8dcde887 | 3931 | echo "configure:3932: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 3932 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
3933 | echo $ac_n "(cached) $ac_c" 1>&6 |
3934 | else | |
3935 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3936 | #line 3937 "configure" |
9608ab8b MK |
3937 | #include "confdefs.h" |
3938 | #include <sys/types.h> | |
5ee754fc MK |
3939 | #include <sys/stat.h> |
3940 | ||
3941 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3942 | # if S_ISBLK (S_IFDIR) | |
3943 | You lose. | |
3944 | # endif | |
3945 | #endif | |
3946 | ||
3947 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3948 | # if S_ISBLK (S_IFCHR) | |
3949 | You lose. | |
3950 | # endif | |
3951 | #endif | |
3952 | ||
3953 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3954 | # if S_ISLNK (S_IFREG) | |
3955 | You lose. | |
3956 | # endif | |
3957 | #endif | |
3958 | ||
3959 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3960 | # if S_ISSOCK (S_IFREG) | |
3961 | You lose. | |
3962 | # endif | |
3963 | #endif | |
3964 | ||
9608ab8b | 3965 | EOF |
5ee754fc MK |
3966 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3967 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 3968 | rm -rf conftest* |
5ee754fc MK |
3969 | ac_cv_header_stat_broken=yes |
3970 | else | |
3971 | rm -rf conftest* | |
3972 | ac_cv_header_stat_broken=no | |
3973 | fi | |
3974 | rm -f conftest* | |
3975 | ||
3976 | fi | |
3977 | ||
3978 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3979 | if test $ac_cv_header_stat_broken = yes; then | |
3980 | cat >> confdefs.h <<\EOF | |
3981 | #define STAT_MACROS_BROKEN 1 | |
3982 | EOF | |
3983 | ||
3984 | fi | |
3985 | ||
3986 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
8dcde887 | 3987 | echo "configure:3988: checking for ANSI C header files" >&5 |
5ee754fc MK |
3988 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3990 | else | |
3991 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 3992 | #line 3993 "configure" |
5ee754fc MK |
3993 | #include "confdefs.h" |
3994 | #include <stdlib.h> | |
3995 | #include <stdarg.h> | |
3996 | #include <string.h> | |
3997 | #include <float.h> | |
3998 | EOF | |
3999 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4000 | { (eval echo configure:4001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4001 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4002 | if test -z "$ac_err"; then | |
4003 | rm -rf conftest* | |
4004 | ac_cv_header_stdc=yes | |
4005 | else | |
4006 | echo "$ac_err" >&5 | |
4007 | echo "configure: failed program was:" >&5 | |
4008 | cat conftest.$ac_ext >&5 | |
4009 | rm -rf conftest* | |
4010 | ac_cv_header_stdc=no | |
4011 | fi | |
4012 | rm -f conftest* | |
4013 | ||
4014 | if test $ac_cv_header_stdc = yes; then | |
4015 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4016 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4017 | #line 4018 "configure" |
5ee754fc MK |
4018 | #include "confdefs.h" |
4019 | #include <string.h> | |
4020 | EOF | |
4021 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4022 | egrep "memchr" >/dev/null 2>&1; then | |
4023 | : | |
4024 | else | |
4025 | rm -rf conftest* | |
4026 | ac_cv_header_stdc=no | |
4027 | fi | |
4028 | rm -f conftest* | |
4029 | ||
4030 | fi | |
4031 | ||
4032 | if test $ac_cv_header_stdc = yes; then | |
4033 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4034 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4035 | #line 4036 "configure" |
5ee754fc MK |
4036 | #include "confdefs.h" |
4037 | #include <stdlib.h> | |
4038 | EOF | |
4039 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4040 | egrep "free" >/dev/null 2>&1; then | |
4041 | : | |
4042 | else | |
4043 | rm -rf conftest* | |
4044 | ac_cv_header_stdc=no | |
4045 | fi | |
4046 | rm -f conftest* | |
4047 | ||
4048 | fi | |
4049 | ||
4050 | if test $ac_cv_header_stdc = yes; then | |
4051 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4052 | if test "$cross_compiling" = yes; then | |
4053 | : | |
4054 | else | |
4055 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4056 | #line 4057 "configure" |
5ee754fc MK |
4057 | #include "confdefs.h" |
4058 | #include <ctype.h> | |
4059 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4060 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4061 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4062 | int main () { int i; for (i = 0; i < 256; i++) | |
4063 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4064 | exit (0); } | |
4065 | ||
4066 | EOF | |
8dcde887 | 4067 | if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4068 | then |
4069 | : | |
9608ab8b | 4070 | else |
5ee754fc MK |
4071 | echo "configure: failed program was:" >&5 |
4072 | cat conftest.$ac_ext >&5 | |
4073 | rm -fr conftest* | |
4074 | ac_cv_header_stdc=no | |
4075 | fi | |
4076 | rm -fr conftest* | |
4077 | fi | |
4078 | ||
4079 | fi | |
4080 | fi | |
4081 | ||
4082 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4083 | if test $ac_cv_header_stdc = yes; then | |
4084 | cat >> confdefs.h <<\EOF | |
4085 | #define STDC_HEADERS 1 | |
4086 | EOF | |
4087 | ||
4088 | fi | |
4089 | ||
4090 | for ac_hdr in link.h | |
4091 | do | |
4092 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4093 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4094 | echo "configure:4095: checking for $ac_hdr" >&5 |
5ee754fc MK |
4095 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4096 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4097 | else | |
4098 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4099 | #line 4100 "configure" |
5ee754fc MK |
4100 | #include "confdefs.h" |
4101 | #include <$ac_hdr> | |
4102 | EOF | |
4103 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4104 | { (eval echo configure:4105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4105 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4106 | if test -z "$ac_err"; then | |
4107 | rm -rf conftest* | |
4108 | eval "ac_cv_header_$ac_safe=yes" | |
4109 | else | |
4110 | echo "$ac_err" >&5 | |
4111 | echo "configure: failed program was:" >&5 | |
4112 | cat conftest.$ac_ext >&5 | |
4113 | rm -rf conftest* | |
4114 | eval "ac_cv_header_$ac_safe=no" | |
4115 | fi | |
4116 | rm -f conftest* | |
4117 | fi | |
4118 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4119 | echo "$ac_t""yes" 1>&6 | |
4120 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4121 | cat >> confdefs.h <<EOF | |
4122 | #define $ac_tr_hdr 1 | |
4123 | EOF | |
4124 | ||
4125 | else | |
4126 | echo "$ac_t""no" 1>&6 | |
4127 | fi | |
4128 | done | |
4129 | ||
4130 | for ac_hdr in nlist.h | |
4131 | do | |
4132 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4133 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4134 | echo "configure:4135: checking for $ac_hdr" >&5 |
5ee754fc MK |
4135 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4137 | else | |
4138 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4139 | #line 4140 "configure" |
5ee754fc MK |
4140 | #include "confdefs.h" |
4141 | #include <$ac_hdr> | |
4142 | EOF | |
4143 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4144 | { (eval echo configure:4145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4145 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4146 | if test -z "$ac_err"; then | |
4147 | rm -rf conftest* | |
4148 | eval "ac_cv_header_$ac_safe=yes" | |
4149 | else | |
4150 | echo "$ac_err" >&5 | |
4151 | echo "configure: failed program was:" >&5 | |
4152 | cat conftest.$ac_ext >&5 | |
4153 | rm -rf conftest* | |
4154 | eval "ac_cv_header_$ac_safe=no" | |
4155 | fi | |
4156 | rm -f conftest* | |
4157 | fi | |
4158 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4159 | echo "$ac_t""yes" 1>&6 | |
4160 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4161 | cat >> confdefs.h <<EOF | |
4162 | #define $ac_tr_hdr 1 | |
4163 | EOF | |
4164 | ||
4165 | else | |
4166 | echo "$ac_t""no" 1>&6 | |
4167 | fi | |
4168 | done | |
4169 | ||
4170 | for ac_hdr in poll.h sys/poll.h | |
4171 | do | |
4172 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4173 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4174 | echo "configure:4175: checking for $ac_hdr" >&5 |
5ee754fc MK |
4175 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4177 | else | |
4178 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4179 | #line 4180 "configure" |
5ee754fc MK |
4180 | #include "confdefs.h" |
4181 | #include <$ac_hdr> | |
4182 | EOF | |
4183 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4184 | { (eval echo configure:4185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4185 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4186 | if test -z "$ac_err"; then | |
4187 | rm -rf conftest* | |
4188 | eval "ac_cv_header_$ac_safe=yes" | |
4189 | else | |
4190 | echo "$ac_err" >&5 | |
4191 | echo "configure: failed program was:" >&5 | |
4192 | cat conftest.$ac_ext >&5 | |
4193 | rm -rf conftest* | |
4194 | eval "ac_cv_header_$ac_safe=no" | |
4195 | fi | |
4196 | rm -f conftest* | |
4197 | fi | |
4198 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4199 | echo "$ac_t""yes" 1>&6 | |
4200 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4201 | cat >> confdefs.h <<EOF | |
4202 | #define $ac_tr_hdr 1 | |
4203 | EOF | |
4204 | ||
4205 | else | |
4206 | echo "$ac_t""no" 1>&6 | |
4207 | fi | |
4208 | done | |
4209 | ||
4210 | for ac_hdr in proc_service.h thread_db.h | |
4211 | do | |
4212 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4213 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4214 | echo "configure:4215: checking for $ac_hdr" >&5 |
5ee754fc MK |
4215 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4217 | else | |
4218 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4219 | #line 4220 "configure" |
5ee754fc MK |
4220 | #include "confdefs.h" |
4221 | #include <$ac_hdr> | |
4222 | EOF | |
4223 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4224 | { (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4225 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4226 | if test -z "$ac_err"; then | |
4227 | rm -rf conftest* | |
4228 | eval "ac_cv_header_$ac_safe=yes" | |
4229 | else | |
4230 | echo "$ac_err" >&5 | |
4231 | echo "configure: failed program was:" >&5 | |
4232 | cat conftest.$ac_ext >&5 | |
4233 | rm -rf conftest* | |
4234 | eval "ac_cv_header_$ac_safe=no" | |
4235 | fi | |
4236 | rm -f conftest* | |
4237 | fi | |
4238 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4239 | echo "$ac_t""yes" 1>&6 | |
4240 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4241 | cat >> confdefs.h <<EOF | |
4242 | #define $ac_tr_hdr 1 | |
4243 | EOF | |
4244 | ||
4245 | else | |
4246 | echo "$ac_t""no" 1>&6 | |
4247 | fi | |
4248 | done | |
4249 | ||
4250 | for ac_hdr in stddef.h | |
4251 | do | |
4252 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4253 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4254 | echo "configure:4255: checking for $ac_hdr" >&5 |
5ee754fc MK |
4255 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4257 | else | |
4258 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4259 | #line 4260 "configure" |
5ee754fc MK |
4260 | #include "confdefs.h" |
4261 | #include <$ac_hdr> | |
4262 | EOF | |
4263 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4264 | { (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4265 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4266 | if test -z "$ac_err"; then | |
4267 | rm -rf conftest* | |
4268 | eval "ac_cv_header_$ac_safe=yes" | |
4269 | else | |
4270 | echo "$ac_err" >&5 | |
4271 | echo "configure: failed program was:" >&5 | |
4272 | cat conftest.$ac_ext >&5 | |
4273 | rm -rf conftest* | |
4274 | eval "ac_cv_header_$ac_safe=no" | |
4275 | fi | |
4276 | rm -f conftest* | |
4277 | fi | |
4278 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4279 | echo "$ac_t""yes" 1>&6 | |
4280 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4281 | cat >> confdefs.h <<EOF | |
4282 | #define $ac_tr_hdr 1 | |
4283 | EOF | |
4284 | ||
4285 | else | |
4286 | echo "$ac_t""no" 1>&6 | |
4287 | fi | |
4288 | done | |
4289 | ||
4290 | for ac_hdr in stdlib.h | |
4291 | do | |
4292 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4293 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4294 | echo "configure:4295: checking for $ac_hdr" >&5 |
5ee754fc MK |
4295 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4297 | else | |
4298 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4299 | #line 4300 "configure" |
5ee754fc MK |
4300 | #include "confdefs.h" |
4301 | #include <$ac_hdr> | |
4302 | EOF | |
4303 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4304 | { (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4305 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4306 | if test -z "$ac_err"; then | |
4307 | rm -rf conftest* | |
4308 | eval "ac_cv_header_$ac_safe=yes" | |
4309 | else | |
4310 | echo "$ac_err" >&5 | |
4311 | echo "configure: failed program was:" >&5 | |
4312 | cat conftest.$ac_ext >&5 | |
4313 | rm -rf conftest* | |
4314 | eval "ac_cv_header_$ac_safe=no" | |
4315 | fi | |
4316 | rm -f conftest* | |
4317 | fi | |
4318 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4319 | echo "$ac_t""yes" 1>&6 | |
4320 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4321 | cat >> confdefs.h <<EOF | |
4322 | #define $ac_tr_hdr 1 | |
4323 | EOF | |
4324 | ||
4325 | else | |
4326 | echo "$ac_t""no" 1>&6 | |
4327 | fi | |
4328 | done | |
4329 | ||
4330 | for ac_hdr in stdint.h | |
4331 | do | |
4332 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4333 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4334 | echo "configure:4335: checking for $ac_hdr" >&5 |
5ee754fc MK |
4335 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4336 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4337 | else | |
4338 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4339 | #line 4340 "configure" |
5ee754fc MK |
4340 | #include "confdefs.h" |
4341 | #include <$ac_hdr> | |
4342 | EOF | |
4343 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4344 | { (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4345 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4346 | if test -z "$ac_err"; then | |
4347 | rm -rf conftest* | |
4348 | eval "ac_cv_header_$ac_safe=yes" | |
4349 | else | |
4350 | echo "$ac_err" >&5 | |
4351 | echo "configure: failed program was:" >&5 | |
4352 | cat conftest.$ac_ext >&5 | |
4353 | rm -rf conftest* | |
4354 | eval "ac_cv_header_$ac_safe=no" | |
4355 | fi | |
4356 | rm -f conftest* | |
4357 | fi | |
4358 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4359 | echo "$ac_t""yes" 1>&6 | |
4360 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4361 | cat >> confdefs.h <<EOF | |
4362 | #define $ac_tr_hdr 1 | |
4363 | EOF | |
4364 | ||
4365 | else | |
4366 | echo "$ac_t""no" 1>&6 | |
4367 | fi | |
4368 | done | |
4369 | ||
4370 | for ac_hdr in string.h memory.h strings.h | |
4371 | do | |
4372 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4373 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4374 | echo "configure:4375: checking for $ac_hdr" >&5 |
5ee754fc MK |
4375 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4376 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4377 | else | |
4378 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4379 | #line 4380 "configure" |
5ee754fc MK |
4380 | #include "confdefs.h" |
4381 | #include <$ac_hdr> | |
4382 | EOF | |
4383 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4384 | { (eval echo configure:4385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4385 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4386 | if test -z "$ac_err"; then | |
4387 | rm -rf conftest* | |
4388 | eval "ac_cv_header_$ac_safe=yes" | |
4389 | else | |
4390 | echo "$ac_err" >&5 | |
4391 | echo "configure: failed program was:" >&5 | |
4392 | cat conftest.$ac_ext >&5 | |
4393 | rm -rf conftest* | |
4394 | eval "ac_cv_header_$ac_safe=no" | |
4395 | fi | |
4396 | rm -f conftest* | |
4397 | fi | |
4398 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4399 | echo "$ac_t""yes" 1>&6 | |
4400 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4401 | cat >> confdefs.h <<EOF | |
4402 | #define $ac_tr_hdr 1 | |
4403 | EOF | |
4404 | ||
4405 | else | |
4406 | echo "$ac_t""no" 1>&6 | |
4407 | fi | |
4408 | done | |
4409 | ||
4410 | for ac_hdr in sys/fault.h | |
4411 | do | |
4412 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4413 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4414 | echo "configure:4415: checking for $ac_hdr" >&5 |
5ee754fc MK |
4415 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4416 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4417 | else | |
4418 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4419 | #line 4420 "configure" |
5ee754fc MK |
4420 | #include "confdefs.h" |
4421 | #include <$ac_hdr> | |
4422 | EOF | |
4423 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4424 | { (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4425 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4426 | if test -z "$ac_err"; then | |
4427 | rm -rf conftest* | |
4428 | eval "ac_cv_header_$ac_safe=yes" | |
4429 | else | |
4430 | echo "$ac_err" >&5 | |
4431 | echo "configure: failed program was:" >&5 | |
4432 | cat conftest.$ac_ext >&5 | |
4433 | rm -rf conftest* | |
4434 | eval "ac_cv_header_$ac_safe=no" | |
4435 | fi | |
4436 | rm -f conftest* | |
4437 | fi | |
4438 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4439 | echo "$ac_t""yes" 1>&6 | |
4440 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4441 | cat >> confdefs.h <<EOF | |
4442 | #define $ac_tr_hdr 1 | |
4443 | EOF | |
4444 | ||
4445 | else | |
4446 | echo "$ac_t""no" 1>&6 | |
4447 | fi | |
4448 | done | |
4449 | ||
4450 | for ac_hdr in sys/file.h | |
4451 | do | |
4452 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4453 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4454 | echo "configure:4455: checking for $ac_hdr" >&5 |
5ee754fc MK |
4455 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4457 | else | |
4458 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4459 | #line 4460 "configure" |
5ee754fc MK |
4460 | #include "confdefs.h" |
4461 | #include <$ac_hdr> | |
4462 | EOF | |
4463 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4464 | { (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4465 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4466 | if test -z "$ac_err"; then | |
4467 | rm -rf conftest* | |
4468 | eval "ac_cv_header_$ac_safe=yes" | |
4469 | else | |
4470 | echo "$ac_err" >&5 | |
4471 | echo "configure: failed program was:" >&5 | |
4472 | cat conftest.$ac_ext >&5 | |
4473 | rm -rf conftest* | |
4474 | eval "ac_cv_header_$ac_safe=no" | |
4475 | fi | |
4476 | rm -f conftest* | |
4477 | fi | |
4478 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4479 | echo "$ac_t""yes" 1>&6 | |
4480 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4481 | cat >> confdefs.h <<EOF | |
4482 | #define $ac_tr_hdr 1 | |
4483 | EOF | |
4484 | ||
4485 | else | |
4486 | echo "$ac_t""no" 1>&6 | |
4487 | fi | |
4488 | done | |
4489 | ||
4490 | for ac_hdr in sys/filio.h | |
4491 | do | |
4492 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4493 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4494 | echo "configure:4495: checking for $ac_hdr" >&5 |
5ee754fc MK |
4495 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4497 | else | |
4498 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4499 | #line 4500 "configure" |
5ee754fc MK |
4500 | #include "confdefs.h" |
4501 | #include <$ac_hdr> | |
4502 | EOF | |
4503 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4504 | { (eval echo configure:4505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4505 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4506 | if test -z "$ac_err"; then | |
4507 | rm -rf conftest* | |
4508 | eval "ac_cv_header_$ac_safe=yes" | |
4509 | else | |
4510 | echo "$ac_err" >&5 | |
4511 | echo "configure: failed program was:" >&5 | |
4512 | cat conftest.$ac_ext >&5 | |
4513 | rm -rf conftest* | |
4514 | eval "ac_cv_header_$ac_safe=no" | |
4515 | fi | |
4516 | rm -f conftest* | |
4517 | fi | |
4518 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4519 | echo "$ac_t""yes" 1>&6 | |
4520 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4521 | cat >> confdefs.h <<EOF | |
4522 | #define $ac_tr_hdr 1 | |
4523 | EOF | |
4524 | ||
4525 | else | |
4526 | echo "$ac_t""no" 1>&6 | |
4527 | fi | |
4528 | done | |
4529 | ||
4530 | for ac_hdr in sys/ioctl.h | |
4531 | do | |
4532 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4533 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4534 | echo "configure:4535: checking for $ac_hdr" >&5 |
5ee754fc MK |
4535 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4537 | else | |
4538 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4539 | #line 4540 "configure" |
5ee754fc MK |
4540 | #include "confdefs.h" |
4541 | #include <$ac_hdr> | |
4542 | EOF | |
4543 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4544 | { (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4545 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4546 | if test -z "$ac_err"; then | |
4547 | rm -rf conftest* | |
4548 | eval "ac_cv_header_$ac_safe=yes" | |
4549 | else | |
4550 | echo "$ac_err" >&5 | |
4551 | echo "configure: failed program was:" >&5 | |
4552 | cat conftest.$ac_ext >&5 | |
4553 | rm -rf conftest* | |
4554 | eval "ac_cv_header_$ac_safe=no" | |
4555 | fi | |
4556 | rm -f conftest* | |
4557 | fi | |
4558 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4559 | echo "$ac_t""yes" 1>&6 | |
4560 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4561 | cat >> confdefs.h <<EOF | |
4562 | #define $ac_tr_hdr 1 | |
4563 | EOF | |
4564 | ||
4565 | else | |
4566 | echo "$ac_t""no" 1>&6 | |
4567 | fi | |
4568 | done | |
4569 | ||
4570 | for ac_hdr in sys/param.h | |
4571 | do | |
4572 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4573 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4574 | echo "configure:4575: checking for $ac_hdr" >&5 |
5ee754fc MK |
4575 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4576 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4577 | else | |
4578 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4579 | #line 4580 "configure" |
5ee754fc MK |
4580 | #include "confdefs.h" |
4581 | #include <$ac_hdr> | |
4582 | EOF | |
4583 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4584 | { (eval echo configure:4585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4585 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4586 | if test -z "$ac_err"; then | |
4587 | rm -rf conftest* | |
4588 | eval "ac_cv_header_$ac_safe=yes" | |
4589 | else | |
4590 | echo "$ac_err" >&5 | |
4591 | echo "configure: failed program was:" >&5 | |
4592 | cat conftest.$ac_ext >&5 | |
4593 | rm -rf conftest* | |
4594 | eval "ac_cv_header_$ac_safe=no" | |
4595 | fi | |
4596 | rm -f conftest* | |
4597 | fi | |
4598 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4599 | echo "$ac_t""yes" 1>&6 | |
4600 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4601 | cat >> confdefs.h <<EOF | |
4602 | #define $ac_tr_hdr 1 | |
4603 | EOF | |
4604 | ||
4605 | else | |
4606 | echo "$ac_t""no" 1>&6 | |
4607 | fi | |
4608 | done | |
4609 | ||
4610 | for ac_hdr in sys/proc.h | |
4611 | do | |
4612 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4613 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4614 | echo "configure:4615: checking for $ac_hdr" >&5 |
5ee754fc MK |
4615 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4617 | else | |
4618 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4619 | #line 4620 "configure" |
5ee754fc MK |
4620 | #include "confdefs.h" |
4621 | #include <$ac_hdr> | |
4622 | EOF | |
4623 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4624 | { (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4625 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4626 | if test -z "$ac_err"; then | |
4627 | rm -rf conftest* | |
4628 | eval "ac_cv_header_$ac_safe=yes" | |
4629 | else | |
4630 | echo "$ac_err" >&5 | |
4631 | echo "configure: failed program was:" >&5 | |
4632 | cat conftest.$ac_ext >&5 | |
4633 | rm -rf conftest* | |
4634 | eval "ac_cv_header_$ac_safe=no" | |
4635 | fi | |
4636 | rm -f conftest* | |
4637 | fi | |
4638 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4639 | echo "$ac_t""yes" 1>&6 | |
4640 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4641 | cat >> confdefs.h <<EOF | |
4642 | #define $ac_tr_hdr 1 | |
4643 | EOF | |
4644 | ||
4645 | else | |
4646 | echo "$ac_t""no" 1>&6 | |
4647 | fi | |
4648 | done | |
4649 | ||
4650 | for ac_hdr in sys/procfs.h | |
4651 | do | |
4652 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4653 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4654 | echo "configure:4655: checking for $ac_hdr" >&5 |
5ee754fc MK |
4655 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4657 | else | |
4658 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4659 | #line 4660 "configure" |
5ee754fc MK |
4660 | #include "confdefs.h" |
4661 | #include <$ac_hdr> | |
4662 | EOF | |
4663 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4664 | { (eval echo configure:4665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4665 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4666 | if test -z "$ac_err"; then | |
4667 | rm -rf conftest* | |
4668 | eval "ac_cv_header_$ac_safe=yes" | |
4669 | else | |
4670 | echo "$ac_err" >&5 | |
4671 | echo "configure: failed program was:" >&5 | |
4672 | cat conftest.$ac_ext >&5 | |
4673 | rm -rf conftest* | |
4674 | eval "ac_cv_header_$ac_safe=no" | |
4675 | fi | |
4676 | rm -f conftest* | |
4677 | fi | |
4678 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4679 | echo "$ac_t""yes" 1>&6 | |
4680 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4681 | cat >> confdefs.h <<EOF | |
4682 | #define $ac_tr_hdr 1 | |
4683 | EOF | |
4684 | ||
4685 | else | |
4686 | echo "$ac_t""no" 1>&6 | |
4687 | fi | |
4688 | done | |
4689 | ||
4690 | for ac_hdr in sys/ptrace.h ptrace.h | |
4691 | do | |
4692 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4693 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4694 | echo "configure:4695: checking for $ac_hdr" >&5 |
5ee754fc MK |
4695 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4697 | else | |
4698 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4699 | #line 4700 "configure" |
5ee754fc MK |
4700 | #include "confdefs.h" |
4701 | #include <$ac_hdr> | |
4702 | EOF | |
4703 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4704 | { (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4705 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4706 | if test -z "$ac_err"; then | |
4707 | rm -rf conftest* | |
4708 | eval "ac_cv_header_$ac_safe=yes" | |
4709 | else | |
4710 | echo "$ac_err" >&5 | |
4711 | echo "configure: failed program was:" >&5 | |
4712 | cat conftest.$ac_ext >&5 | |
4713 | rm -rf conftest* | |
4714 | eval "ac_cv_header_$ac_safe=no" | |
4715 | fi | |
4716 | rm -f conftest* | |
4717 | fi | |
4718 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4719 | echo "$ac_t""yes" 1>&6 | |
4720 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4721 | cat >> confdefs.h <<EOF | |
4722 | #define $ac_tr_hdr 1 | |
4723 | EOF | |
4724 | ||
4725 | else | |
4726 | echo "$ac_t""no" 1>&6 | |
4727 | fi | |
4728 | done | |
4729 | ||
4730 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4731 | do | |
4732 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4733 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4734 | echo "configure:4735: checking for $ac_hdr" >&5 |
5ee754fc MK |
4735 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4737 | else | |
4738 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4739 | #line 4740 "configure" |
5ee754fc MK |
4740 | #include "confdefs.h" |
4741 | #include <$ac_hdr> | |
4742 | EOF | |
4743 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4744 | { (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4745 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4746 | if test -z "$ac_err"; then | |
4747 | rm -rf conftest* | |
4748 | eval "ac_cv_header_$ac_safe=yes" | |
4749 | else | |
4750 | echo "$ac_err" >&5 | |
4751 | echo "configure: failed program was:" >&5 | |
4752 | cat conftest.$ac_ext >&5 | |
4753 | rm -rf conftest* | |
4754 | eval "ac_cv_header_$ac_safe=no" | |
4755 | fi | |
4756 | rm -f conftest* | |
4757 | fi | |
4758 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4759 | echo "$ac_t""yes" 1>&6 | |
4760 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4761 | cat >> confdefs.h <<EOF | |
4762 | #define $ac_tr_hdr 1 | |
4763 | EOF | |
4764 | ||
4765 | else | |
4766 | echo "$ac_t""no" 1>&6 | |
4767 | fi | |
4768 | done | |
4769 | ||
4770 | for ac_hdr in sys/select.h | |
4771 | do | |
4772 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4773 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4774 | echo "configure:4775: checking for $ac_hdr" >&5 |
5ee754fc MK |
4775 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4777 | else | |
4778 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4779 | #line 4780 "configure" |
5ee754fc MK |
4780 | #include "confdefs.h" |
4781 | #include <$ac_hdr> | |
4782 | EOF | |
4783 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4784 | { (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4785 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4786 | if test -z "$ac_err"; then | |
4787 | rm -rf conftest* | |
4788 | eval "ac_cv_header_$ac_safe=yes" | |
4789 | else | |
4790 | echo "$ac_err" >&5 | |
4791 | echo "configure: failed program was:" >&5 | |
4792 | cat conftest.$ac_ext >&5 | |
4793 | rm -rf conftest* | |
4794 | eval "ac_cv_header_$ac_safe=no" | |
4795 | fi | |
4796 | rm -f conftest* | |
4797 | fi | |
4798 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4799 | echo "$ac_t""yes" 1>&6 | |
4800 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4801 | cat >> confdefs.h <<EOF | |
4802 | #define $ac_tr_hdr 1 | |
4803 | EOF | |
4804 | ||
4805 | else | |
4806 | echo "$ac_t""no" 1>&6 | |
4807 | fi | |
4808 | done | |
4809 | ||
4810 | for ac_hdr in sys/syscall.h | |
4811 | do | |
4812 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4813 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4814 | echo "configure:4815: checking for $ac_hdr" >&5 |
5ee754fc MK |
4815 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4816 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4817 | else | |
4818 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4819 | #line 4820 "configure" |
5ee754fc MK |
4820 | #include "confdefs.h" |
4821 | #include <$ac_hdr> | |
4822 | EOF | |
4823 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4824 | { (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4825 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4826 | if test -z "$ac_err"; then | |
4827 | rm -rf conftest* | |
4828 | eval "ac_cv_header_$ac_safe=yes" | |
4829 | else | |
4830 | echo "$ac_err" >&5 | |
4831 | echo "configure: failed program was:" >&5 | |
4832 | cat conftest.$ac_ext >&5 | |
4833 | rm -rf conftest* | |
4834 | eval "ac_cv_header_$ac_safe=no" | |
4835 | fi | |
4836 | rm -f conftest* | |
4837 | fi | |
4838 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4839 | echo "$ac_t""yes" 1>&6 | |
4840 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4841 | cat >> confdefs.h <<EOF | |
4842 | #define $ac_tr_hdr 1 | |
4843 | EOF | |
4844 | ||
4845 | else | |
4846 | echo "$ac_t""no" 1>&6 | |
4847 | fi | |
4848 | done | |
4849 | ||
4850 | for ac_hdr in sys/user.h | |
4851 | do | |
4852 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4853 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4854 | echo "configure:4855: checking for $ac_hdr" >&5 |
5ee754fc MK |
4855 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4857 | else | |
4858 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4859 | #line 4860 "configure" |
5ee754fc MK |
4860 | #include "confdefs.h" |
4861 | #include <$ac_hdr> | |
4862 | EOF | |
4863 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4864 | { (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4865 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4866 | if test -z "$ac_err"; then | |
4867 | rm -rf conftest* | |
4868 | eval "ac_cv_header_$ac_safe=yes" | |
4869 | else | |
4870 | echo "$ac_err" >&5 | |
4871 | echo "configure: failed program was:" >&5 | |
4872 | cat conftest.$ac_ext >&5 | |
4873 | rm -rf conftest* | |
4874 | eval "ac_cv_header_$ac_safe=no" | |
4875 | fi | |
4876 | rm -f conftest* | |
4877 | fi | |
4878 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4879 | echo "$ac_t""yes" 1>&6 | |
4880 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4881 | cat >> confdefs.h <<EOF | |
4882 | #define $ac_tr_hdr 1 | |
4883 | EOF | |
4884 | ||
4885 | else | |
4886 | echo "$ac_t""no" 1>&6 | |
4887 | fi | |
4888 | done | |
4889 | ||
4890 | for ac_hdr in sys/wait.h wait.h | |
4891 | do | |
4892 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4893 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4894 | echo "configure:4895: checking for $ac_hdr" >&5 |
5ee754fc MK |
4895 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4896 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4897 | else | |
4898 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 4899 | #line 4900 "configure" |
5ee754fc MK |
4900 | #include "confdefs.h" |
4901 | #include <$ac_hdr> | |
4902 | EOF | |
4903 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 4904 | { (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4905 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4906 | if test -z "$ac_err"; then | |
4907 | rm -rf conftest* | |
4908 | eval "ac_cv_header_$ac_safe=yes" | |
4909 | else | |
4910 | echo "$ac_err" >&5 | |
9608ab8b MK |
4911 | echo "configure: failed program was:" >&5 |
4912 | cat conftest.$ac_ext >&5 | |
4913 | rm -rf conftest* | |
5ee754fc | 4914 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4915 | fi |
4916 | rm -f conftest* | |
4917 | fi | |
5ee754fc | 4918 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
4919 | echo "$ac_t""yes" 1>&6 |
4920 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4921 | cat >> confdefs.h <<EOF | |
4922 | #define $ac_tr_hdr 1 | |
4923 | EOF | |
5ee754fc | 4924 | |
9608ab8b MK |
4925 | else |
4926 | echo "$ac_t""no" 1>&6 | |
4927 | fi | |
4928 | done | |
5ee754fc MK |
4929 | |
4930 | for ac_hdr in termios.h termio.h sgtty.h | |
4931 | do | |
4932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4933 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4934 | echo "configure:4935: checking for $ac_hdr" >&5 |
5ee754fc | 4935 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4936 | echo $ac_n "(cached) $ac_c" 1>&6 |
4937 | else | |
5ee754fc | 4938 | cat > conftest.$ac_ext <<EOF |
8dcde887 | 4939 | #line 4940 "configure" |
9608ab8b | 4940 | #include "confdefs.h" |
5ee754fc | 4941 | #include <$ac_hdr> |
9608ab8b | 4942 | EOF |
5ee754fc | 4943 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
8dcde887 | 4944 | { (eval echo configure:4945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4945 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4946 | if test -z "$ac_err"; then | |
9608ab8b | 4947 | rm -rf conftest* |
5ee754fc | 4948 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4949 | else |
5ee754fc | 4950 | echo "$ac_err" >&5 |
9608ab8b MK |
4951 | echo "configure: failed program was:" >&5 |
4952 | cat conftest.$ac_ext >&5 | |
4953 | rm -rf conftest* | |
5ee754fc | 4954 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4955 | fi |
4956 | rm -f conftest* | |
9608ab8b | 4957 | fi |
5ee754fc | 4958 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4959 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4961 | cat >> confdefs.h <<EOF | |
4962 | #define $ac_tr_hdr 1 | |
4963 | EOF | |
4964 | ||
9608ab8b MK |
4965 | else |
4966 | echo "$ac_t""no" 1>&6 | |
4967 | fi | |
5ee754fc | 4968 | done |
9608ab8b | 4969 | |
5ee754fc MK |
4970 | for ac_hdr in unistd.h |
4971 | do | |
4972 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4973 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 4974 | echo "configure:4975: checking for $ac_hdr" >&5 |
5ee754fc | 4975 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4976 | echo $ac_n "(cached) $ac_c" 1>&6 |
4977 | else | |
5ee754fc | 4978 | cat > conftest.$ac_ext <<EOF |
8dcde887 | 4979 | #line 4980 "configure" |
9608ab8b | 4980 | #include "confdefs.h" |
5ee754fc | 4981 | #include <$ac_hdr> |
9608ab8b | 4982 | EOF |
5ee754fc | 4983 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
8dcde887 | 4984 | { (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4985 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4986 | if test -z "$ac_err"; then | |
9608ab8b | 4987 | rm -rf conftest* |
5ee754fc | 4988 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4989 | else |
5ee754fc | 4990 | echo "$ac_err" >&5 |
9608ab8b MK |
4991 | echo "configure: failed program was:" >&5 |
4992 | cat conftest.$ac_ext >&5 | |
4993 | rm -rf conftest* | |
5ee754fc | 4994 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4995 | fi |
4996 | rm -f conftest* | |
9608ab8b | 4997 | fi |
5ee754fc | 4998 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4999 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5000 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5001 | cat >> confdefs.h <<EOF | |
5002 | #define $ac_tr_hdr 1 | |
5003 | EOF | |
5004 | ||
9608ab8b MK |
5005 | else |
5006 | echo "$ac_t""no" 1>&6 | |
5007 | fi | |
5ee754fc | 5008 | done |
9608ab8b | 5009 | |
9608ab8b | 5010 | |
5ee754fc MK |
5011 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5012 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5013 | # think that we don't have <curses.h> if we're using GCC. | |
5014 | case $host_os in | |
5015 | solaris2.[78]) | |
5016 | if test "$GCC" = yes; then | |
5017 | cat >> confdefs.h <<\EOF | |
5018 | #define _MSE_INT_H 1 | |
5019 | EOF | |
5020 | ||
5021 | fi ;; | |
5022 | esac | |
5023 | for ac_hdr in curses.h ncurses.h term.h | |
5024 | do | |
5025 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5026 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 5027 | echo "configure:5028: checking for $ac_hdr" >&5 |
5ee754fc | 5028 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5029 | echo $ac_n "(cached) $ac_c" 1>&6 |
5030 | else | |
5031 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5032 | #line 5033 "configure" |
c906108c | 5033 | #include "confdefs.h" |
5ee754fc | 5034 | #include <$ac_hdr> |
c906108c SS |
5035 | EOF |
5036 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 5037 | { (eval echo configure:5038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5038 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5039 | if test -z "$ac_err"; then | |
5040 | rm -rf conftest* | |
5ee754fc | 5041 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5042 | else |
5043 | echo "$ac_err" >&5 | |
5044 | echo "configure: failed program was:" >&5 | |
5045 | cat conftest.$ac_ext >&5 | |
5046 | rm -rf conftest* | |
5ee754fc | 5047 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5048 | fi |
5049 | rm -f conftest* | |
c906108c | 5050 | fi |
5ee754fc MK |
5051 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5052 | echo "$ac_t""yes" 1>&6 | |
5053 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5054 | cat >> confdefs.h <<EOF | |
5055 | #define $ac_tr_hdr 1 | |
c906108c | 5056 | EOF |
5ee754fc | 5057 | |
c906108c | 5058 | else |
5ee754fc | 5059 | echo "$ac_t""no" 1>&6 |
c906108c | 5060 | fi |
5ee754fc | 5061 | done |
c906108c SS |
5062 | |
5063 | ||
5ee754fc MK |
5064 | # FIXME: kettenis/20030102: In most cases we include these |
5065 | # unconditionally, so what's the point in checking these? | |
5066 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5067 | do |
5068 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5069 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 5070 | echo "configure:5071: checking for $ac_hdr" >&5 |
c906108c SS |
5071 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5073 | else | |
5074 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5075 | #line 5076 "configure" |
c906108c SS |
5076 | #include "confdefs.h" |
5077 | #include <$ac_hdr> | |
5078 | EOF | |
5079 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 5080 | { (eval echo configure:5081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5081 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5082 | if test -z "$ac_err"; then | |
5083 | rm -rf conftest* | |
5084 | eval "ac_cv_header_$ac_safe=yes" | |
5085 | else | |
5086 | echo "$ac_err" >&5 | |
5087 | echo "configure: failed program was:" >&5 | |
5088 | cat conftest.$ac_ext >&5 | |
5089 | rm -rf conftest* | |
5090 | eval "ac_cv_header_$ac_safe=no" | |
5091 | fi | |
5092 | rm -f conftest* | |
5093 | fi | |
5094 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5095 | echo "$ac_t""yes" 1>&6 | |
5096 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5097 | cat >> confdefs.h <<EOF | |
5098 | #define $ac_tr_hdr 1 | |
5099 | EOF | |
5100 | ||
5101 | else | |
5102 | echo "$ac_t""no" 1>&6 | |
5103 | fi | |
5104 | done | |
5105 | ||
5ee754fc MK |
5106 | |
5107 | # ------------------ # | |
5108 | # Checks for types. # | |
5109 | # ------------------ # | |
5110 | ||
5111 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
8dcde887 | 5112 | echo "configure:5113: checking return type of signal handlers" >&5 |
5ee754fc | 5113 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5114 | echo $ac_n "(cached) $ac_c" 1>&6 |
5115 | else | |
5116 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5117 | #line 5118 "configure" |
c906108c SS |
5118 | #include "confdefs.h" |
5119 | #include <sys/types.h> | |
5ee754fc MK |
5120 | #include <signal.h> |
5121 | #ifdef signal | |
5122 | #undef signal | |
c906108c | 5123 | #endif |
5ee754fc MK |
5124 | #ifdef __cplusplus |
5125 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5126 | #else | |
5127 | void (*signal ()) (); | |
c906108c SS |
5128 | #endif |
5129 | ||
5ee754fc MK |
5130 | int main() { |
5131 | int i; | |
5132 | ; return 0; } | |
c906108c | 5133 | EOF |
8dcde887 | 5134 | if { (eval echo configure:5135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5135 | rm -rf conftest* |
5ee754fc | 5136 | ac_cv_type_signal=void |
c906108c | 5137 | else |
5ee754fc MK |
5138 | echo "configure: failed program was:" >&5 |
5139 | cat conftest.$ac_ext >&5 | |
c906108c | 5140 | rm -rf conftest* |
5ee754fc | 5141 | ac_cv_type_signal=int |
c906108c SS |
5142 | fi |
5143 | rm -f conftest* | |
c906108c SS |
5144 | fi |
5145 | ||
5ee754fc MK |
5146 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5147 | cat >> confdefs.h <<EOF | |
5148 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5149 | EOF |
5150 | ||
c906108c SS |
5151 | |
5152 | ||
5ee754fc MK |
5153 | # ------------------------------------- # |
5154 | # Checks for compiler characteristics. # | |
5155 | # ------------------------------------- # | |
5156 | ||
c906108c | 5157 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
8dcde887 | 5158 | echo "configure:5159: checking for working const" >&5 |
c906108c SS |
5159 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5161 | else | |
5162 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5163 | #line 5164 "configure" |
c906108c SS |
5164 | #include "confdefs.h" |
5165 | ||
5166 | int main() { | |
5167 | ||
5168 | /* Ultrix mips cc rejects this. */ | |
5169 | typedef int charset[2]; const charset x; | |
5170 | /* SunOS 4.1.1 cc rejects this. */ | |
5171 | char const *const *ccp; | |
5172 | char **p; | |
5173 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5174 | struct point {int x, y;}; | |
5175 | static struct point const zero = {0,0}; | |
5176 | /* AIX XL C 1.02.0.0 rejects this. | |
5177 | It does not let you subtract one const X* pointer from another in an arm | |
5178 | of an if-expression whose if-part is not a constant expression */ | |
5179 | const char *g = "string"; | |
5180 | ccp = &g + (g ? g-g : 0); | |
5181 | /* HPUX 7.0 cc rejects these. */ | |
5182 | ++ccp; | |
5183 | p = (char**) ccp; | |
5184 | ccp = (char const *const *) p; | |
5185 | { /* SCO 3.2v4 cc rejects this. */ | |
5186 | char *t; | |
5187 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5188 | ||
5189 | *t++ = 0; | |
5190 | } | |
5191 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5192 | int x[] = {25, 17}; | |
5193 | const int *foo = &x[0]; | |
5194 | ++foo; | |
5195 | } | |
5196 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5197 | typedef const int *iptr; | |
5198 | iptr p = 0; | |
5199 | ++p; | |
5200 | } | |
5201 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5202 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5203 | struct s { int j; const int *ap[3]; }; | |
5204 | struct s *b; b->j = 5; | |
5205 | } | |
5206 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5207 | const int foo = 10; | |
5208 | } | |
5209 | ||
5210 | ; return 0; } | |
5211 | EOF | |
8dcde887 | 5212 | if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5213 | rm -rf conftest* |
5214 | ac_cv_c_const=yes | |
5215 | else | |
5216 | echo "configure: failed program was:" >&5 | |
5217 | cat conftest.$ac_ext >&5 | |
5218 | rm -rf conftest* | |
5219 | ac_cv_c_const=no | |
5220 | fi | |
5221 | rm -f conftest* | |
5222 | fi | |
5223 | ||
5224 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5225 | if test $ac_cv_c_const = no; then | |
5226 | cat >> confdefs.h <<\EOF | |
5227 | #define const | |
5228 | EOF | |
5229 | ||
5230 | fi | |
5231 | ||
bce58c09 | 5232 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
8dcde887 | 5233 | echo "configure:5234: checking for inline" >&5 |
bce58c09 JB |
5234 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5236 | else | |
5237 | ac_cv_c_inline=no | |
5238 | for ac_kw in inline __inline__ __inline; do | |
5239 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5240 | #line 5241 "configure" |
bce58c09 JB |
5241 | #include "confdefs.h" |
5242 | ||
5243 | int main() { | |
5244 | } $ac_kw foo() { | |
5245 | ; return 0; } | |
5246 | EOF | |
8dcde887 | 5247 | if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5248 | rm -rf conftest* |
5249 | ac_cv_c_inline=$ac_kw; break | |
5250 | else | |
5251 | echo "configure: failed program was:" >&5 | |
5252 | cat conftest.$ac_ext >&5 | |
5253 | fi | |
5254 | rm -f conftest* | |
5255 | done | |
5256 | ||
5257 | fi | |
5258 | ||
5259 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5260 | case "$ac_cv_c_inline" in | |
5261 | inline | yes) ;; | |
5262 | no) cat >> confdefs.h <<\EOF | |
5263 | #define inline | |
5264 | EOF | |
5265 | ;; | |
5266 | *) cat >> confdefs.h <<EOF | |
5267 | #define inline $ac_cv_c_inline | |
5268 | EOF | |
5269 | ;; | |
5270 | esac | |
5271 | ||
c906108c | 5272 | |
5ee754fc MK |
5273 | # ------------------------------ # |
5274 | # Checks for library functions. # | |
5275 | # ------------------------------ # | |
5276 | ||
46711df8 MK |
5277 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5278 | # for constant arguments. Useless! | |
5279 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
8dcde887 | 5280 | echo "configure:5281: checking for working alloca.h" >&5 |
46711df8 MK |
5281 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5283 | else | |
5284 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5285 | #line 5286 "configure" |
46711df8 MK |
5286 | #include "confdefs.h" |
5287 | #include <alloca.h> | |
5288 | int main() { | |
5289 | char *p = alloca(2 * sizeof(int)); | |
5290 | ; return 0; } | |
5291 | EOF | |
8dcde887 | 5292 | if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5293 | rm -rf conftest* |
5294 | ac_cv_header_alloca_h=yes | |
5295 | else | |
5296 | echo "configure: failed program was:" >&5 | |
5297 | cat conftest.$ac_ext >&5 | |
5298 | rm -rf conftest* | |
5299 | ac_cv_header_alloca_h=no | |
5300 | fi | |
5301 | rm -f conftest* | |
5302 | fi | |
5303 | ||
5304 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5305 | if test $ac_cv_header_alloca_h = yes; then | |
5306 | cat >> confdefs.h <<\EOF | |
5307 | #define HAVE_ALLOCA_H 1 | |
5308 | EOF | |
5309 | ||
5310 | fi | |
5311 | ||
5312 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
8dcde887 | 5313 | echo "configure:5314: checking for alloca" >&5 |
46711df8 MK |
5314 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5316 | else | |
5317 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5318 | #line 5319 "configure" |
46711df8 MK |
5319 | #include "confdefs.h" |
5320 | ||
5321 | #ifdef __GNUC__ | |
5322 | # define alloca __builtin_alloca | |
5323 | #else | |
5324 | # ifdef _MSC_VER | |
5325 | # include <malloc.h> | |
5326 | # define alloca _alloca | |
5327 | # else | |
5328 | # if HAVE_ALLOCA_H | |
5329 | # include <alloca.h> | |
5330 | # else | |
5331 | # ifdef _AIX | |
5332 | #pragma alloca | |
5333 | # else | |
5334 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5335 | char *alloca (); | |
5336 | # endif | |
5337 | # endif | |
5338 | # endif | |
5339 | # endif | |
5340 | #endif | |
5341 | ||
5342 | int main() { | |
5343 | char *p = (char *) alloca(1); | |
5344 | ; return 0; } | |
5345 | EOF | |
8dcde887 | 5346 | if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5347 | rm -rf conftest* |
5348 | ac_cv_func_alloca_works=yes | |
5349 | else | |
5350 | echo "configure: failed program was:" >&5 | |
5351 | cat conftest.$ac_ext >&5 | |
5352 | rm -rf conftest* | |
5353 | ac_cv_func_alloca_works=no | |
5354 | fi | |
5355 | rm -f conftest* | |
5356 | fi | |
5357 | ||
5358 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5359 | if test $ac_cv_func_alloca_works = yes; then | |
5360 | cat >> confdefs.h <<\EOF | |
5361 | #define HAVE_ALLOCA 1 | |
5362 | EOF | |
5363 | ||
5364 | fi | |
5365 | ||
5366 | if test $ac_cv_func_alloca_works = no; then | |
5367 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5368 | # that cause trouble. Some versions do not even contain alloca or | |
5369 | # contain a buggy version. If you still want to use their alloca, | |
5370 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5371 | ALLOCA=alloca.${ac_objext} | |
5372 | cat >> confdefs.h <<\EOF | |
5373 | #define C_ALLOCA 1 | |
5374 | EOF | |
5375 | ||
5376 | ||
5377 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
8dcde887 | 5378 | echo "configure:5379: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5379 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5381 | else | |
5382 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5383 | #line 5384 "configure" |
46711df8 MK |
5384 | #include "confdefs.h" |
5385 | #if defined(CRAY) && ! defined(CRAY2) | |
5386 | webecray | |
5387 | #else | |
5388 | wenotbecray | |
5389 | #endif | |
5390 | ||
5391 | EOF | |
5392 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5393 | egrep "webecray" >/dev/null 2>&1; then | |
5394 | rm -rf conftest* | |
5395 | ac_cv_os_cray=yes | |
5396 | else | |
5397 | rm -rf conftest* | |
5398 | ac_cv_os_cray=no | |
5399 | fi | |
5400 | rm -f conftest* | |
5401 | ||
5402 | fi | |
5403 | ||
5404 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5405 | if test $ac_cv_os_cray = yes; then | |
5406 | for ac_func in _getb67 GETB67 getb67; do | |
5407 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 5408 | echo "configure:5409: checking for $ac_func" >&5 |
46711df8 MK |
5409 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5410 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5411 | else | |
5412 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5413 | #line 5414 "configure" |
46711df8 MK |
5414 | #include "confdefs.h" |
5415 | /* System header to define __stub macros and hopefully few prototypes, | |
5416 | which can conflict with char $ac_func(); below. */ | |
5417 | #include <assert.h> | |
5418 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5419 | /* We use char because int might match the return type of a gcc2 | |
5420 | builtin and then its argument prototype would still apply. */ | |
5421 | char $ac_func(); | |
5422 | ||
5423 | int main() { | |
5424 | ||
5425 | /* The GNU C library defines this for functions which it implements | |
5426 | to always fail with ENOSYS. Some functions are actually named | |
5427 | something starting with __ and the normal name is an alias. */ | |
5428 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5429 | choke me | |
5430 | #else | |
5431 | $ac_func(); | |
5432 | #endif | |
5433 | ||
5434 | ; return 0; } | |
5435 | EOF | |
8dcde887 | 5436 | if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5437 | rm -rf conftest* |
5438 | eval "ac_cv_func_$ac_func=yes" | |
5439 | else | |
5440 | echo "configure: failed program was:" >&5 | |
5441 | cat conftest.$ac_ext >&5 | |
5442 | rm -rf conftest* | |
5443 | eval "ac_cv_func_$ac_func=no" | |
5444 | fi | |
5445 | rm -f conftest* | |
5446 | fi | |
5447 | ||
5448 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5449 | echo "$ac_t""yes" 1>&6 | |
5450 | cat >> confdefs.h <<EOF | |
5451 | #define CRAY_STACKSEG_END $ac_func | |
5452 | EOF | |
5453 | ||
5454 | break | |
5455 | else | |
5456 | echo "$ac_t""no" 1>&6 | |
5457 | fi | |
5458 | ||
5459 | done | |
5460 | fi | |
5461 | ||
5462 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
8dcde887 | 5463 | echo "configure:5464: checking stack direction for C alloca" >&5 |
46711df8 MK |
5464 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5466 | else | |
5467 | if test "$cross_compiling" = yes; then | |
5468 | ac_cv_c_stack_direction=0 | |
5469 | else | |
5470 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5471 | #line 5472 "configure" |
46711df8 MK |
5472 | #include "confdefs.h" |
5473 | find_stack_direction () | |
5474 | { | |
5475 | static char *addr = 0; | |
5476 | auto char dummy; | |
5477 | if (addr == 0) | |
5478 | { | |
5479 | addr = &dummy; | |
5480 | return find_stack_direction (); | |
5481 | } | |
5482 | else | |
5483 | return (&dummy > addr) ? 1 : -1; | |
5484 | } | |
5485 | main () | |
5486 | { | |
5487 | exit (find_stack_direction() < 0); | |
5488 | } | |
5489 | EOF | |
8dcde887 | 5490 | if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5491 | then |
5492 | ac_cv_c_stack_direction=1 | |
5493 | else | |
5494 | echo "configure: failed program was:" >&5 | |
5495 | cat conftest.$ac_ext >&5 | |
5496 | rm -fr conftest* | |
5497 | ac_cv_c_stack_direction=-1 | |
5498 | fi | |
5499 | rm -fr conftest* | |
5500 | fi | |
5501 | ||
5502 | fi | |
5503 | ||
5504 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5505 | cat >> confdefs.h <<EOF | |
5506 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5507 | EOF | |
5508 | ||
5509 | fi | |
5510 | ||
97bf5e38 MK |
5511 | for ac_hdr in unistd.h |
5512 | do | |
5513 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5514 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8dcde887 | 5515 | echo "configure:5516: checking for $ac_hdr" >&5 |
74c1b268 AC |
5516 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5517 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5518 | else | |
5519 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5520 | #line 5521 "configure" |
74c1b268 | 5521 | #include "confdefs.h" |
97bf5e38 | 5522 | #include <$ac_hdr> |
74c1b268 AC |
5523 | EOF |
5524 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 5525 | { (eval echo configure:5526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5526 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5527 | if test -z "$ac_err"; then | |
5528 | rm -rf conftest* | |
5529 | eval "ac_cv_header_$ac_safe=yes" | |
5530 | else | |
5531 | echo "$ac_err" >&5 | |
5532 | echo "configure: failed program was:" >&5 | |
5533 | cat conftest.$ac_ext >&5 | |
5534 | rm -rf conftest* | |
5535 | eval "ac_cv_header_$ac_safe=no" | |
5536 | fi | |
5537 | rm -f conftest* | |
5538 | fi | |
5539 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5540 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5541 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5542 | cat >> confdefs.h <<EOF | |
5543 | #define $ac_tr_hdr 1 | |
74c1b268 | 5544 | EOF |
97bf5e38 | 5545 | |
74c1b268 AC |
5546 | else |
5547 | echo "$ac_t""no" 1>&6 | |
5548 | fi | |
97bf5e38 | 5549 | done |
74c1b268 | 5550 | |
97bf5e38 MK |
5551 | for ac_func in getpagesize |
5552 | do | |
5553 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 5554 | echo "configure:5555: checking for $ac_func" >&5 |
97bf5e38 | 5555 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5556 | echo $ac_n "(cached) $ac_c" 1>&6 |
5557 | else | |
5558 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5559 | #line 5560 "configure" |
74c1b268 AC |
5560 | #include "confdefs.h" |
5561 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5562 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5563 | #include <assert.h> |
5564 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5565 | /* We use char because int might match the return type of a gcc2 | |
5566 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5567 | char $ac_func(); |
74c1b268 AC |
5568 | |
5569 | int main() { | |
5570 | ||
5571 | /* The GNU C library defines this for functions which it implements | |
5572 | to always fail with ENOSYS. Some functions are actually named | |
5573 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5574 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5575 | choke me |
5576 | #else | |
97bf5e38 | 5577 | $ac_func(); |
74c1b268 AC |
5578 | #endif |
5579 | ||
5580 | ; return 0; } | |
5581 | EOF | |
8dcde887 | 5582 | if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5583 | rm -rf conftest* |
97bf5e38 | 5584 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5585 | else |
5586 | echo "configure: failed program was:" >&5 | |
5587 | cat conftest.$ac_ext >&5 | |
5588 | rm -rf conftest* | |
97bf5e38 | 5589 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5590 | fi |
5591 | rm -f conftest* | |
5592 | fi | |
5593 | ||
97bf5e38 | 5594 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5595 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5596 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5597 | cat >> confdefs.h <<EOF | |
5598 | #define $ac_tr_func 1 | |
5599 | EOF | |
5600 | ||
74c1b268 AC |
5601 | else |
5602 | echo "$ac_t""no" 1>&6 | |
5603 | fi | |
97bf5e38 | 5604 | done |
74c1b268 | 5605 | |
97bf5e38 | 5606 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
8dcde887 | 5607 | echo "configure:5608: checking for working mmap" >&5 |
97bf5e38 MK |
5608 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5609 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5610 | else | |
5611 | if test "$cross_compiling" = yes; then | |
5612 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5613 | else |
5614 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5615 | #line 5616 "configure" |
74c1b268 | 5616 | #include "confdefs.h" |
97bf5e38 MK |
5617 | |
5618 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5619 | Here is a matrix of mmap possibilities: | |
5620 | mmap private not fixed | |
5621 | mmap private fixed at somewhere currently unmapped | |
5622 | mmap private fixed at somewhere already mapped | |
5623 | mmap shared not fixed | |
5624 | mmap shared fixed at somewhere currently unmapped | |
5625 | mmap shared fixed at somewhere already mapped | |
5626 | For private mappings, we should verify that changes cannot be read() | |
5627 | back from the file, nor mmap's back from the file at a different | |
5628 | address. (There have been systems where private was not correctly | |
5629 | implemented like the infamous i386 svr4.0, and systems where the | |
5630 | VM page cache was not coherent with the filesystem buffer cache | |
5631 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5632 | For shared mappings, we should conversely verify that changes get | |
5633 | propogated back to all the places they're supposed to be. | |
5634 | ||
5635 | Grep wants private fixed already mapped. | |
5636 | The main things grep needs to know about mmap are: | |
5637 | * does it exist and is it safe to write into the mmap'd area | |
5638 | * how to use it (BSD variants) */ | |
74c1b268 | 5639 | #include <sys/types.h> |
97bf5e38 MK |
5640 | #include <fcntl.h> |
5641 | #include <sys/mman.h> | |
5642 | ||
5643 | /* This mess was copied from the GNU getpagesize.h. */ | |
5644 | #ifndef HAVE_GETPAGESIZE | |
5645 | # ifdef HAVE_UNISTD_H | |
5646 | # include <unistd.h> | |
5647 | # endif | |
5648 | ||
5649 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5650 | # ifndef HAVE_SYS_PARAM_H | |
5651 | # define HAVE_SYS_PARAM_H 1 | |
5652 | # endif | |
5653 | ||
5654 | # ifdef _SC_PAGESIZE | |
5655 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5656 | # else /* no _SC_PAGESIZE */ | |
5657 | # ifdef HAVE_SYS_PARAM_H | |
5658 | # include <sys/param.h> | |
5659 | # ifdef EXEC_PAGESIZE | |
5660 | # define getpagesize() EXEC_PAGESIZE | |
5661 | # else /* no EXEC_PAGESIZE */ | |
5662 | # ifdef NBPG | |
5663 | # define getpagesize() NBPG * CLSIZE | |
5664 | # ifndef CLSIZE | |
5665 | # define CLSIZE 1 | |
5666 | # endif /* no CLSIZE */ | |
5667 | # else /* no NBPG */ | |
5668 | # ifdef NBPC | |
5669 | # define getpagesize() NBPC | |
5670 | # else /* no NBPC */ | |
5671 | # ifdef PAGESIZE | |
5672 | # define getpagesize() PAGESIZE | |
5673 | # endif /* PAGESIZE */ | |
5674 | # endif /* no NBPC */ | |
5675 | # endif /* no NBPG */ | |
5676 | # endif /* no EXEC_PAGESIZE */ | |
5677 | # else /* no HAVE_SYS_PARAM_H */ | |
5678 | # define getpagesize() 8192 /* punt totally */ | |
5679 | # endif /* no HAVE_SYS_PARAM_H */ | |
5680 | # endif /* no _SC_PAGESIZE */ | |
5681 | ||
5682 | #endif /* no HAVE_GETPAGESIZE */ | |
5683 | ||
74c1b268 | 5684 | #ifdef __cplusplus |
97bf5e38 | 5685 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5686 | #else |
97bf5e38 | 5687 | char *malloc(); |
74c1b268 | 5688 | #endif |
74c1b268 | 5689 | |
97bf5e38 MK |
5690 | int |
5691 | main() | |
5692 | { | |
5693 | char *data, *data2, *data3; | |
5694 | int i, pagesize; | |
5695 | int fd; | |
74c1b268 | 5696 | |
97bf5e38 | 5697 | pagesize = getpagesize(); |
74c1b268 | 5698 | |
97bf5e38 MK |
5699 | /* |
5700 | * First, make a file with some known garbage in it. | |
5701 | */ | |
5702 | data = malloc(pagesize); | |
5703 | if (!data) | |
5704 | exit(1); | |
5705 | for (i = 0; i < pagesize; ++i) | |
5706 | *(data + i) = rand(); | |
5707 | umask(0); | |
5708 | fd = creat("conftestmmap", 0600); | |
5709 | if (fd < 0) | |
5710 | exit(1); | |
5711 | if (write(fd, data, pagesize) != pagesize) | |
5712 | exit(1); | |
5713 | close(fd); | |
74c1b268 | 5714 | |
97bf5e38 MK |
5715 | /* |
5716 | * Next, try to mmap the file at a fixed address which | |
5717 | * already has something else allocated at it. If we can, | |
5718 | * also make sure that we see the same garbage. | |
5719 | */ | |
5720 | fd = open("conftestmmap", O_RDWR); | |
5721 | if (fd < 0) | |
5722 | exit(1); | |
5723 | data2 = malloc(2 * pagesize); | |
5724 | if (!data2) | |
5725 | exit(1); | |
5726 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5727 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5728 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5729 | exit(1); | |
5730 | for (i = 0; i < pagesize; ++i) | |
5731 | if (*(data + i) != *(data2 + i)) | |
5732 | exit(1); | |
74c1b268 | 5733 | |
97bf5e38 MK |
5734 | /* |
5735 | * Finally, make sure that changes to the mapped area | |
5736 | * do not percolate back to the file as seen by read(). | |
5737 | * (This is a bug on some variants of i386 svr4.0.) | |
5738 | */ | |
5739 | for (i = 0; i < pagesize; ++i) | |
5740 | *(data2 + i) = *(data2 + i) + 1; | |
5741 | data3 = malloc(pagesize); | |
5742 | if (!data3) | |
5743 | exit(1); | |
5744 | if (read(fd, data3, pagesize) != pagesize) | |
5745 | exit(1); | |
5746 | for (i = 0; i < pagesize; ++i) | |
5747 | if (*(data + i) != *(data3 + i)) | |
5748 | exit(1); | |
5749 | close(fd); | |
5750 | unlink("conftestmmap"); | |
5751 | exit(0); | |
74c1b268 | 5752 | } |
97bf5e38 | 5753 | |
74c1b268 | 5754 | EOF |
8dcde887 | 5755 | if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5756 | then |
97bf5e38 | 5757 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5758 | else |
5759 | echo "configure: failed program was:" >&5 | |
5760 | cat conftest.$ac_ext >&5 | |
5761 | rm -fr conftest* | |
97bf5e38 | 5762 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5763 | fi |
5764 | rm -fr conftest* | |
5765 | fi | |
5766 | ||
5767 | fi | |
5768 | ||
97bf5e38 MK |
5769 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5770 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5771 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5772 | #define HAVE_MMAP 1 |
74c1b268 AC |
5773 | EOF |
5774 | ||
5775 | fi | |
5776 | ||
97bf5e38 | 5777 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
8dcde887 | 5778 | echo "configure:5779: checking for pid_t" >&5 |
97bf5e38 | 5779 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5780 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5781 | else |
5782 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5783 | #line 5784 "configure" |
0200359f | 5784 | #include "confdefs.h" |
97bf5e38 MK |
5785 | #include <sys/types.h> |
5786 | #if STDC_HEADERS | |
5787 | #include <stdlib.h> | |
5788 | #include <stddef.h> | |
0200359f | 5789 | #endif |
0200359f | 5790 | EOF |
97bf5e38 MK |
5791 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5792 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5793 | rm -rf conftest* | |
5794 | ac_cv_type_pid_t=yes | |
0200359f | 5795 | else |
97bf5e38 MK |
5796 | rm -rf conftest* |
5797 | ac_cv_type_pid_t=no | |
0200359f | 5798 | fi |
97bf5e38 | 5799 | rm -f conftest* |
0200359f MK |
5800 | |
5801 | fi | |
97bf5e38 MK |
5802 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5803 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5804 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5805 | #define pid_t int |
0200359f MK |
5806 | EOF |
5807 | ||
5808 | fi | |
5809 | ||
97bf5e38 MK |
5810 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5811 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
8dcde887 | 5812 | echo "configure:5813: checking for vfork.h" >&5 |
97bf5e38 | 5813 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5814 | echo $ac_n "(cached) $ac_c" 1>&6 |
5815 | else | |
5816 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5817 | #line 5818 "configure" |
72473524 | 5818 | #include "confdefs.h" |
97bf5e38 | 5819 | #include <vfork.h> |
72473524 | 5820 | EOF |
97bf5e38 | 5821 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
8dcde887 | 5822 | { (eval echo configure:5823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
5823 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5824 | if test -z "$ac_err"; then | |
72473524 | 5825 | rm -rf conftest* |
97bf5e38 | 5826 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5827 | else |
97bf5e38 | 5828 | echo "$ac_err" >&5 |
72473524 DJ |
5829 | echo "configure: failed program was:" >&5 |
5830 | cat conftest.$ac_ext >&5 | |
5831 | rm -rf conftest* | |
97bf5e38 | 5832 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5833 | fi |
5834 | rm -f conftest* | |
5835 | fi | |
97bf5e38 MK |
5836 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5837 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5838 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5839 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5840 | EOF |
5841 | ||
97bf5e38 MK |
5842 | else |
5843 | echo "$ac_t""no" 1>&6 | |
72473524 | 5844 | fi |
c906108c | 5845 | |
97bf5e38 | 5846 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
8dcde887 | 5847 | echo "configure:5848: checking for working vfork" >&5 |
97bf5e38 MK |
5848 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
5849 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5850 | else | |
5851 | if test "$cross_compiling" = yes; then | |
5852 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
8dcde887 | 5853 | echo "configure:5854: checking for vfork" >&5 |
97bf5e38 | 5854 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
5855 | echo $ac_n "(cached) $ac_c" 1>&6 |
5856 | else | |
5857 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5858 | #line 5859 "configure" |
2b2d558c | 5859 | #include "confdefs.h" |
97bf5e38 MK |
5860 | /* System header to define __stub macros and hopefully few prototypes, |
5861 | which can conflict with char vfork(); below. */ | |
5862 | #include <assert.h> | |
5863 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5864 | /* We use char because int might match the return type of a gcc2 | |
5865 | builtin and then its argument prototype would still apply. */ | |
5866 | char vfork(); | |
2b2d558c MK |
5867 | |
5868 | int main() { | |
97bf5e38 MK |
5869 | |
5870 | /* The GNU C library defines this for functions which it implements | |
5871 | to always fail with ENOSYS. Some functions are actually named | |
5872 | something starting with __ and the normal name is an alias. */ | |
5873 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
5874 | choke me | |
5875 | #else | |
5876 | vfork(); | |
5877 | #endif | |
5878 | ||
2b2d558c MK |
5879 | ; return 0; } |
5880 | EOF | |
8dcde887 | 5881 | if { (eval echo configure:5882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 5882 | rm -rf conftest* |
97bf5e38 | 5883 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
5884 | else |
5885 | echo "configure: failed program was:" >&5 | |
5886 | cat conftest.$ac_ext >&5 | |
5887 | rm -rf conftest* | |
97bf5e38 | 5888 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
5889 | fi |
5890 | rm -f conftest* | |
5891 | fi | |
5892 | ||
97bf5e38 MK |
5893 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
5894 | echo "$ac_t""yes" 1>&6 | |
5895 | : | |
5896 | else | |
5897 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
5898 | fi |
5899 | ||
97bf5e38 | 5900 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
5901 | else |
5902 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 5903 | #line 5904 "configure" |
7dfa765c | 5904 | #include "confdefs.h" |
97bf5e38 MK |
5905 | /* Thanks to Paul Eggert for this test. */ |
5906 | #include <stdio.h> | |
5907 | #include <sys/types.h> | |
5908 | #include <sys/stat.h> | |
5909 | #ifdef HAVE_UNISTD_H | |
5910 | #include <unistd.h> | |
5911 | #endif | |
5912 | #ifdef HAVE_VFORK_H | |
5913 | #include <vfork.h> | |
5914 | #endif | |
5915 | /* On some sparc systems, changes by the child to local and incoming | |
5916 | argument registers are propagated back to the parent. | |
5917 | The compiler is told about this with #include <vfork.h>, | |
5918 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
5919 | Test for this by using a static variable whose address | |
5920 | is put into a register that is clobbered by the vfork. */ | |
5921 | static | |
5922 | #ifdef __cplusplus | |
5923 | sparc_address_test (int arg) | |
5924 | #else | |
5925 | sparc_address_test (arg) int arg; | |
5926 | #endif | |
5927 | { | |
5928 | static pid_t child; | |
5929 | if (!child) { | |
5930 | child = vfork (); | |
5931 | if (child < 0) { | |
5932 | perror ("vfork"); | |
5933 | _exit(2); | |
5934 | } | |
5935 | if (!child) { | |
5936 | arg = getpid(); | |
5937 | write(-1, "", 0); | |
5938 | _exit (arg); | |
5939 | } | |
5940 | } | |
5941 | } | |
5942 | main() { | |
5943 | pid_t parent = getpid (); | |
5944 | pid_t child; | |
7dfa765c | 5945 | |
97bf5e38 | 5946 | sparc_address_test (); |
7dfa765c | 5947 | |
97bf5e38 | 5948 | child = vfork (); |
7dfa765c | 5949 | |
97bf5e38 MK |
5950 | if (child == 0) { |
5951 | /* Here is another test for sparc vfork register problems. | |
5952 | This test uses lots of local variables, at least | |
5953 | as many local variables as main has allocated so far | |
5954 | including compiler temporaries. 4 locals are enough for | |
5955 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
5956 | A buggy compiler should reuse the register of parent | |
5957 | for one of the local variables, since it will think that | |
5958 | parent can't possibly be used any more in this routine. | |
5959 | Assigning to the local variable will thus munge parent | |
5960 | in the parent process. */ | |
5961 | pid_t | |
5962 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5963 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5964 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5965 | use the same hardware register for all 8 local variables. */ | |
5966 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5967 | || p != p5 || p != p6 || p != p7) | |
5968 | _exit(1); | |
7dfa765c | 5969 | |
97bf5e38 MK |
5970 | /* On some systems (e.g. IRIX 3.3), |
5971 | vfork doesn't separate parent from child file descriptors. | |
5972 | If the child closes a descriptor before it execs or exits, | |
5973 | this munges the parent's descriptor as well. | |
5974 | Test for this by closing stdout in the child. */ | |
5975 | _exit(close(fileno(stdout)) != 0); | |
5976 | } else { | |
5977 | int status; | |
5978 | struct stat st; | |
64bb1671 | 5979 | |
97bf5e38 MK |
5980 | while (wait(&status) != child) |
5981 | ; | |
5982 | exit( | |
5983 | /* Was there some problem with vforking? */ | |
5984 | child < 0 | |
64bb1671 | 5985 | |
97bf5e38 MK |
5986 | /* Did the child fail? (This shouldn't happen.) */ |
5987 | || status | |
64bb1671 | 5988 | |
97bf5e38 MK |
5989 | /* Did the vfork/compiler bug occur? */ |
5990 | || parent != getpid() | |
5991 | ||
5992 | /* Did the file descriptor bug occur? */ | |
5993 | || fstat(fileno(stdout), &st) != 0 | |
5994 | ); | |
5995 | } | |
5996 | } | |
5c44784c | 5997 | EOF |
8dcde887 | 5998 | if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
5999 | then |
6000 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6001 | else |
6002 | echo "configure: failed program was:" >&5 | |
6003 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6004 | rm -fr conftest* |
6005 | ac_cv_func_vfork_works=no | |
5c44784c | 6006 | fi |
97bf5e38 | 6007 | rm -fr conftest* |
5c44784c JM |
6008 | fi |
6009 | ||
0afdd437 MK |
6010 | fi |
6011 | ||
97bf5e38 MK |
6012 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6013 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6014 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6015 | #define vfork fork |
0afdd437 MK |
6016 | EOF |
6017 | ||
6018 | fi | |
6019 | ||
97bf5e38 MK |
6020 | for ac_func in canonicalize_file_name realpath |
6021 | do | |
6022 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6023 | echo "configure:6024: checking for $ac_func" >&5 |
97bf5e38 | 6024 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6025 | echo $ac_n "(cached) $ac_c" 1>&6 |
6026 | else | |
6027 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6028 | #line 6029 "configure" |
7e89e357 | 6029 | #include "confdefs.h" |
97bf5e38 MK |
6030 | /* System header to define __stub macros and hopefully few prototypes, |
6031 | which can conflict with char $ac_func(); below. */ | |
6032 | #include <assert.h> | |
6033 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6034 | /* We use char because int might match the return type of a gcc2 | |
6035 | builtin and then its argument prototype would still apply. */ | |
6036 | char $ac_func(); | |
6037 | ||
7e89e357 | 6038 | int main() { |
97bf5e38 MK |
6039 | |
6040 | /* The GNU C library defines this for functions which it implements | |
6041 | to always fail with ENOSYS. Some functions are actually named | |
6042 | something starting with __ and the normal name is an alias. */ | |
6043 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6044 | choke me | |
6045 | #else | |
6046 | $ac_func(); | |
6047 | #endif | |
6048 | ||
7e89e357 JT |
6049 | ; return 0; } |
6050 | EOF | |
8dcde887 | 6051 | if { (eval echo configure:6052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6052 | rm -rf conftest* |
97bf5e38 | 6053 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6054 | else |
6055 | echo "configure: failed program was:" >&5 | |
6056 | cat conftest.$ac_ext >&5 | |
6057 | rm -rf conftest* | |
97bf5e38 | 6058 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6059 | fi |
6060 | rm -f conftest* | |
6061 | fi | |
6062 | ||
97bf5e38 MK |
6063 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6064 | echo "$ac_t""yes" 1>&6 | |
6065 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6066 | cat >> confdefs.h <<EOF | |
6067 | #define $ac_tr_func 1 | |
7e89e357 | 6068 | EOF |
97bf5e38 MK |
6069 | |
6070 | else | |
6071 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6072 | fi |
97bf5e38 | 6073 | done |
7e89e357 | 6074 | |
97bf5e38 | 6075 | for ac_func in poll |
7be570e7 JM |
6076 | do |
6077 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6078 | echo "configure:6079: checking for $ac_func" >&5 |
7be570e7 JM |
6079 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6081 | else | |
6082 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6083 | #line 6084 "configure" |
7be570e7 JM |
6084 | #include "confdefs.h" |
6085 | /* System header to define __stub macros and hopefully few prototypes, | |
6086 | which can conflict with char $ac_func(); below. */ | |
6087 | #include <assert.h> | |
6088 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6089 | /* We use char because int might match the return type of a gcc2 | |
6090 | builtin and then its argument prototype would still apply. */ | |
6091 | char $ac_func(); | |
6092 | ||
6093 | int main() { | |
6094 | ||
6095 | /* The GNU C library defines this for functions which it implements | |
6096 | to always fail with ENOSYS. Some functions are actually named | |
6097 | something starting with __ and the normal name is an alias. */ | |
6098 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6099 | choke me | |
6100 | #else | |
6101 | $ac_func(); | |
6102 | #endif | |
6103 | ||
6104 | ; return 0; } | |
6105 | EOF | |
8dcde887 | 6106 | if { (eval echo configure:6107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6107 | rm -rf conftest* |
6108 | eval "ac_cv_func_$ac_func=yes" | |
6109 | else | |
6110 | echo "configure: failed program was:" >&5 | |
6111 | cat conftest.$ac_ext >&5 | |
6112 | rm -rf conftest* | |
6113 | eval "ac_cv_func_$ac_func=no" | |
6114 | fi | |
6115 | rm -f conftest* | |
6116 | fi | |
6117 | ||
6118 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6119 | echo "$ac_t""yes" 1>&6 | |
6120 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6121 | cat >> confdefs.h <<EOF | |
6122 | #define $ac_tr_func 1 | |
6123 | EOF | |
6124 | ||
6125 | else | |
6126 | echo "$ac_t""no" 1>&6 | |
6127 | fi | |
6128 | done | |
6129 | ||
97bf5e38 MK |
6130 | for ac_func in sbrk |
6131 | do | |
6132 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6133 | echo "configure:6134: checking for $ac_func" >&5 |
97bf5e38 | 6134 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6135 | echo $ac_n "(cached) $ac_c" 1>&6 |
6136 | else | |
6137 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6138 | #line 6139 "configure" |
c906108c | 6139 | #include "confdefs.h" |
97bf5e38 MK |
6140 | /* System header to define __stub macros and hopefully few prototypes, |
6141 | which can conflict with char $ac_func(); below. */ | |
6142 | #include <assert.h> | |
6143 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6144 | /* We use char because int might match the return type of a gcc2 | |
6145 | builtin and then its argument prototype would still apply. */ | |
6146 | char $ac_func(); | |
c906108c | 6147 | |
97bf5e38 MK |
6148 | int main() { |
6149 | ||
6150 | /* The GNU C library defines this for functions which it implements | |
6151 | to always fail with ENOSYS. Some functions are actually named | |
6152 | something starting with __ and the normal name is an alias. */ | |
6153 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6154 | choke me | |
c906108c | 6155 | #else |
97bf5e38 | 6156 | $ac_func(); |
c906108c | 6157 | #endif |
97bf5e38 | 6158 | |
c906108c SS |
6159 | ; return 0; } |
6160 | EOF | |
8dcde887 | 6161 | if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6162 | rm -rf conftest* |
97bf5e38 | 6163 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6164 | else |
6165 | echo "configure: failed program was:" >&5 | |
6166 | cat conftest.$ac_ext >&5 | |
6167 | rm -rf conftest* | |
97bf5e38 | 6168 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6169 | fi |
6170 | rm -f conftest* | |
6171 | fi | |
6172 | ||
97bf5e38 MK |
6173 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6174 | echo "$ac_t""yes" 1>&6 | |
6175 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6176 | cat >> confdefs.h <<EOF | |
6177 | #define $ac_tr_func 1 | |
c906108c | 6178 | EOF |
97bf5e38 MK |
6179 | |
6180 | else | |
6181 | echo "$ac_t""no" 1>&6 | |
c906108c | 6182 | fi |
97bf5e38 | 6183 | done |
c906108c | 6184 | |
97bf5e38 MK |
6185 | for ac_func in setpgid setpgrp |
6186 | do | |
6187 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6188 | echo "configure:6189: checking for $ac_func" >&5 |
97bf5e38 | 6189 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6190 | echo $ac_n "(cached) $ac_c" 1>&6 |
6191 | else | |
6192 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6193 | #line 6194 "configure" |
c906108c | 6194 | #include "confdefs.h" |
97bf5e38 MK |
6195 | /* System header to define __stub macros and hopefully few prototypes, |
6196 | which can conflict with char $ac_func(); below. */ | |
6197 | #include <assert.h> | |
6198 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6199 | /* We use char because int might match the return type of a gcc2 | |
6200 | builtin and then its argument prototype would still apply. */ | |
6201 | char $ac_func(); | |
c906108c | 6202 | |
97bf5e38 MK |
6203 | int main() { |
6204 | ||
6205 | /* The GNU C library defines this for functions which it implements | |
6206 | to always fail with ENOSYS. Some functions are actually named | |
6207 | something starting with __ and the normal name is an alias. */ | |
6208 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6209 | choke me | |
c906108c | 6210 | #else |
97bf5e38 | 6211 | $ac_func(); |
c906108c | 6212 | #endif |
97bf5e38 | 6213 | |
c906108c SS |
6214 | ; return 0; } |
6215 | EOF | |
8dcde887 | 6216 | if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6217 | rm -rf conftest* |
97bf5e38 | 6218 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6219 | else |
6220 | echo "configure: failed program was:" >&5 | |
6221 | cat conftest.$ac_ext >&5 | |
6222 | rm -rf conftest* | |
97bf5e38 | 6223 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6224 | fi |
6225 | rm -f conftest* | |
6226 | fi | |
6227 | ||
97bf5e38 MK |
6228 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6229 | echo "$ac_t""yes" 1>&6 | |
6230 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6231 | cat >> confdefs.h <<EOF | |
6232 | #define $ac_tr_func 1 | |
c906108c | 6233 | EOF |
97bf5e38 MK |
6234 | |
6235 | else | |
6236 | echo "$ac_t""no" 1>&6 | |
c906108c | 6237 | fi |
97bf5e38 | 6238 | done |
c906108c | 6239 | |
e1ea1d75 | 6240 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6241 | do |
6242 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6243 | echo "configure:6244: checking for $ac_func" >&5 |
97bf5e38 | 6244 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6245 | echo $ac_n "(cached) $ac_c" 1>&6 |
6246 | else | |
6247 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6248 | #line 6249 "configure" |
c906108c | 6249 | #include "confdefs.h" |
97bf5e38 MK |
6250 | /* System header to define __stub macros and hopefully few prototypes, |
6251 | which can conflict with char $ac_func(); below. */ | |
6252 | #include <assert.h> | |
6253 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6254 | /* We use char because int might match the return type of a gcc2 | |
6255 | builtin and then its argument prototype would still apply. */ | |
6256 | char $ac_func(); | |
c906108c | 6257 | |
97bf5e38 MK |
6258 | int main() { |
6259 | ||
6260 | /* The GNU C library defines this for functions which it implements | |
6261 | to always fail with ENOSYS. Some functions are actually named | |
6262 | something starting with __ and the normal name is an alias. */ | |
6263 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6264 | choke me | |
c906108c | 6265 | #else |
97bf5e38 | 6266 | $ac_func(); |
c906108c | 6267 | #endif |
97bf5e38 | 6268 | |
c906108c SS |
6269 | ; return 0; } |
6270 | EOF | |
8dcde887 | 6271 | if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6272 | rm -rf conftest* |
97bf5e38 | 6273 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6274 | else |
6275 | echo "configure: failed program was:" >&5 | |
6276 | cat conftest.$ac_ext >&5 | |
6277 | rm -rf conftest* | |
97bf5e38 | 6278 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6279 | fi |
6280 | rm -f conftest* | |
6281 | fi | |
6282 | ||
97bf5e38 MK |
6283 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6284 | echo "$ac_t""yes" 1>&6 | |
6285 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6286 | cat >> confdefs.h <<EOF | |
6287 | #define $ac_tr_func 1 | |
c906108c | 6288 | EOF |
e1ea1d75 | 6289 | |
97bf5e38 MK |
6290 | else |
6291 | echo "$ac_t""no" 1>&6 | |
c906108c | 6292 | fi |
97bf5e38 | 6293 | done |
c906108c | 6294 | |
97bf5e38 MK |
6295 | for ac_func in socketpair |
6296 | do | |
6297 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8dcde887 | 6298 | echo "configure:6299: checking for $ac_func" >&5 |
97bf5e38 | 6299 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6300 | echo $ac_n "(cached) $ac_c" 1>&6 |
6301 | else | |
6302 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6303 | #line 6304 "configure" |
c906108c | 6304 | #include "confdefs.h" |
97bf5e38 MK |
6305 | /* System header to define __stub macros and hopefully few prototypes, |
6306 | which can conflict with char $ac_func(); below. */ | |
6307 | #include <assert.h> | |
6308 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6309 | /* We use char because int might match the return type of a gcc2 | |
6310 | builtin and then its argument prototype would still apply. */ | |
6311 | char $ac_func(); | |
c906108c | 6312 | |
97bf5e38 MK |
6313 | int main() { |
6314 | ||
6315 | /* The GNU C library defines this for functions which it implements | |
6316 | to always fail with ENOSYS. Some functions are actually named | |
6317 | something starting with __ and the normal name is an alias. */ | |
6318 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6319 | choke me | |
c906108c | 6320 | #else |
97bf5e38 | 6321 | $ac_func(); |
c906108c | 6322 | #endif |
97bf5e38 | 6323 | |
c906108c SS |
6324 | ; return 0; } |
6325 | EOF | |
8dcde887 | 6326 | if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6327 | rm -rf conftest* |
97bf5e38 | 6328 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6329 | else |
6330 | echo "configure: failed program was:" >&5 | |
6331 | cat conftest.$ac_ext >&5 | |
6332 | rm -rf conftest* | |
97bf5e38 | 6333 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6334 | fi |
6335 | rm -f conftest* | |
6336 | fi | |
6337 | ||
97bf5e38 MK |
6338 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6339 | echo "$ac_t""yes" 1>&6 | |
6340 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6341 | cat >> confdefs.h <<EOF | |
6342 | #define $ac_tr_func 1 | |
c906108c | 6343 | EOF |
97bf5e38 MK |
6344 | |
6345 | else | |
6346 | echo "$ac_t""no" 1>&6 | |
c906108c | 6347 | fi |
97bf5e38 | 6348 | done |
c906108c | 6349 | |
97bf5e38 MK |
6350 | |
6351 | if test "$cross_compiling" = no; then | |
6352 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
8dcde887 | 6353 | echo "configure:6354: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6354 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6355 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6356 | else |
6357 | if test "$cross_compiling" = yes; then | |
6358 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6359 | else |
6360 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6361 | #line 6362 "configure" |
c906108c SS |
6362 | #include "confdefs.h" |
6363 | ||
c906108c SS |
6364 | #ifdef HAVE_UNISTD_H |
6365 | #include <unistd.h> | |
6366 | #endif | |
97bf5e38 MK |
6367 | |
6368 | /* | |
6369 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6370 | * successfully. | |
6371 | */ | |
6372 | main() | |
6373 | { | |
6374 | if (setpgrp(1,1) == -1) | |
6375 | exit(0); | |
6376 | else | |
6377 | exit(1); | |
6378 | } | |
6379 | ||
c906108c | 6380 | EOF |
8dcde887 | 6381 | if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6382 | then |
6383 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6384 | else |
6385 | echo "configure: failed program was:" >&5 | |
6386 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6387 | rm -fr conftest* |
6388 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6389 | fi |
97bf5e38 | 6390 | rm -fr conftest* |
c906108c SS |
6391 | fi |
6392 | ||
97bf5e38 MK |
6393 | |
6394 | fi | |
6395 | ||
6396 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6397 | if test $ac_cv_func_setpgrp_void = yes; then | |
6398 | cat >> confdefs.h <<\EOF | |
6399 | #define SETPGRP_VOID 1 | |
c906108c SS |
6400 | EOF |
6401 | ||
6402 | fi | |
6403 | ||
97bf5e38 MK |
6404 | else |
6405 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
8dcde887 | 6406 | echo "configure:6407: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6407 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6408 | echo $ac_n "(cached) $ac_c" 1>&6 |
6409 | else | |
6410 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6411 | #line 6412 "configure" |
b83266a0 SS |
6412 | #include "confdefs.h" |
6413 | ||
b83266a0 | 6414 | #include <unistd.h> |
97bf5e38 | 6415 | |
b83266a0 | 6416 | int main() { |
97bf5e38 MK |
6417 | |
6418 | if (setpgrp(1,1) == -1) | |
6419 | exit (0); | |
6420 | else | |
6421 | exit (1); | |
6422 | ||
b83266a0 SS |
6423 | ; return 0; } |
6424 | EOF | |
8dcde887 | 6425 | if { (eval echo configure:6426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6426 | rm -rf conftest* |
97bf5e38 | 6427 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6428 | else |
6429 | echo "configure: failed program was:" >&5 | |
6430 | cat conftest.$ac_ext >&5 | |
6431 | rm -rf conftest* | |
97bf5e38 | 6432 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6433 | fi |
6434 | rm -f conftest* | |
6435 | fi | |
6436 | ||
97bf5e38 MK |
6437 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6438 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6439 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6440 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6441 | EOF |
6442 | ||
97bf5e38 | 6443 | fi |
b83266a0 SS |
6444 | fi |
6445 | ||
97bf5e38 MK |
6446 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6447 | # since sigsetjmp might only be defined as a macro. | |
6448 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
8dcde887 | 6449 | echo "configure:6450: checking for sigsetjmp" >&5 |
97bf5e38 | 6450 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6451 | echo $ac_n "(cached) $ac_c" 1>&6 |
6452 | else | |
6453 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6454 | #line 6455 "configure" |
a4db0f07 RH |
6455 | #include "confdefs.h" |
6456 | ||
97bf5e38 MK |
6457 | #include <setjmp.h> |
6458 | ||
a4db0f07 | 6459 | int main() { |
97bf5e38 | 6460 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6461 | ; return 0; } |
6462 | EOF | |
8dcde887 | 6463 | if { (eval echo configure:6464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6464 | rm -rf conftest* |
97bf5e38 | 6465 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6466 | else |
6467 | echo "configure: failed program was:" >&5 | |
6468 | cat conftest.$ac_ext >&5 | |
6469 | rm -rf conftest* | |
97bf5e38 | 6470 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6471 | fi |
6472 | rm -f conftest* | |
6473 | fi | |
6474 | ||
97bf5e38 MK |
6475 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6476 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6477 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6478 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6479 | EOF |
6480 | ||
6481 | fi | |
c906108c | 6482 | |
06825bd1 MK |
6483 | # Assume we'll default to using the included libiberty regex. |
6484 | gdb_use_included_regex=yes | |
6485 | ||
6486 | # However, if the system regex is GNU regex, then default to *not* | |
6487 | # using the included regex. | |
6488 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
8dcde887 | 6489 | echo "configure:6490: checking for GNU regex" >&5 |
06825bd1 MK |
6490 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6491 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6492 | else | |
6493 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6494 | #line 6495 "configure" |
06825bd1 MK |
6495 | #include "confdefs.h" |
6496 | #include <gnu-versions.h> | |
6497 | int main() { | |
6498 | #define REGEX_INTERFACE_VERSION 1 | |
6499 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6500 | # error "Version mismatch" | |
6501 | #endif | |
6502 | ; return 0; } | |
6503 | EOF | |
8dcde887 | 6504 | if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6505 | rm -rf conftest* |
6506 | gdb_cv_have_gnu_regex=yes | |
6507 | else | |
6508 | echo "configure: failed program was:" >&5 | |
6509 | cat conftest.$ac_ext >&5 | |
6510 | rm -rf conftest* | |
6511 | gdb_cv_have_gnu_regex=no | |
6512 | fi | |
6513 | rm -f conftest* | |
6514 | fi | |
6515 | ||
6516 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6517 | if test $gdb_cv_have_gnu_regex = yes; then | |
6518 | gdb_use_included_regex=no | |
6519 | fi | |
6520 | ||
6521 | # Check whether --with-included-regex or --without-included-regex was given. | |
6522 | if test "${with_included_regex+set}" = set; then | |
6523 | withval="$with_included_regex" | |
6524 | gdb_with_regex=$withval | |
6525 | else | |
6526 | gdb_with_regex=$gdb_use_included_regex | |
6527 | fi | |
6528 | ||
6529 | if test "$gdb_with_regex" = yes; then | |
6530 | cat >> confdefs.h <<\EOF | |
6531 | #define USE_INCLUDED_REGEX 1 | |
6532 | EOF | |
6533 | ||
6534 | fi | |
6535 | ||
97bf5e38 MK |
6536 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6537 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6538 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
8dcde887 | 6539 | echo "configure:6540: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6540 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6541 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6542 | else | |
6543 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6544 | #line 6545 "configure" |
c906108c | 6545 | #include "confdefs.h" |
97bf5e38 MK |
6546 | #include <machine/reg.h> |
6547 | int main() { | |
6548 | struct reg r; r.r_fs; | |
6549 | ; return 0; } | |
c906108c | 6550 | EOF |
8dcde887 | 6551 | if { (eval echo configure:6552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6552 | rm -rf conftest* |
97bf5e38 | 6553 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6554 | else |
97bf5e38 MK |
6555 | echo "configure: failed program was:" >&5 |
6556 | cat conftest.$ac_ext >&5 | |
c906108c | 6557 | rm -rf conftest* |
97bf5e38 | 6558 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6559 | fi |
6560 | rm -f conftest* | |
97bf5e38 | 6561 | fi |
c906108c | 6562 | |
97bf5e38 MK |
6563 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6564 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6565 | cat >> confdefs.h <<\EOF | |
6566 | #define HAVE_STRUCT_REG_R_FS 1 | |
6567 | EOF | |
6568 | ||
6569 | fi | |
6570 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
8dcde887 | 6571 | echo "configure:6572: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6572 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6574 | else | |
6575 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6576 | #line 6577 "configure" |
c906108c | 6577 | #include "confdefs.h" |
97bf5e38 MK |
6578 | #include <machine/reg.h> |
6579 | int main() { | |
6580 | struct reg r; r.r_gs; | |
6581 | ; return 0; } | |
c906108c | 6582 | EOF |
8dcde887 | 6583 | if { (eval echo configure:6584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6584 | rm -rf conftest* |
97bf5e38 | 6585 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6586 | else |
97bf5e38 MK |
6587 | echo "configure: failed program was:" >&5 |
6588 | cat conftest.$ac_ext >&5 | |
c906108c | 6589 | rm -rf conftest* |
97bf5e38 | 6590 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6591 | fi |
6592 | rm -f conftest* | |
c906108c | 6593 | fi |
c906108c | 6594 | |
97bf5e38 MK |
6595 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6596 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6597 | cat >> confdefs.h <<\EOF | |
6598 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6599 | EOF |
6600 | ||
c906108c SS |
6601 | fi |
6602 | ||
97bf5e38 MK |
6603 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6604 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
8dcde887 | 6605 | echo "configure:6606: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6606 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6607 | echo $ac_n "(cached) $ac_c" 1>&6 |
6608 | else | |
6609 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6610 | #line 6611 "configure" |
c906108c | 6611 | #include "confdefs.h" |
97bf5e38 | 6612 | #include <sys/ptrace.h> |
c906108c | 6613 | int main() { |
97bf5e38 | 6614 | PTRACE_GETREGS; |
c906108c SS |
6615 | ; return 0; } |
6616 | EOF | |
8dcde887 | 6617 | if { (eval echo configure:6618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6618 | rm -rf conftest* |
97bf5e38 | 6619 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6620 | else |
6621 | echo "configure: failed program was:" >&5 | |
6622 | cat conftest.$ac_ext >&5 | |
6623 | rm -rf conftest* | |
97bf5e38 | 6624 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6625 | fi |
6626 | rm -f conftest* | |
6627 | fi | |
6628 | ||
97bf5e38 MK |
6629 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6630 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6631 | cat >> confdefs.h <<\EOF | |
6632 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6633 | EOF |
6634 | ||
97bf5e38 | 6635 | fi |
c906108c | 6636 | |
97bf5e38 MK |
6637 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6638 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
8dcde887 | 6639 | echo "configure:6640: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6640 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6641 | echo $ac_n "(cached) $ac_c" 1>&6 |
6642 | else | |
6643 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6644 | #line 6645 "configure" |
c906108c | 6645 | #include "confdefs.h" |
97bf5e38 | 6646 | #include <sys/ptrace.h> |
c906108c | 6647 | int main() { |
97bf5e38 | 6648 | PTRACE_GETFPXREGS; |
c906108c SS |
6649 | ; return 0; } |
6650 | EOF | |
8dcde887 | 6651 | if { (eval echo configure:6652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6652 | rm -rf conftest* |
97bf5e38 | 6653 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6654 | else |
6655 | echo "configure: failed program was:" >&5 | |
6656 | cat conftest.$ac_ext >&5 | |
6657 | rm -rf conftest* | |
97bf5e38 | 6658 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6659 | fi |
6660 | rm -f conftest* | |
6661 | fi | |
6662 | ||
97bf5e38 MK |
6663 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6664 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6665 | cat >> confdefs.h <<\EOF | |
6666 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6667 | EOF |
6668 | ||
97bf5e38 | 6669 | fi |
c906108c | 6670 | |
97bf5e38 MK |
6671 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6672 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
8dcde887 | 6673 | echo "configure:6674: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6674 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6675 | echo $ac_n "(cached) $ac_c" 1>&6 |
6676 | else | |
6677 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6678 | #line 6679 "configure" |
c906108c | 6679 | #include "confdefs.h" |
97bf5e38 MK |
6680 | #include <sys/types.h> |
6681 | #include <sys/ptrace.h> | |
c906108c | 6682 | int main() { |
97bf5e38 | 6683 | PT_GETDBREGS; |
c906108c SS |
6684 | ; return 0; } |
6685 | EOF | |
8dcde887 | 6686 | if { (eval echo configure:6687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6687 | rm -rf conftest* |
97bf5e38 | 6688 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6689 | else |
6690 | echo "configure: failed program was:" >&5 | |
6691 | cat conftest.$ac_ext >&5 | |
6692 | rm -rf conftest* | |
97bf5e38 | 6693 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6694 | fi |
6695 | rm -f conftest* | |
6696 | fi | |
6697 | ||
97bf5e38 MK |
6698 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6699 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6700 | cat >> confdefs.h <<\EOF | |
6701 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6702 | EOF |
6703 | ||
97bf5e38 | 6704 | fi |
c906108c | 6705 | |
97bf5e38 MK |
6706 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6707 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
8dcde887 | 6708 | echo "configure:6709: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6709 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6710 | echo $ac_n "(cached) $ac_c" 1>&6 |
6711 | else | |
6712 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6713 | #line 6714 "configure" |
c906108c | 6714 | #include "confdefs.h" |
97bf5e38 MK |
6715 | #include <sys/types.h> |
6716 | #include <sys/ptrace.h> | |
c906108c | 6717 | int main() { |
97bf5e38 | 6718 | PT_GETXMMREGS; |
c906108c SS |
6719 | ; return 0; } |
6720 | EOF | |
8dcde887 | 6721 | if { (eval echo configure:6722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6722 | rm -rf conftest* |
97bf5e38 | 6723 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6724 | else |
6725 | echo "configure: failed program was:" >&5 | |
6726 | cat conftest.$ac_ext >&5 | |
6727 | rm -rf conftest* | |
97bf5e38 | 6728 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6729 | fi |
6730 | rm -f conftest* | |
6731 | fi | |
6732 | ||
97bf5e38 MK |
6733 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6734 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6735 | cat >> confdefs.h <<\EOF | |
6736 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6737 | EOF |
6738 | ||
97bf5e38 | 6739 | fi |
c906108c | 6740 | |
97bf5e38 MK |
6741 | |
6742 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
8dcde887 | 6743 | echo "configure:6744: checking whether malloc must be declared" >&5 |
97bf5e38 | 6744 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6745 | echo $ac_n "(cached) $ac_c" 1>&6 |
6746 | else | |
6747 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6748 | #line 6749 "configure" |
3862412b | 6749 | #include "confdefs.h" |
e17bf198 | 6750 | |
97bf5e38 MK |
6751 | #include <stdio.h> |
6752 | #ifdef HAVE_STRING_H | |
6753 | #include <string.h> | |
6754 | #else | |
6755 | #ifdef HAVE_STRINGS_H | |
6756 | #include <strings.h> | |
6757 | #endif | |
6758 | #endif | |
6759 | #ifdef HAVE_STDLIB_H | |
6760 | #include <stdlib.h> | |
6761 | #endif | |
6762 | #ifdef HAVE_UNISTD_H | |
6763 | #include <unistd.h> | |
6764 | #endif | |
3862412b | 6765 | int main() { |
97bf5e38 | 6766 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6767 | ; return 0; } |
6768 | EOF | |
8dcde887 | 6769 | if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6770 | rm -rf conftest* |
97bf5e38 | 6771 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6772 | else |
6773 | echo "configure: failed program was:" >&5 | |
6774 | cat conftest.$ac_ext >&5 | |
6775 | rm -rf conftest* | |
97bf5e38 | 6776 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6777 | fi |
6778 | rm -f conftest* | |
6779 | fi | |
6780 | ||
97bf5e38 MK |
6781 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6782 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6783 | cat >> confdefs.h <<\EOF | |
6784 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6785 | EOF |
6786 | ||
97bf5e38 | 6787 | fi |
3862412b | 6788 | |
97bf5e38 | 6789 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
8dcde887 | 6790 | echo "configure:6791: checking whether realloc must be declared" >&5 |
97bf5e38 | 6791 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
6792 | echo $ac_n "(cached) $ac_c" 1>&6 |
6793 | else | |
6794 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6795 | #line 6796 "configure" |
3862412b | 6796 | #include "confdefs.h" |
e17bf198 | 6797 | |
97bf5e38 MK |
6798 | #include <stdio.h> |
6799 | #ifdef HAVE_STRING_H | |
6800 | #include <string.h> | |
6801 | #else | |
6802 | #ifdef HAVE_STRINGS_H | |
6803 | #include <strings.h> | |
6804 | #endif | |
6805 | #endif | |
6806 | #ifdef HAVE_STDLIB_H | |
6807 | #include <stdlib.h> | |
6808 | #endif | |
6809 | #ifdef HAVE_UNISTD_H | |
6810 | #include <unistd.h> | |
6811 | #endif | |
3862412b | 6812 | int main() { |
97bf5e38 | 6813 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
6814 | ; return 0; } |
6815 | EOF | |
8dcde887 | 6816 | if { (eval echo configure:6817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6817 | rm -rf conftest* |
97bf5e38 | 6818 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
6819 | else |
6820 | echo "configure: failed program was:" >&5 | |
6821 | cat conftest.$ac_ext >&5 | |
6822 | rm -rf conftest* | |
97bf5e38 | 6823 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
6824 | fi |
6825 | rm -f conftest* | |
6826 | fi | |
6827 | ||
97bf5e38 MK |
6828 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
6829 | if test $bfd_cv_decl_needed_realloc = yes; then | |
6830 | cat >> confdefs.h <<\EOF | |
6831 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
6832 | EOF |
6833 | ||
97bf5e38 | 6834 | fi |
3862412b | 6835 | |
97bf5e38 | 6836 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
8dcde887 | 6837 | echo "configure:6838: checking whether free must be declared" >&5 |
97bf5e38 | 6838 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
6839 | echo $ac_n "(cached) $ac_c" 1>&6 |
6840 | else | |
6841 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6842 | #line 6843 "configure" |
451928c5 | 6843 | #include "confdefs.h" |
e17bf198 | 6844 | |
97bf5e38 MK |
6845 | #include <stdio.h> |
6846 | #ifdef HAVE_STRING_H | |
6847 | #include <string.h> | |
6848 | #else | |
6849 | #ifdef HAVE_STRINGS_H | |
6850 | #include <strings.h> | |
6851 | #endif | |
6852 | #endif | |
6853 | #ifdef HAVE_STDLIB_H | |
6854 | #include <stdlib.h> | |
6855 | #endif | |
6856 | #ifdef HAVE_UNISTD_H | |
6857 | #include <unistd.h> | |
6858 | #endif | |
451928c5 | 6859 | int main() { |
97bf5e38 | 6860 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
6861 | ; return 0; } |
6862 | EOF | |
8dcde887 | 6863 | if { (eval echo configure:6864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6864 | rm -rf conftest* |
97bf5e38 | 6865 | bfd_cv_decl_needed_free=no |
451928c5 AC |
6866 | else |
6867 | echo "configure: failed program was:" >&5 | |
6868 | cat conftest.$ac_ext >&5 | |
6869 | rm -rf conftest* | |
97bf5e38 | 6870 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
6871 | fi |
6872 | rm -f conftest* | |
6873 | fi | |
6874 | ||
97bf5e38 MK |
6875 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
6876 | if test $bfd_cv_decl_needed_free = yes; then | |
6877 | cat >> confdefs.h <<\EOF | |
6878 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
6879 | EOF |
6880 | ||
97bf5e38 | 6881 | fi |
451928c5 | 6882 | |
97bf5e38 | 6883 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
8dcde887 | 6884 | echo "configure:6885: checking whether strerror must be declared" >&5 |
97bf5e38 | 6885 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
6886 | echo $ac_n "(cached) $ac_c" 1>&6 |
6887 | else | |
6888 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6889 | #line 6890 "configure" |
451928c5 | 6890 | #include "confdefs.h" |
e17bf198 | 6891 | |
97bf5e38 MK |
6892 | #include <stdio.h> |
6893 | #ifdef HAVE_STRING_H | |
6894 | #include <string.h> | |
6895 | #else | |
6896 | #ifdef HAVE_STRINGS_H | |
6897 | #include <strings.h> | |
6898 | #endif | |
6899 | #endif | |
6900 | #ifdef HAVE_STDLIB_H | |
6901 | #include <stdlib.h> | |
6902 | #endif | |
6903 | #ifdef HAVE_UNISTD_H | |
6904 | #include <unistd.h> | |
6905 | #endif | |
451928c5 | 6906 | int main() { |
97bf5e38 | 6907 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
6908 | ; return 0; } |
6909 | EOF | |
8dcde887 | 6910 | if { (eval echo configure:6911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6911 | rm -rf conftest* |
97bf5e38 | 6912 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
6913 | else |
6914 | echo "configure: failed program was:" >&5 | |
6915 | cat conftest.$ac_ext >&5 | |
6916 | rm -rf conftest* | |
97bf5e38 | 6917 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
6918 | fi |
6919 | rm -f conftest* | |
6920 | fi | |
6921 | ||
97bf5e38 MK |
6922 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
6923 | if test $bfd_cv_decl_needed_strerror = yes; then | |
6924 | cat >> confdefs.h <<\EOF | |
6925 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
6926 | EOF |
6927 | ||
97bf5e38 | 6928 | fi |
451928c5 | 6929 | |
97bf5e38 | 6930 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
8dcde887 | 6931 | echo "configure:6932: checking whether strdup must be declared" >&5 |
97bf5e38 | 6932 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
6933 | echo $ac_n "(cached) $ac_c" 1>&6 |
6934 | else | |
6935 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6936 | #line 6937 "configure" |
3862412b | 6937 | #include "confdefs.h" |
e17bf198 | 6938 | |
97bf5e38 MK |
6939 | #include <stdio.h> |
6940 | #ifdef HAVE_STRING_H | |
6941 | #include <string.h> | |
6942 | #else | |
6943 | #ifdef HAVE_STRINGS_H | |
6944 | #include <strings.h> | |
6945 | #endif | |
6946 | #endif | |
6947 | #ifdef HAVE_STDLIB_H | |
6948 | #include <stdlib.h> | |
6949 | #endif | |
6950 | #ifdef HAVE_UNISTD_H | |
6951 | #include <unistd.h> | |
6952 | #endif | |
3862412b | 6953 | int main() { |
97bf5e38 | 6954 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
6955 | ; return 0; } |
6956 | EOF | |
8dcde887 | 6957 | if { (eval echo configure:6958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6958 | rm -rf conftest* |
97bf5e38 | 6959 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
6960 | else |
6961 | echo "configure: failed program was:" >&5 | |
6962 | cat conftest.$ac_ext >&5 | |
6963 | rm -rf conftest* | |
97bf5e38 | 6964 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
6965 | fi |
6966 | rm -f conftest* | |
6967 | fi | |
6968 | ||
97bf5e38 MK |
6969 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
6970 | if test $bfd_cv_decl_needed_strdup = yes; then | |
6971 | cat >> confdefs.h <<\EOF | |
6972 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
6973 | EOF |
6974 | ||
97bf5e38 | 6975 | fi |
3862412b | 6976 | |
97bf5e38 | 6977 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
8dcde887 | 6978 | echo "configure:6979: checking whether strstr must be declared" >&5 |
97bf5e38 | 6979 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
6980 | echo $ac_n "(cached) $ac_c" 1>&6 |
6981 | else | |
6982 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 6983 | #line 6984 "configure" |
3862412b | 6984 | #include "confdefs.h" |
e17bf198 | 6985 | |
97bf5e38 MK |
6986 | #include <stdio.h> |
6987 | #ifdef HAVE_STRING_H | |
6988 | #include <string.h> | |
6989 | #else | |
6990 | #ifdef HAVE_STRINGS_H | |
6991 | #include <strings.h> | |
6992 | #endif | |
6993 | #endif | |
6994 | #ifdef HAVE_STDLIB_H | |
6995 | #include <stdlib.h> | |
6996 | #endif | |
6997 | #ifdef HAVE_UNISTD_H | |
6998 | #include <unistd.h> | |
6999 | #endif | |
3862412b | 7000 | int main() { |
97bf5e38 | 7001 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7002 | ; return 0; } |
7003 | EOF | |
8dcde887 | 7004 | if { (eval echo configure:7005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7005 | rm -rf conftest* |
97bf5e38 | 7006 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7007 | else |
7008 | echo "configure: failed program was:" >&5 | |
7009 | cat conftest.$ac_ext >&5 | |
7010 | rm -rf conftest* | |
97bf5e38 | 7011 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7012 | fi |
7013 | rm -f conftest* | |
7014 | fi | |
7015 | ||
97bf5e38 MK |
7016 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7017 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7018 | cat >> confdefs.h <<\EOF | |
7019 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7020 | EOF |
7021 | ||
97bf5e38 | 7022 | fi |
3862412b | 7023 | |
97bf5e38 | 7024 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
8dcde887 | 7025 | echo "configure:7026: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7026 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7027 | echo $ac_n "(cached) $ac_c" 1>&6 |
7028 | else | |
7029 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7030 | #line 7031 "configure" |
596c9d4b KB |
7031 | #include "confdefs.h" |
7032 | ||
97bf5e38 MK |
7033 | #include <stdio.h> |
7034 | #ifdef HAVE_STRING_H | |
7035 | #include <string.h> | |
7036 | #else | |
7037 | #ifdef HAVE_STRINGS_H | |
7038 | #include <strings.h> | |
7039 | #endif | |
7040 | #endif | |
7041 | #ifdef HAVE_STDLIB_H | |
7042 | #include <stdlib.h> | |
7043 | #endif | |
7044 | #ifdef HAVE_UNISTD_H | |
7045 | #include <unistd.h> | |
7046 | #endif | |
596c9d4b | 7047 | int main() { |
97bf5e38 | 7048 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7049 | ; return 0; } |
7050 | EOF | |
8dcde887 | 7051 | if { (eval echo configure:7052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7052 | rm -rf conftest* |
97bf5e38 | 7053 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7054 | else |
7055 | echo "configure: failed program was:" >&5 | |
7056 | cat conftest.$ac_ext >&5 | |
7057 | rm -rf conftest* | |
97bf5e38 | 7058 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7059 | fi |
7060 | rm -f conftest* | |
7061 | fi | |
7062 | ||
97bf5e38 MK |
7063 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7064 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7065 | cat >> confdefs.h <<\EOF | |
7066 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7067 | EOF |
7068 | ||
97bf5e38 | 7069 | fi |
596c9d4b | 7070 | |
97bf5e38 MK |
7071 | |
7072 | # The following save_state_t checkery is only necessary for HPUX | |
7073 | # versions earlier than 10.20. When those fade from memory, this | |
7074 | # could be expunged. --jsm 1999-03-22 | |
7075 | ||
7076 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
8dcde887 | 7077 | echo "configure:7078: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7078 | cat > conftest.$ac_ext <<EOF |
8dcde887 | 7079 | #line 7080 "configure" |
97bf5e38 MK |
7080 | #include "confdefs.h" |
7081 | #include <machine/save_state.h> | |
7082 | EOF | |
7083 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7084 | egrep "save_state_t" >/dev/null 2>&1; then | |
7085 | rm -rf conftest* | |
7086 | gdb_cv_hpux_savestate=yes | |
7087 | else | |
7088 | rm -rf conftest* | |
7089 | gdb_cv_hpux_savestate=no | |
7090 | fi | |
7091 | rm -f conftest* | |
7092 | ||
7093 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7094 | #line 7095 "configure" |
97bf5e38 MK |
7095 | #include "confdefs.h" |
7096 | #include <machine/save_state.h> | |
7097 | EOF | |
7098 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7099 | egrep "ss_wide" >/dev/null 2>&1; then | |
7100 | rm -rf conftest* | |
7101 | gdb_cv_hpux_sswide=yes | |
7102 | else | |
7103 | rm -rf conftest* | |
7104 | gdb_cv_hpux_sswide=no | |
7105 | fi | |
7106 | rm -f conftest* | |
7107 | ||
7108 | if test $gdb_cv_hpux_savestate = yes | |
7109 | then | |
7110 | cat >> confdefs.h <<\EOF | |
7111 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7112 | EOF | |
7113 | ||
7114 | fi | |
7115 | if test $gdb_cv_hpux_sswide = yes | |
7116 | then | |
7117 | cat >> confdefs.h <<\EOF | |
7118 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7119 | EOF | |
7120 | ||
7121 | fi | |
7122 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7123 | ||
7124 | ||
7125 | # If we are configured native on GNU/Linux, work around problems with | |
7126 | # sys/procfs.h | |
7127 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7128 | ||
7129 | if test "${target}" = "${host}"; then | |
7130 | case "${host}" in | |
7131 | i[3456]86-*-linux*) | |
7132 | cat >> confdefs.h <<\EOF | |
7133 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7134 | EOF | |
7135 | ||
7136 | cat >> confdefs.h <<\EOF | |
7137 | #define sys_quotactl 1 | |
7138 | EOF | |
7139 | ||
7140 | ;; | |
7141 | ia64-*-aix*) | |
7142 | cat >> confdefs.h <<\EOF | |
7143 | #define NEW_PROC_API 1 | |
7144 | EOF | |
7145 | ||
7146 | ;; | |
7147 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7148 | cat >> confdefs.h <<\EOF | |
7149 | #define NEW_PROC_API 1 | |
7150 | EOF | |
7151 | ||
7152 | ;; | |
7153 | *-*-solaris2.[678]) | |
7154 | cat >> confdefs.h <<\EOF | |
7155 | #define NEW_PROC_API 1 | |
7156 | EOF | |
7157 | ||
7158 | ;; | |
7159 | esac | |
7160 | fi | |
7161 | ||
7162 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7163 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
8dcde887 | 7164 | echo "configure:7165: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7165 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7166 | echo $ac_n "(cached) $ac_c" 1>&6 |
7167 | else | |
7168 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7169 | #line 7170 "configure" |
596c9d4b KB |
7170 | #include "confdefs.h" |
7171 | ||
7172 | #define _SYSCALL32 | |
7173 | #include <sys/procfs.h> | |
7174 | int main() { | |
97bf5e38 | 7175 | pstatus_t avar |
596c9d4b KB |
7176 | ; return 0; } |
7177 | EOF | |
8dcde887 | 7178 | if { (eval echo configure:7179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7179 | rm -rf conftest* |
97bf5e38 | 7180 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7181 | else |
7182 | echo "configure: failed program was:" >&5 | |
7183 | cat conftest.$ac_ext >&5 | |
7184 | rm -rf conftest* | |
97bf5e38 | 7185 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7186 | |
7187 | fi | |
7188 | rm -f conftest* | |
7189 | fi | |
7190 | ||
97bf5e38 | 7191 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7192 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7193 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7194 | EOF |
7195 | ||
7196 | fi | |
97bf5e38 | 7197 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7198 | |
97bf5e38 | 7199 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7200 | echo "configure:7201: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7201 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7202 | echo $ac_n "(cached) $ac_c" 1>&6 |
7203 | else | |
7204 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7205 | #line 7206 "configure" |
596c9d4b KB |
7206 | #include "confdefs.h" |
7207 | ||
7208 | #define _SYSCALL32 | |
7209 | #include <sys/procfs.h> | |
7210 | int main() { | |
97bf5e38 | 7211 | prrun_t avar |
596c9d4b KB |
7212 | ; return 0; } |
7213 | EOF | |
8dcde887 | 7214 | if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7215 | rm -rf conftest* |
97bf5e38 | 7216 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7217 | else |
7218 | echo "configure: failed program was:" >&5 | |
7219 | cat conftest.$ac_ext >&5 | |
7220 | rm -rf conftest* | |
97bf5e38 | 7221 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7222 | |
7223 | fi | |
7224 | rm -f conftest* | |
7225 | fi | |
7226 | ||
97bf5e38 | 7227 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7228 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7229 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7230 | EOF |
7231 | ||
7232 | fi | |
97bf5e38 | 7233 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7234 | |
97bf5e38 | 7235 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7236 | echo "configure:7237: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7237 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7238 | echo $ac_n "(cached) $ac_c" 1>&6 |
7239 | else | |
7240 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7241 | #line 7242 "configure" |
596c9d4b KB |
7242 | #include "confdefs.h" |
7243 | ||
7244 | #define _SYSCALL32 | |
7245 | #include <sys/procfs.h> | |
7246 | int main() { | |
97bf5e38 | 7247 | gregset_t avar |
596c9d4b KB |
7248 | ; return 0; } |
7249 | EOF | |
8dcde887 | 7250 | if { (eval echo configure:7251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7251 | rm -rf conftest* |
97bf5e38 | 7252 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7253 | else |
7254 | echo "configure: failed program was:" >&5 | |
7255 | cat conftest.$ac_ext >&5 | |
7256 | rm -rf conftest* | |
97bf5e38 | 7257 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7258 | |
7259 | fi | |
7260 | rm -f conftest* | |
7261 | fi | |
7262 | ||
97bf5e38 | 7263 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7264 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7265 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7266 | EOF |
7267 | ||
7268 | fi | |
97bf5e38 | 7269 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7270 | |
97bf5e38 | 7271 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7272 | echo "configure:7273: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7273 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7274 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7275 | else |
7276 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7277 | #line 7278 "configure" |
d84dd0c5 | 7278 | #include "confdefs.h" |
97bf5e38 MK |
7279 | |
7280 | #define _SYSCALL32 | |
d84dd0c5 | 7281 | #include <sys/procfs.h> |
97bf5e38 MK |
7282 | int main() { |
7283 | fpregset_t avar | |
7284 | ; return 0; } | |
d84dd0c5 | 7285 | EOF |
8dcde887 | 7286 | if { (eval echo configure:7287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7287 | rm -rf conftest* |
7288 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7289 | else |
7290 | echo "configure: failed program was:" >&5 | |
7291 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7292 | rm -rf conftest* |
7293 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7294 | ||
d84dd0c5 | 7295 | fi |
97bf5e38 | 7296 | rm -f conftest* |
d84dd0c5 MK |
7297 | fi |
7298 | ||
97bf5e38 MK |
7299 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7300 | cat >> confdefs.h <<\EOF | |
7301 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7302 | EOF |
7303 | ||
97bf5e38 MK |
7304 | fi |
7305 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7306 | |
97bf5e38 | 7307 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7308 | echo "configure:7309: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7309 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7310 | echo $ac_n "(cached) $ac_c" 1>&6 |
7311 | else | |
7312 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7313 | #line 7314 "configure" |
c906108c | 7314 | #include "confdefs.h" |
c906108c | 7315 | |
97bf5e38 MK |
7316 | #define _SYSCALL32 |
7317 | #include <sys/procfs.h> | |
c906108c | 7318 | int main() { |
97bf5e38 | 7319 | prgregset_t avar |
c906108c SS |
7320 | ; return 0; } |
7321 | EOF | |
8dcde887 | 7322 | if { (eval echo configure:7323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7323 | rm -rf conftest* |
97bf5e38 | 7324 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7325 | else |
7326 | echo "configure: failed program was:" >&5 | |
7327 | cat conftest.$ac_ext >&5 | |
7328 | rm -rf conftest* | |
97bf5e38 MK |
7329 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7330 | ||
c906108c SS |
7331 | fi |
7332 | rm -f conftest* | |
7333 | fi | |
7334 | ||
97bf5e38 MK |
7335 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7336 | cat >> confdefs.h <<\EOF | |
7337 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7338 | EOF |
7339 | ||
97bf5e38 MK |
7340 | fi |
7341 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7342 | |
97bf5e38 | 7343 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7344 | echo "configure:7345: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7345 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7346 | echo $ac_n "(cached) $ac_c" 1>&6 |
7347 | else | |
7348 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7349 | #line 7350 "configure" |
d45fe813 | 7350 | #include "confdefs.h" |
97bf5e38 MK |
7351 | |
7352 | #define _SYSCALL32 | |
7353 | #include <sys/procfs.h> | |
d45fe813 | 7354 | int main() { |
97bf5e38 | 7355 | prfpregset_t avar |
d45fe813 KB |
7356 | ; return 0; } |
7357 | EOF | |
8dcde887 | 7358 | if { (eval echo configure:7359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7359 | rm -rf conftest* |
97bf5e38 | 7360 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7361 | else |
7362 | echo "configure: failed program was:" >&5 | |
7363 | cat conftest.$ac_ext >&5 | |
7364 | rm -rf conftest* | |
97bf5e38 MK |
7365 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7366 | ||
d45fe813 KB |
7367 | fi |
7368 | rm -f conftest* | |
7369 | fi | |
7370 | ||
97bf5e38 MK |
7371 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7372 | cat >> confdefs.h <<\EOF | |
7373 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7374 | EOF |
7375 | ||
97bf5e38 MK |
7376 | fi |
7377 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7378 | |
97bf5e38 | 7379 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7380 | echo "configure:7381: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7381 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7382 | echo $ac_n "(cached) $ac_c" 1>&6 |
7383 | else | |
7384 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7385 | #line 7386 "configure" |
d45fe813 | 7386 | #include "confdefs.h" |
97bf5e38 MK |
7387 | |
7388 | #define _SYSCALL32 | |
7389 | #include <sys/procfs.h> | |
d45fe813 | 7390 | int main() { |
97bf5e38 | 7391 | prgregset32_t avar |
d45fe813 KB |
7392 | ; return 0; } |
7393 | EOF | |
8dcde887 | 7394 | if { (eval echo configure:7395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7395 | rm -rf conftest* |
97bf5e38 | 7396 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7397 | else |
7398 | echo "configure: failed program was:" >&5 | |
7399 | cat conftest.$ac_ext >&5 | |
7400 | rm -rf conftest* | |
97bf5e38 MK |
7401 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7402 | ||
d45fe813 KB |
7403 | fi |
7404 | rm -f conftest* | |
7405 | fi | |
7406 | ||
97bf5e38 MK |
7407 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7408 | cat >> confdefs.h <<\EOF | |
7409 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7410 | EOF |
7411 | ||
97bf5e38 MK |
7412 | fi |
7413 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7414 | |
97bf5e38 | 7415 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7416 | echo "configure:7417: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7417 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7418 | echo $ac_n "(cached) $ac_c" 1>&6 |
7419 | else | |
7420 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7421 | #line 7422 "configure" |
d45fe813 | 7422 | #include "confdefs.h" |
97bf5e38 MK |
7423 | |
7424 | #define _SYSCALL32 | |
7425 | #include <sys/procfs.h> | |
d45fe813 | 7426 | int main() { |
97bf5e38 | 7427 | prfpregset32_t avar |
d45fe813 KB |
7428 | ; return 0; } |
7429 | EOF | |
8dcde887 | 7430 | if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7431 | rm -rf conftest* |
97bf5e38 | 7432 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7433 | else |
7434 | echo "configure: failed program was:" >&5 | |
7435 | cat conftest.$ac_ext >&5 | |
7436 | rm -rf conftest* | |
97bf5e38 MK |
7437 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7438 | ||
d45fe813 KB |
7439 | fi |
7440 | rm -f conftest* | |
7441 | fi | |
7442 | ||
97bf5e38 MK |
7443 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7444 | cat >> confdefs.h <<\EOF | |
7445 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7446 | EOF |
7447 | ||
97bf5e38 MK |
7448 | fi |
7449 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7450 | |
97bf5e38 | 7451 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7452 | echo "configure:7453: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7453 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7454 | echo $ac_n "(cached) $ac_c" 1>&6 |
7455 | else | |
7456 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7457 | #line 7458 "configure" |
d45fe813 | 7458 | #include "confdefs.h" |
97bf5e38 | 7459 | |
d45fe813 | 7460 | #define _SYSCALL32 |
97bf5e38 | 7461 | #include <sys/procfs.h> |
d45fe813 | 7462 | int main() { |
97bf5e38 | 7463 | lwpid_t avar |
d45fe813 KB |
7464 | ; return 0; } |
7465 | EOF | |
8dcde887 | 7466 | if { (eval echo configure:7467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7467 | rm -rf conftest* |
97bf5e38 | 7468 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7469 | else |
7470 | echo "configure: failed program was:" >&5 | |
7471 | cat conftest.$ac_ext >&5 | |
7472 | rm -rf conftest* | |
97bf5e38 MK |
7473 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7474 | ||
d45fe813 KB |
7475 | fi |
7476 | rm -f conftest* | |
7477 | fi | |
7478 | ||
97bf5e38 MK |
7479 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7480 | cat >> confdefs.h <<\EOF | |
7481 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7482 | EOF |
7483 | ||
97bf5e38 MK |
7484 | fi |
7485 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7486 | |
97bf5e38 | 7487 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7488 | echo "configure:7489: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7489 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7490 | echo $ac_n "(cached) $ac_c" 1>&6 |
7491 | else | |
7492 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7493 | #line 7494 "configure" |
c906108c SS |
7494 | #include "confdefs.h" |
7495 | ||
97bf5e38 MK |
7496 | #define _SYSCALL32 |
7497 | #include <sys/procfs.h> | |
c906108c | 7498 | int main() { |
97bf5e38 | 7499 | psaddr_t avar |
c906108c SS |
7500 | ; return 0; } |
7501 | EOF | |
8dcde887 | 7502 | if { (eval echo configure:7503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7503 | rm -rf conftest* |
97bf5e38 | 7504 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7505 | else |
7506 | echo "configure: failed program was:" >&5 | |
7507 | cat conftest.$ac_ext >&5 | |
7508 | rm -rf conftest* | |
97bf5e38 MK |
7509 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7510 | ||
c906108c SS |
7511 | fi |
7512 | rm -f conftest* | |
7513 | fi | |
7514 | ||
97bf5e38 MK |
7515 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7516 | cat >> confdefs.h <<\EOF | |
7517 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7518 | EOF |
7519 | ||
97bf5e38 MK |
7520 | fi |
7521 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7522 | |
97bf5e38 | 7523 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7524 | echo "configure:7525: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7525 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7526 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7527 | else |
7528 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7529 | #line 7530 "configure" |
c906108c SS |
7530 | #include "confdefs.h" |
7531 | ||
97bf5e38 MK |
7532 | #define _SYSCALL32 |
7533 | #include <sys/procfs.h> | |
7534 | int main() { | |
7535 | prsysent_t avar | |
7536 | ; return 0; } | |
c906108c | 7537 | EOF |
8dcde887 | 7538 | if { (eval echo configure:7539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7539 | rm -rf conftest* |
7540 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7541 | else |
7542 | echo "configure: failed program was:" >&5 | |
7543 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7544 | rm -rf conftest* |
7545 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7546 | ||
c906108c | 7547 | fi |
97bf5e38 | 7548 | rm -f conftest* |
c906108c SS |
7549 | fi |
7550 | ||
97bf5e38 MK |
7551 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7552 | cat >> confdefs.h <<\EOF | |
7553 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7554 | EOF |
7555 | ||
97bf5e38 MK |
7556 | fi |
7557 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7558 | |
97bf5e38 | 7559 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7560 | echo "configure:7561: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7561 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7562 | echo $ac_n "(cached) $ac_c" 1>&6 |
7563 | else | |
7564 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7565 | #line 7566 "configure" |
c906108c SS |
7566 | #include "confdefs.h" |
7567 | ||
97bf5e38 MK |
7568 | #define _SYSCALL32 |
7569 | #include <sys/procfs.h> | |
c906108c | 7570 | int main() { |
97bf5e38 | 7571 | pr_sigset_t avar |
c906108c SS |
7572 | ; return 0; } |
7573 | EOF | |
8dcde887 | 7574 | if { (eval echo configure:7575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7575 | rm -rf conftest* |
97bf5e38 | 7576 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7577 | else |
7578 | echo "configure: failed program was:" >&5 | |
7579 | cat conftest.$ac_ext >&5 | |
7580 | rm -rf conftest* | |
97bf5e38 MK |
7581 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7582 | ||
c906108c SS |
7583 | fi |
7584 | rm -f conftest* | |
7585 | fi | |
7586 | ||
97bf5e38 MK |
7587 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7588 | cat >> confdefs.h <<\EOF | |
7589 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7590 | EOF |
7591 | ||
97bf5e38 MK |
7592 | fi |
7593 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7594 | |
97bf5e38 | 7595 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
8dcde887 | 7596 | echo "configure:7597: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7597 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7598 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7599 | else |
7600 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7601 | #line 7602 "configure" |
c906108c SS |
7602 | #include "confdefs.h" |
7603 | ||
97bf5e38 MK |
7604 | #define _SYSCALL32 |
7605 | #include <sys/procfs.h> | |
7606 | int main() { | |
7607 | pr_sigaction64_t avar | |
7608 | ; return 0; } | |
c906108c | 7609 | EOF |
8dcde887 | 7610 | if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7611 | rm -rf conftest* |
7612 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7613 | else |
7614 | echo "configure: failed program was:" >&5 | |
7615 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7616 | rm -rf conftest* |
7617 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7618 | ||
c906108c | 7619 | fi |
97bf5e38 | 7620 | rm -f conftest* |
c906108c SS |
7621 | fi |
7622 | ||
97bf5e38 MK |
7623 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7624 | cat >> confdefs.h <<\EOF | |
7625 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7626 | EOF |
7627 | ||
97bf5e38 MK |
7628 | fi |
7629 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7630 | ||
7631 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
8dcde887 | 7632 | echo "configure:7633: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7633 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7635 | else | |
7636 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7637 | #line 7638 "configure" |
97bf5e38 MK |
7638 | #include "confdefs.h" |
7639 | ||
7640 | #define _SYSCALL32 | |
7641 | #include <sys/procfs.h> | |
7642 | int main() { | |
7643 | pr_siginfo64_t avar | |
7644 | ; return 0; } | |
7645 | EOF | |
8dcde887 | 7646 | if { (eval echo configure:7647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7647 | rm -rf conftest* |
7648 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7649 | else | |
7650 | echo "configure: failed program was:" >&5 | |
7651 | cat conftest.$ac_ext >&5 | |
7652 | rm -rf conftest* | |
7653 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7654 | ||
7655 | fi | |
7656 | rm -f conftest* | |
c906108c | 7657 | fi |
c906108c | 7658 | |
97bf5e38 MK |
7659 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7660 | cat >> confdefs.h <<\EOF | |
7661 | #define HAVE_PR_SIGINFO64_T 1 | |
7662 | EOF | |
c906108c | 7663 | |
97bf5e38 MK |
7664 | fi |
7665 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7666 | ||
7667 | ||
7668 | ||
7669 | ||
7670 | ||
7671 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7672 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
8dcde887 | 7673 | echo "configure:7674: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7674 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7675 | echo $ac_n "(cached) $ac_c" 1>&6 |
7676 | else | |
7677 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7678 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7679 | else |
7680 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7681 | #line 7682 "configure" |
c906108c | 7682 | #include "confdefs.h" |
97bf5e38 MK |
7683 | #include <sys/procfs.h> |
7684 | int main () | |
7685 | { | |
7686 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7687 | return 1; | |
7688 | return 0; | |
7689 | } | |
c906108c | 7690 | EOF |
8dcde887 | 7691 | if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7692 | then |
97bf5e38 | 7693 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7694 | else |
7695 | echo "configure: failed program was:" >&5 | |
7696 | cat conftest.$ac_ext >&5 | |
7697 | rm -fr conftest* | |
97bf5e38 | 7698 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7699 | fi |
7700 | rm -fr conftest* | |
7701 | fi | |
7702 | ||
7703 | fi | |
7704 | ||
97bf5e38 MK |
7705 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7706 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7707 | cat >> confdefs.h <<\EOF | |
7708 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7709 | EOF |
7710 | ||
97bf5e38 MK |
7711 | fi |
7712 | fi | |
c906108c | 7713 | |
97bf5e38 MK |
7714 | |
7715 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
8dcde887 | 7716 | echo "configure:7717: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7717 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7718 | echo $ac_n "(cached) $ac_c" 1>&6 |
7719 | else | |
7720 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7721 | #line 7722 "configure" |
c906108c | 7722 | #include "confdefs.h" |
97bf5e38 MK |
7723 | #include <unistd.h> |
7724 | #include <sys/types.h> | |
7725 | #include <sys/procfs.h> | |
7726 | ||
7727 | int main() { | |
7728 | ||
7729 | int dummy;; | |
7730 | dummy = ioctl(0, PIOCSET, &dummy); | |
7731 | ||
7732 | ; return 0; } | |
c906108c | 7733 | EOF |
8dcde887 | 7734 | if { (eval echo configure:7735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7735 | rm -rf conftest* |
97bf5e38 | 7736 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7737 | else |
c906108c SS |
7738 | echo "configure: failed program was:" >&5 |
7739 | cat conftest.$ac_ext >&5 | |
7740 | rm -rf conftest* | |
97bf5e38 | 7741 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7742 | fi |
7743 | rm -f conftest* | |
7744 | fi | |
97bf5e38 MK |
7745 | |
7746 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7747 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7748 | cat >> confdefs.h <<\EOF | |
7749 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7750 | EOF |
97bf5e38 MK |
7751 | |
7752 | fi | |
c906108c | 7753 | fi |
c906108c | 7754 | |
97bf5e38 MK |
7755 | if test ${host} = ${target} ; then |
7756 | ||
7757 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
8dcde887 | 7758 | echo "configure:7759: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7759 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7760 | echo $ac_n "(cached) $ac_c" 1>&6 |
7761 | else | |
7762 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7763 | #line 7764 "configure" |
c906108c | 7764 | #include "confdefs.h" |
97bf5e38 | 7765 | #include <link.h> |
c906108c | 7766 | int main() { |
97bf5e38 | 7767 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7768 | ; return 0; } |
7769 | EOF | |
8dcde887 | 7770 | if { (eval echo configure:7771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7771 | rm -rf conftest* |
97bf5e38 | 7772 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7773 | else |
7774 | echo "configure: failed program was:" >&5 | |
7775 | cat conftest.$ac_ext >&5 | |
7776 | rm -rf conftest* | |
97bf5e38 | 7777 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7778 | fi |
7779 | rm -f conftest* | |
7780 | fi | |
7781 | ||
97bf5e38 MK |
7782 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7783 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7784 | cat >> confdefs.h <<\EOF | |
7785 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7786 | EOF |
97bf5e38 MK |
7787 | |
7788 | fi | |
7789 | ||
7790 | ||
7791 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
8dcde887 | 7792 | echo "configure:7793: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
7793 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
7794 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 7795 | else |
97bf5e38 | 7796 | cat > conftest.$ac_ext <<EOF |
8dcde887 | 7797 | #line 7798 "configure" |
97bf5e38 MK |
7798 | #include "confdefs.h" |
7799 | #include <sys/types.h> | |
7800 | #include <link.h> | |
7801 | int main() { | |
7802 | struct link_map lm; (void) lm.lm_addr; | |
7803 | ; return 0; } | |
7804 | EOF | |
8dcde887 | 7805 | if { (eval echo configure:7806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7806 | rm -rf conftest* |
7807 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
7808 | else | |
7809 | echo "configure: failed program was:" >&5 | |
7810 | cat conftest.$ac_ext >&5 | |
7811 | rm -rf conftest* | |
7812 | gdb_cv_have_struct_link_map_with_lm_members=no | |
7813 | fi | |
7814 | rm -f conftest* | |
c906108c | 7815 | fi |
c906108c | 7816 | |
97bf5e38 MK |
7817 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
7818 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
7819 | cat >> confdefs.h <<\EOF | |
7820 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
7821 | EOF | |
7822 | ||
7823 | fi | |
7824 | ||
7825 | ||
7826 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
8dcde887 | 7827 | echo "configure:7828: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 7828 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 7829 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7830 | else |
7831 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7832 | #line 7833 "configure" |
c906108c | 7833 | #include "confdefs.h" |
97bf5e38 MK |
7834 | #include <sys/types.h> |
7835 | #ifdef HAVE_NLIST_H | |
7836 | #include <nlist.h> | |
7837 | #endif | |
7838 | #include <link.h> | |
7839 | int main() { | |
7840 | struct so_map lm; (void) lm.som_addr; | |
7841 | ; return 0; } | |
7842 | EOF | |
8dcde887 | 7843 | if { (eval echo configure:7844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7844 | rm -rf conftest* |
7845 | gdb_cv_have_struct_so_map_with_som_members=yes | |
7846 | else | |
7847 | echo "configure: failed program was:" >&5 | |
7848 | cat conftest.$ac_ext >&5 | |
7849 | rm -rf conftest* | |
7850 | gdb_cv_have_struct_so_map_with_som_members=no | |
7851 | fi | |
7852 | rm -f conftest* | |
7853 | fi | |
c906108c | 7854 | |
97bf5e38 MK |
7855 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
7856 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
7857 | cat >> confdefs.h <<\EOF | |
7858 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
7859 | EOF | |
c906108c | 7860 | |
97bf5e38 | 7861 | fi |
c906108c | 7862 | |
97bf5e38 MK |
7863 | |
7864 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
8dcde887 | 7865 | echo "configure:7866: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
7866 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
7867 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7868 | else | |
7869 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7870 | #line 7871 "configure" |
97bf5e38 MK |
7871 | #include "confdefs.h" |
7872 | #define _SYSCALL32 | |
7873 | #include <sys/link.h> | |
7874 | int main() { | |
7875 | struct link_map32 l; | |
7876 | ; return 0; } | |
7877 | EOF | |
8dcde887 | 7878 | if { (eval echo configure:7879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7879 | rm -rf conftest* |
7880 | gdb_cv_have_struct_link_map32=yes | |
7881 | else | |
7882 | echo "configure: failed program was:" >&5 | |
7883 | cat conftest.$ac_ext >&5 | |
7884 | rm -rf conftest* | |
7885 | gdb_cv_have_struct_link_map32=no | |
7886 | fi | |
7887 | rm -f conftest* | |
7888 | fi | |
c906108c | 7889 | |
97bf5e38 MK |
7890 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
7891 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
7892 | cat >> confdefs.h <<\EOF | |
7893 | #define HAVE_STRUCT_LINK_MAP32 1 | |
7894 | EOF | |
c906108c | 7895 | |
97bf5e38 MK |
7896 | cat >> confdefs.h <<\EOF |
7897 | #define _SYSCALL32 1 | |
7898 | EOF | |
c906108c | 7899 | |
97bf5e38 MK |
7900 | fi |
7901 | fi | |
c906108c | 7902 | |
c906108c | 7903 | |
97bf5e38 | 7904 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
8dcde887 | 7905 | echo "configure:7906: checking for long long support in compiler" >&5 |
97bf5e38 MK |
7906 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
7907 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7908 | else | |
7909 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7910 | #line 7911 "configure" |
97bf5e38 | 7911 | #include "confdefs.h" |
c906108c | 7912 | |
97bf5e38 | 7913 | int main() { |
c906108c | 7914 | |
97bf5e38 MK |
7915 | extern long long foo; |
7916 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 7917 | |
97bf5e38 MK |
7918 | ; return 0; } |
7919 | EOF | |
8dcde887 | 7920 | if { (eval echo configure:7921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7921 | rm -rf conftest* |
7922 | gdb_cv_c_long_long=yes | |
7923 | else | |
7924 | echo "configure: failed program was:" >&5 | |
7925 | cat conftest.$ac_ext >&5 | |
7926 | rm -rf conftest* | |
7927 | gdb_cv_c_long_long=no | |
7928 | fi | |
7929 | rm -f conftest* | |
7930 | fi | |
c906108c | 7931 | |
97bf5e38 MK |
7932 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
7933 | if test $gdb_cv_c_long_long = yes; then | |
7934 | cat >> confdefs.h <<\EOF | |
7935 | #define CC_HAS_LONG_LONG 1 | |
7936 | EOF | |
7937 | ||
7938 | fi | |
7939 | ||
7940 | ||
7941 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
8dcde887 | 7942 | echo "configure:7943: checking for long long support in printf" >&5 |
97bf5e38 MK |
7943 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
7944 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7945 | else | |
7946 | if test "$cross_compiling" = yes; then | |
7947 | gdb_cv_printf_has_long_long=no | |
7948 | else | |
7949 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7950 | #line 7951 "configure" |
97bf5e38 MK |
7951 | #include "confdefs.h" |
7952 | ||
7953 | int main () { | |
7954 | char buf[32]; | |
7955 | long long l = 0; | |
7956 | l = (l << 16) + 0x0123; | |
7957 | l = (l << 16) + 0x4567; | |
7958 | l = (l << 16) + 0x89ab; | |
7959 | l = (l << 16) + 0xcdef; | |
7960 | sprintf (buf, "0x%016llx", l); | |
7961 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 7962 | } |
97bf5e38 | 7963 | EOF |
8dcde887 | 7964 | if { (eval echo configure:7965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7965 | then |
7966 | gdb_cv_printf_has_long_long=yes | |
7967 | else | |
7968 | echo "configure: failed program was:" >&5 | |
7969 | cat conftest.$ac_ext >&5 | |
7970 | rm -fr conftest* | |
7971 | gdb_cv_printf_has_long_long=no | |
7972 | fi | |
7973 | rm -fr conftest* | |
7974 | fi | |
7975 | ||
7976 | fi | |
7977 | ||
7978 | if test $gdb_cv_printf_has_long_long = yes; then | |
7979 | cat >> confdefs.h <<\EOF | |
7980 | #define PRINTF_HAS_LONG_LONG 1 | |
7981 | EOF | |
7982 | ||
7983 | fi | |
7984 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
7985 | ||
7986 | ||
7987 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
8dcde887 | 7988 | echo "configure:7989: checking for long double support in compiler" >&5 |
97bf5e38 MK |
7989 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
7990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7991 | else | |
7992 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 7993 | #line 7994 "configure" |
97bf5e38 MK |
7994 | #include "confdefs.h" |
7995 | ||
7996 | int main() { | |
7997 | long double foo; | |
7998 | ; return 0; } | |
7999 | EOF | |
8dcde887 | 8000 | if { (eval echo configure:8001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8001 | rm -rf conftest* |
8002 | ac_cv_c_long_double=yes | |
8003 | else | |
8004 | echo "configure: failed program was:" >&5 | |
8005 | cat conftest.$ac_ext >&5 | |
8006 | rm -rf conftest* | |
8007 | ac_cv_c_long_double=no | |
8008 | fi | |
8009 | rm -f conftest* | |
8010 | fi | |
c906108c | 8011 | |
97bf5e38 MK |
8012 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8013 | if test $ac_cv_c_long_double = yes; then | |
8014 | cat >> confdefs.h <<\EOF | |
8015 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8016 | EOF |
97bf5e38 MK |
8017 | |
8018 | fi | |
8019 | ||
8020 | ||
8021 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
8dcde887 | 8022 | echo "configure:8023: checking for long double support in printf" >&5 |
97bf5e38 MK |
8023 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8025 | else | |
8026 | if test "$cross_compiling" = yes; then | |
8027 | gdb_cv_printf_has_long_double=no | |
8028 | else | |
8029 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8030 | #line 8031 "configure" |
97bf5e38 MK |
8031 | #include "confdefs.h" |
8032 | ||
8033 | int main () { | |
8034 | char buf[16]; | |
8035 | long double f = 3.141592653; | |
8036 | sprintf (buf, "%Lg", f); | |
8037 | return (strncmp ("3.14159", buf, 7)); | |
8038 | } | |
8039 | EOF | |
8dcde887 | 8040 | if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8041 | then |
97bf5e38 | 8042 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8043 | else |
8044 | echo "configure: failed program was:" >&5 | |
8045 | cat conftest.$ac_ext >&5 | |
8046 | rm -fr conftest* | |
97bf5e38 | 8047 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8048 | fi |
8049 | rm -fr conftest* | |
8050 | fi | |
8051 | ||
8052 | fi | |
8053 | ||
97bf5e38 | 8054 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8055 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8056 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8057 | EOF | |
8058 | ||
8059 | fi | |
8060 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8061 | ||
8062 | ||
8063 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
8dcde887 | 8064 | echo "configure:8065: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8065 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8067 | else | |
8068 | if test "$cross_compiling" = yes; then | |
8069 | gdb_cv_scanf_has_long_double=no | |
8070 | else | |
8071 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8072 | #line 8073 "configure" |
97bf5e38 MK |
8073 | #include "confdefs.h" |
8074 | ||
8075 | int main () { | |
8076 | char *buf = "3.141592653"; | |
8077 | long double f = 0; | |
8078 | sscanf (buf, "%Lg", &f); | |
8079 | return !(f > 3.14159 && f < 3.14160); | |
8080 | } | |
c906108c | 8081 | EOF |
8dcde887 | 8082 | if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8083 | then |
8084 | gdb_cv_scanf_has_long_double=yes | |
8085 | else | |
8086 | echo "configure: failed program was:" >&5 | |
8087 | cat conftest.$ac_ext >&5 | |
8088 | rm -fr conftest* | |
8089 | gdb_cv_scanf_has_long_double=no | |
8090 | fi | |
8091 | rm -fr conftest* | |
8092 | fi | |
c906108c SS |
8093 | |
8094 | fi | |
8095 | ||
97bf5e38 MK |
8096 | if test $gdb_cv_scanf_has_long_double = yes; then |
8097 | cat >> confdefs.h <<\EOF | |
8098 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8099 | EOF | |
8100 | ||
8101 | fi | |
8102 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8103 | |
438013df AO |
8104 | case ${host_os} in |
8105 | aix*) | |
8106 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
8dcde887 | 8107 | echo "configure:8108: checking for -bbigtoc option" >&5 |
438013df AO |
8108 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8109 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8110 | else | |
8111 | ||
8112 | SAVE_LDFLAGS=$LDFLAGS | |
8113 | ||
8114 | case $GCC in | |
8115 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8116 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8117 | esac | |
8118 | ||
8119 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8120 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8121 | #line 8122 "configure" |
438013df AO |
8122 | #include "confdefs.h" |
8123 | ||
8124 | int main() { | |
8125 | int i; | |
8126 | ; return 0; } | |
8127 | EOF | |
8dcde887 | 8128 | if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8129 | : |
8130 | else | |
8131 | echo "configure: failed program was:" >&5 | |
8132 | cat conftest.$ac_ext >&5 | |
8133 | rm -rf conftest* | |
8134 | gdb_cv_bigtoc= | |
8135 | fi | |
8136 | rm -f conftest* | |
8137 | ||
8138 | fi | |
8139 | ||
8140 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8141 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8142 | ;; | |
8143 | esac | |
8144 | ||
c906108c SS |
8145 | |
8146 | ||
8147 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8148 | case ${host_os} in | |
8149 | hpux*) | |
8150 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
8dcde887 | 8151 | echo "configure:8152: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8152 | if test -f /usr/include/dce/cma_config.h ; then |
8153 | if test "$GCC" = "yes" ; then | |
8154 | echo "$ac_t""yes" 1>&6 | |
8155 | cat >> confdefs.h <<\EOF | |
8156 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8157 | EOF | |
8158 | ||
66b965bb | 8159 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8160 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8161 | else | |
8162 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8163 | fi | |
8164 | else | |
8165 | echo "$ac_t""no" 1>&6 | |
8166 | fi | |
8167 | ;; | |
8168 | solaris*) | |
d92419e5 JB |
8169 | # See if thread_db library is around for Solaris thread debugging. |
8170 | # Note that we must explicitly test for version 1 of the library | |
8171 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8172 | # the same API. | |
c906108c | 8173 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
8dcde887 | 8174 | echo "configure:8175: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8175 | if test -f /usr/lib/libthread_db.so.1 ; then |
8176 | echo "$ac_t""yes" 1>&6 | |
8177 | cat >> confdefs.h <<\EOF | |
8178 | #define HAVE_THREAD_DB_LIB 1 | |
8179 | EOF | |
8180 | ||
66b965bb | 8181 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8182 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8183 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
8dcde887 | 8184 | echo "configure:8185: checking for dlopen in -ldl" >&5 |
c906108c SS |
8185 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8186 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8187 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8188 | else | |
8189 | ac_save_LIBS="$LIBS" | |
8190 | LIBS="-ldl $LIBS" | |
8191 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8192 | #line 8193 "configure" |
c906108c SS |
8193 | #include "confdefs.h" |
8194 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8195 | /* We use char because int might match the return type of a gcc2 | |
8196 | builtin and then its argument prototype would still apply. */ | |
8197 | char dlopen(); | |
8198 | ||
8199 | int main() { | |
8200 | dlopen() | |
8201 | ; return 0; } | |
8202 | EOF | |
8dcde887 | 8203 | if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8204 | rm -rf conftest* |
8205 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8206 | else | |
8207 | echo "configure: failed program was:" >&5 | |
8208 | cat conftest.$ac_ext >&5 | |
8209 | rm -rf conftest* | |
8210 | eval "ac_cv_lib_$ac_lib_var=no" | |
8211 | fi | |
8212 | rm -f conftest* | |
8213 | LIBS="$ac_save_LIBS" | |
8214 | ||
8215 | fi | |
8216 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8217 | echo "$ac_t""yes" 1>&6 | |
8218 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8219 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8220 | cat >> confdefs.h <<EOF | |
8221 | #define $ac_tr_lib 1 | |
8222 | EOF | |
8223 | ||
8224 | LIBS="-ldl $LIBS" | |
8225 | ||
8226 | else | |
8227 | echo "$ac_t""no" 1>&6 | |
8228 | fi | |
8229 | ||
8230 | if test "$GCC" = "yes" ; then | |
8231 | # The GNU linker requires the -export-dynamic option to make | |
8232 | # all symbols visible in the dynamic symbol table. | |
8233 | hold_ldflags=$LDFLAGS | |
8234 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
8dcde887 | 8235 | echo "configure:8236: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8236 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8237 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8238 | #line 8239 "configure" |
c906108c SS |
8239 | #include "confdefs.h" |
8240 | ||
8241 | int main() { | |
8242 | int i; | |
8243 | ; return 0; } | |
8244 | EOF | |
8dcde887 | 8245 | if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8246 | rm -rf conftest* |
8247 | found=yes | |
8248 | else | |
8249 | echo "configure: failed program was:" >&5 | |
8250 | cat conftest.$ac_ext >&5 | |
8251 | rm -rf conftest* | |
8252 | found=no | |
8253 | fi | |
8254 | rm -f conftest* | |
8255 | LDFLAGS=$hold_ldflags | |
8256 | echo "$ac_t""$found" 1>&6 | |
8257 | if test $found = yes; then | |
8258 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8259 | fi | |
8260 | fi | |
8261 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8262 | # at one point. | |
8263 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
8dcde887 | 8264 | echo "configure:8265: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8265 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8266 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8267 | else | |
8268 | ||
8269 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8270 | #line 8271 "configure" |
c906108c SS |
8271 | #include "confdefs.h" |
8272 | ||
8273 | #include <proc_service.h> | |
8274 | ps_err_e ps_pdwrite | |
8275 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8276 | ||
8277 | int main() { | |
8278 | ||
8279 | ; return 0; } | |
8280 | EOF | |
8dcde887 | 8281 | if { (eval echo configure:8282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8282 | rm -rf conftest* |
8283 | gdb_cv_proc_service_is_old=no | |
8284 | else | |
8285 | echo "configure: failed program was:" >&5 | |
8286 | cat conftest.$ac_ext >&5 | |
8287 | rm -rf conftest* | |
8288 | gdb_cv_proc_service_is_old=yes | |
8289 | fi | |
8290 | rm -f conftest* | |
8291 | ||
8292 | fi | |
8293 | ||
8294 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8295 | if test $gdb_cv_proc_service_is_old = yes; then | |
8296 | cat >> confdefs.h <<\EOF | |
8297 | #define PROC_SERVICE_IS_OLD 1 | |
8298 | EOF | |
8299 | ||
8300 | fi | |
8301 | else | |
8302 | echo "$ac_t""no" 1>&6 | |
8303 | fi | |
8304 | ;; | |
d92419e5 JB |
8305 | aix*) |
8306 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
8dcde887 | 8307 | echo "configure:8308: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8308 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8309 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8310 | else | |
8311 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8312 | #line 8313 "configure" |
d92419e5 JB |
8313 | #include "confdefs.h" |
8314 | #include <sys/pthdebug.h> | |
8315 | int main() { | |
8316 | #ifndef PTHDB_VERSION_3 | |
8317 | #error | |
8318 | #endif | |
8319 | ; return 0; } | |
8320 | EOF | |
8dcde887 | 8321 | if { (eval echo configure:8322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8322 | rm -rf conftest* |
8323 | gdb_cv_have_aix_thread_debug=yes | |
8324 | else | |
8325 | echo "configure: failed program was:" >&5 | |
8326 | cat conftest.$ac_ext >&5 | |
8327 | rm -rf conftest* | |
8328 | gdb_cv_have_aix_thread_debug=no | |
8329 | fi | |
8330 | rm -f conftest* | |
8331 | fi | |
8332 | ||
8333 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8334 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8335 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8336 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8337 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8338 | fi | |
8339 | ;; | |
c906108c SS |
8340 | esac |
8341 | ||
8342 | fi | |
8343 | ||
3f47be5c EZ |
8344 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8345 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
8dcde887 | 8346 | echo "configure:8347: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8347 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8348 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8349 | else | |
8350 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8351 | #line 8352 "configure" |
3f47be5c EZ |
8352 | #include "confdefs.h" |
8353 | #include <thread_db.h> | |
8354 | int main() { | |
8355 | int i = TD_NOTALLOC; | |
8356 | ; return 0; } | |
8357 | EOF | |
8dcde887 | 8358 | if { (eval echo configure:8359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8359 | rm -rf conftest* |
8360 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8361 | else | |
8362 | echo "configure: failed program was:" >&5 | |
8363 | cat conftest.$ac_ext >&5 | |
8364 | rm -rf conftest* | |
8365 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8366 | ||
8367 | fi | |
8368 | rm -f conftest* | |
8369 | ||
8370 | fi | |
8371 | ||
8372 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8373 | fi | |
8374 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8375 | cat >> confdefs.h <<\EOF | |
8376 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8377 | EOF | |
8378 | ||
8379 | fi | |
8380 | ||
eb784848 DJ |
8381 | if test $host = $target; then |
8382 | case $target in | |
8383 | *-linux*) | |
8384 | save_CFLAGS=$CFLAGS | |
8385 | CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8386 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8387 | #line 8388 "configure" |
eb784848 DJ |
8388 | #include "confdefs.h" |
8389 | #include <unistd.h> | |
8390 | int main() { | |
8391 | pread64 (0, NULL, 0, 0); | |
8392 | ; return 0; } | |
8393 | EOF | |
8dcde887 | 8394 | if { (eval echo configure:8395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
eb784848 DJ |
8395 | rm -rf conftest* |
8396 | ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8397 | cat >> confdefs.h <<\EOF | |
8398 | #define HAVE_PREAD64 1 | |
8399 | EOF | |
8400 | ||
8401 | else | |
8402 | echo "configure: failed program was:" >&5 | |
8403 | cat conftest.$ac_ext >&5 | |
8404 | fi | |
8405 | rm -f conftest* | |
8406 | CFLAGS=$save_CFLAGS | |
8407 | ;; | |
8408 | esac | |
8409 | fi | |
8410 | ||
fb40c209 | 8411 | |
3b851bce AC |
8412 | # NOTE: Don't add -Wall or -Wunused, they both include |
8413 | # -Wunused-parameter which reports bogus warnings. | |
8414 | # NOTE: If you add to this list, remember to update | |
8415 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8416 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8417 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8418 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8419 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8420 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8421 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8422 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8423 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8424 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8425 | if test "${enable_build_warnings+set}" = set; then | |
8426 | enableval="$enable_build_warnings" | |
1decb323 | 8427 | case "${enableval}" in |
c906108c SS |
8428 | yes) ;; |
8429 | no) build_warnings="-w";; | |
8430 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8431 | build_warnings="${build_warnings} ${t}";; | |
8432 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8433 | build_warnings="${t} ${build_warnings}";; | |
8434 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8435 | esac | |
d4f3574e | 8436 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8437 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8438 | fi |
1decb323 | 8439 | fi |
3b851bce AC |
8440 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8441 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8442 | enableval="$enable_gdb_build_warnings" | |
8443 | case "${enableval}" in | |
8444 | yes) ;; | |
8445 | no) build_warnings="-w";; | |
8446 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8447 | build_warnings="${build_warnings} ${t}";; | |
8448 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8449 | build_warnings="${t} ${build_warnings}";; | |
8450 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8451 | esac | |
8452 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8453 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8454 | fi | |
8455 | fi | |
104c1213 JM |
8456 | WARN_CFLAGS="" |
8457 | WERROR_CFLAGS="" | |
c906108c SS |
8458 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8459 | then | |
746a987d | 8460 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
8dcde887 | 8461 | echo "configure:8462: checking compiler warning flags" >&5 |
746a987d AC |
8462 | # Separate out the -Werror flag as some files just cannot be |
8463 | # compiled with it enabled. | |
8464 | for w in ${build_warnings}; do | |
8465 | case $w in | |
8466 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8467 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8468 | saved_CFLAGS="$CFLAGS" |
8469 | CFLAGS="$CFLAGS $w" | |
8470 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8471 | #line 8472 "configure" |
4536bbc6 AC |
8472 | #include "confdefs.h" |
8473 | ||
8474 | int main() { | |
8475 | ||
8476 | ; return 0; } | |
8477 | EOF | |
8dcde887 | 8478 | if { (eval echo configure:8479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8479 | rm -rf conftest* |
8480 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8481 | else | |
8482 | echo "configure: failed program was:" >&5 | |
8483 | cat conftest.$ac_ext >&5 | |
8484 | fi | |
8485 | rm -f conftest* | |
8486 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8487 | esac |
8488 | done | |
8489 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8490 | fi |
8491 | ||
8492 | ||
104c1213 | 8493 | |
c906108c SS |
8494 | MMALLOC_CFLAGS= |
8495 | MMALLOC= | |
8496 | ||
8497 | ||
8498 | ||
8499 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8500 | if test "${with_mmalloc+set}" = set; then | |
8501 | withval="$with_mmalloc" | |
8502 | case "${withval}" in | |
8503 | yes) want_mmalloc=true ;; | |
8504 | no) want_mmalloc=false;; | |
8505 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8506 | esac | |
8507 | else | |
8508 | want_mmalloc=false | |
8509 | fi | |
8510 | ||
8511 | if test x$want_mmalloc = xtrue; then | |
8512 | cat >> confdefs.h <<\EOF | |
8513 | #define USE_MMALLOC 1 | |
8514 | EOF | |
8515 | ||
8516 | cat >> confdefs.h <<\EOF | |
8517 | #define MMCHECK_FORCE 1 | |
8518 | EOF | |
8519 | ||
8520 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8521 | MMALLOC='../mmalloc/libmmalloc.a' | |
8522 | fi | |
8523 | ||
7a292a7a SS |
8524 | # In the Cygwin environment, we need some additional flags. |
8525 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
8dcde887 | 8526 | echo "configure:8527: checking for cygwin" >&5 |
7a292a7a SS |
8527 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8529 | else | |
8530 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8531 | #line 8532 "configure" |
7a292a7a SS |
8532 | #include "confdefs.h" |
8533 | ||
8534 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8535 | lose | |
8536 | #endif | |
8537 | EOF | |
8538 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8539 | egrep "lose" >/dev/null 2>&1; then | |
8540 | rm -rf conftest* | |
8541 | gdb_cv_os_cygwin=yes | |
8542 | else | |
8543 | rm -rf conftest* | |
8544 | gdb_cv_os_cygwin=no | |
8545 | fi | |
8546 | rm -f conftest* | |
8547 | ||
8548 | fi | |
8549 | ||
8550 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8551 | ||
aff38e61 AC |
8552 | |
8553 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8554 | case ${host} in | |
95cbc983 AC |
8555 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8556 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8557 | esac |
8558 | ||
8559 | ||
cd0fc7c3 SS |
8560 | # libreadline needs libuser32.a in a cygwin environment |
8561 | WIN32LIBS= | |
8562 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8563 | WIN32LIBS="-luser32" |
8564 | case "${target}" in | |
8565 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8566 | ;; | |
8567 | esac | |
cd0fc7c3 | 8568 | fi |
c906108c | 8569 | |
7a292a7a | 8570 | |
3fc11d3e JM |
8571 | LIBGUI="../libgui/src/libgui.a" |
8572 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8573 | ||
8574 | ||
7a292a7a | 8575 | |
3fc11d3e JM |
8576 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
8577 | if test "${enable_gdbtk+set}" = set; then | |
8578 | enableval="$enable_gdbtk" | |
8579 | case "${enableval}" in | |
8580 | yes) | |
8581 | case "$host" in | |
8582 | *go32*) | |
8583 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8584 | enable_gdbtk=no ;; | |
8585 | *windows*) | |
8586 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8587 | enable_gdbtk=no ;; | |
8588 | *) | |
8589 | enable_gdbtk=yes ;; | |
8590 | esac ;; | |
8591 | no) | |
8592 | enable_gdbtk=no ;; | |
8593 | *) | |
8594 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
8595 | esac | |
8596 | else | |
8597 | ||
8598 | # Default is on for everything but go32 and Cygwin | |
8599 | case "$host" in | |
8600 | *go32* | *windows*) | |
8601 | ;; | |
8602 | *) | |
379d6434 AC |
8603 | if test -d "${srcdir}/gdbtk" ; then |
8604 | enable_gdbtk=yes | |
8605 | fi | |
8606 | ;; | |
8607 | esac | |
3fc11d3e JM |
8608 | |
8609 | fi | |
8610 | ||
8611 | ||
8612 | WIN32LDAPP= | |
8613 | ||
8614 | ||
8615 | ||
8616 | configdir="unix" | |
8617 | ||
8618 | GDBTKLIBS= | |
8619 | if test "${enable_gdbtk}" = "yes"; then | |
8620 | ||
d1c3b63a KS |
8621 | # Gdbtk must have an absolute path to srcdir in order to run |
8622 | # properly when not installed. | |
8623 | here=`pwd` | |
8624 | cd ${srcdir} | |
8625 | GDBTK_SRC_DIR=`pwd` | |
8626 | cd $here | |
8627 | ||
3fc11d3e JM |
8628 | |
8629 | # | |
8630 | # Ok, lets find the tcl configuration | |
8631 | # First, look for one uninstalled. | |
8632 | # the alternative search directory is invoked by --with-tclconfig | |
8633 | # | |
8634 | ||
8635 | if test x"${no_tcl}" = x ; then | |
8636 | # we reset no_tcl in case something fails here | |
8637 | no_tcl=true | |
8638 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8639 | if test "${with_tclconfig+set}" = set; then | |
8640 | withval="$with_tclconfig" | |
8641 | with_tclconfig=${withval} | |
8642 | fi | |
8643 | ||
8644 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
8dcde887 | 8645 | echo "configure:8646: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8646 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8647 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8648 | else | |
8649 | ||
8650 | ||
8651 | # First check to see if --with-tclconfig was specified. | |
8652 | if test x"${with_tclconfig}" != x ; then | |
8653 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8654 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8655 | else | |
8656 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8657 | fi | |
8658 | fi | |
8659 | ||
8660 | # then check for a private Tcl installation | |
8661 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8662 | for i in \ | |
8663 | ../tcl \ | |
8664 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8665 | ../../tcl \ | |
8666 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8667 | ../../../tcl \ | |
8668 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8669 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8670 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8671 | break | |
8672 | fi | |
8673 | done | |
8674 | fi | |
8675 | # check in a few common install locations | |
8676 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8677 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8678 | if test -f "$i/tclConfig.sh" ; then | |
8679 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8680 | break | |
8681 | fi | |
8682 | done | |
8683 | fi | |
8684 | # check in a few other private locations | |
8685 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8686 | for i in \ | |
8687 | ${srcdir}/../tcl \ | |
8688 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8689 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8690 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8691 | break | |
8692 | fi | |
8693 | done | |
8694 | fi | |
8695 | ||
8696 | fi | |
8697 | ||
8698 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8699 | TCLCONFIG="# no Tcl configs found" | |
8700 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8701 | else | |
8702 | no_tcl= | |
8703 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8704 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8705 | fi | |
8706 | fi | |
8707 | ||
8708 | if test -z "${no_tcl}"; then | |
8709 | ||
8710 | . $TCLCONFIG | |
8711 | ||
8712 | ||
8713 | ||
8714 | ||
8715 | ||
8716 | ||
8717 | ||
8718 | ||
8719 | ||
8720 | ||
8721 | ||
8722 | ||
8723 | ||
8724 | ||
8725 | ||
8726 | ||
8727 | ||
8728 | ||
8729 | ||
8730 | ||
8731 | ||
8732 | ||
8733 | ||
8734 | ||
8735 | ||
8736 | ||
8737 | # | |
8738 | # Ok, lets find the tk configuration | |
8739 | # First, look for one uninstalled. | |
8740 | # the alternative search directory is invoked by --with-tkconfig | |
8741 | # | |
8742 | ||
8743 | if test x"${no_tk}" = x ; then | |
8744 | # we reset no_tk in case something fails here | |
8745 | no_tk=true | |
8746 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8747 | if test "${with_tkconfig+set}" = set; then | |
8748 | withval="$with_tkconfig" | |
8749 | with_tkconfig=${withval} | |
8750 | fi | |
8751 | ||
8752 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
8dcde887 | 8753 | echo "configure:8754: checking for Tk configuration" >&5 |
3fc11d3e JM |
8754 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8755 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8756 | else | |
8757 | ||
8758 | ||
8759 | # First check to see if --with-tkconfig was specified. | |
8760 | if test x"${with_tkconfig}" != x ; then | |
8761 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8762 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8763 | else | |
8764 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8765 | fi | |
8766 | fi | |
8767 | ||
8768 | # then check for a private Tk library | |
8769 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8770 | for i in \ | |
8771 | ../tk \ | |
8772 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8773 | ../../tk \ | |
8774 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8775 | ../../../tk \ | |
8776 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8777 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8778 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8779 | break | |
8780 | fi | |
8781 | done | |
8782 | fi | |
8783 | # check in a few common install locations | |
8784 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8785 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8786 | if test -f "$i/tkConfig.sh" ; then | |
8787 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8788 | break | |
8789 | fi | |
8790 | done | |
8791 | fi | |
8792 | # check in a few other private locations | |
8793 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8794 | for i in \ | |
8795 | ${srcdir}/../tk \ | |
8796 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8797 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8798 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8799 | break | |
8800 | fi | |
8801 | done | |
8802 | fi | |
8803 | ||
8804 | fi | |
8805 | ||
8806 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8807 | TKCONFIG="# no Tk configs found" | |
8808 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8809 | else | |
8810 | no_tk= | |
8811 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8812 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8813 | fi | |
8814 | fi | |
8815 | ||
8816 | ||
8817 | ||
dd2504ab JM |
8818 | # now look for Tcl library stuff |
8819 | ||
8820 | case "${host}" in | |
8821 | *-*-cygwin*) | |
8822 | tcldir=../tcl/win/ | |
8823 | ;; | |
8824 | *) | |
8825 | tcldir=../tcl/unix/ | |
8826 | ;; | |
8827 | esac | |
8828 | ||
8829 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
8830 | ||
3fc11d3e JM |
8831 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
8832 | # point to doing Tcl. | |
8833 | if test -z "${no_tk}"; then | |
8834 | ||
8835 | if test -f "$TKCONFIG" ; then | |
8836 | . $TKCONFIG | |
8837 | fi | |
8838 | ||
8839 | ||
8840 | ||
8841 | ||
8842 | ||
8843 | ||
8844 | ||
8845 | ||
8846 | ||
8847 | ||
8848 | ||
8849 | ||
8850 | ||
8851 | ||
8852 | # | |
8853 | # Ok, lets find the tcl source trees so we can use the headers | |
8854 | # Warning: transition of version 9 to 10 will break this algorithm | |
8855 | # because 10 sorts before 9. We also look for just tcl. We have to | |
8856 | # be careful that we don't match stuff like tclX by accident. | |
8857 | # the alternative search directory is involked by --with-tclinclude | |
8858 | # | |
8859 | ||
8860 | no_tcl=true | |
8861 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
8dcde887 | 8862 | echo "configure:8863: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
8863 | # Check whether --with-tclinclude or --without-tclinclude was given. |
8864 | if test "${with_tclinclude+set}" = set; then | |
8865 | withval="$with_tclinclude" | |
8866 | with_tclinclude=${withval} | |
8867 | fi | |
8868 | ||
8869 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
8870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8871 | else | |
8872 | ||
8873 | # first check to see if --with-tclinclude was specified | |
8874 | if test x"${with_tclinclude}" != x ; then | |
8875 | if test -f ${with_tclinclude}/tclInt.h ; then | |
8876 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
8877 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
8878 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
8879 | else | |
8880 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
8881 | fi | |
8882 | fi | |
8883 | ||
8884 | # next check if it came with Tcl configuration file | |
8885 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8886 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
8887 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
8888 | fi | |
8889 | fi | |
8890 | ||
8891 | # next check in private source directory | |
8892 | # | |
8893 | # since ls returns lowest version numbers first, reverse its output | |
8894 | if test x"${ac_cv_c_tclh}" = x ; then | |
8895 | for i in \ | |
8896 | ${srcdir}/../tcl \ | |
8897 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
8898 | ${srcdir}/../../tcl \ | |
8899 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
8900 | ${srcdir}/../../../tcl \ | |
8901 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
8902 | if test -f $i/generic/tclInt.h ; then | |
8903 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8904 | break | |
8905 | fi | |
8906 | done | |
8907 | fi | |
8908 | # finally check in a few common install locations | |
8909 | # | |
8910 | # since ls returns lowest version numbers first, reverse its output | |
8911 | if test x"${ac_cv_c_tclh}" = x ; then | |
8912 | for i in \ | |
8913 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
8914 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
8915 | /usr/local/src/tcl \ | |
8916 | /usr/local/lib/tcl \ | |
8917 | ${prefix}/include ; do | |
8918 | if test -f $i/generic/tclInt.h ; then | |
8919 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8920 | break | |
8921 | fi | |
8922 | done | |
8923 | fi | |
8924 | # see if one is installed | |
8925 | if test x"${ac_cv_c_tclh}" = x ; then | |
8926 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
8927 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
8dcde887 | 8928 | echo "configure:8929: checking for tclInt.h" >&5 |
3fc11d3e JM |
8929 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
8930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8931 | else | |
8932 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 8933 | #line 8934 "configure" |
3fc11d3e JM |
8934 | #include "confdefs.h" |
8935 | #include <tclInt.h> | |
8936 | EOF | |
8937 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 8938 | { (eval echo configure:8939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
8939 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8940 | if test -z "$ac_err"; then | |
8941 | rm -rf conftest* | |
8942 | eval "ac_cv_header_$ac_safe=yes" | |
8943 | else | |
8944 | echo "$ac_err" >&5 | |
8945 | echo "configure: failed program was:" >&5 | |
8946 | cat conftest.$ac_ext >&5 | |
8947 | rm -rf conftest* | |
8948 | eval "ac_cv_header_$ac_safe=no" | |
8949 | fi | |
8950 | rm -f conftest* | |
8951 | fi | |
8952 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
8953 | echo "$ac_t""yes" 1>&6 | |
8954 | ac_cv_c_tclh=installed | |
8955 | else | |
8956 | echo "$ac_t""no" 1>&6 | |
8957 | ac_cv_c_tclh="" | |
8958 | fi | |
8959 | ||
8960 | fi | |
8961 | ||
8962 | fi | |
8963 | ||
8964 | if test x"${ac_cv_c_tclh}" = x ; then | |
8965 | TCLHDIR="# no Tcl private headers found" | |
8966 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
8967 | fi | |
8968 | if test x"${ac_cv_c_tclh}" != x ; then | |
8969 | no_tcl="" | |
8970 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
8971 | echo "$ac_t""is installed" 1>&6 | |
8972 | TCLHDIR="" | |
8973 | else | |
8974 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
8975 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
8976 | TCLHDIR="-I${ac_cv_c_tclh}" | |
8977 | fi | |
8978 | fi | |
8979 | ||
8980 | ||
8981 | ||
8982 | ||
8983 | # | |
8984 | # Ok, lets find the tk source trees so we can use the headers | |
8985 | # If the directory (presumably symlink) named "tk" exists, use that one | |
8986 | # in preference to any others. Same logic is used when choosing library | |
8987 | # and again with Tcl. The search order is the best place to look first, then in | |
8988 | # decreasing significance. The loop breaks if the trigger file is found. | |
8989 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
8990 | # directory. This converts the path from a relative to an absolute, so | |
8991 | # recursive cache variables for the path will work right. We check all | |
8992 | # the possible paths in one loop rather than many seperate loops to speed | |
8993 | # things up. | |
8994 | # the alternative search directory is involked by --with-tkinclude | |
8995 | # | |
8996 | no_tk=true | |
8997 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
8dcde887 | 8998 | echo "configure:8999: checking for Tk private headers" >&5 |
3fc11d3e JM |
8999 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9000 | if test "${with_tkinclude+set}" = set; then | |
9001 | withval="$with_tkinclude" | |
9002 | with_tkinclude=${withval} | |
9003 | fi | |
9004 | ||
9005 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9007 | else | |
9008 | ||
9009 | # first check to see if --with-tkinclude was specified | |
9010 | if test x"${with_tkinclude}" != x ; then | |
9011 | if test -f ${with_tkinclude}/tk.h ; then | |
9012 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9013 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9014 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9015 | else | |
9016 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9017 | fi | |
9018 | fi | |
9019 | ||
9020 | # next check if it came with Tk configuration file | |
9021 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9022 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9023 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9024 | fi | |
9025 | fi | |
9026 | ||
9027 | # next check in private source directory | |
9028 | # | |
9029 | # since ls returns lowest version numbers first, reverse its output | |
9030 | if test x"${ac_cv_c_tkh}" = x ; then | |
9031 | for i in \ | |
9032 | ${srcdir}/../tk \ | |
9033 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9034 | ${srcdir}/../../tk \ | |
9035 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9036 | ${srcdir}/../../../tk \ | |
9037 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9038 | if test -f $i/generic/tk.h ; then | |
9039 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9040 | break | |
9041 | fi | |
9042 | done | |
9043 | fi | |
9044 | # finally check in a few common install locations | |
9045 | # | |
9046 | # since ls returns lowest version numbers first, reverse its output | |
9047 | if test x"${ac_cv_c_tkh}" = x ; then | |
9048 | for i in \ | |
9049 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9050 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9051 | /usr/local/src/tk \ | |
9052 | /usr/local/lib/tk \ | |
9053 | ${prefix}/include ; do | |
9054 | if test -f $i/generic/tk.h ; then | |
9055 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9056 | break | |
9057 | fi | |
9058 | done | |
9059 | fi | |
9060 | # see if one is installed | |
9061 | if test x"${ac_cv_c_tkh}" = x ; then | |
9062 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9063 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
8dcde887 | 9064 | echo "configure:9065: checking for tk.h" >&5 |
3fc11d3e JM |
9065 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9067 | else | |
9068 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 9069 | #line 9070 "configure" |
3fc11d3e JM |
9070 | #include "confdefs.h" |
9071 | #include <tk.h> | |
9072 | EOF | |
9073 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 9074 | { (eval echo configure:9075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9075 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9076 | if test -z "$ac_err"; then | |
9077 | rm -rf conftest* | |
9078 | eval "ac_cv_header_$ac_safe=yes" | |
9079 | else | |
9080 | echo "$ac_err" >&5 | |
9081 | echo "configure: failed program was:" >&5 | |
9082 | cat conftest.$ac_ext >&5 | |
9083 | rm -rf conftest* | |
9084 | eval "ac_cv_header_$ac_safe=no" | |
9085 | fi | |
9086 | rm -f conftest* | |
9087 | fi | |
9088 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9089 | echo "$ac_t""yes" 1>&6 | |
9090 | ac_cv_c_tkh=installed | |
9091 | else | |
9092 | echo "$ac_t""no" 1>&6 | |
9093 | ac_cv_c_tkh="" | |
9094 | fi | |
9095 | ||
9096 | fi | |
9097 | ||
9098 | fi | |
9099 | ||
9100 | if test x"${ac_cv_c_tkh}" != x ; then | |
9101 | no_tk="" | |
9102 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9103 | echo "$ac_t""is installed" 1>&6 | |
9104 | TKHDIR="" | |
9105 | else | |
9106 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9107 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9108 | TKHDIR="-I${ac_cv_c_tkh}" | |
9109 | fi | |
9110 | else | |
9111 | TKHDIR="# no Tk directory found" | |
9112 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9113 | no_tk=true | |
9114 | fi | |
9115 | ||
9116 | ||
9117 | ||
9118 | ||
9119 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
8dcde887 | 9120 | echo "configure:9121: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9121 | if test x"${ac_cv_c_itclh}" = x ; then |
9122 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9123 | if test -f $i/generic/itcl.h ; then | |
9124 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9125 | break | |
9126 | fi | |
9127 | done | |
9128 | fi | |
9129 | if test x"${ac_cv_c_itclh}" = x ; then | |
9130 | ITCLHDIR="# no Itcl private headers found" | |
9131 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9132 | fi | |
9133 | if test x"${ac_cv_c_itclh}" != x ; then | |
9134 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9135 | fi | |
9136 | # should always be here | |
9137 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9138 | ||
9139 | #AC_SUBST(ITCLLIB) | |
9140 | ||
9141 | ||
9142 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
8dcde887 | 9143 | echo "configure:9144: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9144 | if test x"${ac_cv_c_itkh}" = x ; then |
9145 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9146 | if test -f $i/generic/itk.h ; then | |
9147 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9148 | break | |
9149 | fi | |
9150 | done | |
9151 | fi | |
9152 | if test x"${ac_cv_c_itkh}" = x ; then | |
9153 | ITKHDIR="# no Itk private headers found" | |
9154 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9155 | fi | |
9156 | if test x"${ac_cv_c_itkh}" != x ; then | |
9157 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9158 | fi | |
9159 | # should always be here | |
9160 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9161 | ||
9162 | #AC_SUBST(ITKLIB) | |
9163 | ||
3fc11d3e | 9164 | |
dd2504ab JM |
9165 | |
9166 | # now look for Tk library stuff | |
9167 | ||
9168 | case "${host}" in | |
9169 | *-*-cygwin*) | |
9170 | tkdir=../tk/win/ | |
9171 | ;; | |
9172 | *) | |
9173 | tkdir=../tk/unix/ | |
9174 | ;; | |
9175 | esac | |
9176 | ||
9177 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9178 | ||
3fc11d3e JM |
9179 | # now look for Itcl library stuff |
9180 | ||
9181 | ||
9182 | # | |
9183 | # Ok, lets find the itcl configuration | |
9184 | # First, look for one uninstalled. | |
9185 | # the alternative search directory is invoked by --with-itclconfig | |
9186 | # | |
9187 | ||
9188 | if test x"${no_itcl}" = x ; then | |
9189 | # we reset no_itcl in case something fails here | |
9190 | no_itcl=true | |
9191 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9192 | if test "${with_itclconfig+set}" = set; then | |
9193 | withval="$with_itclconfig" | |
9194 | with_itclconfig=${withval} | |
9195 | fi | |
9196 | ||
9197 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
8dcde887 | 9198 | echo "configure:9199: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9199 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9201 | else | |
9202 | ||
9203 | ||
9204 | # First check to see if --with-itclconfig was specified. | |
9205 | if test x"${with_itclconfig}" != x ; then | |
9206 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9207 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9208 | else | |
9209 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9210 | fi | |
9211 | fi | |
9212 | ||
9213 | # then check for a private Itcl library | |
9214 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9215 | for i in \ | |
9216 | ../itcl/itcl \ | |
9217 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9218 | ../../itcl \ | |
9219 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9220 | ../../../itcl \ | |
9221 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9222 | if test -f "$i/itclConfig.sh" ; then | |
9223 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9224 | break | |
9225 | fi | |
9226 | done | |
9227 | fi | |
9228 | # check in a few common install locations | |
9229 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9230 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9231 | if test -f "$i/itclConfig.sh" ; then | |
9232 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9233 | break | |
9234 | fi | |
9235 | done | |
9236 | fi | |
9237 | # check in a few other private locations | |
9238 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9239 | for i in \ | |
9240 | ${srcdir}/../itcl/itcl \ | |
9241 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9242 | if test -f "$i/itclConfig.sh" ; then | |
9243 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9244 | break | |
9245 | fi | |
9246 | done | |
9247 | fi | |
9248 | ||
9249 | fi | |
9250 | ||
9251 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9252 | ITCLCONFIG="# no Itcl configs found" | |
9253 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9254 | else | |
9255 | no_itcl= | |
9256 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9257 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9258 | fi | |
9259 | fi | |
9260 | ||
9261 | if test -z "${no_itcl}"; then | |
9262 | ||
9263 | if test -f "$ITCLCONFIG" ; then | |
9264 | . $ITCLCONFIG | |
9265 | fi | |
9266 | ||
9267 | ||
9268 | ||
9269 | ||
9270 | ||
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
3fc11d3e JM |
9276 | |
9277 | ||
9278 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9279 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9280 | fi |
9281 | ||
9282 | ||
9283 | # now look for Itk library stuff | |
9284 | ||
9285 | # | |
9286 | # Ok, lets find the itk configuration | |
9287 | # First, look for one uninstalled. | |
9288 | # the alternative search directory is invoked by --with-itkconfig | |
9289 | # | |
9290 | ||
9291 | if test x"${no_itk}" = x ; then | |
9292 | # we reset no_itk in case something fails here | |
9293 | no_itk=true | |
9294 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9295 | if test "${with_itkconfig+set}" = set; then | |
9296 | withval="$with_itkconfig" | |
9297 | with_itkconfig=${withval} | |
9298 | fi | |
9299 | ||
9300 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
8dcde887 | 9301 | echo "configure:9302: checking for Itk configuration" >&5 |
3fc11d3e JM |
9302 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9304 | else | |
9305 | ||
9306 | ||
9307 | # First check to see if --with-itkconfig was specified. | |
9308 | if test x"${with_itkconfig}" != x ; then | |
9309 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9310 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9311 | else | |
9312 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9313 | fi | |
9314 | fi | |
9315 | ||
9316 | # then check for a private Itk library | |
9317 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9318 | for i in \ | |
9319 | ../itcl/itk \ | |
9320 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9321 | ../../itk \ | |
9322 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9323 | ../../../itk \ | |
9324 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9325 | if test -f "$i/itkConfig.sh" ; then | |
9326 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9327 | break | |
9328 | fi | |
9329 | done | |
9330 | fi | |
9331 | # check in a few common install locations | |
9332 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9333 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9334 | if test -f "$i/itkConfig.sh" ; then | |
9335 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9336 | break | |
9337 | fi | |
9338 | done | |
9339 | fi | |
9340 | # check in a few other private locations | |
9341 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9342 | for i in \ | |
9343 | ${srcdir}/../itcl/itk \ | |
9344 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9345 | if test -f "$i/itkConfig.sh" ; then | |
9346 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9347 | break | |
9348 | fi | |
9349 | done | |
9350 | fi | |
9351 | ||
9352 | fi | |
9353 | ||
9354 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9355 | ITKCONFIG="# no Itk configs found" | |
9356 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9357 | else | |
9358 | no_itk= | |
9359 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9360 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9361 | fi | |
9362 | fi | |
9363 | ||
9364 | ||
9365 | if test -z "${no_itcl}"; then | |
9366 | ||
9367 | if test -f "$ITKCONFIG" ; then | |
9368 | . $ITKCONFIG | |
9369 | fi | |
9370 | ||
9371 | ||
9372 | ||
9373 | ||
9374 | ||
9375 | ||
9376 | ||
9377 | ||
9378 | ||
9379 | ||
9380 | ||
9381 | ||
3fc11d3e | 9382 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9383 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9384 | fi |
9385 | ||
4226a5a5 | 9386 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9387 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9388 | # know whether 8.2 will or not, but I bet it will. | |
9389 | # I don't have to worry about 7.x since we don't support it. | |
9390 | GDBTK_CFLAGS="" | |
9391 | if test "$GCC" = "yes"; then | |
9392 | if test "$TCL_VERSION" != "8.0" ; then | |
9393 | GDBTK_CFLAGS="-fwritable-strings" | |
9394 | fi | |
9395 | fi | |
9396 | ||
9397 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9398 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9399 | # Yes, the ordering seems wrong here. But it isn't. |
9400 | # TK_LIBS is the list of libraries that need to be linked | |
9401 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9402 | # were in LIBS then any link tests after this point would | |
9403 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9404 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9405 | |
9406 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9407 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9408 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9409 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9410 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9411 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9412 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9413 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9414 | |
9415 | if test x$gdb_cv_os_cygwin = xyes; then | |
9416 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9417 | WIN32LDAPP="-Wl,--subsystem,console" | |
9418 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9419 | fi | |
9420 | fi | |
9421 | fi | |
ffc6a242 | 9422 | |
ffc6a242 | 9423 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9424 | fi |
9425 | ||
9426 | ||
9427 | ||
9428 | ||
9429 | ||
9430 | ||
9431 | ||
9432 | ||
9433 | ||
9434 | ||
9435 | ||
9436 | ||
9437 | ||
dd2504ab | 9438 | |
c906108c SS |
9439 | # If we find X, set shell vars x_includes and x_libraries to the |
9440 | # paths, otherwise set no_x=yes. | |
9441 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9442 | # --without-x overrides everything else, but does not touch the cache. | |
9443 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
8dcde887 | 9444 | echo "configure:9445: checking for X" >&5 |
c906108c SS |
9445 | |
9446 | # Check whether --with-x or --without-x was given. | |
9447 | if test "${with_x+set}" = set; then | |
9448 | withval="$with_x" | |
9449 | : | |
9450 | fi | |
9451 | ||
9452 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9453 | if test "x$with_x" = xno; then | |
9454 | # The user explicitly disabled X. | |
9455 | have_x=disabled | |
9456 | else | |
9457 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9458 | # Both variables are already set. | |
9459 | have_x=yes | |
9460 | else | |
9461 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9463 | else | |
9464 | # One or both of the vars are not set, and there is no cached value. | |
9465 | ac_x_includes=NO ac_x_libraries=NO | |
9466 | rm -fr conftestdir | |
9467 | if mkdir conftestdir; then | |
9468 | cd conftestdir | |
9469 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9470 | cat > Imakefile <<'EOF' | |
9471 | acfindx: | |
9472 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9473 | EOF | |
9474 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9475 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9476 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9477 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9478 | for ac_extension in a so sl; do | |
9479 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9480 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9481 | ac_im_usrlibdir=$ac_im_libdir; break | |
9482 | fi | |
9483 | done | |
9484 | # Screen out bogus values from the imake configuration. They are | |
9485 | # bogus both because they are the default anyway, and because | |
9486 | # using them would break gcc on systems where it needs fixed includes. | |
9487 | case "$ac_im_incroot" in | |
9488 | /usr/include) ;; | |
9489 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9490 | esac | |
9491 | case "$ac_im_usrlibdir" in | |
9492 | /usr/lib | /lib) ;; | |
9493 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9494 | esac | |
9495 | fi | |
9496 | cd .. | |
9497 | rm -fr conftestdir | |
9498 | fi | |
9499 | ||
9500 | if test "$ac_x_includes" = NO; then | |
9501 | # Guess where to find include files, by looking for this one X11 .h file. | |
9502 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9503 | ||
9504 | # First, try using that file with no special directory specified. | |
9505 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 9506 | #line 9507 "configure" |
c906108c SS |
9507 | #include "confdefs.h" |
9508 | #include <$x_direct_test_include> | |
9509 | EOF | |
9510 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8dcde887 | 9511 | { (eval echo configure:9512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9512 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9513 | if test -z "$ac_err"; then | |
9514 | rm -rf conftest* | |
9515 | # We can compile using X headers with no special include directory. | |
9516 | ac_x_includes= | |
9517 | else | |
9518 | echo "$ac_err" >&5 | |
9519 | echo "configure: failed program was:" >&5 | |
9520 | cat conftest.$ac_ext >&5 | |
9521 | rm -rf conftest* | |
9522 | # Look for the header file in a standard set of common directories. | |
9523 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9524 | for ac_dir in \ | |
9525 | /usr/X11/include \ | |
9526 | /usr/X11R6/include \ | |
9527 | /usr/X11R5/include \ | |
9528 | /usr/X11R4/include \ | |
9529 | \ | |
9530 | /usr/include/X11 \ | |
9531 | /usr/include/X11R6 \ | |
9532 | /usr/include/X11R5 \ | |
9533 | /usr/include/X11R4 \ | |
9534 | \ | |
9535 | /usr/local/X11/include \ | |
9536 | /usr/local/X11R6/include \ | |
9537 | /usr/local/X11R5/include \ | |
9538 | /usr/local/X11R4/include \ | |
9539 | \ | |
9540 | /usr/local/include/X11 \ | |
9541 | /usr/local/include/X11R6 \ | |
9542 | /usr/local/include/X11R5 \ | |
9543 | /usr/local/include/X11R4 \ | |
9544 | \ | |
9545 | /usr/X386/include \ | |
9546 | /usr/x386/include \ | |
9547 | /usr/XFree86/include/X11 \ | |
9548 | \ | |
9549 | /usr/include \ | |
9550 | /usr/local/include \ | |
9551 | /usr/unsupported/include \ | |
9552 | /usr/athena/include \ | |
9553 | /usr/local/x11r5/include \ | |
9554 | /usr/lpp/Xamples/include \ | |
9555 | \ | |
9556 | /usr/openwin/include \ | |
9557 | /usr/openwin/share/include \ | |
9558 | ; \ | |
9559 | do | |
9560 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9561 | ac_x_includes=$ac_dir | |
9562 | break | |
9563 | fi | |
9564 | done | |
9565 | fi | |
9566 | rm -f conftest* | |
9567 | fi # $ac_x_includes = NO | |
9568 | ||
9569 | if test "$ac_x_libraries" = NO; then | |
9570 | # Check for the libraries. | |
9571 | ||
9572 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9573 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9574 | ||
9575 | # See if we find them without any special options. | |
9576 | # Don't add to $LIBS permanently. | |
9577 | ac_save_LIBS="$LIBS" | |
9578 | LIBS="-l$x_direct_test_library $LIBS" | |
9579 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 9580 | #line 9581 "configure" |
c906108c SS |
9581 | #include "confdefs.h" |
9582 | ||
9583 | int main() { | |
9584 | ${x_direct_test_function}() | |
9585 | ; return 0; } | |
9586 | EOF | |
8dcde887 | 9587 | if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9588 | rm -rf conftest* |
9589 | LIBS="$ac_save_LIBS" | |
9590 | # We can link X programs with no special library path. | |
9591 | ac_x_libraries= | |
9592 | else | |
9593 | echo "configure: failed program was:" >&5 | |
9594 | cat conftest.$ac_ext >&5 | |
9595 | rm -rf conftest* | |
9596 | LIBS="$ac_save_LIBS" | |
9597 | # First see if replacing the include by lib works. | |
9598 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9599 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9600 | /usr/X11/lib \ | |
9601 | /usr/X11R6/lib \ | |
9602 | /usr/X11R5/lib \ | |
9603 | /usr/X11R4/lib \ | |
9604 | \ | |
9605 | /usr/lib/X11 \ | |
9606 | /usr/lib/X11R6 \ | |
9607 | /usr/lib/X11R5 \ | |
9608 | /usr/lib/X11R4 \ | |
9609 | \ | |
9610 | /usr/local/X11/lib \ | |
9611 | /usr/local/X11R6/lib \ | |
9612 | /usr/local/X11R5/lib \ | |
9613 | /usr/local/X11R4/lib \ | |
9614 | \ | |
9615 | /usr/local/lib/X11 \ | |
9616 | /usr/local/lib/X11R6 \ | |
9617 | /usr/local/lib/X11R5 \ | |
9618 | /usr/local/lib/X11R4 \ | |
9619 | \ | |
9620 | /usr/X386/lib \ | |
9621 | /usr/x386/lib \ | |
9622 | /usr/XFree86/lib/X11 \ | |
9623 | \ | |
9624 | /usr/lib \ | |
9625 | /usr/local/lib \ | |
9626 | /usr/unsupported/lib \ | |
9627 | /usr/athena/lib \ | |
9628 | /usr/local/x11r5/lib \ | |
9629 | /usr/lpp/Xamples/lib \ | |
9630 | /lib/usr/lib/X11 \ | |
9631 | \ | |
9632 | /usr/openwin/lib \ | |
9633 | /usr/openwin/share/lib \ | |
9634 | ; \ | |
9635 | do | |
9636 | for ac_extension in a so sl; do | |
9637 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9638 | ac_x_libraries=$ac_dir | |
9639 | break 2 | |
9640 | fi | |
9641 | done | |
9642 | done | |
9643 | fi | |
9644 | rm -f conftest* | |
9645 | fi # $ac_x_libraries = NO | |
9646 | ||
9647 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9648 | # Didn't find X anywhere. Cache the known absence of X. | |
9649 | ac_cv_have_x="have_x=no" | |
9650 | else | |
9651 | # Record where we found X for the cache. | |
9652 | ac_cv_have_x="have_x=yes \ | |
9653 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9654 | fi | |
9655 | fi | |
9656 | fi | |
9657 | eval "$ac_cv_have_x" | |
9658 | fi # $with_x != no | |
9659 | ||
9660 | if test "$have_x" != yes; then | |
9661 | echo "$ac_t""$have_x" 1>&6 | |
9662 | no_x=yes | |
9663 | else | |
9664 | # If each of the values was on the command line, it overrides each guess. | |
9665 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9666 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9667 | # Update the cache value to reflect the command line values. | |
9668 | ac_cv_have_x="have_x=yes \ | |
9669 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9670 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9671 | fi | |
9672 | ||
9673 | ||
7a292a7a SS |
9674 | |
9675 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9676 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9677 | # This code just checks for a few cases where we'd like to ignore those | |
9678 | # definitions, even when they're present in the '.mt' file. These cases | |
9679 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9680 | # not part of the source tree. |
7a292a7a SS |
9681 | # |
9682 | # Check whether --enable-sim or --disable-sim was given. | |
9683 | if test "${enable_sim+set}" = set; then | |
9684 | enableval="$enable_sim" | |
9685 | echo "enable_sim = $enable_sim"; | |
9686 | echo "enableval = ${enableval}"; | |
9687 | case "${enableval}" in | |
9688 | yes) ignore_sim=false ;; | |
9689 | no) ignore_sim=true ;; | |
9690 | *) ignore_sim=false ;; | |
9691 | esac | |
9692 | else | |
9693 | ignore_sim=false | |
9694 | fi | |
9695 | ||
9696 | ||
9697 | if test ! -d "${srcdir}/../sim"; then | |
9698 | ignore_sim=true | |
9699 | fi | |
9700 | ||
9701 | if test "${ignore_sim}" = "true"; then | |
9702 | IGNORE_SIM="SIM=" | |
9703 | IGNORE_SIM_OBS="SIM_OBS=" | |
9704 | else | |
9705 | IGNORE_SIM="" | |
9706 | IGNORE_SIM_OBS="" | |
9707 | cat >> confdefs.h <<\EOF | |
9708 | #define WITH_SIM 1 | |
9709 | EOF | |
9710 | ||
9711 | fi | |
9712 | ||
9713 | ||
9714 | ||
c906108c SS |
9715 | |
9716 | ||
9717 | ||
9718 | ||
9719 | ||
9720 | ||
dfcd3bfb | 9721 | |
e56ac5c3 AC |
9722 | |
9723 | ||
b3a90332 AC |
9724 | |
9725 | ||
b46cd165 | 9726 | |
c906108c SS |
9727 | # Begin stuff to support --enable-shared |
9728 | # Check whether --enable-shared or --disable-shared was given. | |
9729 | if test "${enable_shared+set}" = set; then | |
9730 | enableval="$enable_shared" | |
9731 | case "${enableval}" in | |
9732 | yes) shared=true ;; | |
9733 | no) shared=false ;; | |
9734 | *) shared=true ;; | |
9735 | esac | |
9736 | fi | |
9737 | ||
9738 | HLDFLAGS= | |
9739 | HLDENV= | |
9740 | # If we have shared libraries, try to set rpath reasonably. | |
9741 | if test "${shared}" = "true"; then | |
9742 | case "${host}" in | |
9743 | *-*-hpux*) | |
9744 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
9745 | ;; | |
9746 | *-*-irix5* | *-*-irix6*) | |
9747 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
9748 | ;; | |
9749 | *-*-linux*aout*) | |
9750 | ;; | |
88987551 | 9751 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
9752 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
9753 | ;; | |
9754 | *-*-solaris*) | |
9755 | HLDFLAGS='-R $(libdir)' | |
9756 | ;; | |
9757 | *-*-sysv4*) | |
9758 | 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;' | |
9759 | ;; | |
9760 | esac | |
9761 | fi | |
9762 | ||
9763 | # On SunOS, if the linker supports the -rpath option, use it to | |
9764 | # prevent ../bfd and ../opcodes from being included in the run time | |
9765 | # search path. | |
9766 | case "${host}" in | |
9767 | *-*-sunos*) | |
9768 | echo 'main () { }' > conftest.c | |
9769 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
9770 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
9771 | : | |
9772 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
9773 | : | |
9774 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
9775 | : | |
9776 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
9777 | : | |
9778 | elif test "${shared}" = "true"; then | |
9779 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
9780 | else | |
9781 | HLDFLAGS='-Wl,-rpath=' | |
9782 | fi | |
9783 | rm -f conftest.t conftest.c conftest | |
9784 | ;; | |
9785 | esac | |
9786 | ||
9787 | ||
9788 | # End stuff to support --enable-shared | |
9789 | ||
9790 | # target_subdir is used by the testsuite to find the target libraries. | |
9791 | target_subdir= | |
9792 | if test "${host}" != "${target}"; then | |
9793 | target_subdir="${target_alias}/" | |
9794 | fi | |
9795 | ||
9796 | ||
9797 | frags= | |
9798 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9799 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9800 | # When building a native debuger the .mh file containing things |
9801 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9802 | # since it no longer contains anything useful. | |
9803 | if test "${target}" = "${host}"; then | |
9804 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9805 | else | |
9806 | host_makefile_frag=/dev/null | |
9807 | fi | |
c906108c SS |
9808 | fi |
9809 | frags="$frags $host_makefile_frag" | |
9810 | ||
9811 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9812 | if test ! -f ${target_makefile_frag}; then | |
9813 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9814 | fi | |
9815 | frags="$frags $target_makefile_frag" | |
9816 | ||
9817 | ||
9818 | ||
9819 | ||
9820 | ||
9821 | hostfile=`sed -n ' | |
9822 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9823 | ' ${host_makefile_frag}` | |
9824 | ||
9825 | targetfile=`sed -n ' | |
9826 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9827 | ' ${target_makefile_frag}` | |
9828 | ||
6166d547 AC |
9829 | GDB_MULTI_ARCH=`sed -n ' |
9830 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9831 | ' ${target_makefile_frag}` | |
9832 | ||
c906108c | 9833 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9834 | # We pick this up from the host configuration file (.mh) because we |
9835 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9836 | nativefile=`sed -n ' |
9837 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9838 | ' ${host_makefile_frag}` | |
c906108c SS |
9839 | fi |
9840 | ||
9841 | ||
6166d547 AC |
9842 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9843 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9844 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9845 | # will be the default. | |
9846 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9847 | case "${gdb_multi_arch}" in | |
9848 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9849 | no ) GDB_MULTI_ARCH=0 ;; | |
9850 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9851 | esac | |
9852 | fi | |
9853 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9854 | cat >> confdefs.h <<EOF | |
9855 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9856 | EOF | |
9857 | ||
9858 | fi | |
6c5cfe5b | 9859 | # Warn the user when they use an old practice |
6166d547 AC |
9860 | case "${GDB_MULTI_ARCH}" in |
9861 | "" ) ;; | |
9862 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
9863 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
9864 | GDB_MULTI_ARCH_PURE ) | |
9865 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 9866 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 9867 | targetfile="" |
6166d547 AC |
9868 | fi ;; |
9869 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
9870 | esac | |
9871 | ||
8dcde887 MK |
9872 | # Enable multi-ice-gdb-server. |
9873 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
9874 | if test "${enable_multi_ice+set}" = set; then | |
9875 | enableval="$enable_multi_ice" | |
9876 | case $enableval in | |
9877 | yes | no) | |
9878 | ;; | |
9879 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
9880 | esac | |
96baa820 JM |
9881 | fi |
9882 | ||
8dcde887 MK |
9883 | if test "x$enable_multi_ice" = xyes; then |
9884 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
9885 | fi |
9886 | ||
8dcde887 MK |
9887 | # We only build gdbserver automatically if host and target are the same. |
9888 | if test "x$target" = "x$host"; then | |
9889 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
9890 | echo "configure:9891: checking whether gdbserver is supported on this host" >&5 | |
9891 | if test "x$build_gdbserver" = xyes; then | |
9892 | configdirs="$configdirs gdbserver" | |
9893 | echo "$ac_t""yes" 1>&6 | |
9894 | else | |
9895 | echo "$ac_t""no" 1>&6 | |
9896 | fi | |
9897 | fi | |
9898 | ||
9899 | subdirs="doc testsuite $configdirs" | |
9900 | ||
9901 | SUBDIRS=$subdirs | |
96baa820 JM |
9902 | |
9903 | ||
c906108c | 9904 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
9905 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
9906 | # version. | |
c906108c SS |
9907 | |
9908 | files= | |
9909 | links= | |
5a2402b8 | 9910 | |
c906108c | 9911 | rm -f xm.h |
5a2402b8 | 9912 | xm_h="" |
c906108c | 9913 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
9914 | xm_h=xm.h |
9915 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
9916 | files="${files} ${GDB_XM_FILE}" | |
9917 | links="${links} xm.h" | |
9918 | cat >> confdefs.h <<EOF | |
9919 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
9920 | EOF | |
9921 | ||
c906108c | 9922 | fi |
5a2402b8 AC |
9923 | |
9924 | ||
c906108c | 9925 | rm -f tm.h |
5a2402b8 | 9926 | tm_h="" |
c906108c | 9927 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
9928 | tm_h=tm.h |
9929 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
9930 | files="${files} ${GDB_TM_FILE}" | |
9931 | links="${links} tm.h" | |
9932 | cat >> confdefs.h <<EOF | |
9933 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
9934 | EOF | |
9935 | ||
c906108c | 9936 | fi |
5a2402b8 AC |
9937 | |
9938 | ||
c906108c | 9939 | rm -f nm.h |
5a2402b8 | 9940 | nm_h="" |
c906108c | 9941 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
9942 | nm_h=nm.h |
9943 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
9944 | files="${files} ${GDB_NM_FILE}" | |
9945 | links="${links} nm.h" | |
9946 | cat >> confdefs.h <<EOF | |
9947 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
9948 | EOF | |
9949 | ||
c906108c | 9950 | fi |
5a2402b8 AC |
9951 | |
9952 | ||
c906108c SS |
9953 | |
9954 | ||
9955 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
8dcde887 | 9956 | echo "configure:9957: checking for Cygwin environment" >&5 |
c906108c SS |
9957 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
9958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9959 | else | |
9960 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 9961 | #line 9962 "configure" |
c906108c SS |
9962 | #include "confdefs.h" |
9963 | ||
9964 | int main() { | |
9965 | ||
9966 | #ifndef __CYGWIN__ | |
9967 | #define __CYGWIN__ __CYGWIN32__ | |
9968 | #endif | |
9969 | return __CYGWIN__; | |
9970 | ; return 0; } | |
9971 | EOF | |
8dcde887 | 9972 | if { (eval echo configure:9973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9973 | rm -rf conftest* |
9974 | ac_cv_cygwin=yes | |
9975 | else | |
9976 | echo "configure: failed program was:" >&5 | |
9977 | cat conftest.$ac_ext >&5 | |
9978 | rm -rf conftest* | |
9979 | ac_cv_cygwin=no | |
9980 | fi | |
9981 | rm -f conftest* | |
9982 | rm -f conftest* | |
9983 | fi | |
9984 | ||
9985 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
9986 | CYGWIN= | |
9987 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
9988 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
8dcde887 | 9989 | echo "configure:9990: checking for mingw32 environment" >&5 |
c906108c SS |
9990 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
9991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9992 | else | |
9993 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 9994 | #line 9995 "configure" |
c906108c SS |
9995 | #include "confdefs.h" |
9996 | ||
9997 | int main() { | |
9998 | return __MINGW32__; | |
9999 | ; return 0; } | |
10000 | EOF | |
8dcde887 | 10001 | if { (eval echo configure:10002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10002 | rm -rf conftest* |
10003 | ac_cv_mingw32=yes | |
10004 | else | |
10005 | echo "configure: failed program was:" >&5 | |
10006 | cat conftest.$ac_ext >&5 | |
10007 | rm -rf conftest* | |
10008 | ac_cv_mingw32=no | |
10009 | fi | |
10010 | rm -f conftest* | |
10011 | rm -f conftest* | |
10012 | fi | |
10013 | ||
10014 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10015 | MINGW32= | |
10016 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10017 | ||
10018 | ||
10019 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
8dcde887 | 10020 | echo "configure:10021: checking for executable suffix" >&5 |
c906108c SS |
10021 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10022 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10023 | else | |
10024 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10025 | ac_cv_exeext=.exe | |
10026 | else | |
10027 | rm -f conftest* | |
10028 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10029 | ac_cv_exeext= | |
8dcde887 | 10030 | if { (eval echo configure:10031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10031 | for file in conftest.*; do |
10032 | case $file in | |
9608ab8b | 10033 | *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10034 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10035 | esac | |
10036 | done | |
10037 | else | |
10038 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10039 | fi | |
10040 | rm -f conftest* | |
10041 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10042 | fi | |
10043 | fi | |
10044 | ||
10045 | EXEEXT="" | |
10046 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10047 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10048 | ac_exeext=$EXEEXT | |
10049 | ||
10050 | ||
234b45d4 KB |
10051 | |
10052 | cat >> confdefs.h <<\EOF | |
10053 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10054 | EOF | |
10055 | ||
10056 | ||
10057 | ||
10058 | ||
10059 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10060 | if test "${with_libiconv_prefix+set}" = set; then | |
10061 | withval="$with_libiconv_prefix" | |
10062 | ||
10063 | for dir in `echo "$withval" | tr : ' '`; do | |
10064 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10065 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10066 | done | |
10067 | ||
10068 | fi | |
10069 | ||
10070 | ||
10071 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
8dcde887 | 10072 | echo "configure:10073: checking for iconv" >&5 |
234b45d4 KB |
10073 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10074 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10075 | else | |
10076 | ||
10077 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10078 | am_cv_lib_iconv=no | |
10079 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 10080 | #line 10081 "configure" |
234b45d4 KB |
10081 | #include "confdefs.h" |
10082 | #include <stdlib.h> | |
10083 | #include <iconv.h> | |
10084 | int main() { | |
10085 | iconv_t cd = iconv_open("",""); | |
10086 | iconv(cd,NULL,NULL,NULL,NULL); | |
10087 | iconv_close(cd); | |
10088 | ; return 0; } | |
10089 | EOF | |
8dcde887 | 10090 | if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10091 | rm -rf conftest* |
10092 | am_cv_func_iconv=yes | |
10093 | else | |
10094 | echo "configure: failed program was:" >&5 | |
10095 | cat conftest.$ac_ext >&5 | |
10096 | fi | |
10097 | rm -f conftest* | |
10098 | if test "$am_cv_func_iconv" != yes; then | |
10099 | am_save_LIBS="$LIBS" | |
10100 | LIBS="$LIBS -liconv" | |
10101 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 10102 | #line 10103 "configure" |
234b45d4 KB |
10103 | #include "confdefs.h" |
10104 | #include <stdlib.h> | |
10105 | #include <iconv.h> | |
10106 | int main() { | |
10107 | iconv_t cd = iconv_open("",""); | |
10108 | iconv(cd,NULL,NULL,NULL,NULL); | |
10109 | iconv_close(cd); | |
10110 | ; return 0; } | |
10111 | EOF | |
8dcde887 | 10112 | if { (eval echo configure:10113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10113 | rm -rf conftest* |
10114 | am_cv_lib_iconv=yes | |
10115 | am_cv_func_iconv=yes | |
10116 | else | |
10117 | echo "configure: failed program was:" >&5 | |
10118 | cat conftest.$ac_ext >&5 | |
10119 | fi | |
10120 | rm -f conftest* | |
10121 | LIBS="$am_save_LIBS" | |
10122 | fi | |
10123 | ||
10124 | fi | |
10125 | ||
10126 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10127 | if test "$am_cv_func_iconv" = yes; then | |
10128 | cat >> confdefs.h <<\EOF | |
10129 | #define HAVE_ICONV 1 | |
10130 | EOF | |
10131 | ||
10132 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
8dcde887 | 10133 | echo "configure:10134: checking for iconv declaration" >&5 |
234b45d4 KB |
10134 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10136 | else | |
10137 | ||
10138 | cat > conftest.$ac_ext <<EOF | |
8dcde887 | 10139 | #line 10140 "configure" |
234b45d4 KB |
10140 | #include "confdefs.h" |
10141 | ||
10142 | #include <stdlib.h> | |
10143 | #include <iconv.h> | |
10144 | extern | |
10145 | #ifdef __cplusplus | |
10146 | "C" | |
10147 | #endif | |
10148 | #if defined(__STDC__) || defined(__cplusplus) | |
10149 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10150 | #else | |
10151 | size_t iconv(); | |
10152 | #endif | |
10153 | ||
10154 | int main() { | |
10155 | ||
10156 | ; return 0; } | |
10157 | EOF | |
8dcde887 | 10158 | if { (eval echo configure:10159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10159 | rm -rf conftest* |
10160 | am_cv_proto_iconv_arg1="" | |
10161 | else | |
10162 | echo "configure: failed program was:" >&5 | |
10163 | cat conftest.$ac_ext >&5 | |
10164 | rm -rf conftest* | |
10165 | am_cv_proto_iconv_arg1="const" | |
10166 | fi | |
10167 | rm -f conftest* | |
10168 | 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);" | |
10169 | fi | |
10170 | ||
10171 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10172 | echo "$ac_t""${ac_t:- | |
10173 | }$am_cv_proto_iconv" 1>&6 | |
10174 | cat >> confdefs.h <<EOF | |
10175 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10176 | EOF | |
10177 | ||
10178 | fi | |
10179 | LIBICONV= | |
10180 | if test "$am_cv_lib_iconv" = yes; then | |
10181 | LIBICONV="-liconv" | |
10182 | fi | |
10183 | ||
10184 | ||
10185 | ||
c906108c SS |
10186 | trap '' 1 2 15 |
10187 | cat > confcache <<\EOF | |
10188 | # This file is a shell script that caches the results of configure | |
10189 | # tests run on this system so they can be shared between configure | |
10190 | # scripts and configure runs. It is not useful on other systems. | |
10191 | # If it contains results you don't want to keep, you may remove or edit it. | |
10192 | # | |
10193 | # By default, configure uses ./config.cache as the cache file, | |
10194 | # creating it if it does not exist already. You can give configure | |
10195 | # the --cache-file=FILE option to use a different cache file; that is | |
10196 | # what configure does when it calls configure scripts in | |
10197 | # subdirectories, so they share the cache. | |
10198 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10199 | # config.status only pays attention to the cache file if you give it the | |
10200 | # --recheck option to rerun configure. | |
10201 | # | |
10202 | EOF | |
10203 | # The following way of writing the cache mishandles newlines in values, | |
10204 | # but we know of no workaround that is simple, portable, and efficient. | |
10205 | # So, don't put newlines in cache variables' values. | |
10206 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10207 | # and sets the high bit in the cache file unless we assign to the vars. | |
10208 | (set) 2>&1 | | |
10209 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10210 | *ac_space=\ *) | |
10211 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10212 | # turns \\\\ into \\, and sed turns \\ into \). | |
10213 | sed -n \ | |
10214 | -e "s/'/'\\\\''/g" \ | |
10215 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10216 | ;; | |
10217 | *) | |
10218 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10219 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10220 | ;; | |
10221 | esac >> confcache | |
10222 | if cmp -s $cache_file confcache; then | |
10223 | : | |
10224 | else | |
10225 | if test -w $cache_file; then | |
10226 | echo "updating cache $cache_file" | |
10227 | cat confcache > $cache_file | |
10228 | else | |
10229 | echo "not updating unwritable cache $cache_file" | |
10230 | fi | |
10231 | fi | |
10232 | rm -f confcache | |
10233 | ||
10234 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10235 | ||
10236 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10237 | # Let make expand exec_prefix. | |
10238 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10239 | ||
10240 | # Any assignment to VPATH causes Sun make to only execute | |
10241 | # the first set of double-colon rules, so remove it if not needed. | |
10242 | # If there is a colon in the path, we need to keep it. | |
10243 | if test "x$srcdir" = x.; then | |
10244 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10245 | fi | |
10246 | ||
10247 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10248 | ||
10249 | DEFS=-DHAVE_CONFIG_H | |
10250 | ||
10251 | # Without the "./", some shells look in PATH for config.status. | |
10252 | : ${CONFIG_STATUS=./config.status} | |
10253 | ||
10254 | echo creating $CONFIG_STATUS | |
10255 | rm -f $CONFIG_STATUS | |
10256 | cat > $CONFIG_STATUS <<EOF | |
10257 | #! /bin/sh | |
10258 | # Generated automatically by configure. | |
10259 | # Run this file to recreate the current configuration. | |
10260 | # This directory was configured as follows, | |
10261 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10262 | # | |
10263 | # $0 $ac_configure_args | |
10264 | # | |
10265 | # Compiler output produced by configure, useful for debugging | |
10266 | # configure, is in ./config.log if it exists. | |
10267 | ||
10268 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10269 | for ac_option | |
10270 | do | |
10271 | case "\$ac_option" in | |
10272 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10273 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10274 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10275 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10276 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10277 | exit 0 ;; | |
10278 | -help | --help | --hel | --he | --h) | |
10279 | echo "\$ac_cs_usage"; exit 0 ;; | |
10280 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10281 | esac | |
10282 | done | |
10283 | ||
10284 | ac_given_srcdir=$srcdir | |
10285 | ac_given_INSTALL="$INSTALL" | |
10286 | ||
ed952ac5 | 10287 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10288 | EOF |
10289 | cat >> $CONFIG_STATUS <<EOF | |
10290 | ||
10291 | # Protect against being on the right side of a sed subst in config.status. | |
10292 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10293 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10294 | $ac_vpsub | |
10295 | $extrasub | |
10296 | s%@SHELL@%$SHELL%g | |
10297 | s%@CFLAGS@%$CFLAGS%g | |
10298 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10299 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10300 | s%@FFLAGS@%$FFLAGS%g | |
10301 | s%@DEFS@%$DEFS%g | |
10302 | s%@LDFLAGS@%$LDFLAGS%g | |
10303 | s%@LIBS@%$LIBS%g | |
10304 | s%@exec_prefix@%$exec_prefix%g | |
10305 | s%@prefix@%$prefix%g | |
10306 | s%@program_transform_name@%$program_transform_name%g | |
10307 | s%@bindir@%$bindir%g | |
10308 | s%@sbindir@%$sbindir%g | |
10309 | s%@libexecdir@%$libexecdir%g | |
10310 | s%@datadir@%$datadir%g | |
10311 | s%@sysconfdir@%$sysconfdir%g | |
10312 | s%@sharedstatedir@%$sharedstatedir%g | |
10313 | s%@localstatedir@%$localstatedir%g | |
10314 | s%@libdir@%$libdir%g | |
10315 | s%@includedir@%$includedir%g | |
10316 | s%@oldincludedir@%$oldincludedir%g | |
10317 | s%@infodir@%$infodir%g | |
10318 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10319 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10320 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10321 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10322 | s%@CC@%$CC%g |
10323 | s%@CPP@%$CPP%g | |
10324 | s%@host@%$host%g | |
10325 | s%@host_alias@%$host_alias%g | |
10326 | s%@host_cpu@%$host_cpu%g | |
10327 | s%@host_vendor@%$host_vendor%g | |
10328 | s%@host_os@%$host_os%g | |
10329 | s%@target@%$target%g | |
10330 | s%@target_alias@%$target_alias%g | |
10331 | s%@target_cpu@%$target_cpu%g | |
10332 | s%@target_vendor@%$target_vendor%g | |
10333 | s%@target_os@%$target_os%g | |
10334 | s%@build@%$build%g | |
10335 | s%@build_alias@%$build_alias%g | |
10336 | s%@build_cpu@%$build_cpu%g | |
10337 | s%@build_vendor@%$build_vendor%g | |
10338 | s%@build_os@%$build_os%g | |
c906108c | 10339 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10340 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10341 | s%@ALLOCA@%$ALLOCA%g |
10342 | s%@USE_NLS@%$USE_NLS%g | |
10343 | s%@MSGFMT@%$MSGFMT%g | |
10344 | s%@GMSGFMT@%$GMSGFMT%g | |
10345 | s%@XGETTEXT@%$XGETTEXT%g | |
10346 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10347 | s%@CATALOGS@%$CATALOGS%g | |
10348 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10349 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10350 | s%@GMOFILES@%$GMOFILES%g | |
10351 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10352 | s%@INTLDEPS@%$INTLDEPS%g | |
10353 | s%@INTLLIBS@%$INTLLIBS%g | |
10354 | s%@INTLOBJS@%$INTLOBJS%g | |
10355 | s%@POFILES@%$POFILES%g | |
10356 | s%@POSUB@%$POSUB%g | |
10357 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10358 | s%@GT_NO@%$GT_NO%g | |
10359 | s%@GT_YES@%$GT_YES%g | |
10360 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10361 | s%@l@%$l%g | |
8dcde887 | 10362 | s%@subdirs@%$subdirs%g |
7a292a7a | 10363 | s%@AWK@%$AWK%g |
c906108c SS |
10364 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10365 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10366 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10367 | s%@LN_S@%$LN_S%g |
10368 | s%@YACC@%$YACC%g | |
c906108c | 10369 | s%@AR@%$AR%g |
95ca63c4 CF |
10370 | s%@DLLTOOL@%$DLLTOOL%g |
10371 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10372 | s%@MIG@%$MIG%g |
c906108c | 10373 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 10374 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10375 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10376 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10377 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10378 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10379 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10380 | s%@LIBGUI@%$LIBGUI%g |
10381 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10382 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10383 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10384 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10385 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10386 | s%@TCL_CC@%$TCL_CC%g | |
10387 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10388 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10389 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10390 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10391 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10392 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10393 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10394 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10395 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10396 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10397 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10398 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10399 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10400 | s%@TK_VERSION@%$TK_VERSION%g | |
10401 | s%@TK_DEFS@%$TK_DEFS%g | |
10402 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10403 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10404 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10405 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10406 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10407 | s%@TCLHDIR@%$TCLHDIR%g | |
10408 | s%@TKHDIR@%$TKHDIR%g | |
10409 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10410 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10411 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10412 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10413 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10414 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10415 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10416 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10417 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10418 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10419 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10420 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10421 | s%@X_CFLAGS@%$X_CFLAGS%g |
10422 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10423 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10424 | s%@TCL_DEPS@%$TCL_DEPS%g |
10425 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10426 | s%@ITCLLIB@%$ITCLLIB%g |
10427 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10428 | s%@ITKLIB@%$ITKLIB%g | |
10429 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10430 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10431 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10432 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10433 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10434 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
10435 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
10436 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 10437 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10438 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10439 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10440 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10441 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10442 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10443 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10444 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10445 | s%@HLDFLAGS@%$HLDFLAGS%g |
10446 | s%@HLDENV@%$HLDENV%g | |
10447 | s%@target_subdir@%$target_subdir%g | |
10448 | /@host_makefile_frag@/r $host_makefile_frag | |
10449 | s%@host_makefile_frag@%%g | |
10450 | /@target_makefile_frag@/r $target_makefile_frag | |
10451 | s%@target_makefile_frag@%%g | |
10452 | s%@frags@%$frags%g | |
96baa820 | 10453 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
10454 | s%@xm_h@%$xm_h%g |
10455 | s%@tm_h@%$tm_h%g | |
10456 | s%@nm_h@%$nm_h%g | |
c906108c | 10457 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10458 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10459 | |
10460 | CEOF | |
10461 | EOF | |
10462 | ||
10463 | cat >> $CONFIG_STATUS <<\EOF | |
10464 | ||
10465 | # Split the substitutions into bite-sized pieces for seds with | |
10466 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10467 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10468 | ac_file=1 # Number of current file. |
10469 | ac_beg=1 # First line for current file. | |
10470 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10471 | ac_more_lines=: | |
10472 | ac_sed_cmds="" | |
10473 | while $ac_more_lines; do | |
10474 | if test $ac_beg -gt 1; then | |
10475 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10476 | else | |
10477 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10478 | fi | |
10479 | if test ! -s conftest.s$ac_file; then | |
10480 | ac_more_lines=false | |
10481 | rm -f conftest.s$ac_file | |
10482 | else | |
10483 | if test -z "$ac_sed_cmds"; then | |
10484 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10485 | else | |
10486 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10487 | fi | |
10488 | ac_file=`expr $ac_file + 1` | |
10489 | ac_beg=$ac_end | |
10490 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10491 | fi | |
10492 | done | |
10493 | if test -z "$ac_sed_cmds"; then | |
10494 | ac_sed_cmds=cat | |
10495 | fi | |
10496 | EOF | |
10497 | ||
10498 | cat >> $CONFIG_STATUS <<EOF | |
10499 | ||
ed952ac5 | 10500 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10501 | EOF |
10502 | cat >> $CONFIG_STATUS <<\EOF | |
10503 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10504 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10505 | case "$ac_file" in | |
10506 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10507 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10508 | *) ac_file_in="${ac_file}.in" ;; | |
10509 | esac | |
10510 | ||
10511 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10512 | ||
10513 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10514 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10515 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10516 | # The file is in a subdirectory. | |
10517 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10518 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10519 | # A "../" for each directory in $ac_dir_suffix. | |
10520 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10521 | else | |
10522 | ac_dir_suffix= ac_dots= | |
10523 | fi | |
10524 | ||
10525 | case "$ac_given_srcdir" in | |
10526 | .) srcdir=. | |
10527 | if test -z "$ac_dots"; then top_srcdir=. | |
10528 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10529 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10530 | *) # Relative path. | |
10531 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10532 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10533 | esac | |
10534 | ||
10535 | case "$ac_given_INSTALL" in | |
10536 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10537 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10538 | esac | |
10539 | ||
10540 | echo creating "$ac_file" | |
10541 | rm -f "$ac_file" | |
10542 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10543 | case "$ac_file" in | |
10544 | *Makefile*) ac_comsub="1i\\ | |
10545 | # $configure_input" ;; | |
10546 | *) ac_comsub= ;; | |
10547 | esac | |
10548 | ||
10549 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10550 | sed -e "$ac_comsub | |
10551 | s%@configure_input@%$configure_input%g | |
10552 | s%@srcdir@%$srcdir%g | |
10553 | s%@top_srcdir@%$top_srcdir%g | |
10554 | s%@INSTALL@%$INSTALL%g | |
10555 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10556 | fi; done | |
10557 | rm -f conftest.s* | |
10558 | ||
10559 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10560 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10561 | # | |
10562 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10563 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10564 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10565 | ac_dC='\3' | |
10566 | ac_dD='%g' | |
10567 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10568 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10569 | ac_uB='\([ ]\)%\1#\2define\3' | |
10570 | ac_uC=' ' | |
10571 | ac_uD='\4%g' | |
10572 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10573 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10574 | ac_eB='$%\1#\2define\3' | |
10575 | ac_eC=' ' | |
10576 | ac_eD='%g' | |
10577 | ||
10578 | if test "${CONFIG_HEADERS+set}" != set; then | |
10579 | EOF | |
10580 | cat >> $CONFIG_STATUS <<EOF | |
10581 | CONFIG_HEADERS="config.h:config.in" | |
10582 | EOF | |
10583 | cat >> $CONFIG_STATUS <<\EOF | |
10584 | fi | |
10585 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10586 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10587 | case "$ac_file" in | |
10588 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10589 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10590 | *) ac_file_in="${ac_file}.in" ;; | |
10591 | esac | |
10592 | ||
10593 | echo creating $ac_file | |
10594 | ||
10595 | rm -f conftest.frag conftest.in conftest.out | |
10596 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10597 | cat $ac_file_inputs > conftest.in | |
10598 | ||
10599 | EOF | |
10600 | ||
10601 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10602 | # the proper values into config.h.in to produce config.h. And first: | |
10603 | # Protect against being on the right side of a sed subst in config.status. | |
10604 | # Protect against being in an unquoted here document in config.status. | |
10605 | rm -f conftest.vals | |
10606 | cat > conftest.hdr <<\EOF | |
10607 | s/[\\&%]/\\&/g | |
10608 | s%[\\$`]%\\&%g | |
10609 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10610 | s%ac_d%ac_u%gp | |
10611 | s%ac_u%ac_e%gp | |
10612 | EOF | |
10613 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10614 | rm -f conftest.hdr | |
10615 | ||
10616 | # This sed command replaces #undef with comments. This is necessary, for | |
10617 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10618 | # on some systems where configure will not decide to define it. | |
10619 | cat >> conftest.vals <<\EOF | |
10620 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10621 | EOF | |
10622 | ||
10623 | # Break up conftest.vals because some shells have a limit on | |
10624 | # the size of here documents, and old seds have small limits too. | |
10625 | ||
10626 | rm -f conftest.tail | |
10627 | while : | |
10628 | do | |
10629 | ac_lines=`grep -c . conftest.vals` | |
10630 | # grep -c gives empty output for an empty file on some AIX systems. | |
10631 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10632 | # Write a limited-size here document to conftest.frag. | |
10633 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10634 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10635 | echo 'CEOF | |
10636 | sed -f conftest.frag conftest.in > conftest.out | |
10637 | rm -f conftest.in | |
10638 | mv conftest.out conftest.in | |
10639 | ' >> $CONFIG_STATUS | |
10640 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10641 | rm -f conftest.vals | |
10642 | mv conftest.tail conftest.vals | |
10643 | done | |
10644 | rm -f conftest.vals | |
10645 | ||
10646 | cat >> $CONFIG_STATUS <<\EOF | |
10647 | rm -f conftest.frag conftest.h | |
10648 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10649 | cat conftest.in >> conftest.h | |
10650 | rm -f conftest.in | |
10651 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10652 | echo "$ac_file is unchanged" | |
10653 | rm -f conftest.h | |
10654 | else | |
10655 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10656 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10657 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10658 | # The file is in a subdirectory. | |
10659 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10660 | fi | |
10661 | rm -f $ac_file | |
10662 | mv conftest.h $ac_file | |
10663 | fi | |
10664 | fi; done | |
10665 | ||
10666 | EOF | |
10667 | ||
10668 | cat >> $CONFIG_STATUS <<EOF | |
10669 | ac_sources="$files" | |
10670 | ac_dests="$links" | |
10671 | EOF | |
10672 | ||
10673 | cat >> $CONFIG_STATUS <<\EOF | |
10674 | srcdir=$ac_given_srcdir | |
10675 | while test -n "$ac_sources"; do | |
10676 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10677 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10678 | ||
10679 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10680 | ||
10681 | if test ! -r $srcdir/$ac_source; then | |
10682 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10683 | fi | |
10684 | rm -f $ac_dest | |
10685 | ||
10686 | # Make relative symlinks. | |
10687 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10688 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10689 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10690 | # The dest file is in a subdirectory. | |
10691 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10692 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10693 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10694 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10695 | else | |
10696 | ac_dest_dir_suffix= ac_dots= | |
10697 | fi | |
10698 | ||
10699 | case "$srcdir" in | |
10700 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10701 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10702 | esac | |
10703 | ||
10704 | # Make a symlink if possible; otherwise try a hard link. | |
10705 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10706 | ln $srcdir/$ac_source $ac_dest; then : | |
10707 | else | |
10708 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10709 | fi | |
10710 | done | |
10711 | EOF | |
10712 | cat >> $CONFIG_STATUS <<EOF | |
10713 | ||
10714 | gdb_host_cpu=$gdb_host_cpu | |
10715 | gdb_target_cpu=$gdb_target_cpu | |
10716 | nativefile=$nativefile | |
10717 | ||
10718 | EOF | |
10719 | cat >> $CONFIG_STATUS <<\EOF | |
10720 | ||
10721 | if test "${nativefile}" = ""; then | |
c4620205 | 10722 | < Makefile \ |
e27da16d JT |
10723 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10724 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10725 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10726 | > Makefile.tem | |
c906108c SS |
10727 | mv -f Makefile.tem Makefile |
10728 | fi | |
10729 | ||
10730 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10731 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10732 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10733 | mv -f Makefile.tmp Makefile | |
10734 | ||
2acceee2 | 10735 | |
c906108c SS |
10736 | case x$CONFIG_HEADERS in |
10737 | xconfig.h:config.in) | |
10738 | echo > stamp-h ;; | |
10739 | esac | |
10740 | ||
10741 | exit 0 | |
10742 | EOF | |
10743 | chmod +x $CONFIG_STATUS | |
10744 | rm -fr confdefs* $ac_clean_files | |
10745 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10746 | ||
10747 | if test "$no_recursion" != yes; then | |
10748 | ||
10749 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10750 | ac_sub_configure_args= | |
10751 | ac_prev= | |
10752 | for ac_arg in $ac_configure_args; do | |
10753 | if test -n "$ac_prev"; then | |
10754 | ac_prev= | |
10755 | continue | |
10756 | fi | |
10757 | case "$ac_arg" in | |
10758 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10759 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10760 | ac_prev=cache_file ;; | |
10761 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10762 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10763 | ;; | |
10764 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10765 | ac_prev=srcdir ;; | |
10766 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10767 | ;; | |
10768 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10769 | esac | |
10770 | done | |
10771 | ||
8dcde887 | 10772 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
10773 | |
10774 | # Do not complain, so a configure script can configure whichever | |
10775 | # parts of a large source tree are present. | |
10776 | if test ! -d $srcdir/$ac_config_dir; then | |
10777 | continue | |
10778 | fi | |
10779 | ||
10780 | echo configuring in $ac_config_dir | |
10781 | ||
10782 | case "$srcdir" in | |
10783 | .) ;; | |
10784 | *) | |
10785 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10786 | else | |
10787 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10788 | fi | |
10789 | ;; | |
10790 | esac | |
10791 | ||
10792 | ac_popdir=`pwd` | |
10793 | cd $ac_config_dir | |
10794 | ||
10795 | # A "../" for each directory in /$ac_config_dir. | |
10796 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10797 | ||
10798 | case "$srcdir" in | |
10799 | .) # No --srcdir option. We are building in place. | |
10800 | ac_sub_srcdir=$srcdir ;; | |
10801 | /*) # Absolute path. | |
10802 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10803 | *) # Relative path. | |
10804 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10805 | esac | |
10806 | ||
10807 | # Check for guested configure; otherwise get Cygnus style configure. | |
10808 | if test -f $ac_sub_srcdir/configure; then | |
10809 | ac_sub_configure=$ac_sub_srcdir/configure | |
10810 | elif test -f $ac_sub_srcdir/configure.in; then | |
10811 | ac_sub_configure=$ac_configure | |
10812 | else | |
10813 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10814 | ac_sub_configure= | |
10815 | fi | |
10816 | ||
10817 | # The recursion is here. | |
10818 | if test -n "$ac_sub_configure"; then | |
10819 | ||
10820 | # Make the cache file name correct relative to the subdirectory. | |
10821 | case "$cache_file" in | |
10822 | /*) ac_sub_cache_file=$cache_file ;; | |
10823 | *) # Relative path. | |
10824 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10825 | esac | |
10826 | case "$ac_given_INSTALL" in | |
10827 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10828 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10829 | esac | |
10830 | ||
10831 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10832 | # The eval makes quoting arguments work. | |
10833 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10834 | then : | |
10835 | else | |
10836 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10837 | fi | |
10838 | fi | |
10839 | ||
10840 | cd $ac_popdir | |
10841 | done | |
10842 | fi | |
10843 | ||
10844 | ||
10845 | exit 0 |