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)" | |
8ee53726 MK |
27 | ac_help="$ac_help |
28 | --enable-gtk enable gdbtk graphical user interface (GUI)" | |
06825bd1 MK |
29 | ac_help="$ac_help |
30 | --without-included-regex don't use included regex; this is the default | |
31 | on systems with version 2 of the GNU C library | |
32 | (use with caution on other system)" | |
c906108c SS |
33 | ac_help="$ac_help |
34 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
35 | ac_help="$ac_help |
36 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
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" | |
8dcde887 MK |
55 | ac_help="$ac_help |
56 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
57 | ac_help="$ac_help |
58 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
59 | |
60 | # Initialize some variables set by options. | |
61 | # The variables have the same names as the options, with | |
62 | # dashes changed to underlines. | |
63 | build=NONE | |
64 | cache_file=./config.cache | |
65 | exec_prefix=NONE | |
66 | host=NONE | |
67 | no_create= | |
68 | nonopt=NONE | |
69 | no_recursion= | |
70 | prefix=NONE | |
71 | program_prefix=NONE | |
72 | program_suffix=NONE | |
73 | program_transform_name=s,x,x, | |
74 | silent= | |
75 | site= | |
c41b7eb1 | 76 | sitefile= |
c906108c SS |
77 | srcdir= |
78 | target=NONE | |
79 | verbose= | |
80 | x_includes=NONE | |
81 | x_libraries=NONE | |
82 | bindir='${exec_prefix}/bin' | |
83 | sbindir='${exec_prefix}/sbin' | |
84 | libexecdir='${exec_prefix}/libexec' | |
85 | datadir='${prefix}/share' | |
86 | sysconfdir='${prefix}/etc' | |
87 | sharedstatedir='${prefix}/com' | |
88 | localstatedir='${prefix}/var' | |
89 | libdir='${exec_prefix}/lib' | |
90 | includedir='${prefix}/include' | |
91 | oldincludedir='/usr/include' | |
92 | infodir='${prefix}/info' | |
93 | mandir='${prefix}/man' | |
94 | ||
95 | # Initialize some other variables. | |
96 | subdirs= | |
97 | MFLAGS= MAKEFLAGS= | |
98 | SHELL=${CONFIG_SHELL-/bin/sh} | |
99 | # Maximum number of lines to put in a shell here document. | |
100 | ac_max_here_lines=12 | |
101 | ||
102 | ac_prev= | |
103 | for ac_option | |
104 | do | |
105 | ||
106 | # If the previous option needs an argument, assign it. | |
107 | if test -n "$ac_prev"; then | |
108 | eval "$ac_prev=\$ac_option" | |
109 | ac_prev= | |
110 | continue | |
111 | fi | |
112 | ||
113 | case "$ac_option" in | |
114 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
115 | *) ac_optarg= ;; | |
116 | esac | |
117 | ||
118 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
119 | ||
120 | case "$ac_option" in | |
121 | ||
122 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
123 | ac_prev=bindir ;; | |
124 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
125 | bindir="$ac_optarg" ;; | |
126 | ||
127 | -build | --build | --buil | --bui | --bu) | |
128 | ac_prev=build ;; | |
129 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
130 | build="$ac_optarg" ;; | |
131 | ||
132 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
133 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
134 | ac_prev=cache_file ;; | |
135 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
136 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
137 | cache_file="$ac_optarg" ;; | |
138 | ||
139 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
140 | ac_prev=datadir ;; | |
141 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
142 | | --da=*) | |
143 | datadir="$ac_optarg" ;; | |
144 | ||
145 | -disable-* | --disable-*) | |
146 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
147 | # Reject names that are not valid shell variable names. | |
148 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
149 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
150 | fi | |
151 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
152 | eval "enable_${ac_feature}=no" ;; | |
153 | ||
154 | -enable-* | --enable-*) | |
155 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
156 | # Reject names that are not valid shell variable names. | |
157 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
158 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
159 | fi | |
160 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
161 | case "$ac_option" in | |
162 | *=*) ;; | |
163 | *) ac_optarg=yes ;; | |
164 | esac | |
165 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
166 | ||
167 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
168 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
169 | | --exec | --exe | --ex) | |
170 | ac_prev=exec_prefix ;; | |
171 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
172 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
173 | | --exec=* | --exe=* | --ex=*) | |
174 | exec_prefix="$ac_optarg" ;; | |
175 | ||
176 | -gas | --gas | --ga | --g) | |
177 | # Obsolete; use --with-gas. | |
178 | with_gas=yes ;; | |
179 | ||
180 | -help | --help | --hel | --he) | |
181 | # Omit some internal or obsolete options to make the list less imposing. | |
182 | # This message is too long to be a string in the A/UX 3.1 sh. | |
183 | cat << EOF | |
184 | Usage: configure [options] [host] | |
185 | Options: [defaults in brackets after descriptions] | |
186 | Configuration: | |
187 | --cache-file=FILE cache test results in FILE | |
188 | --help print this message | |
189 | --no-create do not create output files | |
190 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 191 | --site-file=FILE use FILE as the site file |
c906108c SS |
192 | --version print the version of autoconf that created configure |
193 | Directory and file names: | |
194 | --prefix=PREFIX install architecture-independent files in PREFIX | |
195 | [$ac_default_prefix] | |
196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
197 | [same as prefix] | |
198 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
201 | --datadir=DIR read-only architecture-independent data in DIR | |
202 | [PREFIX/share] | |
203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
205 | [PREFIX/com] | |
206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
208 | --includedir=DIR C header files in DIR [PREFIX/include] | |
209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
210 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
211 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
212 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
213 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
214 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
215 | --program-transform-name=PROGRAM | |
216 | run sed PROGRAM on installed program names | |
217 | EOF | |
218 | cat << EOF | |
219 | Host type: | |
220 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
221 | --host=HOST configure for HOST [guessed] | |
222 | --target=TARGET configure for TARGET [TARGET=HOST] | |
223 | Features and packages: | |
224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
228 | --x-includes=DIR X include files are in DIR | |
229 | --x-libraries=DIR X library files are in DIR | |
230 | EOF | |
231 | if test -n "$ac_help"; then | |
232 | echo "--enable and --with options recognized:$ac_help" | |
233 | fi | |
234 | exit 0 ;; | |
235 | ||
236 | -host | --host | --hos | --ho) | |
237 | ac_prev=host ;; | |
238 | -host=* | --host=* | --hos=* | --ho=*) | |
239 | host="$ac_optarg" ;; | |
240 | ||
241 | -includedir | --includedir | --includedi | --included | --include \ | |
242 | | --includ | --inclu | --incl | --inc) | |
243 | ac_prev=includedir ;; | |
244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
245 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
246 | includedir="$ac_optarg" ;; | |
247 | ||
248 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
249 | ac_prev=infodir ;; | |
250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
251 | infodir="$ac_optarg" ;; | |
252 | ||
253 | -libdir | --libdir | --libdi | --libd) | |
254 | ac_prev=libdir ;; | |
255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
256 | libdir="$ac_optarg" ;; | |
257 | ||
258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
259 | | --libexe | --libex | --libe) | |
260 | ac_prev=libexecdir ;; | |
261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
262 | | --libexe=* | --libex=* | --libe=*) | |
263 | libexecdir="$ac_optarg" ;; | |
264 | ||
265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
266 | | --localstate | --localstat | --localsta | --localst \ | |
267 | | --locals | --local | --loca | --loc | --lo) | |
268 | ac_prev=localstatedir ;; | |
269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
272 | localstatedir="$ac_optarg" ;; | |
273 | ||
274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
275 | ac_prev=mandir ;; | |
276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
277 | mandir="$ac_optarg" ;; | |
278 | ||
279 | -nfp | --nfp | --nf) | |
280 | # Obsolete; use --without-fp. | |
281 | with_fp=no ;; | |
282 | ||
283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
284 | | --no-cr | --no-c) | |
285 | no_create=yes ;; | |
286 | ||
287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
289 | no_recursion=yes ;; | |
290 | ||
291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
293 | | --oldin | --oldi | --old | --ol | --o) | |
294 | ac_prev=oldincludedir ;; | |
295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
298 | oldincludedir="$ac_optarg" ;; | |
299 | ||
300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
301 | ac_prev=prefix ;; | |
302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
303 | prefix="$ac_optarg" ;; | |
304 | ||
305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
306 | | --program-pre | --program-pr | --program-p) | |
307 | ac_prev=program_prefix ;; | |
308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
310 | program_prefix="$ac_optarg" ;; | |
311 | ||
312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
313 | | --program-suf | --program-su | --program-s) | |
314 | ac_prev=program_suffix ;; | |
315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
317 | program_suffix="$ac_optarg" ;; | |
318 | ||
319 | -program-transform-name | --program-transform-name \ | |
320 | | --program-transform-nam | --program-transform-na \ | |
321 | | --program-transform-n | --program-transform- \ | |
322 | | --program-transform | --program-transfor \ | |
323 | | --program-transfo | --program-transf \ | |
324 | | --program-trans | --program-tran \ | |
325 | | --progr-tra | --program-tr | --program-t) | |
326 | ac_prev=program_transform_name ;; | |
327 | -program-transform-name=* | --program-transform-name=* \ | |
328 | | --program-transform-nam=* | --program-transform-na=* \ | |
329 | | --program-transform-n=* | --program-transform-=* \ | |
330 | | --program-transform=* | --program-transfor=* \ | |
331 | | --program-transfo=* | --program-transf=* \ | |
332 | | --program-trans=* | --program-tran=* \ | |
333 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
334 | program_transform_name="$ac_optarg" ;; | |
335 | ||
336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
337 | | -silent | --silent | --silen | --sile | --sil) | |
338 | silent=yes ;; | |
339 | ||
340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
341 | ac_prev=sbindir ;; | |
342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
343 | | --sbi=* | --sb=*) | |
344 | sbindir="$ac_optarg" ;; | |
345 | ||
346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
348 | | --sharedst | --shareds | --shared | --share | --shar \ | |
349 | | --sha | --sh) | |
350 | ac_prev=sharedstatedir ;; | |
351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
354 | | --sha=* | --sh=*) | |
355 | sharedstatedir="$ac_optarg" ;; | |
356 | ||
357 | -site | --site | --sit) | |
358 | ac_prev=site ;; | |
359 | -site=* | --site=* | --sit=*) | |
360 | site="$ac_optarg" ;; | |
361 | ||
c41b7eb1 JB |
362 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
363 | ac_prev=sitefile ;; | |
364 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
365 | sitefile="$ac_optarg" ;; | |
366 | ||
c906108c SS |
367 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
368 | ac_prev=srcdir ;; | |
369 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
370 | srcdir="$ac_optarg" ;; | |
371 | ||
372 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
373 | | --syscon | --sysco | --sysc | --sys | --sy) | |
374 | ac_prev=sysconfdir ;; | |
375 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
376 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
377 | sysconfdir="$ac_optarg" ;; | |
378 | ||
379 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
380 | ac_prev=target ;; | |
381 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
382 | target="$ac_optarg" ;; | |
383 | ||
384 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
385 | verbose=yes ;; | |
386 | ||
387 | -version | --version | --versio | --versi | --vers) | |
388 | echo "configure generated by autoconf version 2.13" | |
389 | exit 0 ;; | |
390 | ||
391 | -with-* | --with-*) | |
392 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
393 | # Reject names that are not valid shell variable names. | |
394 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
395 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
396 | fi | |
397 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
398 | case "$ac_option" in | |
399 | *=*) ;; | |
400 | *) ac_optarg=yes ;; | |
401 | esac | |
402 | eval "with_${ac_package}='$ac_optarg'" ;; | |
403 | ||
404 | -without-* | --without-*) | |
405 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
406 | # Reject names that are not valid shell variable names. | |
407 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
408 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
409 | fi | |
410 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
411 | eval "with_${ac_package}=no" ;; | |
412 | ||
413 | --x) | |
414 | # Obsolete; use --with-x. | |
415 | with_x=yes ;; | |
416 | ||
417 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
418 | | --x-incl | --x-inc | --x-in | --x-i) | |
419 | ac_prev=x_includes ;; | |
420 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
421 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
422 | x_includes="$ac_optarg" ;; | |
423 | ||
424 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
425 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
426 | ac_prev=x_libraries ;; | |
427 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
428 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
429 | x_libraries="$ac_optarg" ;; | |
430 | ||
431 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
432 | ;; | |
433 | ||
434 | *) | |
435 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
436 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
437 | fi | |
438 | if test "x$nonopt" != xNONE; then | |
439 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
440 | fi | |
441 | nonopt="$ac_option" | |
442 | ;; | |
443 | ||
444 | esac | |
445 | done | |
446 | ||
447 | if test -n "$ac_prev"; then | |
448 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
449 | fi | |
450 | ||
451 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
452 | ||
453 | # File descriptor usage: | |
454 | # 0 standard input | |
455 | # 1 file creation | |
456 | # 2 errors and warnings | |
457 | # 3 some systems may open it to /dev/tty | |
458 | # 4 used on the Kubota Titan | |
459 | # 6 checking for... messages and results | |
460 | # 5 compiler messages saved in config.log | |
461 | if test "$silent" = yes; then | |
462 | exec 6>/dev/null | |
463 | else | |
464 | exec 6>&1 | |
465 | fi | |
466 | exec 5>./config.log | |
467 | ||
468 | echo "\ | |
469 | This file contains any messages produced by compilers while | |
470 | running configure, to aid debugging if configure makes a mistake. | |
471 | " 1>&5 | |
472 | ||
473 | # Strip out --no-create and --no-recursion so they do not pile up. | |
474 | # Also quote any args containing shell metacharacters. | |
475 | ac_configure_args= | |
476 | for ac_arg | |
477 | do | |
478 | case "$ac_arg" in | |
479 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
480 | | --no-cr | --no-c) ;; | |
481 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
482 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
483 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
484 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
485 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
486 | esac | |
487 | done | |
488 | ||
489 | # NLS nuisances. | |
490 | # Only set these to C if already set. These must not be set unconditionally | |
491 | # because not all systems understand e.g. LANG=C (notably SCO). | |
492 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
493 | # Non-C LC_CTYPE values break the ctype check. | |
494 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
495 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
496 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
497 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
498 | ||
499 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
500 | rm -rf conftest* confdefs.h | |
501 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
502 | echo > confdefs.h | |
503 | ||
504 | # A filename unique to this package, relative to the directory that | |
505 | # configure is in, which we can look for to find out if srcdir is correct. | |
506 | ac_unique_file=main.c | |
507 | ||
508 | # Find the source files, if location was not specified. | |
509 | if test -z "$srcdir"; then | |
510 | ac_srcdir_defaulted=yes | |
511 | # Try the directory containing this script, then its parent. | |
512 | ac_prog=$0 | |
513 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
514 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
515 | srcdir=$ac_confdir | |
516 | if test ! -r $srcdir/$ac_unique_file; then | |
517 | srcdir=.. | |
518 | fi | |
519 | else | |
520 | ac_srcdir_defaulted=no | |
521 | fi | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | if test "$ac_srcdir_defaulted" = yes; then | |
524 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
525 | else | |
526 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
527 | fi | |
528 | fi | |
529 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
530 | ||
531 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
532 | if test -z "$sitefile"; then |
533 | if test -z "$CONFIG_SITE"; then | |
534 | if test "x$prefix" != xNONE; then | |
535 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
536 | else | |
537 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
538 | fi | |
c906108c | 539 | fi |
c41b7eb1 JB |
540 | else |
541 | CONFIG_SITE="$sitefile" | |
c906108c SS |
542 | fi |
543 | for ac_site_file in $CONFIG_SITE; do | |
544 | if test -r "$ac_site_file"; then | |
545 | echo "loading site script $ac_site_file" | |
546 | . "$ac_site_file" | |
547 | fi | |
548 | done | |
549 | ||
550 | if test -r "$cache_file"; then | |
551 | echo "loading cache $cache_file" | |
552 | . $cache_file | |
553 | else | |
554 | echo "creating cache $cache_file" | |
555 | > $cache_file | |
556 | fi | |
557 | ||
558 | ac_ext=c | |
559 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
560 | ac_cpp='$CPP $CPPFLAGS' | |
561 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
562 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
563 | cross_compiling=$ac_cv_prog_cc_cross | |
564 | ||
565 | ac_exeext= | |
566 | ac_objext=o | |
567 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
568 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
569 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
570 | ac_n= ac_c=' | |
571 | ' ac_t=' ' | |
572 | else | |
573 | ac_n=-n ac_c= ac_t= | |
574 | fi | |
575 | else | |
576 | ac_n= ac_c='\c' ac_t= | |
577 | fi | |
578 | ||
579 | ||
580 | ||
413ccac7 | 581 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
72cfdc76 | 582 | echo "configure:583: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
583 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
584 | if test "${enable_maintainer_mode+set}" = set; then | |
585 | enableval="$enable_maintainer_mode" | |
586 | USE_MAINTAINER_MODE=$enableval | |
587 | else | |
588 | USE_MAINTAINER_MODE=no | |
589 | fi | |
590 | ||
591 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
592 | ||
593 | ||
594 | if test $USE_MAINTAINER_MODE = yes; then | |
595 | MAINTAINER_MODE_TRUE= | |
596 | MAINTAINER_MODE_FALSE='#' | |
597 | else | |
598 | MAINTAINER_MODE_TRUE='#' | |
599 | MAINTAINER_MODE_FALSE= | |
600 | fi | |
601 | MAINT=$MAINTAINER_MODE_TRUE | |
602 | ||
603 | ||
c906108c SS |
604 | |
605 | # Extract the first word of "gcc", so it can be a program name with args. | |
606 | set dummy gcc; ac_word=$2 | |
607 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 608 | echo "configure:609: checking for $ac_word" >&5 |
c906108c SS |
609 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
611 | else | |
612 | if test -n "$CC"; then | |
613 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
614 | else | |
615 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
616 | ac_dummy="$PATH" | |
617 | for ac_dir in $ac_dummy; do | |
618 | test -z "$ac_dir" && ac_dir=. | |
619 | if test -f $ac_dir/$ac_word; then | |
620 | ac_cv_prog_CC="gcc" | |
621 | break | |
622 | fi | |
623 | done | |
624 | IFS="$ac_save_ifs" | |
625 | fi | |
626 | fi | |
627 | CC="$ac_cv_prog_CC" | |
628 | if test -n "$CC"; then | |
629 | echo "$ac_t""$CC" 1>&6 | |
630 | else | |
631 | echo "$ac_t""no" 1>&6 | |
632 | fi | |
633 | ||
634 | if test -z "$CC"; then | |
635 | # Extract the first word of "cc", so it can be a program name with args. | |
636 | set dummy cc; ac_word=$2 | |
637 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 638 | echo "configure:639: checking for $ac_word" >&5 |
c906108c SS |
639 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
640 | echo $ac_n "(cached) $ac_c" 1>&6 | |
641 | else | |
642 | if test -n "$CC"; then | |
643 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
644 | else | |
645 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
646 | ac_prog_rejected=no | |
647 | ac_dummy="$PATH" | |
648 | for ac_dir in $ac_dummy; do | |
649 | test -z "$ac_dir" && ac_dir=. | |
650 | if test -f $ac_dir/$ac_word; then | |
651 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
652 | ac_prog_rejected=yes | |
653 | continue | |
654 | fi | |
655 | ac_cv_prog_CC="cc" | |
656 | break | |
657 | fi | |
658 | done | |
659 | IFS="$ac_save_ifs" | |
660 | if test $ac_prog_rejected = yes; then | |
661 | # We found a bogon in the path, so make sure we never use it. | |
662 | set dummy $ac_cv_prog_CC | |
663 | shift | |
664 | if test $# -gt 0; then | |
665 | # We chose a different compiler from the bogus one. | |
666 | # However, it has the same basename, so the bogon will be chosen | |
667 | # first if we set CC to just the basename; use the full file name. | |
668 | shift | |
669 | set dummy "$ac_dir/$ac_word" "$@" | |
670 | shift | |
671 | ac_cv_prog_CC="$@" | |
672 | fi | |
673 | fi | |
674 | fi | |
675 | fi | |
676 | CC="$ac_cv_prog_CC" | |
677 | if test -n "$CC"; then | |
678 | echo "$ac_t""$CC" 1>&6 | |
679 | else | |
680 | echo "$ac_t""no" 1>&6 | |
681 | fi | |
682 | ||
683 | if test -z "$CC"; then | |
684 | case "`uname -s`" in | |
685 | *win32* | *WIN32*) | |
686 | # Extract the first word of "cl", so it can be a program name with args. | |
687 | set dummy cl; ac_word=$2 | |
688 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 689 | echo "configure:690: checking for $ac_word" >&5 |
c906108c SS |
690 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
692 | else | |
693 | if test -n "$CC"; then | |
694 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
695 | else | |
696 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
697 | ac_dummy="$PATH" | |
698 | for ac_dir in $ac_dummy; do | |
699 | test -z "$ac_dir" && ac_dir=. | |
700 | if test -f $ac_dir/$ac_word; then | |
701 | ac_cv_prog_CC="cl" | |
702 | break | |
703 | fi | |
704 | done | |
705 | IFS="$ac_save_ifs" | |
706 | fi | |
707 | fi | |
708 | CC="$ac_cv_prog_CC" | |
709 | if test -n "$CC"; then | |
710 | echo "$ac_t""$CC" 1>&6 | |
711 | else | |
712 | echo "$ac_t""no" 1>&6 | |
713 | fi | |
714 | ;; | |
715 | esac | |
716 | fi | |
717 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
718 | fi | |
719 | ||
720 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
72cfdc76 | 721 | echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
722 | |
723 | ac_ext=c | |
724 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
725 | ac_cpp='$CPP $CPPFLAGS' | |
726 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
727 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
728 | cross_compiling=$ac_cv_prog_cc_cross | |
729 | ||
730 | cat > conftest.$ac_ext << EOF | |
731 | ||
72cfdc76 | 732 | #line 733 "configure" |
c906108c SS |
733 | #include "confdefs.h" |
734 | ||
735 | main(){return(0);} | |
736 | EOF | |
72cfdc76 | 737 | if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
738 | ac_cv_prog_cc_works=yes |
739 | # If we can't run a trivial program, we are probably using a cross compiler. | |
740 | if (./conftest; exit) 2>/dev/null; then | |
741 | ac_cv_prog_cc_cross=no | |
742 | else | |
743 | ac_cv_prog_cc_cross=yes | |
744 | fi | |
745 | else | |
746 | echo "configure: failed program was:" >&5 | |
747 | cat conftest.$ac_ext >&5 | |
748 | ac_cv_prog_cc_works=no | |
749 | fi | |
750 | rm -fr conftest* | |
751 | ac_ext=c | |
752 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
753 | ac_cpp='$CPP $CPPFLAGS' | |
754 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
755 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
756 | cross_compiling=$ac_cv_prog_cc_cross | |
757 | ||
758 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
759 | if test $ac_cv_prog_cc_works = no; then | |
760 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
761 | fi | |
762 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
72cfdc76 | 763 | echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
764 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
765 | cross_compiling=$ac_cv_prog_cc_cross | |
766 | ||
767 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
72cfdc76 | 768 | echo "configure:769: checking whether we are using GNU C" >&5 |
c906108c SS |
769 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
771 | else | |
772 | cat > conftest.c <<EOF | |
773 | #ifdef __GNUC__ | |
774 | yes; | |
775 | #endif | |
776 | EOF | |
72cfdc76 | 777 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
778 | ac_cv_prog_gcc=yes |
779 | else | |
780 | ac_cv_prog_gcc=no | |
781 | fi | |
782 | fi | |
783 | ||
784 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
785 | ||
786 | if test $ac_cv_prog_gcc = yes; then | |
787 | GCC=yes | |
788 | else | |
789 | GCC= | |
790 | fi | |
791 | ||
792 | ac_test_CFLAGS="${CFLAGS+set}" | |
793 | ac_save_CFLAGS="$CFLAGS" | |
794 | CFLAGS= | |
795 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
72cfdc76 | 796 | echo "configure:797: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
797 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
799 | else | |
800 | echo 'void f(){}' > conftest.c | |
801 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
802 | ac_cv_prog_cc_g=yes | |
803 | else | |
804 | ac_cv_prog_cc_g=no | |
805 | fi | |
806 | rm -f conftest* | |
807 | ||
808 | fi | |
809 | ||
810 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
811 | if test "$ac_test_CFLAGS" = set; then | |
812 | CFLAGS="$ac_save_CFLAGS" | |
813 | elif test $ac_cv_prog_cc_g = yes; then | |
814 | if test "$GCC" = yes; then | |
815 | CFLAGS="-g -O2" | |
816 | else | |
817 | CFLAGS="-g" | |
818 | fi | |
819 | else | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-O2" | |
822 | else | |
823 | CFLAGS= | |
824 | fi | |
825 | fi | |
826 | ||
14abd0fb MK |
827 | cat >> confdefs.h <<\EOF |
828 | #define _GNU_SOURCE 1 | |
829 | EOF | |
830 | ||
831 | ||
c906108c | 832 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
72cfdc76 | 833 | echo "configure:834: checking how to run the C preprocessor" >&5 |
c906108c SS |
834 | # On Suns, sometimes $CPP names a directory. |
835 | if test -n "$CPP" && test -d "$CPP"; then | |
836 | CPP= | |
837 | fi | |
838 | if test -z "$CPP"; then | |
839 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
840 | echo $ac_n "(cached) $ac_c" 1>&6 | |
841 | else | |
842 | # This must be in double quotes, not single quotes, because CPP may get | |
843 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
844 | CPP="${CC-cc} -E" | |
845 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
846 | # not just through cpp. | |
847 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 848 | #line 849 "configure" |
c906108c SS |
849 | #include "confdefs.h" |
850 | #include <assert.h> | |
851 | Syntax Error | |
852 | EOF | |
853 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 854 | { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
855 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
856 | if test -z "$ac_err"; then | |
857 | : | |
858 | else | |
859 | echo "$ac_err" >&5 | |
860 | echo "configure: failed program was:" >&5 | |
861 | cat conftest.$ac_ext >&5 | |
862 | rm -rf conftest* | |
863 | CPP="${CC-cc} -E -traditional-cpp" | |
864 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 865 | #line 866 "configure" |
c906108c SS |
866 | #include "confdefs.h" |
867 | #include <assert.h> | |
868 | Syntax Error | |
869 | EOF | |
870 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 871 | { (eval echo configure:872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
872 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
873 | if test -z "$ac_err"; then | |
874 | : | |
875 | else | |
876 | echo "$ac_err" >&5 | |
877 | echo "configure: failed program was:" >&5 | |
878 | cat conftest.$ac_ext >&5 | |
879 | rm -rf conftest* | |
880 | CPP="${CC-cc} -nologo -E" | |
881 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 882 | #line 883 "configure" |
c906108c SS |
883 | #include "confdefs.h" |
884 | #include <assert.h> | |
885 | Syntax Error | |
886 | EOF | |
887 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 888 | { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
889 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
890 | if test -z "$ac_err"; then | |
891 | : | |
892 | else | |
893 | echo "$ac_err" >&5 | |
894 | echo "configure: failed program was:" >&5 | |
895 | cat conftest.$ac_ext >&5 | |
896 | rm -rf conftest* | |
897 | CPP=/lib/cpp | |
898 | fi | |
899 | rm -f conftest* | |
900 | fi | |
901 | rm -f conftest* | |
902 | fi | |
903 | rm -f conftest* | |
904 | ac_cv_prog_CPP="$CPP" | |
905 | fi | |
906 | CPP="$ac_cv_prog_CPP" | |
907 | else | |
908 | ac_cv_prog_CPP="$CPP" | |
909 | fi | |
910 | echo "$ac_t""$CPP" 1>&6 | |
911 | ||
912 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
72cfdc76 | 913 | echo "configure:914: checking for AIX" >&5 |
c906108c | 914 | cat > conftest.$ac_ext <<EOF |
72cfdc76 | 915 | #line 916 "configure" |
c906108c SS |
916 | #include "confdefs.h" |
917 | #ifdef _AIX | |
918 | yes | |
919 | #endif | |
920 | ||
921 | EOF | |
922 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
923 | egrep "yes" >/dev/null 2>&1; then | |
924 | rm -rf conftest* | |
925 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
926 | #define _ALL_SOURCE 1 | |
927 | EOF | |
928 | ||
929 | else | |
930 | rm -rf conftest* | |
931 | echo "$ac_t""no" 1>&6 | |
932 | fi | |
933 | rm -f conftest* | |
934 | ||
935 | ||
56157b4a | 936 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
72cfdc76 | 937 | echo "configure:938: checking for POSIXized ISC" >&5 |
56157b4a AC |
938 | if test -d /etc/conf/kconfig.d && |
939 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
940 | then | |
941 | echo "$ac_t""yes" 1>&6 | |
942 | ISC=yes # If later tests want to check for ISC. | |
943 | cat >> confdefs.h <<\EOF | |
944 | #define _POSIX_SOURCE 1 | |
c906108c SS |
945 | EOF |
946 | ||
56157b4a AC |
947 | if test "$GCC" = yes; then |
948 | CC="$CC -posix" | |
949 | else | |
950 | CC="$CC -Xp" | |
951 | fi | |
c906108c SS |
952 | else |
953 | echo "$ac_t""no" 1>&6 | |
56157b4a | 954 | ISC= |
c906108c SS |
955 | fi |
956 | ||
957 | ||
958 | ||
959 | ||
960 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
72cfdc76 | 961 | echo "configure:962: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
962 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
963 | echo $ac_n "(cached) $ac_c" 1>&6 | |
964 | else | |
965 | am_cv_prog_cc_stdc=no | |
966 | ac_save_CC="$CC" | |
967 | # Don't try gcc -ansi; that turns off useful extensions and | |
968 | # breaks some systems' header files. | |
969 | # AIX -qlanglvl=ansi | |
970 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
971 | # HP-UX 10.20 and later -Ae |
972 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 973 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 974 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
975 | do |
976 | CC="$ac_save_CC $ac_arg" | |
977 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 978 | #line 979 "configure" |
c906108c SS |
979 | #include "confdefs.h" |
980 | #include <stdarg.h> | |
981 | #include <stdio.h> | |
982 | #include <sys/types.h> | |
983 | #include <sys/stat.h> | |
984 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
985 | struct buf { int x; }; | |
986 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
987 | static char *e (p, i) | |
988 | char **p; | |
989 | int i; | |
990 | { | |
991 | return p[i]; | |
992 | } | |
993 | static char *f (char * (*g) (char **, int), char **p, ...) | |
994 | { | |
995 | char *s; | |
996 | va_list v; | |
997 | va_start (v,p); | |
998 | s = g (p, va_arg (v,int)); | |
999 | va_end (v); | |
1000 | return s; | |
1001 | } | |
1002 | int test (int i, double x); | |
1003 | struct s1 {int (*f) (int a);}; | |
1004 | struct s2 {int (*f) (double a);}; | |
1005 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1006 | int argc; | |
1007 | char **argv; | |
1008 | ||
1009 | int main() { | |
1010 | ||
1011 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1012 | ||
1013 | ; return 0; } | |
1014 | EOF | |
72cfdc76 | 1015 | if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1016 | rm -rf conftest* |
1017 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1018 | else | |
1019 | echo "configure: failed program was:" >&5 | |
1020 | cat conftest.$ac_ext >&5 | |
1021 | fi | |
1022 | rm -f conftest* | |
1023 | done | |
1024 | CC="$ac_save_CC" | |
1025 | ||
1026 | fi | |
1027 | ||
1028 | if test -z "$am_cv_prog_cc_stdc"; then | |
1029 | echo "$ac_t""none needed" 1>&6 | |
1030 | else | |
1031 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1032 | fi | |
1033 | case "x$am_cv_prog_cc_stdc" in | |
1034 | x|xno) ;; | |
1035 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1036 | esac | |
1037 | ||
1038 | ||
1039 | ac_aux_dir= | |
1040 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1041 | if test -f $ac_dir/install-sh; then | |
1042 | ac_aux_dir=$ac_dir | |
1043 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1044 | break | |
1045 | elif test -f $ac_dir/install.sh; then | |
1046 | ac_aux_dir=$ac_dir | |
1047 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1048 | break | |
1049 | fi | |
1050 | done | |
1051 | if test -z "$ac_aux_dir"; then | |
1052 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1053 | fi | |
1054 | ac_config_guess=$ac_aux_dir/config.guess | |
1055 | ac_config_sub=$ac_aux_dir/config.sub | |
1056 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1057 | ||
1058 | ||
1059 | # Do some error checking and defaulting for the host and target type. | |
1060 | # The inputs are: | |
1061 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1062 | # | |
1063 | # The rules are: | |
1064 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1065 | # same time. | |
1066 | # 2. Host defaults to nonopt. | |
1067 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1068 | # as determined by config.guess. | |
1069 | # 4. Target and build default to nonopt. | |
1070 | # 5. If nonopt is not specified, then target and build default to host. | |
1071 | ||
1072 | # The aliases save the names the user supplied, while $host etc. | |
1073 | # will get canonicalized. | |
1074 | case $host---$target---$nonopt in | |
1075 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1076 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1077 | esac | |
1078 | ||
1079 | ||
1080 | # Make sure we can run config.sub. | |
1081 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1082 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1083 | fi | |
1084 | ||
1085 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
72cfdc76 | 1086 | echo "configure:1087: checking host system type" >&5 |
c906108c SS |
1087 | |
1088 | host_alias=$host | |
1089 | case "$host_alias" in | |
1090 | NONE) | |
1091 | case $nonopt in | |
1092 | NONE) | |
1093 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1094 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1095 | fi ;; | |
1096 | *) host_alias=$nonopt ;; | |
1097 | esac ;; | |
1098 | esac | |
1099 | ||
1100 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1101 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1102 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1103 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1104 | echo "$ac_t""$host" 1>&6 | |
1105 | ||
1106 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
72cfdc76 | 1107 | echo "configure:1108: checking target system type" >&5 |
c906108c SS |
1108 | |
1109 | target_alias=$target | |
1110 | case "$target_alias" in | |
1111 | NONE) | |
1112 | case $nonopt in | |
1113 | NONE) target_alias=$host_alias ;; | |
1114 | *) target_alias=$nonopt ;; | |
1115 | esac ;; | |
1116 | esac | |
1117 | ||
1118 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1119 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1120 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1121 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1122 | echo "$ac_t""$target" 1>&6 | |
1123 | ||
1124 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
72cfdc76 | 1125 | echo "configure:1126: checking build system type" >&5 |
c906108c SS |
1126 | |
1127 | build_alias=$build | |
1128 | case "$build_alias" in | |
1129 | NONE) | |
1130 | case $nonopt in | |
1131 | NONE) build_alias=$host_alias ;; | |
1132 | *) build_alias=$nonopt ;; | |
1133 | esac ;; | |
1134 | esac | |
1135 | ||
1136 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1137 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1138 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1139 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1140 | echo "$ac_t""$build" 1>&6 | |
1141 | ||
1142 | test "$host_alias" != "$target_alias" && | |
1143 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1144 | NONENONEs,x,x, && | |
1145 | program_prefix=${target_alias}- | |
1146 | ||
1147 | ||
8bb2c122 MK |
1148 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1149 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1150 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1151 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1152 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1153 | # 2.5x. | |
1154 | if test $host != $build; then | |
1155 | ac_tool_prefix=${host_alias}- | |
1156 | else | |
1157 | ac_tool_prefix= | |
1158 | fi | |
1159 | ||
1160 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1161 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1162 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 1163 | echo "configure:1164: checking for $ac_word" >&5 |
8bb2c122 MK |
1164 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1165 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1166 | else | |
1167 | if test -n "$RANLIB"; then | |
1168 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1169 | else | |
1170 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1171 | ac_dummy="$PATH" | |
1172 | for ac_dir in $ac_dummy; do | |
1173 | test -z "$ac_dir" && ac_dir=. | |
1174 | if test -f $ac_dir/$ac_word; then | |
1175 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1176 | break | |
1177 | fi | |
1178 | done | |
1179 | IFS="$ac_save_ifs" | |
1180 | fi | |
1181 | fi | |
1182 | RANLIB="$ac_cv_prog_RANLIB" | |
1183 | if test -n "$RANLIB"; then | |
1184 | echo "$ac_t""$RANLIB" 1>&6 | |
1185 | else | |
1186 | echo "$ac_t""no" 1>&6 | |
1187 | fi | |
1188 | ||
1189 | ||
1190 | if test -z "$ac_cv_prog_RANLIB"; then | |
1191 | if test -n "$ac_tool_prefix"; then | |
1192 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1193 | set dummy ranlib; ac_word=$2 | |
1194 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 1195 | echo "configure:1196: checking for $ac_word" >&5 |
8bb2c122 MK |
1196 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1198 | else | |
1199 | if test -n "$RANLIB"; then | |
1200 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1201 | else | |
1202 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1203 | ac_dummy="$PATH" | |
1204 | for ac_dir in $ac_dummy; do | |
1205 | test -z "$ac_dir" && ac_dir=. | |
1206 | if test -f $ac_dir/$ac_word; then | |
1207 | ac_cv_prog_RANLIB="ranlib" | |
1208 | break | |
1209 | fi | |
1210 | done | |
1211 | IFS="$ac_save_ifs" | |
1212 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1213 | fi | |
1214 | fi | |
1215 | RANLIB="$ac_cv_prog_RANLIB" | |
1216 | if test -n "$RANLIB"; then | |
1217 | echo "$ac_t""$RANLIB" 1>&6 | |
1218 | else | |
1219 | echo "$ac_t""no" 1>&6 | |
1220 | fi | |
1221 | ||
1222 | else | |
1223 | RANLIB=":" | |
1224 | fi | |
1225 | fi | |
1226 | ||
1227 | ||
c906108c SS |
1228 | ALL_LINGUAS= |
1229 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
72cfdc76 | 1230 | echo "configure:1231: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1231 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1232 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1233 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1234 | else | |
1235 | cat > conftestmake <<\EOF | |
1236 | all: | |
1237 | @echo 'ac_maketemp="${MAKE}"' | |
1238 | EOF | |
1239 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1240 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1241 | if test -n "$ac_maketemp"; then | |
1242 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1243 | else | |
1244 | eval ac_cv_prog_make_${ac_make}_set=no | |
1245 | fi | |
1246 | rm -f conftestmake | |
1247 | fi | |
1248 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1249 | echo "$ac_t""yes" 1>&6 | |
1250 | SET_MAKE= | |
1251 | else | |
1252 | echo "$ac_t""no" 1>&6 | |
1253 | SET_MAKE="MAKE=${MAKE-make}" | |
1254 | fi | |
1255 | ||
1256 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1257 | set dummy ranlib; ac_word=$2 | |
1258 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 1259 | echo "configure:1260: checking for $ac_word" >&5 |
c906108c SS |
1260 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1261 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1262 | else | |
1263 | if test -n "$RANLIB"; then | |
1264 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1265 | else | |
1266 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1267 | ac_dummy="$PATH" | |
1268 | for ac_dir in $ac_dummy; do | |
1269 | test -z "$ac_dir" && ac_dir=. | |
1270 | if test -f $ac_dir/$ac_word; then | |
1271 | ac_cv_prog_RANLIB="ranlib" | |
1272 | break | |
1273 | fi | |
1274 | done | |
1275 | IFS="$ac_save_ifs" | |
1276 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1277 | fi | |
1278 | fi | |
1279 | RANLIB="$ac_cv_prog_RANLIB" | |
1280 | if test -n "$RANLIB"; then | |
1281 | echo "$ac_t""$RANLIB" 1>&6 | |
1282 | else | |
1283 | echo "$ac_t""no" 1>&6 | |
1284 | fi | |
1285 | ||
1286 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
72cfdc76 | 1287 | echo "configure:1288: checking for ANSI C header files" >&5 |
c906108c SS |
1288 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1290 | else | |
1291 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1292 | #line 1293 "configure" |
c906108c SS |
1293 | #include "confdefs.h" |
1294 | #include <stdlib.h> | |
1295 | #include <stdarg.h> | |
1296 | #include <string.h> | |
1297 | #include <float.h> | |
1298 | EOF | |
1299 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 1300 | { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1301 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1302 | if test -z "$ac_err"; then | |
1303 | rm -rf conftest* | |
1304 | ac_cv_header_stdc=yes | |
1305 | else | |
1306 | echo "$ac_err" >&5 | |
1307 | echo "configure: failed program was:" >&5 | |
1308 | cat conftest.$ac_ext >&5 | |
1309 | rm -rf conftest* | |
1310 | ac_cv_header_stdc=no | |
1311 | fi | |
1312 | rm -f conftest* | |
1313 | ||
1314 | if test $ac_cv_header_stdc = yes; then | |
1315 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1316 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1317 | #line 1318 "configure" |
c906108c SS |
1318 | #include "confdefs.h" |
1319 | #include <string.h> | |
1320 | EOF | |
1321 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1322 | egrep "memchr" >/dev/null 2>&1; then | |
1323 | : | |
1324 | else | |
1325 | rm -rf conftest* | |
1326 | ac_cv_header_stdc=no | |
1327 | fi | |
1328 | rm -f conftest* | |
1329 | ||
1330 | fi | |
1331 | ||
1332 | if test $ac_cv_header_stdc = yes; then | |
1333 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1334 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1335 | #line 1336 "configure" |
c906108c SS |
1336 | #include "confdefs.h" |
1337 | #include <stdlib.h> | |
1338 | EOF | |
1339 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1340 | egrep "free" >/dev/null 2>&1; then | |
1341 | : | |
1342 | else | |
1343 | rm -rf conftest* | |
1344 | ac_cv_header_stdc=no | |
1345 | fi | |
1346 | rm -f conftest* | |
1347 | ||
1348 | fi | |
1349 | ||
1350 | if test $ac_cv_header_stdc = yes; then | |
1351 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1352 | if test "$cross_compiling" = yes; then | |
1353 | : | |
1354 | else | |
1355 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1356 | #line 1357 "configure" |
c906108c SS |
1357 | #include "confdefs.h" |
1358 | #include <ctype.h> | |
1359 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1360 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1361 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1362 | int main () { int i; for (i = 0; i < 256; i++) | |
1363 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1364 | exit (0); } | |
1365 | ||
1366 | EOF | |
72cfdc76 | 1367 | if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1368 | then |
1369 | : | |
1370 | else | |
1371 | echo "configure: failed program was:" >&5 | |
1372 | cat conftest.$ac_ext >&5 | |
1373 | rm -fr conftest* | |
1374 | ac_cv_header_stdc=no | |
1375 | fi | |
1376 | rm -fr conftest* | |
1377 | fi | |
1378 | ||
1379 | fi | |
1380 | fi | |
1381 | ||
1382 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1383 | if test $ac_cv_header_stdc = yes; then | |
1384 | cat >> confdefs.h <<\EOF | |
1385 | #define STDC_HEADERS 1 | |
1386 | EOF | |
1387 | ||
1388 | fi | |
1389 | ||
1390 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
72cfdc76 | 1391 | echo "configure:1392: checking for working const" >&5 |
c906108c SS |
1392 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1393 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1394 | else | |
1395 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1396 | #line 1397 "configure" |
c906108c SS |
1397 | #include "confdefs.h" |
1398 | ||
1399 | int main() { | |
1400 | ||
1401 | /* Ultrix mips cc rejects this. */ | |
1402 | typedef int charset[2]; const charset x; | |
1403 | /* SunOS 4.1.1 cc rejects this. */ | |
1404 | char const *const *ccp; | |
1405 | char **p; | |
1406 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1407 | struct point {int x, y;}; | |
1408 | static struct point const zero = {0,0}; | |
1409 | /* AIX XL C 1.02.0.0 rejects this. | |
1410 | It does not let you subtract one const X* pointer from another in an arm | |
1411 | of an if-expression whose if-part is not a constant expression */ | |
1412 | const char *g = "string"; | |
1413 | ccp = &g + (g ? g-g : 0); | |
1414 | /* HPUX 7.0 cc rejects these. */ | |
1415 | ++ccp; | |
1416 | p = (char**) ccp; | |
1417 | ccp = (char const *const *) p; | |
1418 | { /* SCO 3.2v4 cc rejects this. */ | |
1419 | char *t; | |
1420 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1421 | ||
1422 | *t++ = 0; | |
1423 | } | |
1424 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1425 | int x[] = {25, 17}; | |
1426 | const int *foo = &x[0]; | |
1427 | ++foo; | |
1428 | } | |
1429 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1430 | typedef const int *iptr; | |
1431 | iptr p = 0; | |
1432 | ++p; | |
1433 | } | |
1434 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1435 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1436 | struct s { int j; const int *ap[3]; }; | |
1437 | struct s *b; b->j = 5; | |
1438 | } | |
1439 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1440 | const int foo = 10; | |
1441 | } | |
1442 | ||
1443 | ; return 0; } | |
1444 | EOF | |
72cfdc76 | 1445 | if { (eval echo configure:1446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1446 | rm -rf conftest* |
1447 | ac_cv_c_const=yes | |
1448 | else | |
1449 | echo "configure: failed program was:" >&5 | |
1450 | cat conftest.$ac_ext >&5 | |
1451 | rm -rf conftest* | |
1452 | ac_cv_c_const=no | |
1453 | fi | |
1454 | rm -f conftest* | |
1455 | fi | |
1456 | ||
1457 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1458 | if test $ac_cv_c_const = no; then | |
1459 | cat >> confdefs.h <<\EOF | |
1460 | #define const | |
1461 | EOF | |
1462 | ||
1463 | fi | |
1464 | ||
1465 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
72cfdc76 | 1466 | echo "configure:1467: checking for inline" >&5 |
c906108c SS |
1467 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1469 | else | |
1470 | ac_cv_c_inline=no | |
1471 | for ac_kw in inline __inline__ __inline; do | |
1472 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1473 | #line 1474 "configure" |
c906108c SS |
1474 | #include "confdefs.h" |
1475 | ||
1476 | int main() { | |
1477 | } $ac_kw foo() { | |
1478 | ; return 0; } | |
1479 | EOF | |
72cfdc76 | 1480 | if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1481 | rm -rf conftest* |
1482 | ac_cv_c_inline=$ac_kw; break | |
1483 | else | |
1484 | echo "configure: failed program was:" >&5 | |
1485 | cat conftest.$ac_ext >&5 | |
1486 | fi | |
1487 | rm -f conftest* | |
1488 | done | |
1489 | ||
1490 | fi | |
1491 | ||
1492 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1493 | case "$ac_cv_c_inline" in | |
1494 | inline | yes) ;; | |
1495 | no) cat >> confdefs.h <<\EOF | |
1496 | #define inline | |
1497 | EOF | |
1498 | ;; | |
1499 | *) cat >> confdefs.h <<EOF | |
1500 | #define inline $ac_cv_c_inline | |
1501 | EOF | |
1502 | ;; | |
1503 | esac | |
1504 | ||
1505 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
72cfdc76 | 1506 | echo "configure:1507: checking for off_t" >&5 |
c906108c SS |
1507 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1508 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1509 | else | |
1510 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1511 | #line 1512 "configure" |
c906108c SS |
1512 | #include "confdefs.h" |
1513 | #include <sys/types.h> | |
1514 | #if STDC_HEADERS | |
1515 | #include <stdlib.h> | |
1516 | #include <stddef.h> | |
1517 | #endif | |
1518 | EOF | |
1519 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1520 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1521 | rm -rf conftest* | |
1522 | ac_cv_type_off_t=yes | |
1523 | else | |
1524 | rm -rf conftest* | |
1525 | ac_cv_type_off_t=no | |
1526 | fi | |
1527 | rm -f conftest* | |
1528 | ||
1529 | fi | |
1530 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1531 | if test $ac_cv_type_off_t = no; then | |
1532 | cat >> confdefs.h <<\EOF | |
1533 | #define off_t long | |
1534 | EOF | |
1535 | ||
1536 | fi | |
1537 | ||
1538 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
72cfdc76 | 1539 | echo "configure:1540: checking for size_t" >&5 |
c906108c SS |
1540 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1541 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1542 | else | |
1543 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1544 | #line 1545 "configure" |
c906108c SS |
1545 | #include "confdefs.h" |
1546 | #include <sys/types.h> | |
1547 | #if STDC_HEADERS | |
1548 | #include <stdlib.h> | |
1549 | #include <stddef.h> | |
1550 | #endif | |
1551 | EOF | |
1552 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1553 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1554 | rm -rf conftest* | |
1555 | ac_cv_type_size_t=yes | |
1556 | else | |
1557 | rm -rf conftest* | |
1558 | ac_cv_type_size_t=no | |
1559 | fi | |
1560 | rm -f conftest* | |
1561 | ||
1562 | fi | |
1563 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1564 | if test $ac_cv_type_size_t = no; then | |
1565 | cat >> confdefs.h <<\EOF | |
1566 | #define size_t unsigned | |
1567 | EOF | |
1568 | ||
1569 | fi | |
1570 | ||
1571 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1572 | # for constant arguments. Useless! | |
1573 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
72cfdc76 | 1574 | echo "configure:1575: checking for working alloca.h" >&5 |
c906108c SS |
1575 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1576 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1577 | else | |
1578 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1579 | #line 1580 "configure" |
c906108c SS |
1580 | #include "confdefs.h" |
1581 | #include <alloca.h> | |
1582 | int main() { | |
1583 | char *p = alloca(2 * sizeof(int)); | |
1584 | ; return 0; } | |
1585 | EOF | |
72cfdc76 | 1586 | if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1587 | rm -rf conftest* |
1588 | ac_cv_header_alloca_h=yes | |
1589 | else | |
1590 | echo "configure: failed program was:" >&5 | |
1591 | cat conftest.$ac_ext >&5 | |
1592 | rm -rf conftest* | |
1593 | ac_cv_header_alloca_h=no | |
1594 | fi | |
1595 | rm -f conftest* | |
1596 | fi | |
1597 | ||
1598 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1599 | if test $ac_cv_header_alloca_h = yes; then | |
1600 | cat >> confdefs.h <<\EOF | |
1601 | #define HAVE_ALLOCA_H 1 | |
1602 | EOF | |
1603 | ||
1604 | fi | |
1605 | ||
1606 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
72cfdc76 | 1607 | echo "configure:1608: checking for alloca" >&5 |
c906108c SS |
1608 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1609 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1610 | else | |
1611 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1612 | #line 1613 "configure" |
c906108c SS |
1613 | #include "confdefs.h" |
1614 | ||
1615 | #ifdef __GNUC__ | |
1616 | # define alloca __builtin_alloca | |
1617 | #else | |
1618 | # ifdef _MSC_VER | |
1619 | # include <malloc.h> | |
1620 | # define alloca _alloca | |
1621 | # else | |
1622 | # if HAVE_ALLOCA_H | |
1623 | # include <alloca.h> | |
1624 | # else | |
1625 | # ifdef _AIX | |
1626 | #pragma alloca | |
1627 | # else | |
1628 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1629 | char *alloca (); | |
1630 | # endif | |
1631 | # endif | |
1632 | # endif | |
1633 | # endif | |
1634 | #endif | |
1635 | ||
1636 | int main() { | |
1637 | char *p = (char *) alloca(1); | |
1638 | ; return 0; } | |
1639 | EOF | |
72cfdc76 | 1640 | if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1641 | rm -rf conftest* |
1642 | ac_cv_func_alloca_works=yes | |
1643 | else | |
1644 | echo "configure: failed program was:" >&5 | |
1645 | cat conftest.$ac_ext >&5 | |
1646 | rm -rf conftest* | |
1647 | ac_cv_func_alloca_works=no | |
1648 | fi | |
1649 | rm -f conftest* | |
1650 | fi | |
1651 | ||
1652 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1653 | if test $ac_cv_func_alloca_works = yes; then | |
1654 | cat >> confdefs.h <<\EOF | |
1655 | #define HAVE_ALLOCA 1 | |
1656 | EOF | |
1657 | ||
1658 | fi | |
1659 | ||
1660 | if test $ac_cv_func_alloca_works = no; then | |
1661 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1662 | # that cause trouble. Some versions do not even contain alloca or | |
1663 | # contain a buggy version. If you still want to use their alloca, | |
1664 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1665 | ALLOCA=alloca.${ac_objext} | |
1666 | cat >> confdefs.h <<\EOF | |
1667 | #define C_ALLOCA 1 | |
1668 | EOF | |
1669 | ||
1670 | ||
1671 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
72cfdc76 | 1672 | echo "configure:1673: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1673 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1674 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1675 | else | |
1676 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1677 | #line 1678 "configure" |
c906108c SS |
1678 | #include "confdefs.h" |
1679 | #if defined(CRAY) && ! defined(CRAY2) | |
1680 | webecray | |
1681 | #else | |
1682 | wenotbecray | |
1683 | #endif | |
1684 | ||
1685 | EOF | |
1686 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1687 | egrep "webecray" >/dev/null 2>&1; then | |
1688 | rm -rf conftest* | |
1689 | ac_cv_os_cray=yes | |
1690 | else | |
1691 | rm -rf conftest* | |
1692 | ac_cv_os_cray=no | |
1693 | fi | |
1694 | rm -f conftest* | |
1695 | ||
1696 | fi | |
1697 | ||
1698 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1699 | if test $ac_cv_os_cray = yes; then | |
1700 | for ac_func in _getb67 GETB67 getb67; do | |
1701 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 1702 | echo "configure:1703: checking for $ac_func" >&5 |
c906108c SS |
1703 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1705 | else | |
1706 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1707 | #line 1708 "configure" |
c906108c SS |
1708 | #include "confdefs.h" |
1709 | /* System header to define __stub macros and hopefully few prototypes, | |
1710 | which can conflict with char $ac_func(); below. */ | |
1711 | #include <assert.h> | |
1712 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1713 | /* We use char because int might match the return type of a gcc2 | |
1714 | builtin and then its argument prototype would still apply. */ | |
1715 | char $ac_func(); | |
1716 | ||
1717 | int main() { | |
1718 | ||
1719 | /* The GNU C library defines this for functions which it implements | |
1720 | to always fail with ENOSYS. Some functions are actually named | |
1721 | something starting with __ and the normal name is an alias. */ | |
1722 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1723 | choke me | |
1724 | #else | |
1725 | $ac_func(); | |
1726 | #endif | |
1727 | ||
1728 | ; return 0; } | |
1729 | EOF | |
72cfdc76 | 1730 | if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1731 | rm -rf conftest* |
1732 | eval "ac_cv_func_$ac_func=yes" | |
1733 | else | |
1734 | echo "configure: failed program was:" >&5 | |
1735 | cat conftest.$ac_ext >&5 | |
1736 | rm -rf conftest* | |
1737 | eval "ac_cv_func_$ac_func=no" | |
1738 | fi | |
1739 | rm -f conftest* | |
1740 | fi | |
1741 | ||
1742 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1743 | echo "$ac_t""yes" 1>&6 | |
1744 | cat >> confdefs.h <<EOF | |
1745 | #define CRAY_STACKSEG_END $ac_func | |
1746 | EOF | |
1747 | ||
1748 | break | |
1749 | else | |
1750 | echo "$ac_t""no" 1>&6 | |
1751 | fi | |
1752 | ||
1753 | done | |
1754 | fi | |
1755 | ||
1756 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
72cfdc76 | 1757 | echo "configure:1758: checking stack direction for C alloca" >&5 |
c906108c SS |
1758 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1760 | else | |
1761 | if test "$cross_compiling" = yes; then | |
1762 | ac_cv_c_stack_direction=0 | |
1763 | else | |
1764 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1765 | #line 1766 "configure" |
c906108c SS |
1766 | #include "confdefs.h" |
1767 | find_stack_direction () | |
1768 | { | |
1769 | static char *addr = 0; | |
1770 | auto char dummy; | |
1771 | if (addr == 0) | |
1772 | { | |
1773 | addr = &dummy; | |
1774 | return find_stack_direction (); | |
1775 | } | |
1776 | else | |
1777 | return (&dummy > addr) ? 1 : -1; | |
1778 | } | |
1779 | main () | |
1780 | { | |
1781 | exit (find_stack_direction() < 0); | |
1782 | } | |
1783 | EOF | |
72cfdc76 | 1784 | if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1785 | then |
1786 | ac_cv_c_stack_direction=1 | |
1787 | else | |
1788 | echo "configure: failed program was:" >&5 | |
1789 | cat conftest.$ac_ext >&5 | |
1790 | rm -fr conftest* | |
1791 | ac_cv_c_stack_direction=-1 | |
1792 | fi | |
1793 | rm -fr conftest* | |
1794 | fi | |
1795 | ||
1796 | fi | |
1797 | ||
1798 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1799 | cat >> confdefs.h <<EOF | |
1800 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1801 | EOF | |
1802 | ||
1803 | fi | |
1804 | ||
c41b7eb1 | 1805 | for ac_hdr in unistd.h |
c906108c SS |
1806 | do |
1807 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1808 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 1809 | echo "configure:1810: checking for $ac_hdr" >&5 |
c906108c SS |
1810 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1811 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1812 | else | |
1813 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1814 | #line 1815 "configure" |
c906108c SS |
1815 | #include "confdefs.h" |
1816 | #include <$ac_hdr> | |
1817 | EOF | |
1818 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 1819 | { (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1820 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1821 | if test -z "$ac_err"; then | |
1822 | rm -rf conftest* | |
1823 | eval "ac_cv_header_$ac_safe=yes" | |
1824 | else | |
1825 | echo "$ac_err" >&5 | |
1826 | echo "configure: failed program was:" >&5 | |
1827 | cat conftest.$ac_ext >&5 | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=no" | |
1830 | fi | |
1831 | rm -f conftest* | |
1832 | fi | |
1833 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1834 | echo "$ac_t""yes" 1>&6 | |
1835 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1836 | cat >> confdefs.h <<EOF | |
1837 | #define $ac_tr_hdr 1 | |
1838 | EOF | |
1839 | ||
1840 | else | |
1841 | echo "$ac_t""no" 1>&6 | |
1842 | fi | |
1843 | done | |
1844 | ||
1845 | for ac_func in getpagesize | |
1846 | do | |
1847 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 1848 | echo "configure:1849: checking for $ac_func" >&5 |
c906108c SS |
1849 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1851 | else | |
1852 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1853 | #line 1854 "configure" |
c906108c SS |
1854 | #include "confdefs.h" |
1855 | /* System header to define __stub macros and hopefully few prototypes, | |
1856 | which can conflict with char $ac_func(); below. */ | |
1857 | #include <assert.h> | |
1858 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1859 | /* We use char because int might match the return type of a gcc2 | |
1860 | builtin and then its argument prototype would still apply. */ | |
1861 | char $ac_func(); | |
1862 | ||
1863 | int main() { | |
1864 | ||
1865 | /* The GNU C library defines this for functions which it implements | |
1866 | to always fail with ENOSYS. Some functions are actually named | |
1867 | something starting with __ and the normal name is an alias. */ | |
1868 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1869 | choke me | |
1870 | #else | |
1871 | $ac_func(); | |
1872 | #endif | |
1873 | ||
1874 | ; return 0; } | |
1875 | EOF | |
72cfdc76 | 1876 | if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1877 | rm -rf conftest* |
1878 | eval "ac_cv_func_$ac_func=yes" | |
1879 | else | |
1880 | echo "configure: failed program was:" >&5 | |
1881 | cat conftest.$ac_ext >&5 | |
1882 | rm -rf conftest* | |
1883 | eval "ac_cv_func_$ac_func=no" | |
1884 | fi | |
1885 | rm -f conftest* | |
1886 | fi | |
1887 | ||
1888 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1889 | echo "$ac_t""yes" 1>&6 | |
1890 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1891 | cat >> confdefs.h <<EOF | |
1892 | #define $ac_tr_func 1 | |
1893 | EOF | |
1894 | ||
1895 | else | |
1896 | echo "$ac_t""no" 1>&6 | |
1897 | fi | |
1898 | done | |
1899 | ||
1900 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
72cfdc76 | 1901 | echo "configure:1902: checking for working mmap" >&5 |
c906108c SS |
1902 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1903 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1904 | else | |
1905 | if test "$cross_compiling" = yes; then | |
1906 | ac_cv_func_mmap_fixed_mapped=no | |
1907 | else | |
1908 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 1909 | #line 1910 "configure" |
c906108c SS |
1910 | #include "confdefs.h" |
1911 | ||
1912 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1913 | Here is a matrix of mmap possibilities: | |
1914 | mmap private not fixed | |
1915 | mmap private fixed at somewhere currently unmapped | |
1916 | mmap private fixed at somewhere already mapped | |
1917 | mmap shared not fixed | |
1918 | mmap shared fixed at somewhere currently unmapped | |
1919 | mmap shared fixed at somewhere already mapped | |
1920 | For private mappings, we should verify that changes cannot be read() | |
1921 | back from the file, nor mmap's back from the file at a different | |
1922 | address. (There have been systems where private was not correctly | |
1923 | implemented like the infamous i386 svr4.0, and systems where the | |
1924 | VM page cache was not coherent with the filesystem buffer cache | |
1925 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1926 | For shared mappings, we should conversely verify that changes get | |
1927 | propogated back to all the places they're supposed to be. | |
1928 | ||
1929 | Grep wants private fixed already mapped. | |
1930 | The main things grep needs to know about mmap are: | |
1931 | * does it exist and is it safe to write into the mmap'd area | |
1932 | * how to use it (BSD variants) */ | |
1933 | #include <sys/types.h> | |
1934 | #include <fcntl.h> | |
1935 | #include <sys/mman.h> | |
1936 | ||
1937 | /* This mess was copied from the GNU getpagesize.h. */ | |
1938 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1939 | # ifdef HAVE_UNISTD_H |
1940 | # include <unistd.h> | |
1941 | # endif | |
c906108c SS |
1942 | |
1943 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1944 | # ifndef HAVE_SYS_PARAM_H | |
1945 | # define HAVE_SYS_PARAM_H 1 | |
1946 | # endif | |
1947 | ||
1948 | # ifdef _SC_PAGESIZE | |
1949 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1950 | # else /* no _SC_PAGESIZE */ | |
1951 | # ifdef HAVE_SYS_PARAM_H | |
1952 | # include <sys/param.h> | |
1953 | # ifdef EXEC_PAGESIZE | |
1954 | # define getpagesize() EXEC_PAGESIZE | |
1955 | # else /* no EXEC_PAGESIZE */ | |
1956 | # ifdef NBPG | |
1957 | # define getpagesize() NBPG * CLSIZE | |
1958 | # ifndef CLSIZE | |
1959 | # define CLSIZE 1 | |
1960 | # endif /* no CLSIZE */ | |
1961 | # else /* no NBPG */ | |
1962 | # ifdef NBPC | |
1963 | # define getpagesize() NBPC | |
1964 | # else /* no NBPC */ | |
1965 | # ifdef PAGESIZE | |
1966 | # define getpagesize() PAGESIZE | |
1967 | # endif /* PAGESIZE */ | |
1968 | # endif /* no NBPC */ | |
1969 | # endif /* no NBPG */ | |
1970 | # endif /* no EXEC_PAGESIZE */ | |
1971 | # else /* no HAVE_SYS_PARAM_H */ | |
1972 | # define getpagesize() 8192 /* punt totally */ | |
1973 | # endif /* no HAVE_SYS_PARAM_H */ | |
1974 | # endif /* no _SC_PAGESIZE */ | |
1975 | ||
1976 | #endif /* no HAVE_GETPAGESIZE */ | |
1977 | ||
1978 | #ifdef __cplusplus | |
1979 | extern "C" { void *malloc(unsigned); } | |
1980 | #else | |
1981 | char *malloc(); | |
1982 | #endif | |
1983 | ||
1984 | int | |
1985 | main() | |
1986 | { | |
1987 | char *data, *data2, *data3; | |
1988 | int i, pagesize; | |
1989 | int fd; | |
1990 | ||
1991 | pagesize = getpagesize(); | |
1992 | ||
1993 | /* | |
1994 | * First, make a file with some known garbage in it. | |
1995 | */ | |
1996 | data = malloc(pagesize); | |
1997 | if (!data) | |
1998 | exit(1); | |
1999 | for (i = 0; i < pagesize; ++i) | |
2000 | *(data + i) = rand(); | |
2001 | umask(0); | |
2002 | fd = creat("conftestmmap", 0600); | |
2003 | if (fd < 0) | |
2004 | exit(1); | |
2005 | if (write(fd, data, pagesize) != pagesize) | |
2006 | exit(1); | |
2007 | close(fd); | |
2008 | ||
2009 | /* | |
2010 | * Next, try to mmap the file at a fixed address which | |
2011 | * already has something else allocated at it. If we can, | |
2012 | * also make sure that we see the same garbage. | |
2013 | */ | |
2014 | fd = open("conftestmmap", O_RDWR); | |
2015 | if (fd < 0) | |
2016 | exit(1); | |
2017 | data2 = malloc(2 * pagesize); | |
2018 | if (!data2) | |
2019 | exit(1); | |
2020 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2021 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2022 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2023 | exit(1); | |
2024 | for (i = 0; i < pagesize; ++i) | |
2025 | if (*(data + i) != *(data2 + i)) | |
2026 | exit(1); | |
2027 | ||
2028 | /* | |
2029 | * Finally, make sure that changes to the mapped area | |
2030 | * do not percolate back to the file as seen by read(). | |
2031 | * (This is a bug on some variants of i386 svr4.0.) | |
2032 | */ | |
2033 | for (i = 0; i < pagesize; ++i) | |
2034 | *(data2 + i) = *(data2 + i) + 1; | |
2035 | data3 = malloc(pagesize); | |
2036 | if (!data3) | |
2037 | exit(1); | |
2038 | if (read(fd, data3, pagesize) != pagesize) | |
2039 | exit(1); | |
2040 | for (i = 0; i < pagesize; ++i) | |
2041 | if (*(data + i) != *(data3 + i)) | |
2042 | exit(1); | |
2043 | close(fd); | |
2044 | unlink("conftestmmap"); | |
2045 | exit(0); | |
2046 | } | |
2047 | ||
2048 | EOF | |
72cfdc76 | 2049 | if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2050 | then |
2051 | ac_cv_func_mmap_fixed_mapped=yes | |
2052 | else | |
2053 | echo "configure: failed program was:" >&5 | |
2054 | cat conftest.$ac_ext >&5 | |
2055 | rm -fr conftest* | |
2056 | ac_cv_func_mmap_fixed_mapped=no | |
2057 | fi | |
2058 | rm -fr conftest* | |
2059 | fi | |
2060 | ||
2061 | fi | |
2062 | ||
2063 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2064 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2065 | cat >> confdefs.h <<\EOF | |
2066 | #define HAVE_MMAP 1 | |
2067 | EOF | |
2068 | ||
2069 | fi | |
2070 | ||
2071 | ||
2072 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2073 | unistd.h values.h sys/param.h | |
2074 | do | |
2075 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2076 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 2077 | echo "configure:2078: checking for $ac_hdr" >&5 |
c906108c SS |
2078 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2080 | else | |
2081 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2082 | #line 2083 "configure" |
c906108c SS |
2083 | #include "confdefs.h" |
2084 | #include <$ac_hdr> | |
2085 | EOF | |
2086 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 2087 | { (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2088 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2089 | if test -z "$ac_err"; then | |
2090 | rm -rf conftest* | |
2091 | eval "ac_cv_header_$ac_safe=yes" | |
2092 | else | |
2093 | echo "$ac_err" >&5 | |
2094 | echo "configure: failed program was:" >&5 | |
2095 | cat conftest.$ac_ext >&5 | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=no" | |
2098 | fi | |
2099 | rm -f conftest* | |
2100 | fi | |
2101 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2102 | echo "$ac_t""yes" 1>&6 | |
2103 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2104 | cat >> confdefs.h <<EOF | |
2105 | #define $ac_tr_hdr 1 | |
2106 | EOF | |
2107 | ||
2108 | else | |
2109 | echo "$ac_t""no" 1>&6 | |
2110 | fi | |
2111 | done | |
2112 | ||
2113 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2114 | __argz_count __argz_stringify __argz_next | |
2115 | do | |
2116 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 2117 | echo "configure:2118: checking for $ac_func" >&5 |
c906108c SS |
2118 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2120 | else | |
2121 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2122 | #line 2123 "configure" |
c906108c SS |
2123 | #include "confdefs.h" |
2124 | /* System header to define __stub macros and hopefully few prototypes, | |
2125 | which can conflict with char $ac_func(); below. */ | |
2126 | #include <assert.h> | |
2127 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2128 | /* We use char because int might match the return type of a gcc2 | |
2129 | builtin and then its argument prototype would still apply. */ | |
2130 | char $ac_func(); | |
2131 | ||
2132 | int main() { | |
2133 | ||
2134 | /* The GNU C library defines this for functions which it implements | |
2135 | to always fail with ENOSYS. Some functions are actually named | |
2136 | something starting with __ and the normal name is an alias. */ | |
2137 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2138 | choke me | |
2139 | #else | |
2140 | $ac_func(); | |
2141 | #endif | |
2142 | ||
2143 | ; return 0; } | |
2144 | EOF | |
72cfdc76 | 2145 | if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2146 | rm -rf conftest* |
2147 | eval "ac_cv_func_$ac_func=yes" | |
2148 | else | |
2149 | echo "configure: failed program was:" >&5 | |
2150 | cat conftest.$ac_ext >&5 | |
2151 | rm -rf conftest* | |
2152 | eval "ac_cv_func_$ac_func=no" | |
2153 | fi | |
2154 | rm -f conftest* | |
2155 | fi | |
2156 | ||
2157 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2158 | echo "$ac_t""yes" 1>&6 | |
2159 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2160 | cat >> confdefs.h <<EOF | |
2161 | #define $ac_tr_func 1 | |
2162 | EOF | |
2163 | ||
2164 | else | |
2165 | echo "$ac_t""no" 1>&6 | |
2166 | fi | |
2167 | done | |
2168 | ||
2169 | ||
2170 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2171 | for ac_func in stpcpy | |
2172 | do | |
2173 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 2174 | echo "configure:2175: checking for $ac_func" >&5 |
c906108c SS |
2175 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2177 | else | |
2178 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2179 | #line 2180 "configure" |
c906108c SS |
2180 | #include "confdefs.h" |
2181 | /* System header to define __stub macros and hopefully few prototypes, | |
2182 | which can conflict with char $ac_func(); below. */ | |
2183 | #include <assert.h> | |
2184 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2185 | /* We use char because int might match the return type of a gcc2 | |
2186 | builtin and then its argument prototype would still apply. */ | |
2187 | char $ac_func(); | |
2188 | ||
2189 | int main() { | |
2190 | ||
2191 | /* The GNU C library defines this for functions which it implements | |
2192 | to always fail with ENOSYS. Some functions are actually named | |
2193 | something starting with __ and the normal name is an alias. */ | |
2194 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2195 | choke me | |
2196 | #else | |
2197 | $ac_func(); | |
2198 | #endif | |
2199 | ||
2200 | ; return 0; } | |
2201 | EOF | |
72cfdc76 | 2202 | if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2203 | rm -rf conftest* |
2204 | eval "ac_cv_func_$ac_func=yes" | |
2205 | else | |
2206 | echo "configure: failed program was:" >&5 | |
2207 | cat conftest.$ac_ext >&5 | |
2208 | rm -rf conftest* | |
2209 | eval "ac_cv_func_$ac_func=no" | |
2210 | fi | |
2211 | rm -f conftest* | |
2212 | fi | |
2213 | ||
2214 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2215 | echo "$ac_t""yes" 1>&6 | |
2216 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2217 | cat >> confdefs.h <<EOF | |
2218 | #define $ac_tr_func 1 | |
2219 | EOF | |
2220 | ||
2221 | else | |
2222 | echo "$ac_t""no" 1>&6 | |
2223 | fi | |
2224 | done | |
2225 | ||
2226 | fi | |
2227 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2228 | cat >> confdefs.h <<\EOF | |
2229 | #define HAVE_STPCPY 1 | |
2230 | EOF | |
2231 | ||
2232 | fi | |
2233 | ||
2234 | if test $ac_cv_header_locale_h = yes; then | |
2235 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
72cfdc76 | 2236 | echo "configure:2237: checking for LC_MESSAGES" >&5 |
c906108c SS |
2237 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2238 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2239 | else | |
2240 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2241 | #line 2242 "configure" |
c906108c SS |
2242 | #include "confdefs.h" |
2243 | #include <locale.h> | |
2244 | int main() { | |
2245 | return LC_MESSAGES | |
2246 | ; return 0; } | |
2247 | EOF | |
72cfdc76 | 2248 | if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2249 | rm -rf conftest* |
2250 | am_cv_val_LC_MESSAGES=yes | |
2251 | else | |
2252 | echo "configure: failed program was:" >&5 | |
2253 | cat conftest.$ac_ext >&5 | |
2254 | rm -rf conftest* | |
2255 | am_cv_val_LC_MESSAGES=no | |
2256 | fi | |
2257 | rm -f conftest* | |
2258 | fi | |
2259 | ||
2260 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2261 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2262 | cat >> confdefs.h <<\EOF | |
2263 | #define HAVE_LC_MESSAGES 1 | |
2264 | EOF | |
2265 | ||
2266 | fi | |
2267 | fi | |
2268 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
72cfdc76 | 2269 | echo "configure:2270: checking whether NLS is requested" >&5 |
c906108c SS |
2270 | # Check whether --enable-nls or --disable-nls was given. |
2271 | if test "${enable_nls+set}" = set; then | |
2272 | enableval="$enable_nls" | |
2273 | USE_NLS=$enableval | |
2274 | else | |
2275 | USE_NLS=yes | |
2276 | fi | |
2277 | ||
2278 | echo "$ac_t""$USE_NLS" 1>&6 | |
2279 | ||
2280 | ||
2281 | USE_INCLUDED_LIBINTL=no | |
2282 | ||
2283 | if test "$USE_NLS" = "yes"; then | |
2284 | cat >> confdefs.h <<\EOF | |
2285 | #define ENABLE_NLS 1 | |
2286 | EOF | |
2287 | ||
2288 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
72cfdc76 | 2289 | echo "configure:2290: checking whether included gettext is requested" >&5 |
c906108c SS |
2290 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2291 | if test "${with_included_gettext+set}" = set; then | |
2292 | withval="$with_included_gettext" | |
2293 | nls_cv_force_use_gnu_gettext=$withval | |
2294 | else | |
2295 | nls_cv_force_use_gnu_gettext=no | |
2296 | fi | |
2297 | ||
2298 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2299 | ||
2300 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2301 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2302 | nls_cv_header_intl= | |
2303 | nls_cv_header_libgt= | |
2304 | CATOBJEXT=NONE | |
2305 | ||
2306 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2307 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
72cfdc76 | 2308 | echo "configure:2309: checking for libintl.h" >&5 |
c906108c SS |
2309 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2311 | else | |
2312 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2313 | #line 2314 "configure" |
c906108c SS |
2314 | #include "confdefs.h" |
2315 | #include <libintl.h> | |
2316 | EOF | |
2317 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 2318 | { (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2319 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2320 | if test -z "$ac_err"; then | |
2321 | rm -rf conftest* | |
2322 | eval "ac_cv_header_$ac_safe=yes" | |
2323 | else | |
2324 | echo "$ac_err" >&5 | |
2325 | echo "configure: failed program was:" >&5 | |
2326 | cat conftest.$ac_ext >&5 | |
2327 | rm -rf conftest* | |
2328 | eval "ac_cv_header_$ac_safe=no" | |
2329 | fi | |
2330 | rm -f conftest* | |
2331 | fi | |
2332 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2333 | echo "$ac_t""yes" 1>&6 | |
2334 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
72cfdc76 | 2335 | echo "configure:2336: checking for gettext in libc" >&5 |
c906108c SS |
2336 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2338 | else | |
2339 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2340 | #line 2341 "configure" |
c906108c SS |
2341 | #include "confdefs.h" |
2342 | #include <libintl.h> | |
2343 | int main() { | |
2344 | return (int) gettext ("") | |
2345 | ; return 0; } | |
2346 | EOF | |
72cfdc76 | 2347 | if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2348 | rm -rf conftest* |
2349 | gt_cv_func_gettext_libc=yes | |
2350 | else | |
2351 | echo "configure: failed program was:" >&5 | |
2352 | cat conftest.$ac_ext >&5 | |
2353 | rm -rf conftest* | |
2354 | gt_cv_func_gettext_libc=no | |
2355 | fi | |
2356 | rm -f conftest* | |
2357 | fi | |
2358 | ||
2359 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2360 | ||
2361 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2362 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
72cfdc76 | 2363 | echo "configure:2364: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2364 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2365 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2367 | else | |
2368 | ac_save_LIBS="$LIBS" | |
2369 | LIBS="-lintl $LIBS" | |
2370 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2371 | #line 2372 "configure" |
c906108c SS |
2372 | #include "confdefs.h" |
2373 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2374 | /* We use char because int might match the return type of a gcc2 | |
2375 | builtin and then its argument prototype would still apply. */ | |
2376 | char bindtextdomain(); | |
2377 | ||
2378 | int main() { | |
2379 | bindtextdomain() | |
2380 | ; return 0; } | |
2381 | EOF | |
72cfdc76 | 2382 | if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2383 | rm -rf conftest* |
2384 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2385 | else | |
2386 | echo "configure: failed program was:" >&5 | |
2387 | cat conftest.$ac_ext >&5 | |
2388 | rm -rf conftest* | |
2389 | eval "ac_cv_lib_$ac_lib_var=no" | |
2390 | fi | |
2391 | rm -f conftest* | |
2392 | LIBS="$ac_save_LIBS" | |
2393 | ||
2394 | fi | |
2395 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2396 | echo "$ac_t""yes" 1>&6 | |
2397 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
72cfdc76 | 2398 | echo "configure:2399: checking for gettext in libintl" >&5 |
c906108c SS |
2399 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2400 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2401 | else | |
2402 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2403 | #line 2404 "configure" |
c906108c SS |
2404 | #include "confdefs.h" |
2405 | ||
2406 | int main() { | |
2407 | return (int) gettext ("") | |
2408 | ; return 0; } | |
2409 | EOF | |
72cfdc76 | 2410 | if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2411 | rm -rf conftest* |
2412 | gt_cv_func_gettext_libintl=yes | |
2413 | else | |
2414 | echo "configure: failed program was:" >&5 | |
2415 | cat conftest.$ac_ext >&5 | |
2416 | rm -rf conftest* | |
2417 | gt_cv_func_gettext_libintl=no | |
2418 | fi | |
2419 | rm -f conftest* | |
2420 | fi | |
2421 | ||
2422 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2423 | else | |
2424 | echo "$ac_t""no" 1>&6 | |
2425 | fi | |
2426 | ||
2427 | fi | |
2428 | ||
2429 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2430 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2431 | cat >> confdefs.h <<\EOF | |
2432 | #define HAVE_GETTEXT 1 | |
2433 | EOF | |
2434 | ||
2435 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2436 | set dummy msgfmt; ac_word=$2 | |
2437 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2438 | echo "configure:2439: checking for $ac_word" >&5 |
c906108c SS |
2439 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2440 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2441 | else | |
2442 | case "$MSGFMT" in | |
2443 | /*) | |
2444 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2445 | ;; | |
2446 | *) | |
2447 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2448 | for ac_dir in $PATH; do | |
2449 | test -z "$ac_dir" && ac_dir=. | |
2450 | if test -f $ac_dir/$ac_word; then | |
2451 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2452 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2453 | break | |
2454 | fi | |
2455 | fi | |
2456 | done | |
2457 | IFS="$ac_save_ifs" | |
2458 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2459 | ;; | |
2460 | esac | |
2461 | fi | |
2462 | MSGFMT="$ac_cv_path_MSGFMT" | |
2463 | if test -n "$MSGFMT"; then | |
2464 | echo "$ac_t""$MSGFMT" 1>&6 | |
2465 | else | |
2466 | echo "$ac_t""no" 1>&6 | |
2467 | fi | |
2468 | if test "$MSGFMT" != "no"; then | |
2469 | for ac_func in dcgettext | |
2470 | do | |
2471 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 2472 | echo "configure:2473: checking for $ac_func" >&5 |
c906108c SS |
2473 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2475 | else | |
2476 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2477 | #line 2478 "configure" |
c906108c SS |
2478 | #include "confdefs.h" |
2479 | /* System header to define __stub macros and hopefully few prototypes, | |
2480 | which can conflict with char $ac_func(); below. */ | |
2481 | #include <assert.h> | |
2482 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2483 | /* We use char because int might match the return type of a gcc2 | |
2484 | builtin and then its argument prototype would still apply. */ | |
2485 | char $ac_func(); | |
2486 | ||
2487 | int main() { | |
2488 | ||
2489 | /* The GNU C library defines this for functions which it implements | |
2490 | to always fail with ENOSYS. Some functions are actually named | |
2491 | something starting with __ and the normal name is an alias. */ | |
2492 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2493 | choke me | |
2494 | #else | |
2495 | $ac_func(); | |
2496 | #endif | |
2497 | ||
2498 | ; return 0; } | |
2499 | EOF | |
72cfdc76 | 2500 | if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2501 | rm -rf conftest* |
2502 | eval "ac_cv_func_$ac_func=yes" | |
2503 | else | |
2504 | echo "configure: failed program was:" >&5 | |
2505 | cat conftest.$ac_ext >&5 | |
2506 | rm -rf conftest* | |
2507 | eval "ac_cv_func_$ac_func=no" | |
2508 | fi | |
2509 | rm -f conftest* | |
2510 | fi | |
2511 | ||
2512 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2513 | echo "$ac_t""yes" 1>&6 | |
2514 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2515 | cat >> confdefs.h <<EOF | |
2516 | #define $ac_tr_func 1 | |
2517 | EOF | |
2518 | ||
2519 | else | |
2520 | echo "$ac_t""no" 1>&6 | |
2521 | fi | |
2522 | done | |
2523 | ||
2524 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2525 | set dummy gmsgfmt; ac_word=$2 | |
2526 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2527 | echo "configure:2528: checking for $ac_word" >&5 |
c906108c SS |
2528 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2530 | else | |
2531 | case "$GMSGFMT" in | |
2532 | /*) | |
2533 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2534 | ;; | |
2535 | ?:/*) | |
2536 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2537 | ;; | |
2538 | *) | |
2539 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2540 | ac_dummy="$PATH" | |
2541 | for ac_dir in $ac_dummy; do | |
2542 | test -z "$ac_dir" && ac_dir=. | |
2543 | if test -f $ac_dir/$ac_word; then | |
2544 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2545 | break | |
2546 | fi | |
2547 | done | |
2548 | IFS="$ac_save_ifs" | |
2549 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2550 | ;; | |
2551 | esac | |
2552 | fi | |
2553 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2554 | if test -n "$GMSGFMT"; then | |
2555 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2556 | else | |
2557 | echo "$ac_t""no" 1>&6 | |
2558 | fi | |
2559 | ||
2560 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2561 | set dummy xgettext; ac_word=$2 | |
2562 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2563 | echo "configure:2564: checking for $ac_word" >&5 |
c906108c SS |
2564 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2566 | else | |
2567 | case "$XGETTEXT" in | |
2568 | /*) | |
2569 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2570 | ;; | |
2571 | *) | |
2572 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2573 | for ac_dir in $PATH; do | |
2574 | test -z "$ac_dir" && ac_dir=. | |
2575 | if test -f $ac_dir/$ac_word; then | |
2576 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2577 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2578 | break | |
2579 | fi | |
2580 | fi | |
2581 | done | |
2582 | IFS="$ac_save_ifs" | |
2583 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2584 | ;; | |
2585 | esac | |
2586 | fi | |
2587 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2588 | if test -n "$XGETTEXT"; then | |
2589 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2590 | else | |
2591 | echo "$ac_t""no" 1>&6 | |
2592 | fi | |
2593 | ||
2594 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2595 | #line 2596 "configure" |
c906108c SS |
2596 | #include "confdefs.h" |
2597 | ||
2598 | int main() { | |
2599 | extern int _nl_msg_cat_cntr; | |
2600 | return _nl_msg_cat_cntr | |
2601 | ; return 0; } | |
2602 | EOF | |
72cfdc76 | 2603 | if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2604 | rm -rf conftest* |
2605 | CATOBJEXT=.gmo | |
2606 | DATADIRNAME=share | |
2607 | else | |
2608 | echo "configure: failed program was:" >&5 | |
2609 | cat conftest.$ac_ext >&5 | |
2610 | rm -rf conftest* | |
2611 | CATOBJEXT=.mo | |
2612 | DATADIRNAME=lib | |
2613 | fi | |
2614 | rm -f conftest* | |
2615 | INSTOBJEXT=.mo | |
2616 | fi | |
2617 | fi | |
2618 | ||
2619 | else | |
2620 | echo "$ac_t""no" 1>&6 | |
2621 | fi | |
2622 | ||
2623 | ||
2624 | ||
2625 | if test "$CATOBJEXT" = "NONE"; then | |
2626 | nls_cv_use_gnu_gettext=yes | |
2627 | fi | |
2628 | fi | |
2629 | ||
2630 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2631 | INTLOBJS="\$(GETTOBJS)" | |
2632 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2633 | set dummy msgfmt; ac_word=$2 | |
2634 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2635 | echo "configure:2636: checking for $ac_word" >&5 |
c906108c SS |
2636 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2637 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2638 | else | |
2639 | case "$MSGFMT" in | |
2640 | /*) | |
2641 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2642 | ;; | |
2643 | *) | |
2644 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2645 | for ac_dir in $PATH; do | |
2646 | test -z "$ac_dir" && ac_dir=. | |
2647 | if test -f $ac_dir/$ac_word; then | |
2648 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2649 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2650 | break | |
2651 | fi | |
2652 | fi | |
2653 | done | |
2654 | IFS="$ac_save_ifs" | |
2655 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2656 | ;; | |
2657 | esac | |
2658 | fi | |
2659 | MSGFMT="$ac_cv_path_MSGFMT" | |
2660 | if test -n "$MSGFMT"; then | |
2661 | echo "$ac_t""$MSGFMT" 1>&6 | |
2662 | else | |
2663 | echo "$ac_t""no" 1>&6 | |
2664 | fi | |
2665 | ||
2666 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2667 | set dummy gmsgfmt; ac_word=$2 | |
2668 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2669 | echo "configure:2670: checking for $ac_word" >&5 |
c906108c SS |
2670 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2672 | else | |
2673 | case "$GMSGFMT" in | |
2674 | /*) | |
2675 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2676 | ;; | |
2677 | ?:/*) | |
2678 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2679 | ;; | |
2680 | *) | |
2681 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2682 | ac_dummy="$PATH" | |
2683 | for ac_dir in $ac_dummy; do | |
2684 | test -z "$ac_dir" && ac_dir=. | |
2685 | if test -f $ac_dir/$ac_word; then | |
2686 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2687 | break | |
2688 | fi | |
2689 | done | |
2690 | IFS="$ac_save_ifs" | |
2691 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2692 | ;; | |
2693 | esac | |
2694 | fi | |
2695 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2696 | if test -n "$GMSGFMT"; then | |
2697 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2698 | else | |
2699 | echo "$ac_t""no" 1>&6 | |
2700 | fi | |
2701 | ||
2702 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2703 | set dummy xgettext; ac_word=$2 | |
2704 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 2705 | echo "configure:2706: checking for $ac_word" >&5 |
c906108c SS |
2706 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2707 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2708 | else | |
2709 | case "$XGETTEXT" in | |
2710 | /*) | |
2711 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2712 | ;; | |
2713 | *) | |
2714 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2715 | for ac_dir in $PATH; do | |
2716 | test -z "$ac_dir" && ac_dir=. | |
2717 | if test -f $ac_dir/$ac_word; then | |
2718 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2719 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2720 | break | |
2721 | fi | |
2722 | fi | |
2723 | done | |
2724 | IFS="$ac_save_ifs" | |
2725 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2726 | ;; | |
2727 | esac | |
2728 | fi | |
2729 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2730 | if test -n "$XGETTEXT"; then | |
2731 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2732 | else | |
2733 | echo "$ac_t""no" 1>&6 | |
2734 | fi | |
2735 | ||
2736 | ||
2737 | USE_INCLUDED_LIBINTL=yes | |
2738 | CATOBJEXT=.gmo | |
2739 | INSTOBJEXT=.mo | |
2740 | DATADIRNAME=share | |
2741 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2742 | INTLLIBS=$INTLDEPS | |
2743 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2744 | nls_cv_header_intl=libintl.h | |
2745 | nls_cv_header_libgt=libgettext.h | |
2746 | fi | |
2747 | ||
2748 | if test "$XGETTEXT" != ":"; then | |
2749 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2750 | : ; | |
2751 | else | |
2752 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2753 | XGETTEXT=":" | |
2754 | fi | |
2755 | fi | |
2756 | ||
2757 | # We need to process the po/ directory. | |
2758 | POSUB=po | |
2759 | else | |
2760 | DATADIRNAME=share | |
2761 | nls_cv_header_intl=libintl.h | |
2762 | nls_cv_header_libgt=libgettext.h | |
2763 | fi | |
2764 | ||
2765 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2766 | # because some of the sources are only built for this goal. | |
2767 | if test "$PACKAGE" = gettext; then | |
2768 | USE_NLS=yes | |
2769 | USE_INCLUDED_LIBINTL=yes | |
2770 | fi | |
2771 | ||
2772 | for lang in $ALL_LINGUAS; do | |
2773 | GMOFILES="$GMOFILES $lang.gmo" | |
2774 | POFILES="$POFILES $lang.po" | |
2775 | done | |
2776 | ||
2777 | ||
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | if test "x$CATOBJEXT" != "x"; then | |
2791 | if test "x$ALL_LINGUAS" = "x"; then | |
2792 | LINGUAS= | |
2793 | else | |
2794 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
72cfdc76 | 2795 | echo "configure:2796: checking for catalogs to be installed" >&5 |
c906108c SS |
2796 | NEW_LINGUAS= |
2797 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2798 | case "$ALL_LINGUAS" in | |
2799 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2800 | esac | |
2801 | done | |
2802 | LINGUAS=$NEW_LINGUAS | |
2803 | echo "$ac_t""$LINGUAS" 1>&6 | |
2804 | fi | |
2805 | ||
2806 | if test -n "$LINGUAS"; then | |
2807 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2808 | fi | |
2809 | fi | |
2810 | ||
2811 | if test $ac_cv_header_locale_h = yes; then | |
2812 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2813 | else | |
2814 | INCLUDE_LOCALE_H="\ | |
2815 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2816 | fi | |
2817 | ||
2818 | ||
2819 | if test -f $srcdir/po2tbl.sed.in; then | |
2820 | if test "$CATOBJEXT" = ".cat"; then | |
2821 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2822 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
72cfdc76 | 2823 | echo "configure:2824: checking for linux/version.h" >&5 |
c906108c SS |
2824 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2825 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2826 | else | |
2827 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 2828 | #line 2829 "configure" |
c906108c SS |
2829 | #include "confdefs.h" |
2830 | #include <linux/version.h> | |
2831 | EOF | |
2832 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 2833 | { (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2834 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2835 | if test -z "$ac_err"; then | |
2836 | rm -rf conftest* | |
2837 | eval "ac_cv_header_$ac_safe=yes" | |
2838 | else | |
2839 | echo "$ac_err" >&5 | |
2840 | echo "configure: failed program was:" >&5 | |
2841 | cat conftest.$ac_ext >&5 | |
2842 | rm -rf conftest* | |
2843 | eval "ac_cv_header_$ac_safe=no" | |
2844 | fi | |
2845 | rm -f conftest* | |
2846 | fi | |
2847 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2848 | echo "$ac_t""yes" 1>&6 | |
2849 | msgformat=linux | |
2850 | else | |
2851 | echo "$ac_t""no" 1>&6 | |
2852 | msgformat=xopen | |
2853 | fi | |
2854 | ||
2855 | ||
2856 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2857 | fi | |
2858 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2859 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2860 | fi | |
2861 | ||
2862 | if test "$PACKAGE" = "gettext"; then | |
2863 | GT_NO="#NO#" | |
2864 | GT_YES= | |
2865 | else | |
2866 | GT_NO= | |
2867 | GT_YES="#YES#" | |
2868 | fi | |
2869 | ||
2870 | ||
2871 | ||
2872 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2873 | ||
2874 | ||
2875 | l= | |
2876 | ||
2877 | ||
4536bbc6 | 2878 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2879 | test -d po || mkdir po |
2880 | if test "x$srcdir" != "x."; then | |
2881 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2882 | posrcprefix="$srcdir/" | |
2883 | else | |
2884 | posrcprefix="../$srcdir/" | |
2885 | fi | |
2886 | else | |
2887 | posrcprefix="../" | |
2888 | fi | |
2889 | rm -f po/POTFILES | |
2890 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2891 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2892 | fi | |
2893 | ||
0fbb3da7 TT |
2894 | cat >> confdefs.h <<\EOF |
2895 | #define PACKAGE "gdb" | |
2896 | EOF | |
2897 | ||
2898 | ||
c906108c SS |
2899 | |
2900 | ||
2901 | CONFIG_OBS= | |
66b965bb | 2902 | CONFIG_LIB_OBS= |
c906108c SS |
2903 | CONFIG_DEPS= |
2904 | CONFIG_SRCS= | |
fb40c209 AC |
2905 | CONFIG_INITS= |
2906 | ENABLE_CFLAGS= | |
b3a90332 AC |
2907 | CONFIG_ALL= |
2908 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2909 | CONFIG_INSTALL= |
2910 | CONFIG_UNINSTALL= | |
c906108c | 2911 | |
8dcde887 | 2912 | subdirs="doc testsuite" |
96baa820 | 2913 | |
8dcde887 | 2914 | configdirs= |
96baa820 | 2915 | |
27e9bf90 | 2916 | . $srcdir/configure.host |
c906108c | 2917 | |
27e9bf90 | 2918 | . $srcdir/configure.tgt |
c906108c | 2919 | |
27e9bf90 MK |
2920 | # Fetch the default architecture and default target vector from BFD. |
2921 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2922 | |
27e9bf90 MK |
2923 | # We only want the first architecture, so strip off the others if |
2924 | # there is more than one. | |
2925 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2926 | |
27e9bf90 MK |
2927 | if test "x$targ_archs" != x; then |
2928 | cat >> confdefs.h <<EOF | |
2929 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2930 | EOF |
2931 | ||
2932 | fi | |
27e9bf90 MK |
2933 | if test "x$targ_defvec" != x; then |
2934 | cat >> confdefs.h <<EOF | |
2935 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2936 | EOF |
2937 | ||
2938 | fi | |
c906108c | 2939 | |
8bb2c122 MK |
2940 | if test "$program_transform_name" = s,x,x,; then |
2941 | program_transform_name= | |
2942 | else | |
2943 | # Double any \ or $. echo might interpret backslashes. | |
2944 | cat <<\EOF_SED > conftestsed | |
2945 | s,\\,\\\\,g; s,\$,$$,g | |
2946 | EOF_SED | |
2947 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2948 | rm -f conftestsed | |
2949 | fi | |
2950 | test "$program_prefix" != NONE && | |
2951 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2952 | # Use a double $ so make ignores it. | |
2953 | test "$program_suffix" != NONE && | |
2954 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2955 | ||
2956 | # sed with no file args requires a program. | |
2957 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2958 | ||
2959 | ||
627af7ea MK |
2960 | # The CLI cannot be disabled yet, but may be in the future. |
2961 | ||
2962 | # Enable CLI. | |
2963 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2964 | if test "${enable_gdbcli+set}" = set; then | |
2965 | enableval="$enable_gdbcli" | |
2966 | case $enableval in | |
2967 | yes) | |
2968 | ;; | |
2969 | no) | |
2970 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2971 | *) | |
2972 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2973 | esac | |
2974 | else | |
2975 | enable_gdbcli=yes | |
2976 | fi | |
2977 | ||
2978 | if test x"$enable_gdbcli" = xyes; then | |
2979 | if test -d $srcdir/cli; then | |
2980 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
2981 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
2982 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
2983 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
2984 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
2985 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
2986 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
2987 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
2988 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
2989 | fi | |
2990 | fi | |
2991 | ||
2992 | # Enable MI. | |
2993 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
2994 | if test "${enable_gdbmi+set}" = set; then | |
2995 | enableval="$enable_gdbmi" | |
2996 | case $enableval in | |
2997 | yes | no) | |
2998 | ;; | |
2999 | *) | |
3000 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3001 | esac | |
3002 | else | |
3003 | enable_gdbmi=yes | |
3004 | fi | |
3005 | ||
3006 | if test x"$enable_gdbmi" = xyes; then | |
3007 | if test -d $srcdir/mi; then | |
3008 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3009 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3010 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3011 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3012 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3013 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3014 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3015 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3016 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3017 | fi | |
3018 | fi | |
3019 | ||
06825bd1 MK |
3020 | # Enable TUI. |
3021 | # Check whether --enable-tui or --disable-tui was given. | |
3022 | if test "${enable_tui+set}" = set; then | |
3023 | enableval="$enable_tui" | |
3024 | case $enableval in | |
3025 | yes | no) | |
3026 | ;; | |
3027 | *) | |
3028 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3029 | esac | |
3030 | fi | |
3031 | ||
3032 | if test x"$enable_tui" = xyes; then | |
3033 | if test -d $srcdir/tui; then | |
3034 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3035 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3036 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3037 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3038 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3039 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3040 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3041 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3042 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3043 | need_curses=yes | |
3044 | fi | |
3045 | fi | |
3046 | ||
8ee53726 MK |
3047 | # Enable gdbtk. |
3048 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3049 | if test "${enable_gdbtk+set}" = set; then | |
3050 | enableval="$enable_gdbtk" | |
3051 | case $enableval in | |
3052 | yes | no) | |
3053 | ;; | |
3054 | *) | |
3055 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3056 | esac | |
3057 | else | |
3058 | if test -d $srcdir/gdbtk; then | |
3059 | enable_gdbtk=yes | |
3060 | else | |
3061 | enable_gdbtk=no | |
3062 | fi | |
3063 | fi | |
3064 | ||
3065 | # We unconditionally disable gdbtk tests on selected platforms. | |
3066 | case $host_os in | |
3067 | go32* | windows*) | |
3068 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3069 | enable_gdbtk=no ;; | |
3070 | esac | |
3071 | ||
8bb2c122 MK |
3072 | # --------------------- # |
3073 | # Checks for programs. # | |
3074 | # --------------------- # | |
3075 | ||
c41b7eb1 | 3076 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3077 | do |
3078 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3079 | set dummy $ac_prog; ac_word=$2 | |
3080 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 3081 | echo "configure:3082: checking for $ac_word" >&5 |
7a292a7a SS |
3082 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3084 | else | |
3085 | if test -n "$AWK"; then | |
3086 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3087 | else | |
3088 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3089 | ac_dummy="$PATH" | |
3090 | for ac_dir in $ac_dummy; do | |
3091 | test -z "$ac_dir" && ac_dir=. | |
3092 | if test -f $ac_dir/$ac_word; then | |
3093 | ac_cv_prog_AWK="$ac_prog" | |
3094 | break | |
3095 | fi | |
3096 | done | |
3097 | IFS="$ac_save_ifs" | |
3098 | fi | |
3099 | fi | |
3100 | AWK="$ac_cv_prog_AWK" | |
3101 | if test -n "$AWK"; then | |
3102 | echo "$ac_t""$AWK" 1>&6 | |
3103 | else | |
3104 | echo "$ac_t""no" 1>&6 | |
3105 | fi | |
3106 | ||
3107 | test -n "$AWK" && break | |
3108 | done | |
3109 | ||
c906108c SS |
3110 | # Find a good install program. We prefer a C program (faster), |
3111 | # so one script is as good as another. But avoid the broken or | |
3112 | # incompatible versions: | |
3113 | # SysV /etc/install, /usr/sbin/install | |
3114 | # SunOS /usr/etc/install | |
3115 | # IRIX /sbin/install | |
3116 | # AIX /bin/install | |
3117 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3118 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3119 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3120 | # ./install, which can be erroneously created by make from ./install.sh. | |
3121 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
72cfdc76 | 3122 | echo "configure:3123: checking for a BSD compatible install" >&5 |
c906108c SS |
3123 | if test -z "$INSTALL"; then |
3124 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3126 | else | |
3127 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3128 | for ac_dir in $PATH; do | |
3129 | # Account for people who put trailing slashes in PATH elements. | |
3130 | case "$ac_dir/" in | |
3131 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3132 | *) | |
3133 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3134 | # Don't use installbsd from OSF since it installs stuff as root | |
3135 | # by default. | |
3136 | for ac_prog in ginstall scoinst install; do | |
3137 | if test -f $ac_dir/$ac_prog; then | |
3138 | if test $ac_prog = install && | |
3139 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3140 | # AIX install. It has an incompatible calling convention. | |
3141 | : | |
3142 | else | |
3143 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3144 | break 2 | |
3145 | fi | |
3146 | fi | |
3147 | done | |
3148 | ;; | |
3149 | esac | |
3150 | done | |
3151 | IFS="$ac_save_IFS" | |
3152 | ||
3153 | fi | |
3154 | if test "${ac_cv_path_install+set}" = set; then | |
3155 | INSTALL="$ac_cv_path_install" | |
3156 | else | |
3157 | # As a last resort, use the slow shell script. We don't cache a | |
3158 | # path for INSTALL within a source directory, because that will | |
3159 | # break other packages using the cache if that directory is | |
3160 | # removed, or if the path is relative. | |
3161 | INSTALL="$ac_install_sh" | |
3162 | fi | |
3163 | fi | |
3164 | echo "$ac_t""$INSTALL" 1>&6 | |
3165 | ||
3166 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3167 | # It thinks the first close brace ends the variable substitution. | |
3168 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3169 | ||
3170 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3171 | ||
3172 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3173 | ||
8bb2c122 | 3174 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
72cfdc76 | 3175 | echo "configure:3176: checking whether ln -s works" >&5 |
8bb2c122 MK |
3176 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3177 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3178 | else |
8bb2c122 MK |
3179 | rm -f conftestdata |
3180 | if ln -s X conftestdata 2>/dev/null | |
3181 | then | |
3182 | rm -f conftestdata | |
3183 | ac_cv_prog_LN_S="ln -s" | |
3184 | else | |
3185 | ac_cv_prog_LN_S=ln | |
3186 | fi | |
3187 | fi | |
3188 | LN_S="$ac_cv_prog_LN_S" | |
3189 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3190 | echo "$ac_t""yes" 1>&6 | |
3191 | else | |
3192 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3193 | fi |
3194 | ||
8bb2c122 MK |
3195 | # Extract the first word of "ranlib", so it can be a program name with args. |
3196 | set dummy ranlib; ac_word=$2 | |
c906108c | 3197 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
72cfdc76 | 3198 | echo "configure:3199: checking for $ac_word" >&5 |
8bb2c122 | 3199 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3200 | echo $ac_n "(cached) $ac_c" 1>&6 |
3201 | else | |
8bb2c122 MK |
3202 | if test -n "$RANLIB"; then |
3203 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3204 | else |
3205 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3206 | ac_dummy="$PATH" | |
3207 | for ac_dir in $ac_dummy; do | |
3208 | test -z "$ac_dir" && ac_dir=. | |
3209 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3210 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3211 | break |
3212 | fi | |
3213 | done | |
3214 | IFS="$ac_save_ifs" | |
8bb2c122 | 3215 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3216 | fi |
3217 | fi | |
8bb2c122 MK |
3218 | RANLIB="$ac_cv_prog_RANLIB" |
3219 | if test -n "$RANLIB"; then | |
3220 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3221 | else |
3222 | echo "$ac_t""no" 1>&6 | |
3223 | fi | |
3224 | ||
8bb2c122 MK |
3225 | for ac_prog in 'bison -y' byacc |
3226 | do | |
3227 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3228 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3229 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
72cfdc76 | 3230 | echo "configure:3231: checking for $ac_word" >&5 |
8bb2c122 | 3231 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3232 | echo $ac_n "(cached) $ac_c" 1>&6 |
3233 | else | |
8bb2c122 MK |
3234 | if test -n "$YACC"; then |
3235 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3236 | else |
3237 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3238 | ac_dummy="$PATH" | |
3239 | for ac_dir in $ac_dummy; do | |
3240 | test -z "$ac_dir" && ac_dir=. | |
3241 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3242 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3243 | break |
3244 | fi | |
3245 | done | |
3246 | IFS="$ac_save_ifs" | |
3247 | fi | |
3248 | fi | |
8bb2c122 MK |
3249 | YACC="$ac_cv_prog_YACC" |
3250 | if test -n "$YACC"; then | |
3251 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3252 | else |
3253 | echo "$ac_t""no" 1>&6 | |
3254 | fi | |
3255 | ||
8bb2c122 MK |
3256 | test -n "$YACC" && break |
3257 | done | |
3258 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3259 | |
8bb2c122 MK |
3260 | |
3261 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3262 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3263 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
72cfdc76 | 3264 | echo "configure:3265: checking for $ac_word" >&5 |
8bb2c122 | 3265 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3266 | echo $ac_n "(cached) $ac_c" 1>&6 |
3267 | else | |
8bb2c122 MK |
3268 | if test -n "$AR"; then |
3269 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3270 | else |
3271 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3272 | ac_dummy="$PATH" | |
3273 | for ac_dir in $ac_dummy; do | |
3274 | test -z "$ac_dir" && ac_dir=. | |
3275 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3276 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3277 | break |
3278 | fi | |
3279 | done | |
3280 | IFS="$ac_save_ifs" | |
8bb2c122 | 3281 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3282 | fi |
3283 | fi | |
8bb2c122 MK |
3284 | AR="$ac_cv_prog_AR" |
3285 | if test -n "$AR"; then | |
3286 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3287 | else |
3288 | echo "$ac_t""no" 1>&6 | |
3289 | fi | |
3290 | ||
8bb2c122 | 3291 | |
c906108c | 3292 | |
95ca63c4 CF |
3293 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3294 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3295 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 3296 | echo "configure:3297: checking for $ac_word" >&5 |
95ca63c4 CF |
3297 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3298 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3299 | else | |
3300 | if test -n "$DLLTOOL"; then | |
3301 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3302 | else | |
3303 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3304 | ac_dummy="$PATH" | |
3305 | for ac_dir in $ac_dummy; do | |
3306 | test -z "$ac_dir" && ac_dir=. | |
3307 | if test -f $ac_dir/$ac_word; then | |
3308 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3309 | break | |
3310 | fi | |
3311 | done | |
3312 | IFS="$ac_save_ifs" | |
3313 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3314 | fi | |
3315 | fi | |
3316 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3317 | if test -n "$DLLTOOL"; then | |
3318 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3319 | else | |
3320 | echo "$ac_t""no" 1>&6 | |
3321 | fi | |
3322 | ||
3323 | ||
3324 | ||
3325 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3326 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3327 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 3328 | echo "configure:3329: checking for $ac_word" >&5 |
95ca63c4 CF |
3329 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3330 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3331 | else | |
3332 | if test -n "$WINDRES"; then | |
3333 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3334 | else | |
3335 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3336 | ac_dummy="$PATH" | |
3337 | for ac_dir in $ac_dummy; do | |
3338 | test -z "$ac_dir" && ac_dir=. | |
3339 | if test -f $ac_dir/$ac_word; then | |
3340 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3341 | break | |
3342 | fi | |
3343 | done | |
3344 | IFS="$ac_save_ifs" | |
3345 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3346 | fi | |
3347 | fi | |
3348 | WINDRES="$ac_cv_prog_WINDRES" | |
3349 | if test -n "$WINDRES"; then | |
3350 | echo "$ac_t""$WINDRES" 1>&6 | |
3351 | else | |
3352 | echo "$ac_t""no" 1>&6 | |
3353 | fi | |
3354 | ||
3355 | ||
3356 | ||
c906108c | 3357 | |
8bb2c122 | 3358 | # Needed for GNU/Hurd. |
75c6e08a MK |
3359 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3360 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3361 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
72cfdc76 | 3362 | echo "configure:3363: checking for $ac_word" >&5 |
75c6e08a MK |
3363 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3364 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3365 | else | |
3366 | if test -n "$MIG"; then | |
3367 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3368 | else | |
3369 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3370 | ac_dummy="$PATH" | |
3371 | for ac_dir in $ac_dummy; do | |
3372 | test -z "$ac_dir" && ac_dir=. | |
3373 | if test -f $ac_dir/$ac_word; then | |
3374 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3375 | break | |
3376 | fi | |
3377 | done | |
3378 | IFS="$ac_save_ifs" | |
3379 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3380 | fi | |
3381 | fi | |
3382 | MIG="$ac_cv_prog_MIG" | |
3383 | if test -n "$MIG"; then | |
3384 | echo "$ac_t""$MIG" 1>&6 | |
3385 | else | |
3386 | echo "$ac_t""no" 1>&6 | |
3387 | fi | |
3388 | ||
3389 | ||
3390 | ||
3391 | ||
9a156167 MK |
3392 | # ---------------------- # |
3393 | # Checks for libraries. # | |
3394 | # ---------------------- # | |
3395 | ||
3396 | # We might need to link with -lm; most simulators need it. | |
3397 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
72cfdc76 | 3398 | echo "configure:3399: checking for main in -lm" >&5 |
9a156167 MK |
3399 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3400 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3401 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3402 | else | |
3403 | ac_save_LIBS="$LIBS" | |
3404 | LIBS="-lm $LIBS" | |
3405 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3406 | #line 3407 "configure" |
9a156167 MK |
3407 | #include "confdefs.h" |
3408 | ||
3409 | int main() { | |
3410 | main() | |
3411 | ; return 0; } | |
3412 | EOF | |
72cfdc76 | 3413 | if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3414 | rm -rf conftest* |
3415 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3416 | else | |
3417 | echo "configure: failed program was:" >&5 | |
3418 | cat conftest.$ac_ext >&5 | |
3419 | rm -rf conftest* | |
3420 | eval "ac_cv_lib_$ac_lib_var=no" | |
3421 | fi | |
3422 | rm -f conftest* | |
3423 | LIBS="$ac_save_LIBS" | |
3424 | ||
3425 | fi | |
3426 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3427 | echo "$ac_t""yes" 1>&6 | |
3428 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3429 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3430 | cat >> confdefs.h <<EOF | |
3431 | #define $ac_tr_lib 1 | |
3432 | EOF | |
3433 | ||
3434 | LIBS="-lm $LIBS" | |
3435 | ||
3436 | else | |
3437 | echo "$ac_t""no" 1>&6 | |
3438 | fi | |
3439 | ||
3440 | ||
3441 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3442 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3443 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3444 | # is known to have this problem). Therefore we avoid libw if we can. | |
3445 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
72cfdc76 | 3446 | echo "configure:3447: checking for wctype" >&5 |
9a156167 MK |
3447 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3448 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3449 | else | |
3450 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3451 | #line 3452 "configure" |
9a156167 MK |
3452 | #include "confdefs.h" |
3453 | /* System header to define __stub macros and hopefully few prototypes, | |
3454 | which can conflict with char wctype(); below. */ | |
3455 | #include <assert.h> | |
3456 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3457 | /* We use char because int might match the return type of a gcc2 | |
3458 | builtin and then its argument prototype would still apply. */ | |
3459 | char wctype(); | |
3460 | ||
3461 | int main() { | |
3462 | ||
3463 | /* The GNU C library defines this for functions which it implements | |
3464 | to always fail with ENOSYS. Some functions are actually named | |
3465 | something starting with __ and the normal name is an alias. */ | |
3466 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3467 | choke me | |
3468 | #else | |
3469 | wctype(); | |
3470 | #endif | |
3471 | ||
3472 | ; return 0; } | |
3473 | EOF | |
72cfdc76 | 3474 | if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3475 | rm -rf conftest* |
3476 | eval "ac_cv_func_wctype=yes" | |
3477 | else | |
3478 | echo "configure: failed program was:" >&5 | |
3479 | cat conftest.$ac_ext >&5 | |
3480 | rm -rf conftest* | |
3481 | eval "ac_cv_func_wctype=no" | |
3482 | fi | |
3483 | rm -f conftest* | |
3484 | fi | |
3485 | ||
3486 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3487 | echo "$ac_t""yes" 1>&6 | |
3488 | : | |
3489 | else | |
3490 | echo "$ac_t""no" 1>&6 | |
3491 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
72cfdc76 | 3492 | echo "configure:3493: checking for wctype in -lw" >&5 |
9a156167 MK |
3493 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3494 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3495 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3496 | else | |
3497 | ac_save_LIBS="$LIBS" | |
3498 | LIBS="-lw $LIBS" | |
3499 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3500 | #line 3501 "configure" |
9a156167 MK |
3501 | #include "confdefs.h" |
3502 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3503 | /* We use char because int might match the return type of a gcc2 | |
3504 | builtin and then its argument prototype would still apply. */ | |
3505 | char wctype(); | |
3506 | ||
3507 | int main() { | |
3508 | wctype() | |
3509 | ; return 0; } | |
3510 | EOF | |
72cfdc76 | 3511 | if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3512 | rm -rf conftest* |
3513 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3514 | else | |
3515 | echo "configure: failed program was:" >&5 | |
3516 | cat conftest.$ac_ext >&5 | |
3517 | rm -rf conftest* | |
3518 | eval "ac_cv_lib_$ac_lib_var=no" | |
3519 | fi | |
3520 | rm -f conftest* | |
3521 | LIBS="$ac_save_LIBS" | |
3522 | ||
3523 | fi | |
3524 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3525 | echo "$ac_t""yes" 1>&6 | |
3526 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3527 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3528 | cat >> confdefs.h <<EOF | |
3529 | #define $ac_tr_lib 1 | |
3530 | EOF | |
3531 | ||
3532 | LIBS="-lw $LIBS" | |
3533 | ||
3534 | else | |
3535 | echo "$ac_t""no" 1>&6 | |
3536 | fi | |
3537 | ||
3538 | fi | |
3539 | ||
3540 | ||
3541 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3542 | ||
3543 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
72cfdc76 | 3544 | echo "configure:3545: checking for library containing socketpair" >&5 |
9a156167 MK |
3545 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3547 | else | |
3548 | ac_func_search_save_LIBS="$LIBS" | |
3549 | ac_cv_search_socketpair="no" | |
3550 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3551 | #line 3552 "configure" |
9a156167 MK |
3552 | #include "confdefs.h" |
3553 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3554 | /* We use char because int might match the return type of a gcc2 | |
3555 | builtin and then its argument prototype would still apply. */ | |
3556 | char socketpair(); | |
3557 | ||
3558 | int main() { | |
3559 | socketpair() | |
3560 | ; return 0; } | |
3561 | EOF | |
72cfdc76 | 3562 | if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3563 | rm -rf conftest* |
3564 | ac_cv_search_socketpair="none required" | |
3565 | else | |
3566 | echo "configure: failed program was:" >&5 | |
3567 | cat conftest.$ac_ext >&5 | |
3568 | fi | |
3569 | rm -f conftest* | |
3570 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3571 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3572 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3573 | #line 3574 "configure" |
9a156167 MK |
3574 | #include "confdefs.h" |
3575 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3576 | /* We use char because int might match the return type of a gcc2 | |
3577 | builtin and then its argument prototype would still apply. */ | |
3578 | char socketpair(); | |
3579 | ||
3580 | int main() { | |
3581 | socketpair() | |
3582 | ; return 0; } | |
3583 | EOF | |
72cfdc76 | 3584 | if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3585 | rm -rf conftest* |
3586 | ac_cv_search_socketpair="-l$i" | |
3587 | break | |
3588 | else | |
3589 | echo "configure: failed program was:" >&5 | |
3590 | cat conftest.$ac_ext >&5 | |
3591 | fi | |
3592 | rm -f conftest* | |
3593 | done | |
3594 | LIBS="$ac_func_search_save_LIBS" | |
3595 | fi | |
3596 | ||
3597 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3598 | if test "$ac_cv_search_socketpair" != "no"; then | |
3599 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3600 | ||
3601 | else : | |
3602 | ||
3603 | fi | |
3604 | ||
06825bd1 MK |
3605 | # Since GDB uses Readline, we need termcap functionality, so we need |
3606 | # to find a library that provides that. When GDB is configured with | |
3607 | # --enable-tui, we need full curses functionality. | |
3608 | # | |
3609 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3610 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3611 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3612 | # `curses'. I don't see why we should use HP curses if a more | |
3613 | # standard curses is available, except that according to HP's | |
3614 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3615 | # HP-UX 10.10 and 10.20. | |
3616 | ||
3617 | if test "$need_curses" = yes; then | |
3618 | ||
3619 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
72cfdc76 | 3620 | echo "configure:3621: checking for library containing initscr" >&5 |
06825bd1 MK |
3621 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3622 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3623 | else | |
3624 | ac_func_search_save_LIBS="$LIBS" | |
3625 | ac_cv_search_initscr="no" | |
3626 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3627 | #line 3628 "configure" |
06825bd1 MK |
3628 | #include "confdefs.h" |
3629 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3630 | /* We use char because int might match the return type of a gcc2 | |
3631 | builtin and then its argument prototype would still apply. */ | |
3632 | char initscr(); | |
3633 | ||
3634 | int main() { | |
3635 | initscr() | |
3636 | ; return 0; } | |
3637 | EOF | |
72cfdc76 | 3638 | if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3639 | rm -rf conftest* |
3640 | ac_cv_search_initscr="none required" | |
3641 | else | |
3642 | echo "configure: failed program was:" >&5 | |
3643 | cat conftest.$ac_ext >&5 | |
3644 | fi | |
3645 | rm -f conftest* | |
3646 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3647 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3648 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3649 | #line 3650 "configure" |
06825bd1 MK |
3650 | #include "confdefs.h" |
3651 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3652 | /* We use char because int might match the return type of a gcc2 | |
3653 | builtin and then its argument prototype would still apply. */ | |
3654 | char initscr(); | |
3655 | ||
3656 | int main() { | |
3657 | initscr() | |
3658 | ; return 0; } | |
3659 | EOF | |
72cfdc76 | 3660 | if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3661 | rm -rf conftest* |
3662 | ac_cv_search_initscr="-l$i" | |
3663 | break | |
3664 | else | |
3665 | echo "configure: failed program was:" >&5 | |
3666 | cat conftest.$ac_ext >&5 | |
3667 | fi | |
3668 | rm -f conftest* | |
3669 | done | |
3670 | LIBS="$ac_func_search_save_LIBS" | |
3671 | fi | |
3672 | ||
3673 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3674 | if test "$ac_cv_search_initscr" != "no"; then | |
3675 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3676 | ||
3677 | else : | |
3678 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3679 | fi | |
3680 | fi | |
3681 | ||
3682 | case $host_os in | |
3683 | cygwin*) | |
3684 | if test -d $srcdir/libtermcap; then | |
3685 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3686 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3687 | fi ;; | |
3688 | go32*) | |
3689 | # ??? Is this really true? | |
3690 | ac_cv_search_tgetent="none required" | |
3691 | ;; | |
3692 | aix*) | |
3693 | # Readline prefers curses over termcap on AIX. | |
3694 | # ??? Why? | |
3695 | ||
3696 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
72cfdc76 | 3697 | echo "configure:3698: checking for library containing tgetent" >&5 |
06825bd1 MK |
3698 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3700 | else | |
3701 | ac_func_search_save_LIBS="$LIBS" | |
3702 | ac_cv_search_tgetent="no" | |
3703 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3704 | #line 3705 "configure" |
06825bd1 MK |
3705 | #include "confdefs.h" |
3706 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3707 | /* We use char because int might match the return type of a gcc2 | |
3708 | builtin and then its argument prototype would still apply. */ | |
3709 | char tgetent(); | |
3710 | ||
3711 | int main() { | |
3712 | tgetent() | |
3713 | ; return 0; } | |
3714 | EOF | |
72cfdc76 | 3715 | if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3716 | rm -rf conftest* |
3717 | ac_cv_search_tgetent="none required" | |
3718 | else | |
3719 | echo "configure: failed program was:" >&5 | |
3720 | cat conftest.$ac_ext >&5 | |
3721 | fi | |
3722 | rm -f conftest* | |
3723 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3724 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3725 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3726 | #line 3727 "configure" |
06825bd1 MK |
3727 | #include "confdefs.h" |
3728 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3729 | /* We use char because int might match the return type of a gcc2 | |
3730 | builtin and then its argument prototype would still apply. */ | |
3731 | char tgetent(); | |
3732 | ||
3733 | int main() { | |
3734 | tgetent() | |
3735 | ; return 0; } | |
3736 | EOF | |
72cfdc76 | 3737 | if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3738 | rm -rf conftest* |
3739 | ac_cv_search_tgetent="-l$i" | |
3740 | break | |
3741 | else | |
3742 | echo "configure: failed program was:" >&5 | |
3743 | cat conftest.$ac_ext >&5 | |
3744 | fi | |
3745 | rm -f conftest* | |
3746 | done | |
3747 | LIBS="$ac_func_search_save_LIBS" | |
3748 | fi | |
3749 | ||
3750 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3751 | if test "$ac_cv_search_tgetent" != "no"; then | |
3752 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3753 | ||
3754 | else : | |
3755 | ||
3756 | fi | |
3757 | ;; | |
3758 | esac | |
3759 | ||
3760 | # Note: We used to check for libtermlib and libterminfo too, but | |
3761 | # Readline doesn't, so I think we're safe with leaving them out. | |
3762 | ||
3763 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
72cfdc76 | 3764 | echo "configure:3765: checking for library containing tgetent" >&5 |
06825bd1 MK |
3765 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3766 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3767 | else | |
3768 | ac_func_search_save_LIBS="$LIBS" | |
3769 | ac_cv_search_tgetent="no" | |
3770 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3771 | #line 3772 "configure" |
06825bd1 MK |
3772 | #include "confdefs.h" |
3773 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3774 | /* We use char because int might match the return type of a gcc2 | |
3775 | builtin and then its argument prototype would still apply. */ | |
3776 | char tgetent(); | |
3777 | ||
3778 | int main() { | |
3779 | tgetent() | |
3780 | ; return 0; } | |
3781 | EOF | |
72cfdc76 | 3782 | if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3783 | rm -rf conftest* |
3784 | ac_cv_search_tgetent="none required" | |
3785 | else | |
3786 | echo "configure: failed program was:" >&5 | |
3787 | cat conftest.$ac_ext >&5 | |
3788 | fi | |
3789 | rm -f conftest* | |
3790 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3791 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3792 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3793 | #line 3794 "configure" |
06825bd1 MK |
3794 | #include "confdefs.h" |
3795 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3796 | /* We use char because int might match the return type of a gcc2 | |
3797 | builtin and then its argument prototype would still apply. */ | |
3798 | char tgetent(); | |
3799 | ||
3800 | int main() { | |
3801 | tgetent() | |
3802 | ; return 0; } | |
3803 | EOF | |
72cfdc76 | 3804 | if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3805 | rm -rf conftest* |
3806 | ac_cv_search_tgetent="-l$i" | |
3807 | break | |
3808 | else | |
3809 | echo "configure: failed program was:" >&5 | |
3810 | cat conftest.$ac_ext >&5 | |
3811 | fi | |
3812 | rm -f conftest* | |
3813 | done | |
3814 | LIBS="$ac_func_search_save_LIBS" | |
3815 | fi | |
3816 | ||
3817 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3818 | if test "$ac_cv_search_tgetent" != "no"; then | |
3819 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3820 | ||
3821 | else : | |
3822 | ||
3823 | fi | |
3824 | ||
3825 | if test "$ac_cv_search_tgetent" = no; then | |
3826 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3827 | fi | |
3828 | ||
5ee754fc MK |
3829 | # ------------------------- # |
3830 | # Checks for header files. # | |
3831 | # ------------------------- # | |
3832 | ||
3833 | ac_header_dirent=no | |
3834 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3835 | do | |
3836 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3837 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
72cfdc76 | 3838 | echo "configure:3839: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3839 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3840 | echo $ac_n "(cached) $ac_c" 1>&6 |
3841 | else | |
3842 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3843 | #line 3844 "configure" |
c906108c SS |
3844 | #include "confdefs.h" |
3845 | #include <sys/types.h> | |
5ee754fc MK |
3846 | #include <$ac_hdr> |
3847 | int main() { | |
3848 | DIR *dirp = 0; | |
3849 | ; return 0; } | |
3850 | EOF | |
72cfdc76 | 3851 | if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
3852 | rm -rf conftest* |
3853 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3854 | else | |
3855 | echo "configure: failed program was:" >&5 | |
3856 | cat conftest.$ac_ext >&5 | |
3857 | rm -rf conftest* | |
3858 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3859 | fi | |
3860 | rm -f conftest* | |
3861 | fi | |
3862 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3863 | echo "$ac_t""yes" 1>&6 | |
3864 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3865 | cat >> confdefs.h <<EOF | |
3866 | #define $ac_tr_hdr 1 | |
3867 | EOF | |
3868 | ac_header_dirent=$ac_hdr; break | |
3869 | else | |
3870 | echo "$ac_t""no" 1>&6 | |
3871 | fi | |
3872 | done | |
3873 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
3874 | if test $ac_header_dirent = dirent.h; then | |
3875 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
72cfdc76 | 3876 | echo "configure:3877: checking for opendir in -ldir" >&5 |
5ee754fc MK |
3877 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
3878 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3880 | else | |
3881 | ac_save_LIBS="$LIBS" | |
3882 | LIBS="-ldir $LIBS" | |
3883 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3884 | #line 3885 "configure" |
5ee754fc MK |
3885 | #include "confdefs.h" |
3886 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3887 | /* We use char because int might match the return type of a gcc2 | |
3888 | builtin and then its argument prototype would still apply. */ | |
3889 | char opendir(); | |
c906108c SS |
3890 | |
3891 | int main() { | |
5ee754fc | 3892 | opendir() |
c906108c SS |
3893 | ; return 0; } |
3894 | EOF | |
72cfdc76 | 3895 | if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 3896 | rm -rf conftest* |
5ee754fc | 3897 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
3898 | else |
3899 | echo "configure: failed program was:" >&5 | |
3900 | cat conftest.$ac_ext >&5 | |
3901 | rm -rf conftest* | |
5ee754fc | 3902 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
3903 | fi |
3904 | rm -f conftest* | |
5ee754fc MK |
3905 | LIBS="$ac_save_LIBS" |
3906 | ||
3907 | fi | |
3908 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3909 | echo "$ac_t""yes" 1>&6 | |
3910 | LIBS="$LIBS -ldir" | |
3911 | else | |
3912 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3913 | fi |
3914 | ||
5ee754fc MK |
3915 | else |
3916 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
72cfdc76 | 3917 | echo "configure:3918: checking for opendir in -lx" >&5 |
5ee754fc MK |
3918 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
3919 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3921 | else | |
3922 | ac_save_LIBS="$LIBS" | |
3923 | LIBS="-lx $LIBS" | |
3924 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3925 | #line 3926 "configure" |
5ee754fc MK |
3926 | #include "confdefs.h" |
3927 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3928 | /* We use char because int might match the return type of a gcc2 | |
3929 | builtin and then its argument prototype would still apply. */ | |
3930 | char opendir(); | |
3931 | ||
3932 | int main() { | |
3933 | opendir() | |
3934 | ; return 0; } | |
c906108c | 3935 | EOF |
72cfdc76 | 3936 | if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
3937 | rm -rf conftest* |
3938 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3939 | else | |
3940 | echo "configure: failed program was:" >&5 | |
3941 | cat conftest.$ac_ext >&5 | |
3942 | rm -rf conftest* | |
3943 | eval "ac_cv_lib_$ac_lib_var=no" | |
3944 | fi | |
3945 | rm -f conftest* | |
3946 | LIBS="$ac_save_LIBS" | |
c906108c | 3947 | |
5ee754fc MK |
3948 | fi |
3949 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3950 | echo "$ac_t""yes" 1>&6 | |
3951 | LIBS="$LIBS -lx" | |
3952 | else | |
3953 | echo "$ac_t""no" 1>&6 | |
3954 | fi | |
c906108c | 3955 | |
5ee754fc | 3956 | fi |
c906108c | 3957 | |
5ee754fc | 3958 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
72cfdc76 | 3959 | echo "configure:3960: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 3960 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
3961 | echo $ac_n "(cached) $ac_c" 1>&6 |
3962 | else | |
3963 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 3964 | #line 3965 "configure" |
9608ab8b MK |
3965 | #include "confdefs.h" |
3966 | #include <sys/types.h> | |
5ee754fc MK |
3967 | #include <sys/stat.h> |
3968 | ||
3969 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3970 | # if S_ISBLK (S_IFDIR) | |
3971 | You lose. | |
3972 | # endif | |
3973 | #endif | |
3974 | ||
3975 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3976 | # if S_ISBLK (S_IFCHR) | |
3977 | You lose. | |
3978 | # endif | |
3979 | #endif | |
3980 | ||
3981 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3982 | # if S_ISLNK (S_IFREG) | |
3983 | You lose. | |
3984 | # endif | |
3985 | #endif | |
3986 | ||
3987 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3988 | # if S_ISSOCK (S_IFREG) | |
3989 | You lose. | |
3990 | # endif | |
3991 | #endif | |
3992 | ||
9608ab8b | 3993 | EOF |
5ee754fc MK |
3994 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3995 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 3996 | rm -rf conftest* |
5ee754fc MK |
3997 | ac_cv_header_stat_broken=yes |
3998 | else | |
3999 | rm -rf conftest* | |
4000 | ac_cv_header_stat_broken=no | |
4001 | fi | |
4002 | rm -f conftest* | |
4003 | ||
4004 | fi | |
4005 | ||
4006 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4007 | if test $ac_cv_header_stat_broken = yes; then | |
4008 | cat >> confdefs.h <<\EOF | |
4009 | #define STAT_MACROS_BROKEN 1 | |
4010 | EOF | |
4011 | ||
4012 | fi | |
4013 | ||
4014 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
72cfdc76 | 4015 | echo "configure:4016: checking for ANSI C header files" >&5 |
5ee754fc MK |
4016 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4017 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4018 | else | |
4019 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4020 | #line 4021 "configure" |
5ee754fc MK |
4021 | #include "confdefs.h" |
4022 | #include <stdlib.h> | |
4023 | #include <stdarg.h> | |
4024 | #include <string.h> | |
4025 | #include <float.h> | |
4026 | EOF | |
4027 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4028 | { (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4029 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4030 | if test -z "$ac_err"; then | |
4031 | rm -rf conftest* | |
4032 | ac_cv_header_stdc=yes | |
4033 | else | |
4034 | echo "$ac_err" >&5 | |
4035 | echo "configure: failed program was:" >&5 | |
4036 | cat conftest.$ac_ext >&5 | |
4037 | rm -rf conftest* | |
4038 | ac_cv_header_stdc=no | |
4039 | fi | |
4040 | rm -f conftest* | |
4041 | ||
4042 | if test $ac_cv_header_stdc = yes; then | |
4043 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4044 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4045 | #line 4046 "configure" |
5ee754fc MK |
4046 | #include "confdefs.h" |
4047 | #include <string.h> | |
4048 | EOF | |
4049 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4050 | egrep "memchr" >/dev/null 2>&1; then | |
4051 | : | |
4052 | else | |
4053 | rm -rf conftest* | |
4054 | ac_cv_header_stdc=no | |
4055 | fi | |
4056 | rm -f conftest* | |
4057 | ||
4058 | fi | |
4059 | ||
4060 | if test $ac_cv_header_stdc = yes; then | |
4061 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4062 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4063 | #line 4064 "configure" |
5ee754fc MK |
4064 | #include "confdefs.h" |
4065 | #include <stdlib.h> | |
4066 | EOF | |
4067 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4068 | egrep "free" >/dev/null 2>&1; then | |
4069 | : | |
4070 | else | |
4071 | rm -rf conftest* | |
4072 | ac_cv_header_stdc=no | |
4073 | fi | |
4074 | rm -f conftest* | |
4075 | ||
4076 | fi | |
4077 | ||
4078 | if test $ac_cv_header_stdc = yes; then | |
4079 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4080 | if test "$cross_compiling" = yes; then | |
4081 | : | |
4082 | else | |
4083 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4084 | #line 4085 "configure" |
5ee754fc MK |
4085 | #include "confdefs.h" |
4086 | #include <ctype.h> | |
4087 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4088 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4089 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4090 | int main () { int i; for (i = 0; i < 256; i++) | |
4091 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4092 | exit (0); } | |
4093 | ||
4094 | EOF | |
72cfdc76 | 4095 | if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4096 | then |
4097 | : | |
9608ab8b | 4098 | else |
5ee754fc MK |
4099 | echo "configure: failed program was:" >&5 |
4100 | cat conftest.$ac_ext >&5 | |
4101 | rm -fr conftest* | |
4102 | ac_cv_header_stdc=no | |
4103 | fi | |
4104 | rm -fr conftest* | |
4105 | fi | |
4106 | ||
4107 | fi | |
4108 | fi | |
4109 | ||
4110 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4111 | if test $ac_cv_header_stdc = yes; then | |
4112 | cat >> confdefs.h <<\EOF | |
4113 | #define STDC_HEADERS 1 | |
4114 | EOF | |
4115 | ||
4116 | fi | |
4117 | ||
4118 | for ac_hdr in link.h | |
4119 | do | |
4120 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4121 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4122 | echo "configure:4123: checking for $ac_hdr" >&5 |
5ee754fc MK |
4123 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4125 | else | |
4126 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4127 | #line 4128 "configure" |
5ee754fc MK |
4128 | #include "confdefs.h" |
4129 | #include <$ac_hdr> | |
4130 | EOF | |
4131 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4132 | { (eval echo configure:4133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4133 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4134 | if test -z "$ac_err"; then | |
4135 | rm -rf conftest* | |
4136 | eval "ac_cv_header_$ac_safe=yes" | |
4137 | else | |
4138 | echo "$ac_err" >&5 | |
4139 | echo "configure: failed program was:" >&5 | |
4140 | cat conftest.$ac_ext >&5 | |
4141 | rm -rf conftest* | |
4142 | eval "ac_cv_header_$ac_safe=no" | |
4143 | fi | |
4144 | rm -f conftest* | |
4145 | fi | |
4146 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4147 | echo "$ac_t""yes" 1>&6 | |
4148 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4149 | cat >> confdefs.h <<EOF | |
4150 | #define $ac_tr_hdr 1 | |
4151 | EOF | |
4152 | ||
4153 | else | |
4154 | echo "$ac_t""no" 1>&6 | |
4155 | fi | |
4156 | done | |
4157 | ||
4158 | for ac_hdr in nlist.h | |
4159 | do | |
4160 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4161 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4162 | echo "configure:4163: checking for $ac_hdr" >&5 |
5ee754fc MK |
4163 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4165 | else | |
4166 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4167 | #line 4168 "configure" |
5ee754fc MK |
4168 | #include "confdefs.h" |
4169 | #include <$ac_hdr> | |
4170 | EOF | |
4171 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4172 | { (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4173 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4174 | if test -z "$ac_err"; then | |
4175 | rm -rf conftest* | |
4176 | eval "ac_cv_header_$ac_safe=yes" | |
4177 | else | |
4178 | echo "$ac_err" >&5 | |
4179 | echo "configure: failed program was:" >&5 | |
4180 | cat conftest.$ac_ext >&5 | |
4181 | rm -rf conftest* | |
4182 | eval "ac_cv_header_$ac_safe=no" | |
4183 | fi | |
4184 | rm -f conftest* | |
4185 | fi | |
4186 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4187 | echo "$ac_t""yes" 1>&6 | |
4188 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4189 | cat >> confdefs.h <<EOF | |
4190 | #define $ac_tr_hdr 1 | |
4191 | EOF | |
4192 | ||
4193 | else | |
4194 | echo "$ac_t""no" 1>&6 | |
4195 | fi | |
4196 | done | |
4197 | ||
4198 | for ac_hdr in poll.h sys/poll.h | |
4199 | do | |
4200 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4201 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4202 | echo "configure:4203: checking for $ac_hdr" >&5 |
5ee754fc MK |
4203 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4205 | else | |
4206 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4207 | #line 4208 "configure" |
5ee754fc MK |
4208 | #include "confdefs.h" |
4209 | #include <$ac_hdr> | |
4210 | EOF | |
4211 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4212 | { (eval echo configure:4213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4213 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4214 | if test -z "$ac_err"; then | |
4215 | rm -rf conftest* | |
4216 | eval "ac_cv_header_$ac_safe=yes" | |
4217 | else | |
4218 | echo "$ac_err" >&5 | |
4219 | echo "configure: failed program was:" >&5 | |
4220 | cat conftest.$ac_ext >&5 | |
4221 | rm -rf conftest* | |
4222 | eval "ac_cv_header_$ac_safe=no" | |
4223 | fi | |
4224 | rm -f conftest* | |
4225 | fi | |
4226 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4227 | echo "$ac_t""yes" 1>&6 | |
4228 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4229 | cat >> confdefs.h <<EOF | |
4230 | #define $ac_tr_hdr 1 | |
4231 | EOF | |
4232 | ||
4233 | else | |
4234 | echo "$ac_t""no" 1>&6 | |
4235 | fi | |
4236 | done | |
4237 | ||
4238 | for ac_hdr in proc_service.h thread_db.h | |
4239 | do | |
4240 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4241 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4242 | echo "configure:4243: checking for $ac_hdr" >&5 |
5ee754fc MK |
4243 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4245 | else | |
4246 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4247 | #line 4248 "configure" |
5ee754fc MK |
4248 | #include "confdefs.h" |
4249 | #include <$ac_hdr> | |
4250 | EOF | |
4251 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4252 | { (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4253 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4254 | if test -z "$ac_err"; then | |
4255 | rm -rf conftest* | |
4256 | eval "ac_cv_header_$ac_safe=yes" | |
4257 | else | |
4258 | echo "$ac_err" >&5 | |
4259 | echo "configure: failed program was:" >&5 | |
4260 | cat conftest.$ac_ext >&5 | |
4261 | rm -rf conftest* | |
4262 | eval "ac_cv_header_$ac_safe=no" | |
4263 | fi | |
4264 | rm -f conftest* | |
4265 | fi | |
4266 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4267 | echo "$ac_t""yes" 1>&6 | |
4268 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4269 | cat >> confdefs.h <<EOF | |
4270 | #define $ac_tr_hdr 1 | |
4271 | EOF | |
4272 | ||
4273 | else | |
4274 | echo "$ac_t""no" 1>&6 | |
4275 | fi | |
4276 | done | |
4277 | ||
4278 | for ac_hdr in stddef.h | |
4279 | do | |
4280 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4281 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4282 | echo "configure:4283: checking for $ac_hdr" >&5 |
5ee754fc MK |
4283 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4284 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4285 | else | |
4286 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4287 | #line 4288 "configure" |
5ee754fc MK |
4288 | #include "confdefs.h" |
4289 | #include <$ac_hdr> | |
4290 | EOF | |
4291 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4292 | { (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4293 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4294 | if test -z "$ac_err"; then | |
4295 | rm -rf conftest* | |
4296 | eval "ac_cv_header_$ac_safe=yes" | |
4297 | else | |
4298 | echo "$ac_err" >&5 | |
4299 | echo "configure: failed program was:" >&5 | |
4300 | cat conftest.$ac_ext >&5 | |
4301 | rm -rf conftest* | |
4302 | eval "ac_cv_header_$ac_safe=no" | |
4303 | fi | |
4304 | rm -f conftest* | |
4305 | fi | |
4306 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4307 | echo "$ac_t""yes" 1>&6 | |
4308 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4309 | cat >> confdefs.h <<EOF | |
4310 | #define $ac_tr_hdr 1 | |
4311 | EOF | |
4312 | ||
4313 | else | |
4314 | echo "$ac_t""no" 1>&6 | |
4315 | fi | |
4316 | done | |
4317 | ||
4318 | for ac_hdr in stdlib.h | |
4319 | do | |
4320 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4321 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4322 | echo "configure:4323: checking for $ac_hdr" >&5 |
5ee754fc MK |
4323 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4325 | else | |
4326 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4327 | #line 4328 "configure" |
5ee754fc MK |
4328 | #include "confdefs.h" |
4329 | #include <$ac_hdr> | |
4330 | EOF | |
4331 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4332 | { (eval echo configure:4333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4333 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4334 | if test -z "$ac_err"; then | |
4335 | rm -rf conftest* | |
4336 | eval "ac_cv_header_$ac_safe=yes" | |
4337 | else | |
4338 | echo "$ac_err" >&5 | |
4339 | echo "configure: failed program was:" >&5 | |
4340 | cat conftest.$ac_ext >&5 | |
4341 | rm -rf conftest* | |
4342 | eval "ac_cv_header_$ac_safe=no" | |
4343 | fi | |
4344 | rm -f conftest* | |
4345 | fi | |
4346 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4347 | echo "$ac_t""yes" 1>&6 | |
4348 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4349 | cat >> confdefs.h <<EOF | |
4350 | #define $ac_tr_hdr 1 | |
4351 | EOF | |
4352 | ||
4353 | else | |
4354 | echo "$ac_t""no" 1>&6 | |
4355 | fi | |
4356 | done | |
4357 | ||
4358 | for ac_hdr in stdint.h | |
4359 | do | |
4360 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4361 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4362 | echo "configure:4363: checking for $ac_hdr" >&5 |
5ee754fc MK |
4363 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4364 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4365 | else | |
4366 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4367 | #line 4368 "configure" |
5ee754fc MK |
4368 | #include "confdefs.h" |
4369 | #include <$ac_hdr> | |
4370 | EOF | |
4371 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4372 | { (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4373 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4374 | if test -z "$ac_err"; then | |
4375 | rm -rf conftest* | |
4376 | eval "ac_cv_header_$ac_safe=yes" | |
4377 | else | |
4378 | echo "$ac_err" >&5 | |
4379 | echo "configure: failed program was:" >&5 | |
4380 | cat conftest.$ac_ext >&5 | |
4381 | rm -rf conftest* | |
4382 | eval "ac_cv_header_$ac_safe=no" | |
4383 | fi | |
4384 | rm -f conftest* | |
4385 | fi | |
4386 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4387 | echo "$ac_t""yes" 1>&6 | |
4388 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4389 | cat >> confdefs.h <<EOF | |
4390 | #define $ac_tr_hdr 1 | |
4391 | EOF | |
4392 | ||
4393 | else | |
4394 | echo "$ac_t""no" 1>&6 | |
4395 | fi | |
4396 | done | |
4397 | ||
4398 | for ac_hdr in string.h memory.h strings.h | |
4399 | do | |
4400 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4401 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4402 | echo "configure:4403: checking for $ac_hdr" >&5 |
5ee754fc MK |
4403 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4404 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4405 | else | |
4406 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4407 | #line 4408 "configure" |
5ee754fc MK |
4408 | #include "confdefs.h" |
4409 | #include <$ac_hdr> | |
4410 | EOF | |
4411 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4412 | { (eval echo configure:4413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4413 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4414 | if test -z "$ac_err"; then | |
4415 | rm -rf conftest* | |
4416 | eval "ac_cv_header_$ac_safe=yes" | |
4417 | else | |
4418 | echo "$ac_err" >&5 | |
4419 | echo "configure: failed program was:" >&5 | |
4420 | cat conftest.$ac_ext >&5 | |
4421 | rm -rf conftest* | |
4422 | eval "ac_cv_header_$ac_safe=no" | |
4423 | fi | |
4424 | rm -f conftest* | |
4425 | fi | |
4426 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4427 | echo "$ac_t""yes" 1>&6 | |
4428 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4429 | cat >> confdefs.h <<EOF | |
4430 | #define $ac_tr_hdr 1 | |
4431 | EOF | |
4432 | ||
4433 | else | |
4434 | echo "$ac_t""no" 1>&6 | |
4435 | fi | |
4436 | done | |
4437 | ||
4438 | for ac_hdr in sys/fault.h | |
4439 | do | |
4440 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4441 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4442 | echo "configure:4443: checking for $ac_hdr" >&5 |
5ee754fc MK |
4443 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4445 | else | |
4446 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4447 | #line 4448 "configure" |
5ee754fc MK |
4448 | #include "confdefs.h" |
4449 | #include <$ac_hdr> | |
4450 | EOF | |
4451 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4452 | { (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4453 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4454 | if test -z "$ac_err"; then | |
4455 | rm -rf conftest* | |
4456 | eval "ac_cv_header_$ac_safe=yes" | |
4457 | else | |
4458 | echo "$ac_err" >&5 | |
4459 | echo "configure: failed program was:" >&5 | |
4460 | cat conftest.$ac_ext >&5 | |
4461 | rm -rf conftest* | |
4462 | eval "ac_cv_header_$ac_safe=no" | |
4463 | fi | |
4464 | rm -f conftest* | |
4465 | fi | |
4466 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4467 | echo "$ac_t""yes" 1>&6 | |
4468 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4469 | cat >> confdefs.h <<EOF | |
4470 | #define $ac_tr_hdr 1 | |
4471 | EOF | |
4472 | ||
4473 | else | |
4474 | echo "$ac_t""no" 1>&6 | |
4475 | fi | |
4476 | done | |
4477 | ||
4478 | for ac_hdr in sys/file.h | |
4479 | do | |
4480 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4481 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4482 | echo "configure:4483: checking for $ac_hdr" >&5 |
5ee754fc MK |
4483 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4485 | else | |
4486 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4487 | #line 4488 "configure" |
5ee754fc MK |
4488 | #include "confdefs.h" |
4489 | #include <$ac_hdr> | |
4490 | EOF | |
4491 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4492 | { (eval echo configure:4493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4493 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4494 | if test -z "$ac_err"; then | |
4495 | rm -rf conftest* | |
4496 | eval "ac_cv_header_$ac_safe=yes" | |
4497 | else | |
4498 | echo "$ac_err" >&5 | |
4499 | echo "configure: failed program was:" >&5 | |
4500 | cat conftest.$ac_ext >&5 | |
4501 | rm -rf conftest* | |
4502 | eval "ac_cv_header_$ac_safe=no" | |
4503 | fi | |
4504 | rm -f conftest* | |
4505 | fi | |
4506 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4507 | echo "$ac_t""yes" 1>&6 | |
4508 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4509 | cat >> confdefs.h <<EOF | |
4510 | #define $ac_tr_hdr 1 | |
4511 | EOF | |
4512 | ||
4513 | else | |
4514 | echo "$ac_t""no" 1>&6 | |
4515 | fi | |
4516 | done | |
4517 | ||
4518 | for ac_hdr in sys/filio.h | |
4519 | do | |
4520 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4521 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4522 | echo "configure:4523: checking for $ac_hdr" >&5 |
5ee754fc MK |
4523 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4525 | else | |
4526 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4527 | #line 4528 "configure" |
5ee754fc MK |
4528 | #include "confdefs.h" |
4529 | #include <$ac_hdr> | |
4530 | EOF | |
4531 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4532 | { (eval echo configure:4533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4533 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4534 | if test -z "$ac_err"; then | |
4535 | rm -rf conftest* | |
4536 | eval "ac_cv_header_$ac_safe=yes" | |
4537 | else | |
4538 | echo "$ac_err" >&5 | |
4539 | echo "configure: failed program was:" >&5 | |
4540 | cat conftest.$ac_ext >&5 | |
4541 | rm -rf conftest* | |
4542 | eval "ac_cv_header_$ac_safe=no" | |
4543 | fi | |
4544 | rm -f conftest* | |
4545 | fi | |
4546 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4547 | echo "$ac_t""yes" 1>&6 | |
4548 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4549 | cat >> confdefs.h <<EOF | |
4550 | #define $ac_tr_hdr 1 | |
4551 | EOF | |
4552 | ||
4553 | else | |
4554 | echo "$ac_t""no" 1>&6 | |
4555 | fi | |
4556 | done | |
4557 | ||
4558 | for ac_hdr in sys/ioctl.h | |
4559 | do | |
4560 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4561 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4562 | echo "configure:4563: checking for $ac_hdr" >&5 |
5ee754fc MK |
4563 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4565 | else | |
4566 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4567 | #line 4568 "configure" |
5ee754fc MK |
4568 | #include "confdefs.h" |
4569 | #include <$ac_hdr> | |
4570 | EOF | |
4571 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4572 | { (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4573 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4574 | if test -z "$ac_err"; then | |
4575 | rm -rf conftest* | |
4576 | eval "ac_cv_header_$ac_safe=yes" | |
4577 | else | |
4578 | echo "$ac_err" >&5 | |
4579 | echo "configure: failed program was:" >&5 | |
4580 | cat conftest.$ac_ext >&5 | |
4581 | rm -rf conftest* | |
4582 | eval "ac_cv_header_$ac_safe=no" | |
4583 | fi | |
4584 | rm -f conftest* | |
4585 | fi | |
4586 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4587 | echo "$ac_t""yes" 1>&6 | |
4588 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4589 | cat >> confdefs.h <<EOF | |
4590 | #define $ac_tr_hdr 1 | |
4591 | EOF | |
4592 | ||
4593 | else | |
4594 | echo "$ac_t""no" 1>&6 | |
4595 | fi | |
4596 | done | |
4597 | ||
4598 | for ac_hdr in sys/param.h | |
4599 | do | |
4600 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4601 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4602 | echo "configure:4603: checking for $ac_hdr" >&5 |
5ee754fc MK |
4603 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4604 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4605 | else | |
4606 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4607 | #line 4608 "configure" |
5ee754fc MK |
4608 | #include "confdefs.h" |
4609 | #include <$ac_hdr> | |
4610 | EOF | |
4611 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4612 | { (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4613 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4614 | if test -z "$ac_err"; then | |
4615 | rm -rf conftest* | |
4616 | eval "ac_cv_header_$ac_safe=yes" | |
4617 | else | |
4618 | echo "$ac_err" >&5 | |
4619 | echo "configure: failed program was:" >&5 | |
4620 | cat conftest.$ac_ext >&5 | |
4621 | rm -rf conftest* | |
4622 | eval "ac_cv_header_$ac_safe=no" | |
4623 | fi | |
4624 | rm -f conftest* | |
4625 | fi | |
4626 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4627 | echo "$ac_t""yes" 1>&6 | |
4628 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4629 | cat >> confdefs.h <<EOF | |
4630 | #define $ac_tr_hdr 1 | |
4631 | EOF | |
4632 | ||
4633 | else | |
4634 | echo "$ac_t""no" 1>&6 | |
4635 | fi | |
4636 | done | |
4637 | ||
4638 | for ac_hdr in sys/proc.h | |
4639 | do | |
4640 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4641 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4642 | echo "configure:4643: checking for $ac_hdr" >&5 |
5ee754fc MK |
4643 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4644 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4645 | else | |
4646 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4647 | #line 4648 "configure" |
5ee754fc MK |
4648 | #include "confdefs.h" |
4649 | #include <$ac_hdr> | |
4650 | EOF | |
4651 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4652 | { (eval echo configure:4653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4653 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4654 | if test -z "$ac_err"; then | |
4655 | rm -rf conftest* | |
4656 | eval "ac_cv_header_$ac_safe=yes" | |
4657 | else | |
4658 | echo "$ac_err" >&5 | |
4659 | echo "configure: failed program was:" >&5 | |
4660 | cat conftest.$ac_ext >&5 | |
4661 | rm -rf conftest* | |
4662 | eval "ac_cv_header_$ac_safe=no" | |
4663 | fi | |
4664 | rm -f conftest* | |
4665 | fi | |
4666 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4667 | echo "$ac_t""yes" 1>&6 | |
4668 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4669 | cat >> confdefs.h <<EOF | |
4670 | #define $ac_tr_hdr 1 | |
4671 | EOF | |
4672 | ||
4673 | else | |
4674 | echo "$ac_t""no" 1>&6 | |
4675 | fi | |
4676 | done | |
4677 | ||
4678 | for ac_hdr in sys/procfs.h | |
4679 | do | |
4680 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4681 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4682 | echo "configure:4683: checking for $ac_hdr" >&5 |
5ee754fc MK |
4683 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4684 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4685 | else | |
4686 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4687 | #line 4688 "configure" |
5ee754fc MK |
4688 | #include "confdefs.h" |
4689 | #include <$ac_hdr> | |
4690 | EOF | |
4691 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4692 | { (eval echo configure:4693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4693 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4694 | if test -z "$ac_err"; then | |
4695 | rm -rf conftest* | |
4696 | eval "ac_cv_header_$ac_safe=yes" | |
4697 | else | |
4698 | echo "$ac_err" >&5 | |
4699 | echo "configure: failed program was:" >&5 | |
4700 | cat conftest.$ac_ext >&5 | |
4701 | rm -rf conftest* | |
4702 | eval "ac_cv_header_$ac_safe=no" | |
4703 | fi | |
4704 | rm -f conftest* | |
4705 | fi | |
4706 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4707 | echo "$ac_t""yes" 1>&6 | |
4708 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4709 | cat >> confdefs.h <<EOF | |
4710 | #define $ac_tr_hdr 1 | |
4711 | EOF | |
4712 | ||
4713 | else | |
4714 | echo "$ac_t""no" 1>&6 | |
4715 | fi | |
4716 | done | |
4717 | ||
4718 | for ac_hdr in sys/ptrace.h ptrace.h | |
4719 | do | |
4720 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4721 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4722 | echo "configure:4723: checking for $ac_hdr" >&5 |
5ee754fc MK |
4723 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4724 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4725 | else | |
4726 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4727 | #line 4728 "configure" |
5ee754fc MK |
4728 | #include "confdefs.h" |
4729 | #include <$ac_hdr> | |
4730 | EOF | |
4731 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4732 | { (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4733 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4734 | if test -z "$ac_err"; then | |
4735 | rm -rf conftest* | |
4736 | eval "ac_cv_header_$ac_safe=yes" | |
4737 | else | |
4738 | echo "$ac_err" >&5 | |
4739 | echo "configure: failed program was:" >&5 | |
4740 | cat conftest.$ac_ext >&5 | |
4741 | rm -rf conftest* | |
4742 | eval "ac_cv_header_$ac_safe=no" | |
4743 | fi | |
4744 | rm -f conftest* | |
4745 | fi | |
4746 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4747 | echo "$ac_t""yes" 1>&6 | |
4748 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4749 | cat >> confdefs.h <<EOF | |
4750 | #define $ac_tr_hdr 1 | |
4751 | EOF | |
4752 | ||
4753 | else | |
4754 | echo "$ac_t""no" 1>&6 | |
4755 | fi | |
4756 | done | |
4757 | ||
4758 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4759 | do | |
4760 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4761 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4762 | echo "configure:4763: checking for $ac_hdr" >&5 |
5ee754fc MK |
4763 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4764 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4765 | else | |
4766 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4767 | #line 4768 "configure" |
5ee754fc MK |
4768 | #include "confdefs.h" |
4769 | #include <$ac_hdr> | |
4770 | EOF | |
4771 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4772 | { (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4773 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4774 | if test -z "$ac_err"; then | |
4775 | rm -rf conftest* | |
4776 | eval "ac_cv_header_$ac_safe=yes" | |
4777 | else | |
4778 | echo "$ac_err" >&5 | |
4779 | echo "configure: failed program was:" >&5 | |
4780 | cat conftest.$ac_ext >&5 | |
4781 | rm -rf conftest* | |
4782 | eval "ac_cv_header_$ac_safe=no" | |
4783 | fi | |
4784 | rm -f conftest* | |
4785 | fi | |
4786 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4787 | echo "$ac_t""yes" 1>&6 | |
4788 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4789 | cat >> confdefs.h <<EOF | |
4790 | #define $ac_tr_hdr 1 | |
4791 | EOF | |
4792 | ||
4793 | else | |
4794 | echo "$ac_t""no" 1>&6 | |
4795 | fi | |
4796 | done | |
4797 | ||
4798 | for ac_hdr in sys/select.h | |
4799 | do | |
4800 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4801 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4802 | echo "configure:4803: checking for $ac_hdr" >&5 |
5ee754fc MK |
4803 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4805 | else | |
4806 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4807 | #line 4808 "configure" |
5ee754fc MK |
4808 | #include "confdefs.h" |
4809 | #include <$ac_hdr> | |
4810 | EOF | |
4811 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4812 | { (eval echo configure:4813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4813 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4814 | if test -z "$ac_err"; then | |
4815 | rm -rf conftest* | |
4816 | eval "ac_cv_header_$ac_safe=yes" | |
4817 | else | |
4818 | echo "$ac_err" >&5 | |
4819 | echo "configure: failed program was:" >&5 | |
4820 | cat conftest.$ac_ext >&5 | |
4821 | rm -rf conftest* | |
4822 | eval "ac_cv_header_$ac_safe=no" | |
4823 | fi | |
4824 | rm -f conftest* | |
4825 | fi | |
4826 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4827 | echo "$ac_t""yes" 1>&6 | |
4828 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4829 | cat >> confdefs.h <<EOF | |
4830 | #define $ac_tr_hdr 1 | |
4831 | EOF | |
4832 | ||
4833 | else | |
4834 | echo "$ac_t""no" 1>&6 | |
4835 | fi | |
4836 | done | |
4837 | ||
4838 | for ac_hdr in sys/syscall.h | |
4839 | do | |
4840 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4841 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4842 | echo "configure:4843: checking for $ac_hdr" >&5 |
5ee754fc MK |
4843 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4845 | else | |
4846 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4847 | #line 4848 "configure" |
5ee754fc MK |
4848 | #include "confdefs.h" |
4849 | #include <$ac_hdr> | |
4850 | EOF | |
4851 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4852 | { (eval echo configure:4853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4853 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4854 | if test -z "$ac_err"; then | |
4855 | rm -rf conftest* | |
4856 | eval "ac_cv_header_$ac_safe=yes" | |
4857 | else | |
4858 | echo "$ac_err" >&5 | |
4859 | echo "configure: failed program was:" >&5 | |
4860 | cat conftest.$ac_ext >&5 | |
4861 | rm -rf conftest* | |
4862 | eval "ac_cv_header_$ac_safe=no" | |
4863 | fi | |
4864 | rm -f conftest* | |
4865 | fi | |
4866 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4867 | echo "$ac_t""yes" 1>&6 | |
4868 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4869 | cat >> confdefs.h <<EOF | |
4870 | #define $ac_tr_hdr 1 | |
4871 | EOF | |
4872 | ||
4873 | else | |
4874 | echo "$ac_t""no" 1>&6 | |
4875 | fi | |
4876 | done | |
4877 | ||
4878 | for ac_hdr in sys/user.h | |
4879 | do | |
4880 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4881 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4882 | echo "configure:4883: checking for $ac_hdr" >&5 |
5ee754fc MK |
4883 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4884 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4885 | else | |
4886 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4887 | #line 4888 "configure" |
5ee754fc MK |
4888 | #include "confdefs.h" |
4889 | #include <$ac_hdr> | |
4890 | EOF | |
4891 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4892 | { (eval echo configure:4893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4893 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4894 | if test -z "$ac_err"; then | |
4895 | rm -rf conftest* | |
4896 | eval "ac_cv_header_$ac_safe=yes" | |
4897 | else | |
4898 | echo "$ac_err" >&5 | |
4899 | echo "configure: failed program was:" >&5 | |
4900 | cat conftest.$ac_ext >&5 | |
4901 | rm -rf conftest* | |
4902 | eval "ac_cv_header_$ac_safe=no" | |
4903 | fi | |
4904 | rm -f conftest* | |
4905 | fi | |
4906 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4907 | echo "$ac_t""yes" 1>&6 | |
4908 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4909 | cat >> confdefs.h <<EOF | |
4910 | #define $ac_tr_hdr 1 | |
4911 | EOF | |
4912 | ||
4913 | else | |
4914 | echo "$ac_t""no" 1>&6 | |
4915 | fi | |
4916 | done | |
4917 | ||
4918 | for ac_hdr in sys/wait.h wait.h | |
4919 | do | |
4920 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4921 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4922 | echo "configure:4923: checking for $ac_hdr" >&5 |
5ee754fc MK |
4923 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4925 | else | |
4926 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 4927 | #line 4928 "configure" |
5ee754fc MK |
4928 | #include "confdefs.h" |
4929 | #include <$ac_hdr> | |
4930 | EOF | |
4931 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 4932 | { (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4933 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4934 | if test -z "$ac_err"; then | |
4935 | rm -rf conftest* | |
4936 | eval "ac_cv_header_$ac_safe=yes" | |
4937 | else | |
4938 | echo "$ac_err" >&5 | |
9608ab8b MK |
4939 | echo "configure: failed program was:" >&5 |
4940 | cat conftest.$ac_ext >&5 | |
4941 | rm -rf conftest* | |
5ee754fc | 4942 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4943 | fi |
4944 | rm -f conftest* | |
4945 | fi | |
5ee754fc | 4946 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
4947 | echo "$ac_t""yes" 1>&6 |
4948 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4949 | cat >> confdefs.h <<EOF | |
4950 | #define $ac_tr_hdr 1 | |
4951 | EOF | |
5ee754fc | 4952 | |
9608ab8b MK |
4953 | else |
4954 | echo "$ac_t""no" 1>&6 | |
4955 | fi | |
4956 | done | |
5ee754fc MK |
4957 | |
4958 | for ac_hdr in termios.h termio.h sgtty.h | |
4959 | do | |
4960 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4961 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 4962 | echo "configure:4963: checking for $ac_hdr" >&5 |
5ee754fc | 4963 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4964 | echo $ac_n "(cached) $ac_c" 1>&6 |
4965 | else | |
5ee754fc | 4966 | cat > conftest.$ac_ext <<EOF |
72cfdc76 | 4967 | #line 4968 "configure" |
9608ab8b | 4968 | #include "confdefs.h" |
5ee754fc | 4969 | #include <$ac_hdr> |
9608ab8b | 4970 | EOF |
5ee754fc | 4971 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
72cfdc76 | 4972 | { (eval echo configure:4973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4973 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4974 | if test -z "$ac_err"; then | |
9608ab8b | 4975 | rm -rf conftest* |
5ee754fc | 4976 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4977 | else |
5ee754fc | 4978 | echo "$ac_err" >&5 |
9608ab8b MK |
4979 | echo "configure: failed program was:" >&5 |
4980 | cat conftest.$ac_ext >&5 | |
4981 | rm -rf conftest* | |
5ee754fc | 4982 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4983 | fi |
4984 | rm -f conftest* | |
9608ab8b | 4985 | fi |
5ee754fc | 4986 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4987 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4988 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4989 | cat >> confdefs.h <<EOF | |
4990 | #define $ac_tr_hdr 1 | |
4991 | EOF | |
4992 | ||
9608ab8b MK |
4993 | else |
4994 | echo "$ac_t""no" 1>&6 | |
4995 | fi | |
5ee754fc | 4996 | done |
9608ab8b | 4997 | |
5ee754fc MK |
4998 | for ac_hdr in unistd.h |
4999 | do | |
5000 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5001 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 5002 | echo "configure:5003: checking for $ac_hdr" >&5 |
5ee754fc | 5003 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5004 | echo $ac_n "(cached) $ac_c" 1>&6 |
5005 | else | |
5ee754fc | 5006 | cat > conftest.$ac_ext <<EOF |
72cfdc76 | 5007 | #line 5008 "configure" |
9608ab8b | 5008 | #include "confdefs.h" |
5ee754fc | 5009 | #include <$ac_hdr> |
9608ab8b | 5010 | EOF |
5ee754fc | 5011 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
72cfdc76 | 5012 | { (eval echo configure:5013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5013 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5014 | if test -z "$ac_err"; then | |
9608ab8b | 5015 | rm -rf conftest* |
5ee754fc | 5016 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5017 | else |
5ee754fc | 5018 | echo "$ac_err" >&5 |
9608ab8b MK |
5019 | echo "configure: failed program was:" >&5 |
5020 | cat conftest.$ac_ext >&5 | |
5021 | rm -rf conftest* | |
5ee754fc | 5022 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5023 | fi |
5024 | rm -f conftest* | |
9608ab8b | 5025 | fi |
5ee754fc | 5026 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5027 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5028 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5029 | cat >> confdefs.h <<EOF | |
5030 | #define $ac_tr_hdr 1 | |
5031 | EOF | |
5032 | ||
9608ab8b MK |
5033 | else |
5034 | echo "$ac_t""no" 1>&6 | |
5035 | fi | |
5ee754fc | 5036 | done |
9608ab8b | 5037 | |
9608ab8b | 5038 | |
5ee754fc MK |
5039 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5040 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5041 | # think that we don't have <curses.h> if we're using GCC. | |
5042 | case $host_os in | |
5043 | solaris2.[78]) | |
5044 | if test "$GCC" = yes; then | |
5045 | cat >> confdefs.h <<\EOF | |
5046 | #define _MSE_INT_H 1 | |
5047 | EOF | |
5048 | ||
5049 | fi ;; | |
5050 | esac | |
5051 | for ac_hdr in curses.h ncurses.h term.h | |
5052 | do | |
5053 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5054 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 5055 | echo "configure:5056: checking for $ac_hdr" >&5 |
5ee754fc | 5056 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5057 | echo $ac_n "(cached) $ac_c" 1>&6 |
5058 | else | |
5059 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5060 | #line 5061 "configure" |
c906108c | 5061 | #include "confdefs.h" |
5ee754fc | 5062 | #include <$ac_hdr> |
c906108c SS |
5063 | EOF |
5064 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 5065 | { (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5066 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5067 | if test -z "$ac_err"; then | |
5068 | rm -rf conftest* | |
5ee754fc | 5069 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5070 | else |
5071 | echo "$ac_err" >&5 | |
5072 | echo "configure: failed program was:" >&5 | |
5073 | cat conftest.$ac_ext >&5 | |
5074 | rm -rf conftest* | |
5ee754fc | 5075 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5076 | fi |
5077 | rm -f conftest* | |
c906108c | 5078 | fi |
5ee754fc MK |
5079 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5080 | echo "$ac_t""yes" 1>&6 | |
5081 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5082 | cat >> confdefs.h <<EOF | |
5083 | #define $ac_tr_hdr 1 | |
c906108c | 5084 | EOF |
5ee754fc | 5085 | |
c906108c | 5086 | else |
5ee754fc | 5087 | echo "$ac_t""no" 1>&6 |
c906108c | 5088 | fi |
5ee754fc | 5089 | done |
c906108c SS |
5090 | |
5091 | ||
5ee754fc MK |
5092 | # FIXME: kettenis/20030102: In most cases we include these |
5093 | # unconditionally, so what's the point in checking these? | |
5094 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5095 | do |
5096 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5097 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 5098 | echo "configure:5099: checking for $ac_hdr" >&5 |
c906108c SS |
5099 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5101 | else | |
5102 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5103 | #line 5104 "configure" |
c906108c SS |
5104 | #include "confdefs.h" |
5105 | #include <$ac_hdr> | |
5106 | EOF | |
5107 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 5108 | { (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5109 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5110 | if test -z "$ac_err"; then | |
5111 | rm -rf conftest* | |
5112 | eval "ac_cv_header_$ac_safe=yes" | |
5113 | else | |
5114 | echo "$ac_err" >&5 | |
5115 | echo "configure: failed program was:" >&5 | |
5116 | cat conftest.$ac_ext >&5 | |
5117 | rm -rf conftest* | |
5118 | eval "ac_cv_header_$ac_safe=no" | |
5119 | fi | |
5120 | rm -f conftest* | |
5121 | fi | |
5122 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5123 | echo "$ac_t""yes" 1>&6 | |
5124 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5125 | cat >> confdefs.h <<EOF | |
5126 | #define $ac_tr_hdr 1 | |
5127 | EOF | |
5128 | ||
5129 | else | |
5130 | echo "$ac_t""no" 1>&6 | |
5131 | fi | |
5132 | done | |
5133 | ||
5ee754fc MK |
5134 | |
5135 | # ------------------ # | |
5136 | # Checks for types. # | |
5137 | # ------------------ # | |
5138 | ||
5139 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
72cfdc76 | 5140 | echo "configure:5141: checking return type of signal handlers" >&5 |
5ee754fc | 5141 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5142 | echo $ac_n "(cached) $ac_c" 1>&6 |
5143 | else | |
5144 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5145 | #line 5146 "configure" |
c906108c SS |
5146 | #include "confdefs.h" |
5147 | #include <sys/types.h> | |
5ee754fc MK |
5148 | #include <signal.h> |
5149 | #ifdef signal | |
5150 | #undef signal | |
c906108c | 5151 | #endif |
5ee754fc MK |
5152 | #ifdef __cplusplus |
5153 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5154 | #else | |
5155 | void (*signal ()) (); | |
c906108c SS |
5156 | #endif |
5157 | ||
5ee754fc MK |
5158 | int main() { |
5159 | int i; | |
5160 | ; return 0; } | |
c906108c | 5161 | EOF |
72cfdc76 | 5162 | if { (eval echo configure:5163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5163 | rm -rf conftest* |
5ee754fc | 5164 | ac_cv_type_signal=void |
c906108c | 5165 | else |
5ee754fc MK |
5166 | echo "configure: failed program was:" >&5 |
5167 | cat conftest.$ac_ext >&5 | |
c906108c | 5168 | rm -rf conftest* |
5ee754fc | 5169 | ac_cv_type_signal=int |
c906108c SS |
5170 | fi |
5171 | rm -f conftest* | |
c906108c SS |
5172 | fi |
5173 | ||
5ee754fc MK |
5174 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5175 | cat >> confdefs.h <<EOF | |
5176 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5177 | EOF |
5178 | ||
c906108c SS |
5179 | |
5180 | ||
5ee754fc MK |
5181 | # ------------------------------------- # |
5182 | # Checks for compiler characteristics. # | |
5183 | # ------------------------------------- # | |
5184 | ||
c906108c | 5185 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
72cfdc76 | 5186 | echo "configure:5187: checking for working const" >&5 |
c906108c SS |
5187 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5188 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5189 | else | |
5190 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5191 | #line 5192 "configure" |
c906108c SS |
5192 | #include "confdefs.h" |
5193 | ||
5194 | int main() { | |
5195 | ||
5196 | /* Ultrix mips cc rejects this. */ | |
5197 | typedef int charset[2]; const charset x; | |
5198 | /* SunOS 4.1.1 cc rejects this. */ | |
5199 | char const *const *ccp; | |
5200 | char **p; | |
5201 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5202 | struct point {int x, y;}; | |
5203 | static struct point const zero = {0,0}; | |
5204 | /* AIX XL C 1.02.0.0 rejects this. | |
5205 | It does not let you subtract one const X* pointer from another in an arm | |
5206 | of an if-expression whose if-part is not a constant expression */ | |
5207 | const char *g = "string"; | |
5208 | ccp = &g + (g ? g-g : 0); | |
5209 | /* HPUX 7.0 cc rejects these. */ | |
5210 | ++ccp; | |
5211 | p = (char**) ccp; | |
5212 | ccp = (char const *const *) p; | |
5213 | { /* SCO 3.2v4 cc rejects this. */ | |
5214 | char *t; | |
5215 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5216 | ||
5217 | *t++ = 0; | |
5218 | } | |
5219 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5220 | int x[] = {25, 17}; | |
5221 | const int *foo = &x[0]; | |
5222 | ++foo; | |
5223 | } | |
5224 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5225 | typedef const int *iptr; | |
5226 | iptr p = 0; | |
5227 | ++p; | |
5228 | } | |
5229 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5230 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5231 | struct s { int j; const int *ap[3]; }; | |
5232 | struct s *b; b->j = 5; | |
5233 | } | |
5234 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5235 | const int foo = 10; | |
5236 | } | |
5237 | ||
5238 | ; return 0; } | |
5239 | EOF | |
72cfdc76 | 5240 | if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5241 | rm -rf conftest* |
5242 | ac_cv_c_const=yes | |
5243 | else | |
5244 | echo "configure: failed program was:" >&5 | |
5245 | cat conftest.$ac_ext >&5 | |
5246 | rm -rf conftest* | |
5247 | ac_cv_c_const=no | |
5248 | fi | |
5249 | rm -f conftest* | |
5250 | fi | |
5251 | ||
5252 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5253 | if test $ac_cv_c_const = no; then | |
5254 | cat >> confdefs.h <<\EOF | |
5255 | #define const | |
5256 | EOF | |
5257 | ||
5258 | fi | |
5259 | ||
bce58c09 | 5260 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
72cfdc76 | 5261 | echo "configure:5262: checking for inline" >&5 |
bce58c09 JB |
5262 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5264 | else | |
5265 | ac_cv_c_inline=no | |
5266 | for ac_kw in inline __inline__ __inline; do | |
5267 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5268 | #line 5269 "configure" |
bce58c09 JB |
5269 | #include "confdefs.h" |
5270 | ||
5271 | int main() { | |
5272 | } $ac_kw foo() { | |
5273 | ; return 0; } | |
5274 | EOF | |
72cfdc76 | 5275 | if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5276 | rm -rf conftest* |
5277 | ac_cv_c_inline=$ac_kw; break | |
5278 | else | |
5279 | echo "configure: failed program was:" >&5 | |
5280 | cat conftest.$ac_ext >&5 | |
5281 | fi | |
5282 | rm -f conftest* | |
5283 | done | |
5284 | ||
5285 | fi | |
5286 | ||
5287 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5288 | case "$ac_cv_c_inline" in | |
5289 | inline | yes) ;; | |
5290 | no) cat >> confdefs.h <<\EOF | |
5291 | #define inline | |
5292 | EOF | |
5293 | ;; | |
5294 | *) cat >> confdefs.h <<EOF | |
5295 | #define inline $ac_cv_c_inline | |
5296 | EOF | |
5297 | ;; | |
5298 | esac | |
5299 | ||
c906108c | 5300 | |
5ee754fc MK |
5301 | # ------------------------------ # |
5302 | # Checks for library functions. # | |
5303 | # ------------------------------ # | |
5304 | ||
46711df8 MK |
5305 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5306 | # for constant arguments. Useless! | |
5307 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
72cfdc76 | 5308 | echo "configure:5309: checking for working alloca.h" >&5 |
46711df8 MK |
5309 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5310 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5311 | else | |
5312 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5313 | #line 5314 "configure" |
46711df8 MK |
5314 | #include "confdefs.h" |
5315 | #include <alloca.h> | |
5316 | int main() { | |
5317 | char *p = alloca(2 * sizeof(int)); | |
5318 | ; return 0; } | |
5319 | EOF | |
72cfdc76 | 5320 | if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5321 | rm -rf conftest* |
5322 | ac_cv_header_alloca_h=yes | |
5323 | else | |
5324 | echo "configure: failed program was:" >&5 | |
5325 | cat conftest.$ac_ext >&5 | |
5326 | rm -rf conftest* | |
5327 | ac_cv_header_alloca_h=no | |
5328 | fi | |
5329 | rm -f conftest* | |
5330 | fi | |
5331 | ||
5332 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5333 | if test $ac_cv_header_alloca_h = yes; then | |
5334 | cat >> confdefs.h <<\EOF | |
5335 | #define HAVE_ALLOCA_H 1 | |
5336 | EOF | |
5337 | ||
5338 | fi | |
5339 | ||
5340 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
72cfdc76 | 5341 | echo "configure:5342: checking for alloca" >&5 |
46711df8 MK |
5342 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5344 | else | |
5345 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5346 | #line 5347 "configure" |
46711df8 MK |
5347 | #include "confdefs.h" |
5348 | ||
5349 | #ifdef __GNUC__ | |
5350 | # define alloca __builtin_alloca | |
5351 | #else | |
5352 | # ifdef _MSC_VER | |
5353 | # include <malloc.h> | |
5354 | # define alloca _alloca | |
5355 | # else | |
5356 | # if HAVE_ALLOCA_H | |
5357 | # include <alloca.h> | |
5358 | # else | |
5359 | # ifdef _AIX | |
5360 | #pragma alloca | |
5361 | # else | |
5362 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5363 | char *alloca (); | |
5364 | # endif | |
5365 | # endif | |
5366 | # endif | |
5367 | # endif | |
5368 | #endif | |
5369 | ||
5370 | int main() { | |
5371 | char *p = (char *) alloca(1); | |
5372 | ; return 0; } | |
5373 | EOF | |
72cfdc76 | 5374 | if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5375 | rm -rf conftest* |
5376 | ac_cv_func_alloca_works=yes | |
5377 | else | |
5378 | echo "configure: failed program was:" >&5 | |
5379 | cat conftest.$ac_ext >&5 | |
5380 | rm -rf conftest* | |
5381 | ac_cv_func_alloca_works=no | |
5382 | fi | |
5383 | rm -f conftest* | |
5384 | fi | |
5385 | ||
5386 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5387 | if test $ac_cv_func_alloca_works = yes; then | |
5388 | cat >> confdefs.h <<\EOF | |
5389 | #define HAVE_ALLOCA 1 | |
5390 | EOF | |
5391 | ||
5392 | fi | |
5393 | ||
5394 | if test $ac_cv_func_alloca_works = no; then | |
5395 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5396 | # that cause trouble. Some versions do not even contain alloca or | |
5397 | # contain a buggy version. If you still want to use their alloca, | |
5398 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5399 | ALLOCA=alloca.${ac_objext} | |
5400 | cat >> confdefs.h <<\EOF | |
5401 | #define C_ALLOCA 1 | |
5402 | EOF | |
5403 | ||
5404 | ||
5405 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
72cfdc76 | 5406 | echo "configure:5407: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5407 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5409 | else | |
5410 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5411 | #line 5412 "configure" |
46711df8 MK |
5412 | #include "confdefs.h" |
5413 | #if defined(CRAY) && ! defined(CRAY2) | |
5414 | webecray | |
5415 | #else | |
5416 | wenotbecray | |
5417 | #endif | |
5418 | ||
5419 | EOF | |
5420 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5421 | egrep "webecray" >/dev/null 2>&1; then | |
5422 | rm -rf conftest* | |
5423 | ac_cv_os_cray=yes | |
5424 | else | |
5425 | rm -rf conftest* | |
5426 | ac_cv_os_cray=no | |
5427 | fi | |
5428 | rm -f conftest* | |
5429 | ||
5430 | fi | |
5431 | ||
5432 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5433 | if test $ac_cv_os_cray = yes; then | |
5434 | for ac_func in _getb67 GETB67 getb67; do | |
5435 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 5436 | echo "configure:5437: checking for $ac_func" >&5 |
46711df8 MK |
5437 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5438 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5439 | else | |
5440 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5441 | #line 5442 "configure" |
46711df8 MK |
5442 | #include "confdefs.h" |
5443 | /* System header to define __stub macros and hopefully few prototypes, | |
5444 | which can conflict with char $ac_func(); below. */ | |
5445 | #include <assert.h> | |
5446 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5447 | /* We use char because int might match the return type of a gcc2 | |
5448 | builtin and then its argument prototype would still apply. */ | |
5449 | char $ac_func(); | |
5450 | ||
5451 | int main() { | |
5452 | ||
5453 | /* The GNU C library defines this for functions which it implements | |
5454 | to always fail with ENOSYS. Some functions are actually named | |
5455 | something starting with __ and the normal name is an alias. */ | |
5456 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5457 | choke me | |
5458 | #else | |
5459 | $ac_func(); | |
5460 | #endif | |
5461 | ||
5462 | ; return 0; } | |
5463 | EOF | |
72cfdc76 | 5464 | if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5465 | rm -rf conftest* |
5466 | eval "ac_cv_func_$ac_func=yes" | |
5467 | else | |
5468 | echo "configure: failed program was:" >&5 | |
5469 | cat conftest.$ac_ext >&5 | |
5470 | rm -rf conftest* | |
5471 | eval "ac_cv_func_$ac_func=no" | |
5472 | fi | |
5473 | rm -f conftest* | |
5474 | fi | |
5475 | ||
5476 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5477 | echo "$ac_t""yes" 1>&6 | |
5478 | cat >> confdefs.h <<EOF | |
5479 | #define CRAY_STACKSEG_END $ac_func | |
5480 | EOF | |
5481 | ||
5482 | break | |
5483 | else | |
5484 | echo "$ac_t""no" 1>&6 | |
5485 | fi | |
5486 | ||
5487 | done | |
5488 | fi | |
5489 | ||
5490 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
72cfdc76 | 5491 | echo "configure:5492: checking stack direction for C alloca" >&5 |
46711df8 MK |
5492 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5494 | else | |
5495 | if test "$cross_compiling" = yes; then | |
5496 | ac_cv_c_stack_direction=0 | |
5497 | else | |
5498 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5499 | #line 5500 "configure" |
46711df8 MK |
5500 | #include "confdefs.h" |
5501 | find_stack_direction () | |
5502 | { | |
5503 | static char *addr = 0; | |
5504 | auto char dummy; | |
5505 | if (addr == 0) | |
5506 | { | |
5507 | addr = &dummy; | |
5508 | return find_stack_direction (); | |
5509 | } | |
5510 | else | |
5511 | return (&dummy > addr) ? 1 : -1; | |
5512 | } | |
5513 | main () | |
5514 | { | |
5515 | exit (find_stack_direction() < 0); | |
5516 | } | |
5517 | EOF | |
72cfdc76 | 5518 | if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5519 | then |
5520 | ac_cv_c_stack_direction=1 | |
5521 | else | |
5522 | echo "configure: failed program was:" >&5 | |
5523 | cat conftest.$ac_ext >&5 | |
5524 | rm -fr conftest* | |
5525 | ac_cv_c_stack_direction=-1 | |
5526 | fi | |
5527 | rm -fr conftest* | |
5528 | fi | |
5529 | ||
5530 | fi | |
5531 | ||
5532 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5533 | cat >> confdefs.h <<EOF | |
5534 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5535 | EOF | |
5536 | ||
5537 | fi | |
5538 | ||
97bf5e38 MK |
5539 | for ac_hdr in unistd.h |
5540 | do | |
5541 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5542 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
72cfdc76 | 5543 | echo "configure:5544: checking for $ac_hdr" >&5 |
74c1b268 AC |
5544 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5546 | else | |
5547 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5548 | #line 5549 "configure" |
74c1b268 | 5549 | #include "confdefs.h" |
97bf5e38 | 5550 | #include <$ac_hdr> |
74c1b268 AC |
5551 | EOF |
5552 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 5553 | { (eval echo configure:5554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5554 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5555 | if test -z "$ac_err"; then | |
5556 | rm -rf conftest* | |
5557 | eval "ac_cv_header_$ac_safe=yes" | |
5558 | else | |
5559 | echo "$ac_err" >&5 | |
5560 | echo "configure: failed program was:" >&5 | |
5561 | cat conftest.$ac_ext >&5 | |
5562 | rm -rf conftest* | |
5563 | eval "ac_cv_header_$ac_safe=no" | |
5564 | fi | |
5565 | rm -f conftest* | |
5566 | fi | |
5567 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5568 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5569 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5570 | cat >> confdefs.h <<EOF | |
5571 | #define $ac_tr_hdr 1 | |
74c1b268 | 5572 | EOF |
97bf5e38 | 5573 | |
74c1b268 AC |
5574 | else |
5575 | echo "$ac_t""no" 1>&6 | |
5576 | fi | |
97bf5e38 | 5577 | done |
74c1b268 | 5578 | |
97bf5e38 MK |
5579 | for ac_func in getpagesize |
5580 | do | |
5581 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 5582 | echo "configure:5583: checking for $ac_func" >&5 |
97bf5e38 | 5583 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5584 | echo $ac_n "(cached) $ac_c" 1>&6 |
5585 | else | |
5586 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5587 | #line 5588 "configure" |
74c1b268 AC |
5588 | #include "confdefs.h" |
5589 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5590 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5591 | #include <assert.h> |
5592 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5593 | /* We use char because int might match the return type of a gcc2 | |
5594 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5595 | char $ac_func(); |
74c1b268 AC |
5596 | |
5597 | int main() { | |
5598 | ||
5599 | /* The GNU C library defines this for functions which it implements | |
5600 | to always fail with ENOSYS. Some functions are actually named | |
5601 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5602 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5603 | choke me |
5604 | #else | |
97bf5e38 | 5605 | $ac_func(); |
74c1b268 AC |
5606 | #endif |
5607 | ||
5608 | ; return 0; } | |
5609 | EOF | |
72cfdc76 | 5610 | if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5611 | rm -rf conftest* |
97bf5e38 | 5612 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5613 | else |
5614 | echo "configure: failed program was:" >&5 | |
5615 | cat conftest.$ac_ext >&5 | |
5616 | rm -rf conftest* | |
97bf5e38 | 5617 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5618 | fi |
5619 | rm -f conftest* | |
5620 | fi | |
5621 | ||
97bf5e38 | 5622 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5623 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5624 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5625 | cat >> confdefs.h <<EOF | |
5626 | #define $ac_tr_func 1 | |
5627 | EOF | |
5628 | ||
74c1b268 AC |
5629 | else |
5630 | echo "$ac_t""no" 1>&6 | |
5631 | fi | |
97bf5e38 | 5632 | done |
74c1b268 | 5633 | |
97bf5e38 | 5634 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
72cfdc76 | 5635 | echo "configure:5636: checking for working mmap" >&5 |
97bf5e38 MK |
5636 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5637 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5638 | else | |
5639 | if test "$cross_compiling" = yes; then | |
5640 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5641 | else |
5642 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5643 | #line 5644 "configure" |
74c1b268 | 5644 | #include "confdefs.h" |
97bf5e38 MK |
5645 | |
5646 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5647 | Here is a matrix of mmap possibilities: | |
5648 | mmap private not fixed | |
5649 | mmap private fixed at somewhere currently unmapped | |
5650 | mmap private fixed at somewhere already mapped | |
5651 | mmap shared not fixed | |
5652 | mmap shared fixed at somewhere currently unmapped | |
5653 | mmap shared fixed at somewhere already mapped | |
5654 | For private mappings, we should verify that changes cannot be read() | |
5655 | back from the file, nor mmap's back from the file at a different | |
5656 | address. (There have been systems where private was not correctly | |
5657 | implemented like the infamous i386 svr4.0, and systems where the | |
5658 | VM page cache was not coherent with the filesystem buffer cache | |
5659 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5660 | For shared mappings, we should conversely verify that changes get | |
5661 | propogated back to all the places they're supposed to be. | |
5662 | ||
5663 | Grep wants private fixed already mapped. | |
5664 | The main things grep needs to know about mmap are: | |
5665 | * does it exist and is it safe to write into the mmap'd area | |
5666 | * how to use it (BSD variants) */ | |
74c1b268 | 5667 | #include <sys/types.h> |
97bf5e38 MK |
5668 | #include <fcntl.h> |
5669 | #include <sys/mman.h> | |
5670 | ||
5671 | /* This mess was copied from the GNU getpagesize.h. */ | |
5672 | #ifndef HAVE_GETPAGESIZE | |
5673 | # ifdef HAVE_UNISTD_H | |
5674 | # include <unistd.h> | |
5675 | # endif | |
5676 | ||
5677 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5678 | # ifndef HAVE_SYS_PARAM_H | |
5679 | # define HAVE_SYS_PARAM_H 1 | |
5680 | # endif | |
5681 | ||
5682 | # ifdef _SC_PAGESIZE | |
5683 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5684 | # else /* no _SC_PAGESIZE */ | |
5685 | # ifdef HAVE_SYS_PARAM_H | |
5686 | # include <sys/param.h> | |
5687 | # ifdef EXEC_PAGESIZE | |
5688 | # define getpagesize() EXEC_PAGESIZE | |
5689 | # else /* no EXEC_PAGESIZE */ | |
5690 | # ifdef NBPG | |
5691 | # define getpagesize() NBPG * CLSIZE | |
5692 | # ifndef CLSIZE | |
5693 | # define CLSIZE 1 | |
5694 | # endif /* no CLSIZE */ | |
5695 | # else /* no NBPG */ | |
5696 | # ifdef NBPC | |
5697 | # define getpagesize() NBPC | |
5698 | # else /* no NBPC */ | |
5699 | # ifdef PAGESIZE | |
5700 | # define getpagesize() PAGESIZE | |
5701 | # endif /* PAGESIZE */ | |
5702 | # endif /* no NBPC */ | |
5703 | # endif /* no NBPG */ | |
5704 | # endif /* no EXEC_PAGESIZE */ | |
5705 | # else /* no HAVE_SYS_PARAM_H */ | |
5706 | # define getpagesize() 8192 /* punt totally */ | |
5707 | # endif /* no HAVE_SYS_PARAM_H */ | |
5708 | # endif /* no _SC_PAGESIZE */ | |
5709 | ||
5710 | #endif /* no HAVE_GETPAGESIZE */ | |
5711 | ||
74c1b268 | 5712 | #ifdef __cplusplus |
97bf5e38 | 5713 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5714 | #else |
97bf5e38 | 5715 | char *malloc(); |
74c1b268 | 5716 | #endif |
74c1b268 | 5717 | |
97bf5e38 MK |
5718 | int |
5719 | main() | |
5720 | { | |
5721 | char *data, *data2, *data3; | |
5722 | int i, pagesize; | |
5723 | int fd; | |
74c1b268 | 5724 | |
97bf5e38 | 5725 | pagesize = getpagesize(); |
74c1b268 | 5726 | |
97bf5e38 MK |
5727 | /* |
5728 | * First, make a file with some known garbage in it. | |
5729 | */ | |
5730 | data = malloc(pagesize); | |
5731 | if (!data) | |
5732 | exit(1); | |
5733 | for (i = 0; i < pagesize; ++i) | |
5734 | *(data + i) = rand(); | |
5735 | umask(0); | |
5736 | fd = creat("conftestmmap", 0600); | |
5737 | if (fd < 0) | |
5738 | exit(1); | |
5739 | if (write(fd, data, pagesize) != pagesize) | |
5740 | exit(1); | |
5741 | close(fd); | |
74c1b268 | 5742 | |
97bf5e38 MK |
5743 | /* |
5744 | * Next, try to mmap the file at a fixed address which | |
5745 | * already has something else allocated at it. If we can, | |
5746 | * also make sure that we see the same garbage. | |
5747 | */ | |
5748 | fd = open("conftestmmap", O_RDWR); | |
5749 | if (fd < 0) | |
5750 | exit(1); | |
5751 | data2 = malloc(2 * pagesize); | |
5752 | if (!data2) | |
5753 | exit(1); | |
5754 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5755 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5756 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5757 | exit(1); | |
5758 | for (i = 0; i < pagesize; ++i) | |
5759 | if (*(data + i) != *(data2 + i)) | |
5760 | exit(1); | |
74c1b268 | 5761 | |
97bf5e38 MK |
5762 | /* |
5763 | * Finally, make sure that changes to the mapped area | |
5764 | * do not percolate back to the file as seen by read(). | |
5765 | * (This is a bug on some variants of i386 svr4.0.) | |
5766 | */ | |
5767 | for (i = 0; i < pagesize; ++i) | |
5768 | *(data2 + i) = *(data2 + i) + 1; | |
5769 | data3 = malloc(pagesize); | |
5770 | if (!data3) | |
5771 | exit(1); | |
5772 | if (read(fd, data3, pagesize) != pagesize) | |
5773 | exit(1); | |
5774 | for (i = 0; i < pagesize; ++i) | |
5775 | if (*(data + i) != *(data3 + i)) | |
5776 | exit(1); | |
5777 | close(fd); | |
5778 | unlink("conftestmmap"); | |
5779 | exit(0); | |
74c1b268 | 5780 | } |
97bf5e38 | 5781 | |
74c1b268 | 5782 | EOF |
72cfdc76 | 5783 | if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5784 | then |
97bf5e38 | 5785 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5786 | else |
5787 | echo "configure: failed program was:" >&5 | |
5788 | cat conftest.$ac_ext >&5 | |
5789 | rm -fr conftest* | |
97bf5e38 | 5790 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5791 | fi |
5792 | rm -fr conftest* | |
5793 | fi | |
5794 | ||
5795 | fi | |
5796 | ||
97bf5e38 MK |
5797 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5798 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5799 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5800 | #define HAVE_MMAP 1 |
74c1b268 AC |
5801 | EOF |
5802 | ||
5803 | fi | |
5804 | ||
97bf5e38 | 5805 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
72cfdc76 | 5806 | echo "configure:5807: checking for pid_t" >&5 |
97bf5e38 | 5807 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5808 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5809 | else |
5810 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5811 | #line 5812 "configure" |
0200359f | 5812 | #include "confdefs.h" |
97bf5e38 MK |
5813 | #include <sys/types.h> |
5814 | #if STDC_HEADERS | |
5815 | #include <stdlib.h> | |
5816 | #include <stddef.h> | |
0200359f | 5817 | #endif |
0200359f | 5818 | EOF |
97bf5e38 MK |
5819 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5820 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5821 | rm -rf conftest* | |
5822 | ac_cv_type_pid_t=yes | |
0200359f | 5823 | else |
97bf5e38 MK |
5824 | rm -rf conftest* |
5825 | ac_cv_type_pid_t=no | |
0200359f | 5826 | fi |
97bf5e38 | 5827 | rm -f conftest* |
0200359f MK |
5828 | |
5829 | fi | |
97bf5e38 MK |
5830 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5831 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5832 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5833 | #define pid_t int |
0200359f MK |
5834 | EOF |
5835 | ||
5836 | fi | |
5837 | ||
97bf5e38 MK |
5838 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5839 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
72cfdc76 | 5840 | echo "configure:5841: checking for vfork.h" >&5 |
97bf5e38 | 5841 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5842 | echo $ac_n "(cached) $ac_c" 1>&6 |
5843 | else | |
5844 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5845 | #line 5846 "configure" |
72473524 | 5846 | #include "confdefs.h" |
97bf5e38 | 5847 | #include <vfork.h> |
72473524 | 5848 | EOF |
97bf5e38 | 5849 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
72cfdc76 | 5850 | { (eval echo configure:5851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
5851 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5852 | if test -z "$ac_err"; then | |
72473524 | 5853 | rm -rf conftest* |
97bf5e38 | 5854 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5855 | else |
97bf5e38 | 5856 | echo "$ac_err" >&5 |
72473524 DJ |
5857 | echo "configure: failed program was:" >&5 |
5858 | cat conftest.$ac_ext >&5 | |
5859 | rm -rf conftest* | |
97bf5e38 | 5860 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5861 | fi |
5862 | rm -f conftest* | |
5863 | fi | |
97bf5e38 MK |
5864 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5865 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5866 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5867 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5868 | EOF |
5869 | ||
97bf5e38 MK |
5870 | else |
5871 | echo "$ac_t""no" 1>&6 | |
72473524 | 5872 | fi |
c906108c | 5873 | |
97bf5e38 | 5874 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
72cfdc76 | 5875 | echo "configure:5876: checking for working vfork" >&5 |
97bf5e38 MK |
5876 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
5877 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5878 | else | |
5879 | if test "$cross_compiling" = yes; then | |
5880 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
72cfdc76 | 5881 | echo "configure:5882: checking for vfork" >&5 |
97bf5e38 | 5882 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
5883 | echo $ac_n "(cached) $ac_c" 1>&6 |
5884 | else | |
5885 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5886 | #line 5887 "configure" |
2b2d558c | 5887 | #include "confdefs.h" |
97bf5e38 MK |
5888 | /* System header to define __stub macros and hopefully few prototypes, |
5889 | which can conflict with char vfork(); below. */ | |
5890 | #include <assert.h> | |
5891 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5892 | /* We use char because int might match the return type of a gcc2 | |
5893 | builtin and then its argument prototype would still apply. */ | |
5894 | char vfork(); | |
2b2d558c MK |
5895 | |
5896 | int main() { | |
97bf5e38 MK |
5897 | |
5898 | /* The GNU C library defines this for functions which it implements | |
5899 | to always fail with ENOSYS. Some functions are actually named | |
5900 | something starting with __ and the normal name is an alias. */ | |
5901 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
5902 | choke me | |
5903 | #else | |
5904 | vfork(); | |
5905 | #endif | |
5906 | ||
2b2d558c MK |
5907 | ; return 0; } |
5908 | EOF | |
72cfdc76 | 5909 | if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 5910 | rm -rf conftest* |
97bf5e38 | 5911 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
5912 | else |
5913 | echo "configure: failed program was:" >&5 | |
5914 | cat conftest.$ac_ext >&5 | |
5915 | rm -rf conftest* | |
97bf5e38 | 5916 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
5917 | fi |
5918 | rm -f conftest* | |
5919 | fi | |
5920 | ||
97bf5e38 MK |
5921 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
5922 | echo "$ac_t""yes" 1>&6 | |
5923 | : | |
5924 | else | |
5925 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
5926 | fi |
5927 | ||
97bf5e38 | 5928 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
5929 | else |
5930 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 5931 | #line 5932 "configure" |
7dfa765c | 5932 | #include "confdefs.h" |
97bf5e38 MK |
5933 | /* Thanks to Paul Eggert for this test. */ |
5934 | #include <stdio.h> | |
5935 | #include <sys/types.h> | |
5936 | #include <sys/stat.h> | |
5937 | #ifdef HAVE_UNISTD_H | |
5938 | #include <unistd.h> | |
5939 | #endif | |
5940 | #ifdef HAVE_VFORK_H | |
5941 | #include <vfork.h> | |
5942 | #endif | |
5943 | /* On some sparc systems, changes by the child to local and incoming | |
5944 | argument registers are propagated back to the parent. | |
5945 | The compiler is told about this with #include <vfork.h>, | |
5946 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
5947 | Test for this by using a static variable whose address | |
5948 | is put into a register that is clobbered by the vfork. */ | |
5949 | static | |
5950 | #ifdef __cplusplus | |
5951 | sparc_address_test (int arg) | |
5952 | #else | |
5953 | sparc_address_test (arg) int arg; | |
5954 | #endif | |
5955 | { | |
5956 | static pid_t child; | |
5957 | if (!child) { | |
5958 | child = vfork (); | |
5959 | if (child < 0) { | |
5960 | perror ("vfork"); | |
5961 | _exit(2); | |
5962 | } | |
5963 | if (!child) { | |
5964 | arg = getpid(); | |
5965 | write(-1, "", 0); | |
5966 | _exit (arg); | |
5967 | } | |
5968 | } | |
5969 | } | |
5970 | main() { | |
5971 | pid_t parent = getpid (); | |
5972 | pid_t child; | |
7dfa765c | 5973 | |
97bf5e38 | 5974 | sparc_address_test (); |
7dfa765c | 5975 | |
97bf5e38 | 5976 | child = vfork (); |
7dfa765c | 5977 | |
97bf5e38 MK |
5978 | if (child == 0) { |
5979 | /* Here is another test for sparc vfork register problems. | |
5980 | This test uses lots of local variables, at least | |
5981 | as many local variables as main has allocated so far | |
5982 | including compiler temporaries. 4 locals are enough for | |
5983 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
5984 | A buggy compiler should reuse the register of parent | |
5985 | for one of the local variables, since it will think that | |
5986 | parent can't possibly be used any more in this routine. | |
5987 | Assigning to the local variable will thus munge parent | |
5988 | in the parent process. */ | |
5989 | pid_t | |
5990 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5991 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5992 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5993 | use the same hardware register for all 8 local variables. */ | |
5994 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5995 | || p != p5 || p != p6 || p != p7) | |
5996 | _exit(1); | |
7dfa765c | 5997 | |
97bf5e38 MK |
5998 | /* On some systems (e.g. IRIX 3.3), |
5999 | vfork doesn't separate parent from child file descriptors. | |
6000 | If the child closes a descriptor before it execs or exits, | |
6001 | this munges the parent's descriptor as well. | |
6002 | Test for this by closing stdout in the child. */ | |
6003 | _exit(close(fileno(stdout)) != 0); | |
6004 | } else { | |
6005 | int status; | |
6006 | struct stat st; | |
64bb1671 | 6007 | |
97bf5e38 MK |
6008 | while (wait(&status) != child) |
6009 | ; | |
6010 | exit( | |
6011 | /* Was there some problem with vforking? */ | |
6012 | child < 0 | |
64bb1671 | 6013 | |
97bf5e38 MK |
6014 | /* Did the child fail? (This shouldn't happen.) */ |
6015 | || status | |
64bb1671 | 6016 | |
97bf5e38 MK |
6017 | /* Did the vfork/compiler bug occur? */ |
6018 | || parent != getpid() | |
6019 | ||
6020 | /* Did the file descriptor bug occur? */ | |
6021 | || fstat(fileno(stdout), &st) != 0 | |
6022 | ); | |
6023 | } | |
6024 | } | |
5c44784c | 6025 | EOF |
72cfdc76 | 6026 | if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6027 | then |
6028 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6029 | else |
6030 | echo "configure: failed program was:" >&5 | |
6031 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6032 | rm -fr conftest* |
6033 | ac_cv_func_vfork_works=no | |
5c44784c | 6034 | fi |
97bf5e38 | 6035 | rm -fr conftest* |
5c44784c JM |
6036 | fi |
6037 | ||
0afdd437 MK |
6038 | fi |
6039 | ||
97bf5e38 MK |
6040 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6041 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6042 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6043 | #define vfork fork |
0afdd437 MK |
6044 | EOF |
6045 | ||
6046 | fi | |
6047 | ||
97bf5e38 MK |
6048 | for ac_func in canonicalize_file_name realpath |
6049 | do | |
6050 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6051 | echo "configure:6052: checking for $ac_func" >&5 |
97bf5e38 | 6052 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6053 | echo $ac_n "(cached) $ac_c" 1>&6 |
6054 | else | |
6055 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6056 | #line 6057 "configure" |
7e89e357 | 6057 | #include "confdefs.h" |
97bf5e38 MK |
6058 | /* System header to define __stub macros and hopefully few prototypes, |
6059 | which can conflict with char $ac_func(); below. */ | |
6060 | #include <assert.h> | |
6061 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6062 | /* We use char because int might match the return type of a gcc2 | |
6063 | builtin and then its argument prototype would still apply. */ | |
6064 | char $ac_func(); | |
6065 | ||
7e89e357 | 6066 | int main() { |
97bf5e38 MK |
6067 | |
6068 | /* The GNU C library defines this for functions which it implements | |
6069 | to always fail with ENOSYS. Some functions are actually named | |
6070 | something starting with __ and the normal name is an alias. */ | |
6071 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6072 | choke me | |
6073 | #else | |
6074 | $ac_func(); | |
6075 | #endif | |
6076 | ||
7e89e357 JT |
6077 | ; return 0; } |
6078 | EOF | |
72cfdc76 | 6079 | if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6080 | rm -rf conftest* |
97bf5e38 | 6081 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6082 | else |
6083 | echo "configure: failed program was:" >&5 | |
6084 | cat conftest.$ac_ext >&5 | |
6085 | rm -rf conftest* | |
97bf5e38 | 6086 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6087 | fi |
6088 | rm -f conftest* | |
6089 | fi | |
6090 | ||
97bf5e38 MK |
6091 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6092 | echo "$ac_t""yes" 1>&6 | |
6093 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6094 | cat >> confdefs.h <<EOF | |
6095 | #define $ac_tr_func 1 | |
7e89e357 | 6096 | EOF |
97bf5e38 MK |
6097 | |
6098 | else | |
6099 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6100 | fi |
97bf5e38 | 6101 | done |
7e89e357 | 6102 | |
97bf5e38 | 6103 | for ac_func in poll |
7be570e7 JM |
6104 | do |
6105 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6106 | echo "configure:6107: checking for $ac_func" >&5 |
7be570e7 JM |
6107 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6108 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6109 | else | |
6110 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6111 | #line 6112 "configure" |
7be570e7 JM |
6112 | #include "confdefs.h" |
6113 | /* System header to define __stub macros and hopefully few prototypes, | |
6114 | which can conflict with char $ac_func(); below. */ | |
6115 | #include <assert.h> | |
6116 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6117 | /* We use char because int might match the return type of a gcc2 | |
6118 | builtin and then its argument prototype would still apply. */ | |
6119 | char $ac_func(); | |
6120 | ||
6121 | int main() { | |
6122 | ||
6123 | /* The GNU C library defines this for functions which it implements | |
6124 | to always fail with ENOSYS. Some functions are actually named | |
6125 | something starting with __ and the normal name is an alias. */ | |
6126 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6127 | choke me | |
6128 | #else | |
6129 | $ac_func(); | |
6130 | #endif | |
6131 | ||
6132 | ; return 0; } | |
6133 | EOF | |
72cfdc76 | 6134 | if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6135 | rm -rf conftest* |
6136 | eval "ac_cv_func_$ac_func=yes" | |
6137 | else | |
6138 | echo "configure: failed program was:" >&5 | |
6139 | cat conftest.$ac_ext >&5 | |
6140 | rm -rf conftest* | |
6141 | eval "ac_cv_func_$ac_func=no" | |
6142 | fi | |
6143 | rm -f conftest* | |
6144 | fi | |
6145 | ||
6146 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6147 | echo "$ac_t""yes" 1>&6 | |
6148 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6149 | cat >> confdefs.h <<EOF | |
6150 | #define $ac_tr_func 1 | |
6151 | EOF | |
6152 | ||
6153 | else | |
6154 | echo "$ac_t""no" 1>&6 | |
6155 | fi | |
6156 | done | |
6157 | ||
6158 | for ac_func in pread64 | |
6159 | do | |
6160 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6161 | echo "configure:6162: checking for $ac_func" >&5 |
14abd0fb MK |
6162 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6163 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6164 | else | |
6165 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6166 | #line 6167 "configure" |
14abd0fb MK |
6167 | #include "confdefs.h" |
6168 | /* System header to define __stub macros and hopefully few prototypes, | |
6169 | which can conflict with char $ac_func(); below. */ | |
6170 | #include <assert.h> | |
6171 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6172 | /* We use char because int might match the return type of a gcc2 | |
6173 | builtin and then its argument prototype would still apply. */ | |
6174 | char $ac_func(); | |
6175 | ||
6176 | int main() { | |
6177 | ||
6178 | /* The GNU C library defines this for functions which it implements | |
6179 | to always fail with ENOSYS. Some functions are actually named | |
6180 | something starting with __ and the normal name is an alias. */ | |
6181 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6182 | choke me | |
6183 | #else | |
6184 | $ac_func(); | |
6185 | #endif | |
6186 | ||
6187 | ; return 0; } | |
6188 | EOF | |
72cfdc76 | 6189 | if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6190 | rm -rf conftest* |
6191 | eval "ac_cv_func_$ac_func=yes" | |
6192 | else | |
6193 | echo "configure: failed program was:" >&5 | |
6194 | cat conftest.$ac_ext >&5 | |
6195 | rm -rf conftest* | |
6196 | eval "ac_cv_func_$ac_func=no" | |
6197 | fi | |
6198 | rm -f conftest* | |
6199 | fi | |
6200 | ||
6201 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6202 | echo "$ac_t""yes" 1>&6 | |
6203 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6204 | cat >> confdefs.h <<EOF | |
6205 | #define $ac_tr_func 1 | |
6206 | EOF | |
6207 | ||
6208 | else | |
6209 | echo "$ac_t""no" 1>&6 | |
6210 | fi | |
6211 | done | |
6212 | ||
97bf5e38 MK |
6213 | for ac_func in sbrk |
6214 | do | |
6215 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6216 | echo "configure:6217: checking for $ac_func" >&5 |
97bf5e38 | 6217 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6218 | echo $ac_n "(cached) $ac_c" 1>&6 |
6219 | else | |
6220 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6221 | #line 6222 "configure" |
c906108c | 6222 | #include "confdefs.h" |
97bf5e38 MK |
6223 | /* System header to define __stub macros and hopefully few prototypes, |
6224 | which can conflict with char $ac_func(); below. */ | |
6225 | #include <assert.h> | |
6226 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6227 | /* We use char because int might match the return type of a gcc2 | |
6228 | builtin and then its argument prototype would still apply. */ | |
6229 | char $ac_func(); | |
c906108c | 6230 | |
97bf5e38 MK |
6231 | int main() { |
6232 | ||
6233 | /* The GNU C library defines this for functions which it implements | |
6234 | to always fail with ENOSYS. Some functions are actually named | |
6235 | something starting with __ and the normal name is an alias. */ | |
6236 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6237 | choke me | |
c906108c | 6238 | #else |
97bf5e38 | 6239 | $ac_func(); |
c906108c | 6240 | #endif |
97bf5e38 | 6241 | |
c906108c SS |
6242 | ; return 0; } |
6243 | EOF | |
72cfdc76 | 6244 | if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6245 | rm -rf conftest* |
97bf5e38 | 6246 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6247 | else |
6248 | echo "configure: failed program was:" >&5 | |
6249 | cat conftest.$ac_ext >&5 | |
6250 | rm -rf conftest* | |
97bf5e38 | 6251 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6252 | fi |
6253 | rm -f conftest* | |
6254 | fi | |
6255 | ||
97bf5e38 MK |
6256 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6257 | echo "$ac_t""yes" 1>&6 | |
6258 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6259 | cat >> confdefs.h <<EOF | |
6260 | #define $ac_tr_func 1 | |
c906108c | 6261 | EOF |
97bf5e38 MK |
6262 | |
6263 | else | |
6264 | echo "$ac_t""no" 1>&6 | |
c906108c | 6265 | fi |
97bf5e38 | 6266 | done |
c906108c | 6267 | |
97bf5e38 MK |
6268 | for ac_func in setpgid setpgrp |
6269 | do | |
6270 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6271 | echo "configure:6272: checking for $ac_func" >&5 |
97bf5e38 | 6272 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6273 | echo $ac_n "(cached) $ac_c" 1>&6 |
6274 | else | |
6275 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6276 | #line 6277 "configure" |
c906108c | 6277 | #include "confdefs.h" |
97bf5e38 MK |
6278 | /* System header to define __stub macros and hopefully few prototypes, |
6279 | which can conflict with char $ac_func(); below. */ | |
6280 | #include <assert.h> | |
6281 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6282 | /* We use char because int might match the return type of a gcc2 | |
6283 | builtin and then its argument prototype would still apply. */ | |
6284 | char $ac_func(); | |
c906108c | 6285 | |
97bf5e38 MK |
6286 | int main() { |
6287 | ||
6288 | /* The GNU C library defines this for functions which it implements | |
6289 | to always fail with ENOSYS. Some functions are actually named | |
6290 | something starting with __ and the normal name is an alias. */ | |
6291 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6292 | choke me | |
c906108c | 6293 | #else |
97bf5e38 | 6294 | $ac_func(); |
c906108c | 6295 | #endif |
97bf5e38 | 6296 | |
c906108c SS |
6297 | ; return 0; } |
6298 | EOF | |
72cfdc76 | 6299 | if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6300 | rm -rf conftest* |
97bf5e38 | 6301 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6302 | else |
6303 | echo "configure: failed program was:" >&5 | |
6304 | cat conftest.$ac_ext >&5 | |
6305 | rm -rf conftest* | |
97bf5e38 | 6306 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6307 | fi |
6308 | rm -f conftest* | |
6309 | fi | |
6310 | ||
97bf5e38 MK |
6311 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6312 | echo "$ac_t""yes" 1>&6 | |
6313 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6314 | cat >> confdefs.h <<EOF | |
6315 | #define $ac_tr_func 1 | |
c906108c | 6316 | EOF |
97bf5e38 MK |
6317 | |
6318 | else | |
6319 | echo "$ac_t""no" 1>&6 | |
c906108c | 6320 | fi |
97bf5e38 | 6321 | done |
c906108c | 6322 | |
e1ea1d75 | 6323 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6324 | do |
6325 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6326 | echo "configure:6327: checking for $ac_func" >&5 |
97bf5e38 | 6327 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6328 | echo $ac_n "(cached) $ac_c" 1>&6 |
6329 | else | |
6330 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6331 | #line 6332 "configure" |
c906108c | 6332 | #include "confdefs.h" |
97bf5e38 MK |
6333 | /* System header to define __stub macros and hopefully few prototypes, |
6334 | which can conflict with char $ac_func(); below. */ | |
6335 | #include <assert.h> | |
6336 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6337 | /* We use char because int might match the return type of a gcc2 | |
6338 | builtin and then its argument prototype would still apply. */ | |
6339 | char $ac_func(); | |
c906108c | 6340 | |
97bf5e38 MK |
6341 | int main() { |
6342 | ||
6343 | /* The GNU C library defines this for functions which it implements | |
6344 | to always fail with ENOSYS. Some functions are actually named | |
6345 | something starting with __ and the normal name is an alias. */ | |
6346 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6347 | choke me | |
c906108c | 6348 | #else |
97bf5e38 | 6349 | $ac_func(); |
c906108c | 6350 | #endif |
97bf5e38 | 6351 | |
c906108c SS |
6352 | ; return 0; } |
6353 | EOF | |
72cfdc76 | 6354 | if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6355 | rm -rf conftest* |
97bf5e38 | 6356 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6357 | else |
6358 | echo "configure: failed program was:" >&5 | |
6359 | cat conftest.$ac_ext >&5 | |
6360 | rm -rf conftest* | |
97bf5e38 | 6361 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6362 | fi |
6363 | rm -f conftest* | |
6364 | fi | |
6365 | ||
97bf5e38 MK |
6366 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6367 | echo "$ac_t""yes" 1>&6 | |
6368 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6369 | cat >> confdefs.h <<EOF | |
6370 | #define $ac_tr_func 1 | |
c906108c | 6371 | EOF |
e1ea1d75 | 6372 | |
97bf5e38 MK |
6373 | else |
6374 | echo "$ac_t""no" 1>&6 | |
c906108c | 6375 | fi |
97bf5e38 | 6376 | done |
c906108c | 6377 | |
97bf5e38 MK |
6378 | for ac_func in socketpair |
6379 | do | |
6380 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
72cfdc76 | 6381 | echo "configure:6382: checking for $ac_func" >&5 |
97bf5e38 | 6382 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6383 | echo $ac_n "(cached) $ac_c" 1>&6 |
6384 | else | |
6385 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6386 | #line 6387 "configure" |
c906108c | 6387 | #include "confdefs.h" |
97bf5e38 MK |
6388 | /* System header to define __stub macros and hopefully few prototypes, |
6389 | which can conflict with char $ac_func(); below. */ | |
6390 | #include <assert.h> | |
6391 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6392 | /* We use char because int might match the return type of a gcc2 | |
6393 | builtin and then its argument prototype would still apply. */ | |
6394 | char $ac_func(); | |
c906108c | 6395 | |
97bf5e38 MK |
6396 | int main() { |
6397 | ||
6398 | /* The GNU C library defines this for functions which it implements | |
6399 | to always fail with ENOSYS. Some functions are actually named | |
6400 | something starting with __ and the normal name is an alias. */ | |
6401 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6402 | choke me | |
c906108c | 6403 | #else |
97bf5e38 | 6404 | $ac_func(); |
c906108c | 6405 | #endif |
97bf5e38 | 6406 | |
c906108c SS |
6407 | ; return 0; } |
6408 | EOF | |
72cfdc76 | 6409 | if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6410 | rm -rf conftest* |
97bf5e38 | 6411 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6412 | else |
6413 | echo "configure: failed program was:" >&5 | |
6414 | cat conftest.$ac_ext >&5 | |
6415 | rm -rf conftest* | |
97bf5e38 | 6416 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6417 | fi |
6418 | rm -f conftest* | |
6419 | fi | |
6420 | ||
97bf5e38 MK |
6421 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6422 | echo "$ac_t""yes" 1>&6 | |
6423 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6424 | cat >> confdefs.h <<EOF | |
6425 | #define $ac_tr_func 1 | |
c906108c | 6426 | EOF |
97bf5e38 MK |
6427 | |
6428 | else | |
6429 | echo "$ac_t""no" 1>&6 | |
c906108c | 6430 | fi |
97bf5e38 | 6431 | done |
c906108c | 6432 | |
97bf5e38 MK |
6433 | |
6434 | if test "$cross_compiling" = no; then | |
6435 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
72cfdc76 | 6436 | echo "configure:6437: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6437 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6438 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6439 | else |
6440 | if test "$cross_compiling" = yes; then | |
6441 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6442 | else |
6443 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6444 | #line 6445 "configure" |
c906108c SS |
6445 | #include "confdefs.h" |
6446 | ||
c906108c SS |
6447 | #ifdef HAVE_UNISTD_H |
6448 | #include <unistd.h> | |
6449 | #endif | |
97bf5e38 MK |
6450 | |
6451 | /* | |
6452 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6453 | * successfully. | |
6454 | */ | |
6455 | main() | |
6456 | { | |
6457 | if (setpgrp(1,1) == -1) | |
6458 | exit(0); | |
6459 | else | |
6460 | exit(1); | |
6461 | } | |
6462 | ||
c906108c | 6463 | EOF |
72cfdc76 | 6464 | if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6465 | then |
6466 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6467 | else |
6468 | echo "configure: failed program was:" >&5 | |
6469 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6470 | rm -fr conftest* |
6471 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6472 | fi |
97bf5e38 | 6473 | rm -fr conftest* |
c906108c SS |
6474 | fi |
6475 | ||
97bf5e38 MK |
6476 | |
6477 | fi | |
6478 | ||
6479 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6480 | if test $ac_cv_func_setpgrp_void = yes; then | |
6481 | cat >> confdefs.h <<\EOF | |
6482 | #define SETPGRP_VOID 1 | |
c906108c SS |
6483 | EOF |
6484 | ||
6485 | fi | |
6486 | ||
97bf5e38 MK |
6487 | else |
6488 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
72cfdc76 | 6489 | echo "configure:6490: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6490 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6491 | echo $ac_n "(cached) $ac_c" 1>&6 |
6492 | else | |
6493 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6494 | #line 6495 "configure" |
b83266a0 SS |
6495 | #include "confdefs.h" |
6496 | ||
b83266a0 | 6497 | #include <unistd.h> |
97bf5e38 | 6498 | |
b83266a0 | 6499 | int main() { |
97bf5e38 MK |
6500 | |
6501 | if (setpgrp(1,1) == -1) | |
6502 | exit (0); | |
6503 | else | |
6504 | exit (1); | |
6505 | ||
b83266a0 SS |
6506 | ; return 0; } |
6507 | EOF | |
72cfdc76 | 6508 | if { (eval echo configure:6509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6509 | rm -rf conftest* |
97bf5e38 | 6510 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6511 | else |
6512 | echo "configure: failed program was:" >&5 | |
6513 | cat conftest.$ac_ext >&5 | |
6514 | rm -rf conftest* | |
97bf5e38 | 6515 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6516 | fi |
6517 | rm -f conftest* | |
6518 | fi | |
6519 | ||
97bf5e38 MK |
6520 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6521 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6522 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6523 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6524 | EOF |
6525 | ||
97bf5e38 | 6526 | fi |
b83266a0 SS |
6527 | fi |
6528 | ||
97bf5e38 MK |
6529 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6530 | # since sigsetjmp might only be defined as a macro. | |
6531 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
72cfdc76 | 6532 | echo "configure:6533: checking for sigsetjmp" >&5 |
97bf5e38 | 6533 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6534 | echo $ac_n "(cached) $ac_c" 1>&6 |
6535 | else | |
6536 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6537 | #line 6538 "configure" |
a4db0f07 RH |
6538 | #include "confdefs.h" |
6539 | ||
97bf5e38 MK |
6540 | #include <setjmp.h> |
6541 | ||
a4db0f07 | 6542 | int main() { |
97bf5e38 | 6543 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6544 | ; return 0; } |
6545 | EOF | |
72cfdc76 | 6546 | if { (eval echo configure:6547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6547 | rm -rf conftest* |
97bf5e38 | 6548 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6549 | else |
6550 | echo "configure: failed program was:" >&5 | |
6551 | cat conftest.$ac_ext >&5 | |
6552 | rm -rf conftest* | |
97bf5e38 | 6553 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6554 | fi |
6555 | rm -f conftest* | |
6556 | fi | |
6557 | ||
97bf5e38 MK |
6558 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6559 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6560 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6561 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6562 | EOF |
6563 | ||
6564 | fi | |
c906108c | 6565 | |
06825bd1 MK |
6566 | # Assume we'll default to using the included libiberty regex. |
6567 | gdb_use_included_regex=yes | |
6568 | ||
6569 | # However, if the system regex is GNU regex, then default to *not* | |
6570 | # using the included regex. | |
6571 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
72cfdc76 | 6572 | echo "configure:6573: checking for GNU regex" >&5 |
06825bd1 MK |
6573 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6575 | else | |
6576 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6577 | #line 6578 "configure" |
06825bd1 MK |
6578 | #include "confdefs.h" |
6579 | #include <gnu-versions.h> | |
6580 | int main() { | |
6581 | #define REGEX_INTERFACE_VERSION 1 | |
6582 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6583 | # error "Version mismatch" | |
6584 | #endif | |
6585 | ; return 0; } | |
6586 | EOF | |
72cfdc76 | 6587 | if { (eval echo configure:6588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6588 | rm -rf conftest* |
6589 | gdb_cv_have_gnu_regex=yes | |
6590 | else | |
6591 | echo "configure: failed program was:" >&5 | |
6592 | cat conftest.$ac_ext >&5 | |
6593 | rm -rf conftest* | |
6594 | gdb_cv_have_gnu_regex=no | |
6595 | fi | |
6596 | rm -f conftest* | |
6597 | fi | |
6598 | ||
6599 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6600 | if test $gdb_cv_have_gnu_regex = yes; then | |
6601 | gdb_use_included_regex=no | |
6602 | fi | |
6603 | ||
6604 | # Check whether --with-included-regex or --without-included-regex was given. | |
6605 | if test "${with_included_regex+set}" = set; then | |
6606 | withval="$with_included_regex" | |
6607 | gdb_with_regex=$withval | |
6608 | else | |
6609 | gdb_with_regex=$gdb_use_included_regex | |
6610 | fi | |
6611 | ||
6612 | if test "$gdb_with_regex" = yes; then | |
6613 | cat >> confdefs.h <<\EOF | |
6614 | #define USE_INCLUDED_REGEX 1 | |
6615 | EOF | |
6616 | ||
6617 | fi | |
6618 | ||
97bf5e38 MK |
6619 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6620 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6621 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
72cfdc76 | 6622 | echo "configure:6623: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6623 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6625 | else | |
6626 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6627 | #line 6628 "configure" |
c906108c | 6628 | #include "confdefs.h" |
97bf5e38 MK |
6629 | #include <machine/reg.h> |
6630 | int main() { | |
6631 | struct reg r; r.r_fs; | |
6632 | ; return 0; } | |
c906108c | 6633 | EOF |
72cfdc76 | 6634 | if { (eval echo configure:6635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6635 | rm -rf conftest* |
97bf5e38 | 6636 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6637 | else |
97bf5e38 MK |
6638 | echo "configure: failed program was:" >&5 |
6639 | cat conftest.$ac_ext >&5 | |
c906108c | 6640 | rm -rf conftest* |
97bf5e38 | 6641 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6642 | fi |
6643 | rm -f conftest* | |
97bf5e38 | 6644 | fi |
c906108c | 6645 | |
97bf5e38 MK |
6646 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6647 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6648 | cat >> confdefs.h <<\EOF | |
6649 | #define HAVE_STRUCT_REG_R_FS 1 | |
6650 | EOF | |
6651 | ||
6652 | fi | |
6653 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
72cfdc76 | 6654 | echo "configure:6655: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6655 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6657 | else | |
6658 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6659 | #line 6660 "configure" |
c906108c | 6660 | #include "confdefs.h" |
97bf5e38 MK |
6661 | #include <machine/reg.h> |
6662 | int main() { | |
6663 | struct reg r; r.r_gs; | |
6664 | ; return 0; } | |
c906108c | 6665 | EOF |
72cfdc76 | 6666 | if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6667 | rm -rf conftest* |
97bf5e38 | 6668 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6669 | else |
97bf5e38 MK |
6670 | echo "configure: failed program was:" >&5 |
6671 | cat conftest.$ac_ext >&5 | |
c906108c | 6672 | rm -rf conftest* |
97bf5e38 | 6673 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6674 | fi |
6675 | rm -f conftest* | |
c906108c | 6676 | fi |
c906108c | 6677 | |
97bf5e38 MK |
6678 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6679 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6680 | cat >> confdefs.h <<\EOF | |
6681 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6682 | EOF |
6683 | ||
c906108c SS |
6684 | fi |
6685 | ||
97bf5e38 MK |
6686 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6687 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
72cfdc76 | 6688 | echo "configure:6689: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6689 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6690 | echo $ac_n "(cached) $ac_c" 1>&6 |
6691 | else | |
6692 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6693 | #line 6694 "configure" |
c906108c | 6694 | #include "confdefs.h" |
97bf5e38 | 6695 | #include <sys/ptrace.h> |
c906108c | 6696 | int main() { |
97bf5e38 | 6697 | PTRACE_GETREGS; |
c906108c SS |
6698 | ; return 0; } |
6699 | EOF | |
72cfdc76 | 6700 | if { (eval echo configure:6701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6701 | rm -rf conftest* |
97bf5e38 | 6702 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6703 | else |
6704 | echo "configure: failed program was:" >&5 | |
6705 | cat conftest.$ac_ext >&5 | |
6706 | rm -rf conftest* | |
97bf5e38 | 6707 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6708 | fi |
6709 | rm -f conftest* | |
6710 | fi | |
6711 | ||
97bf5e38 MK |
6712 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6713 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6714 | cat >> confdefs.h <<\EOF | |
6715 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6716 | EOF |
6717 | ||
97bf5e38 | 6718 | fi |
c906108c | 6719 | |
97bf5e38 MK |
6720 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6721 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
72cfdc76 | 6722 | echo "configure:6723: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6723 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6724 | echo $ac_n "(cached) $ac_c" 1>&6 |
6725 | else | |
6726 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6727 | #line 6728 "configure" |
c906108c | 6728 | #include "confdefs.h" |
97bf5e38 | 6729 | #include <sys/ptrace.h> |
c906108c | 6730 | int main() { |
97bf5e38 | 6731 | PTRACE_GETFPXREGS; |
c906108c SS |
6732 | ; return 0; } |
6733 | EOF | |
72cfdc76 | 6734 | if { (eval echo configure:6735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6735 | rm -rf conftest* |
97bf5e38 | 6736 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6737 | else |
6738 | echo "configure: failed program was:" >&5 | |
6739 | cat conftest.$ac_ext >&5 | |
6740 | rm -rf conftest* | |
97bf5e38 | 6741 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6742 | fi |
6743 | rm -f conftest* | |
6744 | fi | |
6745 | ||
97bf5e38 MK |
6746 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6747 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6748 | cat >> confdefs.h <<\EOF | |
6749 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6750 | EOF |
6751 | ||
97bf5e38 | 6752 | fi |
c906108c | 6753 | |
97bf5e38 MK |
6754 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6755 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
72cfdc76 | 6756 | echo "configure:6757: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6757 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6758 | echo $ac_n "(cached) $ac_c" 1>&6 |
6759 | else | |
6760 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6761 | #line 6762 "configure" |
c906108c | 6762 | #include "confdefs.h" |
97bf5e38 MK |
6763 | #include <sys/types.h> |
6764 | #include <sys/ptrace.h> | |
c906108c | 6765 | int main() { |
97bf5e38 | 6766 | PT_GETDBREGS; |
c906108c SS |
6767 | ; return 0; } |
6768 | EOF | |
72cfdc76 | 6769 | if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6770 | rm -rf conftest* |
97bf5e38 | 6771 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6772 | else |
6773 | echo "configure: failed program was:" >&5 | |
6774 | cat conftest.$ac_ext >&5 | |
6775 | rm -rf conftest* | |
97bf5e38 | 6776 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6777 | fi |
6778 | rm -f conftest* | |
6779 | fi | |
6780 | ||
97bf5e38 MK |
6781 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6782 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6783 | cat >> confdefs.h <<\EOF | |
6784 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6785 | EOF |
6786 | ||
97bf5e38 | 6787 | fi |
c906108c | 6788 | |
97bf5e38 MK |
6789 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6790 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
72cfdc76 | 6791 | echo "configure:6792: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6792 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6793 | echo $ac_n "(cached) $ac_c" 1>&6 |
6794 | else | |
6795 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6796 | #line 6797 "configure" |
c906108c | 6797 | #include "confdefs.h" |
97bf5e38 MK |
6798 | #include <sys/types.h> |
6799 | #include <sys/ptrace.h> | |
c906108c | 6800 | int main() { |
97bf5e38 | 6801 | PT_GETXMMREGS; |
c906108c SS |
6802 | ; return 0; } |
6803 | EOF | |
72cfdc76 | 6804 | if { (eval echo configure:6805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6805 | rm -rf conftest* |
97bf5e38 | 6806 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6807 | else |
6808 | echo "configure: failed program was:" >&5 | |
6809 | cat conftest.$ac_ext >&5 | |
6810 | rm -rf conftest* | |
97bf5e38 | 6811 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6812 | fi |
6813 | rm -f conftest* | |
6814 | fi | |
6815 | ||
97bf5e38 MK |
6816 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6817 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6818 | cat >> confdefs.h <<\EOF | |
6819 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6820 | EOF |
6821 | ||
97bf5e38 | 6822 | fi |
c906108c | 6823 | |
97bf5e38 MK |
6824 | |
6825 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
72cfdc76 | 6826 | echo "configure:6827: checking whether malloc must be declared" >&5 |
97bf5e38 | 6827 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6828 | echo $ac_n "(cached) $ac_c" 1>&6 |
6829 | else | |
6830 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6831 | #line 6832 "configure" |
3862412b | 6832 | #include "confdefs.h" |
e17bf198 | 6833 | |
97bf5e38 MK |
6834 | #include <stdio.h> |
6835 | #ifdef HAVE_STRING_H | |
6836 | #include <string.h> | |
6837 | #else | |
6838 | #ifdef HAVE_STRINGS_H | |
6839 | #include <strings.h> | |
6840 | #endif | |
6841 | #endif | |
6842 | #ifdef HAVE_STDLIB_H | |
6843 | #include <stdlib.h> | |
6844 | #endif | |
6845 | #ifdef HAVE_UNISTD_H | |
6846 | #include <unistd.h> | |
6847 | #endif | |
3862412b | 6848 | int main() { |
97bf5e38 | 6849 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6850 | ; return 0; } |
6851 | EOF | |
72cfdc76 | 6852 | if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6853 | rm -rf conftest* |
97bf5e38 | 6854 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6855 | else |
6856 | echo "configure: failed program was:" >&5 | |
6857 | cat conftest.$ac_ext >&5 | |
6858 | rm -rf conftest* | |
97bf5e38 | 6859 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6860 | fi |
6861 | rm -f conftest* | |
6862 | fi | |
6863 | ||
97bf5e38 MK |
6864 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6865 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6866 | cat >> confdefs.h <<\EOF | |
6867 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6868 | EOF |
6869 | ||
97bf5e38 | 6870 | fi |
3862412b | 6871 | |
97bf5e38 | 6872 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
72cfdc76 | 6873 | echo "configure:6874: checking whether realloc must be declared" >&5 |
97bf5e38 | 6874 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
6875 | echo $ac_n "(cached) $ac_c" 1>&6 |
6876 | else | |
6877 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6878 | #line 6879 "configure" |
3862412b | 6879 | #include "confdefs.h" |
e17bf198 | 6880 | |
97bf5e38 MK |
6881 | #include <stdio.h> |
6882 | #ifdef HAVE_STRING_H | |
6883 | #include <string.h> | |
6884 | #else | |
6885 | #ifdef HAVE_STRINGS_H | |
6886 | #include <strings.h> | |
6887 | #endif | |
6888 | #endif | |
6889 | #ifdef HAVE_STDLIB_H | |
6890 | #include <stdlib.h> | |
6891 | #endif | |
6892 | #ifdef HAVE_UNISTD_H | |
6893 | #include <unistd.h> | |
6894 | #endif | |
3862412b | 6895 | int main() { |
97bf5e38 | 6896 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
6897 | ; return 0; } |
6898 | EOF | |
72cfdc76 | 6899 | if { (eval echo configure:6900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6900 | rm -rf conftest* |
97bf5e38 | 6901 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
6902 | else |
6903 | echo "configure: failed program was:" >&5 | |
6904 | cat conftest.$ac_ext >&5 | |
6905 | rm -rf conftest* | |
97bf5e38 | 6906 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
6907 | fi |
6908 | rm -f conftest* | |
6909 | fi | |
6910 | ||
97bf5e38 MK |
6911 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
6912 | if test $bfd_cv_decl_needed_realloc = yes; then | |
6913 | cat >> confdefs.h <<\EOF | |
6914 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
6915 | EOF |
6916 | ||
97bf5e38 | 6917 | fi |
3862412b | 6918 | |
97bf5e38 | 6919 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
72cfdc76 | 6920 | echo "configure:6921: checking whether free must be declared" >&5 |
97bf5e38 | 6921 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
6922 | echo $ac_n "(cached) $ac_c" 1>&6 |
6923 | else | |
6924 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6925 | #line 6926 "configure" |
451928c5 | 6926 | #include "confdefs.h" |
e17bf198 | 6927 | |
97bf5e38 MK |
6928 | #include <stdio.h> |
6929 | #ifdef HAVE_STRING_H | |
6930 | #include <string.h> | |
6931 | #else | |
6932 | #ifdef HAVE_STRINGS_H | |
6933 | #include <strings.h> | |
6934 | #endif | |
6935 | #endif | |
6936 | #ifdef HAVE_STDLIB_H | |
6937 | #include <stdlib.h> | |
6938 | #endif | |
6939 | #ifdef HAVE_UNISTD_H | |
6940 | #include <unistd.h> | |
6941 | #endif | |
451928c5 | 6942 | int main() { |
97bf5e38 | 6943 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
6944 | ; return 0; } |
6945 | EOF | |
72cfdc76 | 6946 | if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6947 | rm -rf conftest* |
97bf5e38 | 6948 | bfd_cv_decl_needed_free=no |
451928c5 AC |
6949 | else |
6950 | echo "configure: failed program was:" >&5 | |
6951 | cat conftest.$ac_ext >&5 | |
6952 | rm -rf conftest* | |
97bf5e38 | 6953 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
6954 | fi |
6955 | rm -f conftest* | |
6956 | fi | |
6957 | ||
97bf5e38 MK |
6958 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
6959 | if test $bfd_cv_decl_needed_free = yes; then | |
6960 | cat >> confdefs.h <<\EOF | |
6961 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
6962 | EOF |
6963 | ||
97bf5e38 | 6964 | fi |
451928c5 | 6965 | |
97bf5e38 | 6966 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
72cfdc76 | 6967 | echo "configure:6968: checking whether strerror must be declared" >&5 |
97bf5e38 | 6968 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
6969 | echo $ac_n "(cached) $ac_c" 1>&6 |
6970 | else | |
6971 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 6972 | #line 6973 "configure" |
451928c5 | 6973 | #include "confdefs.h" |
e17bf198 | 6974 | |
97bf5e38 MK |
6975 | #include <stdio.h> |
6976 | #ifdef HAVE_STRING_H | |
6977 | #include <string.h> | |
6978 | #else | |
6979 | #ifdef HAVE_STRINGS_H | |
6980 | #include <strings.h> | |
6981 | #endif | |
6982 | #endif | |
6983 | #ifdef HAVE_STDLIB_H | |
6984 | #include <stdlib.h> | |
6985 | #endif | |
6986 | #ifdef HAVE_UNISTD_H | |
6987 | #include <unistd.h> | |
6988 | #endif | |
451928c5 | 6989 | int main() { |
97bf5e38 | 6990 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
6991 | ; return 0; } |
6992 | EOF | |
72cfdc76 | 6993 | if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6994 | rm -rf conftest* |
97bf5e38 | 6995 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
6996 | else |
6997 | echo "configure: failed program was:" >&5 | |
6998 | cat conftest.$ac_ext >&5 | |
6999 | rm -rf conftest* | |
97bf5e38 | 7000 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7001 | fi |
7002 | rm -f conftest* | |
7003 | fi | |
7004 | ||
97bf5e38 MK |
7005 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7006 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7007 | cat >> confdefs.h <<\EOF | |
7008 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7009 | EOF |
7010 | ||
97bf5e38 | 7011 | fi |
451928c5 | 7012 | |
97bf5e38 | 7013 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
72cfdc76 | 7014 | echo "configure:7015: checking whether strdup must be declared" >&5 |
97bf5e38 | 7015 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7016 | echo $ac_n "(cached) $ac_c" 1>&6 |
7017 | else | |
7018 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7019 | #line 7020 "configure" |
3862412b | 7020 | #include "confdefs.h" |
e17bf198 | 7021 | |
97bf5e38 MK |
7022 | #include <stdio.h> |
7023 | #ifdef HAVE_STRING_H | |
7024 | #include <string.h> | |
7025 | #else | |
7026 | #ifdef HAVE_STRINGS_H | |
7027 | #include <strings.h> | |
7028 | #endif | |
7029 | #endif | |
7030 | #ifdef HAVE_STDLIB_H | |
7031 | #include <stdlib.h> | |
7032 | #endif | |
7033 | #ifdef HAVE_UNISTD_H | |
7034 | #include <unistd.h> | |
7035 | #endif | |
3862412b | 7036 | int main() { |
97bf5e38 | 7037 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7038 | ; return 0; } |
7039 | EOF | |
72cfdc76 | 7040 | if { (eval echo configure:7041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7041 | rm -rf conftest* |
97bf5e38 | 7042 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7043 | else |
7044 | echo "configure: failed program was:" >&5 | |
7045 | cat conftest.$ac_ext >&5 | |
7046 | rm -rf conftest* | |
97bf5e38 | 7047 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7048 | fi |
7049 | rm -f conftest* | |
7050 | fi | |
7051 | ||
97bf5e38 MK |
7052 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7053 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7054 | cat >> confdefs.h <<\EOF | |
7055 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7056 | EOF |
7057 | ||
97bf5e38 | 7058 | fi |
3862412b | 7059 | |
97bf5e38 | 7060 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
72cfdc76 | 7061 | echo "configure:7062: checking whether strstr must be declared" >&5 |
97bf5e38 | 7062 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7063 | echo $ac_n "(cached) $ac_c" 1>&6 |
7064 | else | |
7065 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7066 | #line 7067 "configure" |
3862412b | 7067 | #include "confdefs.h" |
e17bf198 | 7068 | |
97bf5e38 MK |
7069 | #include <stdio.h> |
7070 | #ifdef HAVE_STRING_H | |
7071 | #include <string.h> | |
7072 | #else | |
7073 | #ifdef HAVE_STRINGS_H | |
7074 | #include <strings.h> | |
7075 | #endif | |
7076 | #endif | |
7077 | #ifdef HAVE_STDLIB_H | |
7078 | #include <stdlib.h> | |
7079 | #endif | |
7080 | #ifdef HAVE_UNISTD_H | |
7081 | #include <unistd.h> | |
7082 | #endif | |
3862412b | 7083 | int main() { |
97bf5e38 | 7084 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7085 | ; return 0; } |
7086 | EOF | |
72cfdc76 | 7087 | if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7088 | rm -rf conftest* |
97bf5e38 | 7089 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7090 | else |
7091 | echo "configure: failed program was:" >&5 | |
7092 | cat conftest.$ac_ext >&5 | |
7093 | rm -rf conftest* | |
97bf5e38 | 7094 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7095 | fi |
7096 | rm -f conftest* | |
7097 | fi | |
7098 | ||
97bf5e38 MK |
7099 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7100 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7101 | cat >> confdefs.h <<\EOF | |
7102 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7103 | EOF |
7104 | ||
97bf5e38 | 7105 | fi |
3862412b | 7106 | |
97bf5e38 | 7107 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
72cfdc76 | 7108 | echo "configure:7109: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7109 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7110 | echo $ac_n "(cached) $ac_c" 1>&6 |
7111 | else | |
7112 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7113 | #line 7114 "configure" |
596c9d4b KB |
7114 | #include "confdefs.h" |
7115 | ||
97bf5e38 MK |
7116 | #include <stdio.h> |
7117 | #ifdef HAVE_STRING_H | |
7118 | #include <string.h> | |
7119 | #else | |
7120 | #ifdef HAVE_STRINGS_H | |
7121 | #include <strings.h> | |
7122 | #endif | |
7123 | #endif | |
7124 | #ifdef HAVE_STDLIB_H | |
7125 | #include <stdlib.h> | |
7126 | #endif | |
7127 | #ifdef HAVE_UNISTD_H | |
7128 | #include <unistd.h> | |
7129 | #endif | |
596c9d4b | 7130 | int main() { |
97bf5e38 | 7131 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7132 | ; return 0; } |
7133 | EOF | |
72cfdc76 | 7134 | if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7135 | rm -rf conftest* |
97bf5e38 | 7136 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7137 | else |
7138 | echo "configure: failed program was:" >&5 | |
7139 | cat conftest.$ac_ext >&5 | |
7140 | rm -rf conftest* | |
97bf5e38 | 7141 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7142 | fi |
7143 | rm -f conftest* | |
7144 | fi | |
7145 | ||
97bf5e38 MK |
7146 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7147 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7148 | cat >> confdefs.h <<\EOF | |
7149 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7150 | EOF |
7151 | ||
97bf5e38 | 7152 | fi |
596c9d4b | 7153 | |
97bf5e38 MK |
7154 | |
7155 | # The following save_state_t checkery is only necessary for HPUX | |
7156 | # versions earlier than 10.20. When those fade from memory, this | |
7157 | # could be expunged. --jsm 1999-03-22 | |
7158 | ||
7159 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
72cfdc76 | 7160 | echo "configure:7161: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7161 | cat > conftest.$ac_ext <<EOF |
72cfdc76 | 7162 | #line 7163 "configure" |
97bf5e38 MK |
7163 | #include "confdefs.h" |
7164 | #include <machine/save_state.h> | |
7165 | EOF | |
7166 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7167 | egrep "save_state_t" >/dev/null 2>&1; then | |
7168 | rm -rf conftest* | |
7169 | gdb_cv_hpux_savestate=yes | |
7170 | else | |
7171 | rm -rf conftest* | |
7172 | gdb_cv_hpux_savestate=no | |
7173 | fi | |
7174 | rm -f conftest* | |
7175 | ||
7176 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7177 | #line 7178 "configure" |
97bf5e38 MK |
7178 | #include "confdefs.h" |
7179 | #include <machine/save_state.h> | |
7180 | EOF | |
7181 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7182 | egrep "ss_wide" >/dev/null 2>&1; then | |
7183 | rm -rf conftest* | |
7184 | gdb_cv_hpux_sswide=yes | |
7185 | else | |
7186 | rm -rf conftest* | |
7187 | gdb_cv_hpux_sswide=no | |
7188 | fi | |
7189 | rm -f conftest* | |
7190 | ||
7191 | if test $gdb_cv_hpux_savestate = yes | |
7192 | then | |
7193 | cat >> confdefs.h <<\EOF | |
7194 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7195 | EOF | |
7196 | ||
7197 | fi | |
7198 | if test $gdb_cv_hpux_sswide = yes | |
7199 | then | |
7200 | cat >> confdefs.h <<\EOF | |
7201 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7202 | EOF | |
7203 | ||
7204 | fi | |
7205 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7206 | ||
7207 | ||
7208 | # If we are configured native on GNU/Linux, work around problems with | |
7209 | # sys/procfs.h | |
7210 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7211 | ||
7212 | if test "${target}" = "${host}"; then | |
7213 | case "${host}" in | |
7214 | i[3456]86-*-linux*) | |
7215 | cat >> confdefs.h <<\EOF | |
7216 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7217 | EOF | |
7218 | ||
7219 | cat >> confdefs.h <<\EOF | |
7220 | #define sys_quotactl 1 | |
7221 | EOF | |
7222 | ||
7223 | ;; | |
7224 | ia64-*-aix*) | |
7225 | cat >> confdefs.h <<\EOF | |
7226 | #define NEW_PROC_API 1 | |
7227 | EOF | |
7228 | ||
7229 | ;; | |
7230 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7231 | cat >> confdefs.h <<\EOF | |
7232 | #define NEW_PROC_API 1 | |
7233 | EOF | |
7234 | ||
7235 | ;; | |
7236 | *-*-solaris2.[678]) | |
7237 | cat >> confdefs.h <<\EOF | |
7238 | #define NEW_PROC_API 1 | |
7239 | EOF | |
7240 | ||
7241 | ;; | |
7242 | esac | |
7243 | fi | |
7244 | ||
7245 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7246 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
72cfdc76 | 7247 | echo "configure:7248: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7248 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7249 | echo $ac_n "(cached) $ac_c" 1>&6 |
7250 | else | |
7251 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7252 | #line 7253 "configure" |
596c9d4b KB |
7253 | #include "confdefs.h" |
7254 | ||
7255 | #define _SYSCALL32 | |
7256 | #include <sys/procfs.h> | |
7257 | int main() { | |
97bf5e38 | 7258 | pstatus_t avar |
596c9d4b KB |
7259 | ; return 0; } |
7260 | EOF | |
72cfdc76 | 7261 | if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7262 | rm -rf conftest* |
97bf5e38 | 7263 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7264 | else |
7265 | echo "configure: failed program was:" >&5 | |
7266 | cat conftest.$ac_ext >&5 | |
7267 | rm -rf conftest* | |
97bf5e38 | 7268 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7269 | |
7270 | fi | |
7271 | rm -f conftest* | |
7272 | fi | |
7273 | ||
97bf5e38 | 7274 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7275 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7276 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7277 | EOF |
7278 | ||
7279 | fi | |
97bf5e38 | 7280 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7281 | |
97bf5e38 | 7282 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7283 | echo "configure:7284: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7284 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7285 | echo $ac_n "(cached) $ac_c" 1>&6 |
7286 | else | |
7287 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7288 | #line 7289 "configure" |
596c9d4b KB |
7289 | #include "confdefs.h" |
7290 | ||
7291 | #define _SYSCALL32 | |
7292 | #include <sys/procfs.h> | |
7293 | int main() { | |
97bf5e38 | 7294 | prrun_t avar |
596c9d4b KB |
7295 | ; return 0; } |
7296 | EOF | |
72cfdc76 | 7297 | if { (eval echo configure:7298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7298 | rm -rf conftest* |
97bf5e38 | 7299 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7300 | else |
7301 | echo "configure: failed program was:" >&5 | |
7302 | cat conftest.$ac_ext >&5 | |
7303 | rm -rf conftest* | |
97bf5e38 | 7304 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7305 | |
7306 | fi | |
7307 | rm -f conftest* | |
7308 | fi | |
7309 | ||
97bf5e38 | 7310 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7311 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7312 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7313 | EOF |
7314 | ||
7315 | fi | |
97bf5e38 | 7316 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7317 | |
97bf5e38 | 7318 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7319 | echo "configure:7320: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7320 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7321 | echo $ac_n "(cached) $ac_c" 1>&6 |
7322 | else | |
7323 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7324 | #line 7325 "configure" |
596c9d4b KB |
7325 | #include "confdefs.h" |
7326 | ||
7327 | #define _SYSCALL32 | |
7328 | #include <sys/procfs.h> | |
7329 | int main() { | |
97bf5e38 | 7330 | gregset_t avar |
596c9d4b KB |
7331 | ; return 0; } |
7332 | EOF | |
72cfdc76 | 7333 | if { (eval echo configure:7334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7334 | rm -rf conftest* |
97bf5e38 | 7335 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7336 | else |
7337 | echo "configure: failed program was:" >&5 | |
7338 | cat conftest.$ac_ext >&5 | |
7339 | rm -rf conftest* | |
97bf5e38 | 7340 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7341 | |
7342 | fi | |
7343 | rm -f conftest* | |
7344 | fi | |
7345 | ||
97bf5e38 | 7346 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7347 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7348 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7349 | EOF |
7350 | ||
7351 | fi | |
97bf5e38 | 7352 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7353 | |
97bf5e38 | 7354 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7355 | echo "configure:7356: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7356 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7357 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7358 | else |
7359 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7360 | #line 7361 "configure" |
d84dd0c5 | 7361 | #include "confdefs.h" |
97bf5e38 MK |
7362 | |
7363 | #define _SYSCALL32 | |
d84dd0c5 | 7364 | #include <sys/procfs.h> |
97bf5e38 MK |
7365 | int main() { |
7366 | fpregset_t avar | |
7367 | ; return 0; } | |
d84dd0c5 | 7368 | EOF |
72cfdc76 | 7369 | if { (eval echo configure:7370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7370 | rm -rf conftest* |
7371 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7372 | else |
7373 | echo "configure: failed program was:" >&5 | |
7374 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7375 | rm -rf conftest* |
7376 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7377 | ||
d84dd0c5 | 7378 | fi |
97bf5e38 | 7379 | rm -f conftest* |
d84dd0c5 MK |
7380 | fi |
7381 | ||
97bf5e38 MK |
7382 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7383 | cat >> confdefs.h <<\EOF | |
7384 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7385 | EOF |
7386 | ||
97bf5e38 MK |
7387 | fi |
7388 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7389 | |
97bf5e38 | 7390 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7391 | echo "configure:7392: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7392 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7393 | echo $ac_n "(cached) $ac_c" 1>&6 |
7394 | else | |
7395 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7396 | #line 7397 "configure" |
c906108c | 7397 | #include "confdefs.h" |
c906108c | 7398 | |
97bf5e38 MK |
7399 | #define _SYSCALL32 |
7400 | #include <sys/procfs.h> | |
c906108c | 7401 | int main() { |
97bf5e38 | 7402 | prgregset_t avar |
c906108c SS |
7403 | ; return 0; } |
7404 | EOF | |
72cfdc76 | 7405 | if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7406 | rm -rf conftest* |
97bf5e38 | 7407 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7408 | else |
7409 | echo "configure: failed program was:" >&5 | |
7410 | cat conftest.$ac_ext >&5 | |
7411 | rm -rf conftest* | |
97bf5e38 MK |
7412 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7413 | ||
c906108c SS |
7414 | fi |
7415 | rm -f conftest* | |
7416 | fi | |
7417 | ||
97bf5e38 MK |
7418 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7419 | cat >> confdefs.h <<\EOF | |
7420 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7421 | EOF |
7422 | ||
97bf5e38 MK |
7423 | fi |
7424 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7425 | |
97bf5e38 | 7426 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7427 | echo "configure:7428: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7428 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7429 | echo $ac_n "(cached) $ac_c" 1>&6 |
7430 | else | |
7431 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7432 | #line 7433 "configure" |
d45fe813 | 7433 | #include "confdefs.h" |
97bf5e38 MK |
7434 | |
7435 | #define _SYSCALL32 | |
7436 | #include <sys/procfs.h> | |
d45fe813 | 7437 | int main() { |
97bf5e38 | 7438 | prfpregset_t avar |
d45fe813 KB |
7439 | ; return 0; } |
7440 | EOF | |
72cfdc76 | 7441 | if { (eval echo configure:7442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7442 | rm -rf conftest* |
97bf5e38 | 7443 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7444 | else |
7445 | echo "configure: failed program was:" >&5 | |
7446 | cat conftest.$ac_ext >&5 | |
7447 | rm -rf conftest* | |
97bf5e38 MK |
7448 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7449 | ||
d45fe813 KB |
7450 | fi |
7451 | rm -f conftest* | |
7452 | fi | |
7453 | ||
97bf5e38 MK |
7454 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7455 | cat >> confdefs.h <<\EOF | |
7456 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7457 | EOF |
7458 | ||
97bf5e38 MK |
7459 | fi |
7460 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7461 | |
97bf5e38 | 7462 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7463 | echo "configure:7464: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7464 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7465 | echo $ac_n "(cached) $ac_c" 1>&6 |
7466 | else | |
7467 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7468 | #line 7469 "configure" |
d45fe813 | 7469 | #include "confdefs.h" |
97bf5e38 MK |
7470 | |
7471 | #define _SYSCALL32 | |
7472 | #include <sys/procfs.h> | |
d45fe813 | 7473 | int main() { |
97bf5e38 | 7474 | prgregset32_t avar |
d45fe813 KB |
7475 | ; return 0; } |
7476 | EOF | |
72cfdc76 | 7477 | if { (eval echo configure:7478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7478 | rm -rf conftest* |
97bf5e38 | 7479 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7480 | else |
7481 | echo "configure: failed program was:" >&5 | |
7482 | cat conftest.$ac_ext >&5 | |
7483 | rm -rf conftest* | |
97bf5e38 MK |
7484 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7485 | ||
d45fe813 KB |
7486 | fi |
7487 | rm -f conftest* | |
7488 | fi | |
7489 | ||
97bf5e38 MK |
7490 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7491 | cat >> confdefs.h <<\EOF | |
7492 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7493 | EOF |
7494 | ||
97bf5e38 MK |
7495 | fi |
7496 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7497 | |
97bf5e38 | 7498 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7499 | echo "configure:7500: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7500 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7501 | echo $ac_n "(cached) $ac_c" 1>&6 |
7502 | else | |
7503 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7504 | #line 7505 "configure" |
d45fe813 | 7505 | #include "confdefs.h" |
97bf5e38 MK |
7506 | |
7507 | #define _SYSCALL32 | |
7508 | #include <sys/procfs.h> | |
d45fe813 | 7509 | int main() { |
97bf5e38 | 7510 | prfpregset32_t avar |
d45fe813 KB |
7511 | ; return 0; } |
7512 | EOF | |
72cfdc76 | 7513 | if { (eval echo configure:7514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7514 | rm -rf conftest* |
97bf5e38 | 7515 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7516 | else |
7517 | echo "configure: failed program was:" >&5 | |
7518 | cat conftest.$ac_ext >&5 | |
7519 | rm -rf conftest* | |
97bf5e38 MK |
7520 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7521 | ||
d45fe813 KB |
7522 | fi |
7523 | rm -f conftest* | |
7524 | fi | |
7525 | ||
97bf5e38 MK |
7526 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7527 | cat >> confdefs.h <<\EOF | |
7528 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7529 | EOF |
7530 | ||
97bf5e38 MK |
7531 | fi |
7532 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7533 | |
97bf5e38 | 7534 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7535 | echo "configure:7536: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7536 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7537 | echo $ac_n "(cached) $ac_c" 1>&6 |
7538 | else | |
7539 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7540 | #line 7541 "configure" |
d45fe813 | 7541 | #include "confdefs.h" |
97bf5e38 | 7542 | |
d45fe813 | 7543 | #define _SYSCALL32 |
97bf5e38 | 7544 | #include <sys/procfs.h> |
d45fe813 | 7545 | int main() { |
97bf5e38 | 7546 | lwpid_t avar |
d45fe813 KB |
7547 | ; return 0; } |
7548 | EOF | |
72cfdc76 | 7549 | if { (eval echo configure:7550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7550 | rm -rf conftest* |
97bf5e38 | 7551 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7552 | else |
7553 | echo "configure: failed program was:" >&5 | |
7554 | cat conftest.$ac_ext >&5 | |
7555 | rm -rf conftest* | |
97bf5e38 MK |
7556 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7557 | ||
d45fe813 KB |
7558 | fi |
7559 | rm -f conftest* | |
7560 | fi | |
7561 | ||
97bf5e38 MK |
7562 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7563 | cat >> confdefs.h <<\EOF | |
7564 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7565 | EOF |
7566 | ||
97bf5e38 MK |
7567 | fi |
7568 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7569 | |
97bf5e38 | 7570 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7571 | echo "configure:7572: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7572 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7573 | echo $ac_n "(cached) $ac_c" 1>&6 |
7574 | else | |
7575 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7576 | #line 7577 "configure" |
c906108c SS |
7577 | #include "confdefs.h" |
7578 | ||
97bf5e38 MK |
7579 | #define _SYSCALL32 |
7580 | #include <sys/procfs.h> | |
c906108c | 7581 | int main() { |
97bf5e38 | 7582 | psaddr_t avar |
c906108c SS |
7583 | ; return 0; } |
7584 | EOF | |
72cfdc76 | 7585 | if { (eval echo configure:7586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7586 | rm -rf conftest* |
97bf5e38 | 7587 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7588 | else |
7589 | echo "configure: failed program was:" >&5 | |
7590 | cat conftest.$ac_ext >&5 | |
7591 | rm -rf conftest* | |
97bf5e38 MK |
7592 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7593 | ||
c906108c SS |
7594 | fi |
7595 | rm -f conftest* | |
7596 | fi | |
7597 | ||
97bf5e38 MK |
7598 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7599 | cat >> confdefs.h <<\EOF | |
7600 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7601 | EOF |
7602 | ||
97bf5e38 MK |
7603 | fi |
7604 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7605 | |
97bf5e38 | 7606 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7607 | echo "configure:7608: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7608 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7609 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7610 | else |
7611 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7612 | #line 7613 "configure" |
c906108c SS |
7613 | #include "confdefs.h" |
7614 | ||
97bf5e38 MK |
7615 | #define _SYSCALL32 |
7616 | #include <sys/procfs.h> | |
7617 | int main() { | |
7618 | prsysent_t avar | |
7619 | ; return 0; } | |
c906108c | 7620 | EOF |
72cfdc76 | 7621 | if { (eval echo configure:7622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7622 | rm -rf conftest* |
7623 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7624 | else |
7625 | echo "configure: failed program was:" >&5 | |
7626 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7627 | rm -rf conftest* |
7628 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7629 | ||
c906108c | 7630 | fi |
97bf5e38 | 7631 | rm -f conftest* |
c906108c SS |
7632 | fi |
7633 | ||
97bf5e38 MK |
7634 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7635 | cat >> confdefs.h <<\EOF | |
7636 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7637 | EOF |
7638 | ||
97bf5e38 MK |
7639 | fi |
7640 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7641 | |
97bf5e38 | 7642 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7643 | echo "configure:7644: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7644 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7645 | echo $ac_n "(cached) $ac_c" 1>&6 |
7646 | else | |
7647 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7648 | #line 7649 "configure" |
c906108c SS |
7649 | #include "confdefs.h" |
7650 | ||
97bf5e38 MK |
7651 | #define _SYSCALL32 |
7652 | #include <sys/procfs.h> | |
c906108c | 7653 | int main() { |
97bf5e38 | 7654 | pr_sigset_t avar |
c906108c SS |
7655 | ; return 0; } |
7656 | EOF | |
72cfdc76 | 7657 | if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7658 | rm -rf conftest* |
97bf5e38 | 7659 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7660 | else |
7661 | echo "configure: failed program was:" >&5 | |
7662 | cat conftest.$ac_ext >&5 | |
7663 | rm -rf conftest* | |
97bf5e38 MK |
7664 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7665 | ||
c906108c SS |
7666 | fi |
7667 | rm -f conftest* | |
7668 | fi | |
7669 | ||
97bf5e38 MK |
7670 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7671 | cat >> confdefs.h <<\EOF | |
7672 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7673 | EOF |
7674 | ||
97bf5e38 MK |
7675 | fi |
7676 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7677 | |
97bf5e38 | 7678 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
72cfdc76 | 7679 | echo "configure:7680: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7680 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7681 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7682 | else |
7683 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7684 | #line 7685 "configure" |
c906108c SS |
7685 | #include "confdefs.h" |
7686 | ||
97bf5e38 MK |
7687 | #define _SYSCALL32 |
7688 | #include <sys/procfs.h> | |
7689 | int main() { | |
7690 | pr_sigaction64_t avar | |
7691 | ; return 0; } | |
c906108c | 7692 | EOF |
72cfdc76 | 7693 | if { (eval echo configure:7694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7694 | rm -rf conftest* |
7695 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7696 | else |
7697 | echo "configure: failed program was:" >&5 | |
7698 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7699 | rm -rf conftest* |
7700 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7701 | ||
c906108c | 7702 | fi |
97bf5e38 | 7703 | rm -f conftest* |
c906108c SS |
7704 | fi |
7705 | ||
97bf5e38 MK |
7706 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7707 | cat >> confdefs.h <<\EOF | |
7708 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7709 | EOF |
7710 | ||
97bf5e38 MK |
7711 | fi |
7712 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7713 | ||
7714 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
72cfdc76 | 7715 | echo "configure:7716: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7716 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7717 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7718 | else | |
7719 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7720 | #line 7721 "configure" |
97bf5e38 MK |
7721 | #include "confdefs.h" |
7722 | ||
7723 | #define _SYSCALL32 | |
7724 | #include <sys/procfs.h> | |
7725 | int main() { | |
7726 | pr_siginfo64_t avar | |
7727 | ; return 0; } | |
7728 | EOF | |
72cfdc76 | 7729 | if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7730 | rm -rf conftest* |
7731 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7732 | else | |
7733 | echo "configure: failed program was:" >&5 | |
7734 | cat conftest.$ac_ext >&5 | |
7735 | rm -rf conftest* | |
7736 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7737 | ||
7738 | fi | |
7739 | rm -f conftest* | |
c906108c | 7740 | fi |
c906108c | 7741 | |
97bf5e38 MK |
7742 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7743 | cat >> confdefs.h <<\EOF | |
7744 | #define HAVE_PR_SIGINFO64_T 1 | |
7745 | EOF | |
c906108c | 7746 | |
97bf5e38 MK |
7747 | fi |
7748 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7749 | ||
7750 | ||
7751 | ||
7752 | ||
7753 | ||
7754 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7755 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
72cfdc76 | 7756 | echo "configure:7757: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7757 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7758 | echo $ac_n "(cached) $ac_c" 1>&6 |
7759 | else | |
7760 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7761 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7762 | else |
7763 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7764 | #line 7765 "configure" |
c906108c | 7765 | #include "confdefs.h" |
97bf5e38 MK |
7766 | #include <sys/procfs.h> |
7767 | int main () | |
7768 | { | |
7769 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7770 | return 1; | |
7771 | return 0; | |
7772 | } | |
c906108c | 7773 | EOF |
72cfdc76 | 7774 | if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7775 | then |
97bf5e38 | 7776 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7777 | else |
7778 | echo "configure: failed program was:" >&5 | |
7779 | cat conftest.$ac_ext >&5 | |
7780 | rm -fr conftest* | |
97bf5e38 | 7781 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7782 | fi |
7783 | rm -fr conftest* | |
7784 | fi | |
7785 | ||
7786 | fi | |
7787 | ||
97bf5e38 MK |
7788 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7789 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7790 | cat >> confdefs.h <<\EOF | |
7791 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7792 | EOF |
7793 | ||
97bf5e38 MK |
7794 | fi |
7795 | fi | |
c906108c | 7796 | |
97bf5e38 MK |
7797 | |
7798 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
72cfdc76 | 7799 | echo "configure:7800: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7800 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7801 | echo $ac_n "(cached) $ac_c" 1>&6 |
7802 | else | |
7803 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7804 | #line 7805 "configure" |
c906108c | 7805 | #include "confdefs.h" |
97bf5e38 MK |
7806 | #include <unistd.h> |
7807 | #include <sys/types.h> | |
7808 | #include <sys/procfs.h> | |
7809 | ||
7810 | int main() { | |
7811 | ||
7812 | int dummy;; | |
7813 | dummy = ioctl(0, PIOCSET, &dummy); | |
7814 | ||
7815 | ; return 0; } | |
c906108c | 7816 | EOF |
72cfdc76 | 7817 | if { (eval echo configure:7818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7818 | rm -rf conftest* |
97bf5e38 | 7819 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7820 | else |
c906108c SS |
7821 | echo "configure: failed program was:" >&5 |
7822 | cat conftest.$ac_ext >&5 | |
7823 | rm -rf conftest* | |
97bf5e38 | 7824 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7825 | fi |
7826 | rm -f conftest* | |
7827 | fi | |
97bf5e38 MK |
7828 | |
7829 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7830 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7831 | cat >> confdefs.h <<\EOF | |
7832 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7833 | EOF |
97bf5e38 MK |
7834 | |
7835 | fi | |
c906108c | 7836 | fi |
c906108c | 7837 | |
97bf5e38 MK |
7838 | if test ${host} = ${target} ; then |
7839 | ||
7840 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
72cfdc76 | 7841 | echo "configure:7842: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7842 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7843 | echo $ac_n "(cached) $ac_c" 1>&6 |
7844 | else | |
7845 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7846 | #line 7847 "configure" |
c906108c | 7847 | #include "confdefs.h" |
97bf5e38 | 7848 | #include <link.h> |
c906108c | 7849 | int main() { |
97bf5e38 | 7850 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7851 | ; return 0; } |
7852 | EOF | |
72cfdc76 | 7853 | if { (eval echo configure:7854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7854 | rm -rf conftest* |
97bf5e38 | 7855 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7856 | else |
7857 | echo "configure: failed program was:" >&5 | |
7858 | cat conftest.$ac_ext >&5 | |
7859 | rm -rf conftest* | |
97bf5e38 | 7860 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7861 | fi |
7862 | rm -f conftest* | |
7863 | fi | |
7864 | ||
97bf5e38 MK |
7865 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7866 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7867 | cat >> confdefs.h <<\EOF | |
7868 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7869 | EOF |
97bf5e38 MK |
7870 | |
7871 | fi | |
7872 | ||
7873 | ||
7874 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
72cfdc76 | 7875 | echo "configure:7876: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
7876 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
7877 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 7878 | else |
97bf5e38 | 7879 | cat > conftest.$ac_ext <<EOF |
72cfdc76 | 7880 | #line 7881 "configure" |
97bf5e38 MK |
7881 | #include "confdefs.h" |
7882 | #include <sys/types.h> | |
7883 | #include <link.h> | |
7884 | int main() { | |
7885 | struct link_map lm; (void) lm.lm_addr; | |
7886 | ; return 0; } | |
7887 | EOF | |
72cfdc76 | 7888 | if { (eval echo configure:7889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7889 | rm -rf conftest* |
7890 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
7891 | else | |
7892 | echo "configure: failed program was:" >&5 | |
7893 | cat conftest.$ac_ext >&5 | |
7894 | rm -rf conftest* | |
7895 | gdb_cv_have_struct_link_map_with_lm_members=no | |
7896 | fi | |
7897 | rm -f conftest* | |
c906108c | 7898 | fi |
c906108c | 7899 | |
97bf5e38 MK |
7900 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
7901 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
7902 | cat >> confdefs.h <<\EOF | |
7903 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
7904 | EOF | |
7905 | ||
7906 | fi | |
7907 | ||
7908 | ||
7909 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
72cfdc76 | 7910 | echo "configure:7911: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 7911 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 7912 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7913 | else |
7914 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7915 | #line 7916 "configure" |
c906108c | 7916 | #include "confdefs.h" |
97bf5e38 MK |
7917 | #include <sys/types.h> |
7918 | #ifdef HAVE_NLIST_H | |
7919 | #include <nlist.h> | |
7920 | #endif | |
7921 | #include <link.h> | |
7922 | int main() { | |
7923 | struct so_map lm; (void) lm.som_addr; | |
7924 | ; return 0; } | |
7925 | EOF | |
72cfdc76 | 7926 | if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7927 | rm -rf conftest* |
7928 | gdb_cv_have_struct_so_map_with_som_members=yes | |
7929 | else | |
7930 | echo "configure: failed program was:" >&5 | |
7931 | cat conftest.$ac_ext >&5 | |
7932 | rm -rf conftest* | |
7933 | gdb_cv_have_struct_so_map_with_som_members=no | |
7934 | fi | |
7935 | rm -f conftest* | |
7936 | fi | |
c906108c | 7937 | |
97bf5e38 MK |
7938 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
7939 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
7940 | cat >> confdefs.h <<\EOF | |
7941 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
7942 | EOF | |
c906108c | 7943 | |
97bf5e38 | 7944 | fi |
c906108c | 7945 | |
97bf5e38 MK |
7946 | |
7947 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
72cfdc76 | 7948 | echo "configure:7949: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
7949 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
7950 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7951 | else | |
7952 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7953 | #line 7954 "configure" |
97bf5e38 MK |
7954 | #include "confdefs.h" |
7955 | #define _SYSCALL32 | |
7956 | #include <sys/link.h> | |
7957 | int main() { | |
7958 | struct link_map32 l; | |
7959 | ; return 0; } | |
7960 | EOF | |
72cfdc76 | 7961 | if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7962 | rm -rf conftest* |
7963 | gdb_cv_have_struct_link_map32=yes | |
7964 | else | |
7965 | echo "configure: failed program was:" >&5 | |
7966 | cat conftest.$ac_ext >&5 | |
7967 | rm -rf conftest* | |
7968 | gdb_cv_have_struct_link_map32=no | |
7969 | fi | |
7970 | rm -f conftest* | |
7971 | fi | |
c906108c | 7972 | |
97bf5e38 MK |
7973 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
7974 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
7975 | cat >> confdefs.h <<\EOF | |
7976 | #define HAVE_STRUCT_LINK_MAP32 1 | |
7977 | EOF | |
c906108c | 7978 | |
97bf5e38 MK |
7979 | cat >> confdefs.h <<\EOF |
7980 | #define _SYSCALL32 1 | |
7981 | EOF | |
c906108c | 7982 | |
97bf5e38 MK |
7983 | fi |
7984 | fi | |
c906108c | 7985 | |
c906108c | 7986 | |
97bf5e38 | 7987 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
72cfdc76 | 7988 | echo "configure:7989: checking for long long support in compiler" >&5 |
97bf5e38 MK |
7989 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
7990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7991 | else | |
7992 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 7993 | #line 7994 "configure" |
97bf5e38 | 7994 | #include "confdefs.h" |
c906108c | 7995 | |
97bf5e38 | 7996 | int main() { |
c906108c | 7997 | |
97bf5e38 MK |
7998 | extern long long foo; |
7999 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8000 | |
97bf5e38 MK |
8001 | ; return 0; } |
8002 | EOF | |
72cfdc76 | 8003 | if { (eval echo configure:8004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8004 | rm -rf conftest* |
8005 | gdb_cv_c_long_long=yes | |
8006 | else | |
8007 | echo "configure: failed program was:" >&5 | |
8008 | cat conftest.$ac_ext >&5 | |
8009 | rm -rf conftest* | |
8010 | gdb_cv_c_long_long=no | |
8011 | fi | |
8012 | rm -f conftest* | |
8013 | fi | |
c906108c | 8014 | |
97bf5e38 MK |
8015 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8016 | if test $gdb_cv_c_long_long = yes; then | |
8017 | cat >> confdefs.h <<\EOF | |
8018 | #define CC_HAS_LONG_LONG 1 | |
8019 | EOF | |
8020 | ||
8021 | fi | |
8022 | ||
8023 | ||
8024 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
72cfdc76 | 8025 | echo "configure:8026: checking for long long support in printf" >&5 |
97bf5e38 MK |
8026 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8028 | else | |
8029 | if test "$cross_compiling" = yes; then | |
8030 | gdb_cv_printf_has_long_long=no | |
8031 | else | |
8032 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8033 | #line 8034 "configure" |
97bf5e38 MK |
8034 | #include "confdefs.h" |
8035 | ||
8036 | int main () { | |
8037 | char buf[32]; | |
8038 | long long l = 0; | |
8039 | l = (l << 16) + 0x0123; | |
8040 | l = (l << 16) + 0x4567; | |
8041 | l = (l << 16) + 0x89ab; | |
8042 | l = (l << 16) + 0xcdef; | |
8043 | sprintf (buf, "0x%016llx", l); | |
8044 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8045 | } |
97bf5e38 | 8046 | EOF |
72cfdc76 | 8047 | if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8048 | then |
8049 | gdb_cv_printf_has_long_long=yes | |
8050 | else | |
8051 | echo "configure: failed program was:" >&5 | |
8052 | cat conftest.$ac_ext >&5 | |
8053 | rm -fr conftest* | |
8054 | gdb_cv_printf_has_long_long=no | |
8055 | fi | |
8056 | rm -fr conftest* | |
8057 | fi | |
8058 | ||
8059 | fi | |
8060 | ||
8061 | if test $gdb_cv_printf_has_long_long = yes; then | |
8062 | cat >> confdefs.h <<\EOF | |
8063 | #define PRINTF_HAS_LONG_LONG 1 | |
8064 | EOF | |
8065 | ||
8066 | fi | |
8067 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8068 | ||
8069 | ||
8070 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
72cfdc76 | 8071 | echo "configure:8072: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8072 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8074 | else | |
8075 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8076 | #line 8077 "configure" |
97bf5e38 MK |
8077 | #include "confdefs.h" |
8078 | ||
8079 | int main() { | |
8080 | long double foo; | |
8081 | ; return 0; } | |
8082 | EOF | |
72cfdc76 | 8083 | if { (eval echo configure:8084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8084 | rm -rf conftest* |
8085 | ac_cv_c_long_double=yes | |
8086 | else | |
8087 | echo "configure: failed program was:" >&5 | |
8088 | cat conftest.$ac_ext >&5 | |
8089 | rm -rf conftest* | |
8090 | ac_cv_c_long_double=no | |
8091 | fi | |
8092 | rm -f conftest* | |
8093 | fi | |
c906108c | 8094 | |
97bf5e38 MK |
8095 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8096 | if test $ac_cv_c_long_double = yes; then | |
8097 | cat >> confdefs.h <<\EOF | |
8098 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8099 | EOF |
97bf5e38 MK |
8100 | |
8101 | fi | |
8102 | ||
8103 | ||
8104 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
72cfdc76 | 8105 | echo "configure:8106: checking for long double support in printf" >&5 |
97bf5e38 MK |
8106 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8108 | else | |
8109 | if test "$cross_compiling" = yes; then | |
8110 | gdb_cv_printf_has_long_double=no | |
8111 | else | |
8112 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8113 | #line 8114 "configure" |
97bf5e38 MK |
8114 | #include "confdefs.h" |
8115 | ||
8116 | int main () { | |
8117 | char buf[16]; | |
8118 | long double f = 3.141592653; | |
8119 | sprintf (buf, "%Lg", f); | |
8120 | return (strncmp ("3.14159", buf, 7)); | |
8121 | } | |
8122 | EOF | |
72cfdc76 | 8123 | if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8124 | then |
97bf5e38 | 8125 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8126 | else |
8127 | echo "configure: failed program was:" >&5 | |
8128 | cat conftest.$ac_ext >&5 | |
8129 | rm -fr conftest* | |
97bf5e38 | 8130 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8131 | fi |
8132 | rm -fr conftest* | |
8133 | fi | |
8134 | ||
8135 | fi | |
8136 | ||
97bf5e38 | 8137 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8138 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8139 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8140 | EOF | |
8141 | ||
8142 | fi | |
8143 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8144 | ||
8145 | ||
8146 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
72cfdc76 | 8147 | echo "configure:8148: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8148 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8150 | else | |
8151 | if test "$cross_compiling" = yes; then | |
8152 | gdb_cv_scanf_has_long_double=no | |
8153 | else | |
8154 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8155 | #line 8156 "configure" |
97bf5e38 MK |
8156 | #include "confdefs.h" |
8157 | ||
8158 | int main () { | |
8159 | char *buf = "3.141592653"; | |
8160 | long double f = 0; | |
8161 | sscanf (buf, "%Lg", &f); | |
8162 | return !(f > 3.14159 && f < 3.14160); | |
8163 | } | |
c906108c | 8164 | EOF |
72cfdc76 | 8165 | if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8166 | then |
8167 | gdb_cv_scanf_has_long_double=yes | |
8168 | else | |
8169 | echo "configure: failed program was:" >&5 | |
8170 | cat conftest.$ac_ext >&5 | |
8171 | rm -fr conftest* | |
8172 | gdb_cv_scanf_has_long_double=no | |
8173 | fi | |
8174 | rm -fr conftest* | |
8175 | fi | |
c906108c SS |
8176 | |
8177 | fi | |
8178 | ||
97bf5e38 MK |
8179 | if test $gdb_cv_scanf_has_long_double = yes; then |
8180 | cat >> confdefs.h <<\EOF | |
8181 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8182 | EOF | |
8183 | ||
8184 | fi | |
8185 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8186 | |
438013df AO |
8187 | case ${host_os} in |
8188 | aix*) | |
8189 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
72cfdc76 | 8190 | echo "configure:8191: checking for -bbigtoc option" >&5 |
438013df AO |
8191 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8193 | else | |
8194 | ||
8195 | SAVE_LDFLAGS=$LDFLAGS | |
8196 | ||
8197 | case $GCC in | |
8198 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8199 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8200 | esac | |
8201 | ||
8202 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8203 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8204 | #line 8205 "configure" |
438013df AO |
8205 | #include "confdefs.h" |
8206 | ||
8207 | int main() { | |
8208 | int i; | |
8209 | ; return 0; } | |
8210 | EOF | |
72cfdc76 | 8211 | if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8212 | : |
8213 | else | |
8214 | echo "configure: failed program was:" >&5 | |
8215 | cat conftest.$ac_ext >&5 | |
8216 | rm -rf conftest* | |
8217 | gdb_cv_bigtoc= | |
8218 | fi | |
8219 | rm -f conftest* | |
8220 | ||
8221 | fi | |
8222 | ||
8223 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8224 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8225 | ;; | |
8226 | esac | |
8227 | ||
c906108c SS |
8228 | |
8229 | ||
8230 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8231 | case ${host_os} in | |
8232 | hpux*) | |
8233 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
72cfdc76 | 8234 | echo "configure:8235: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8235 | if test -f /usr/include/dce/cma_config.h ; then |
8236 | if test "$GCC" = "yes" ; then | |
8237 | echo "$ac_t""yes" 1>&6 | |
8238 | cat >> confdefs.h <<\EOF | |
8239 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8240 | EOF | |
8241 | ||
66b965bb | 8242 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8243 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8244 | else | |
8245 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8246 | fi | |
8247 | else | |
8248 | echo "$ac_t""no" 1>&6 | |
8249 | fi | |
8250 | ;; | |
8251 | solaris*) | |
d92419e5 JB |
8252 | # See if thread_db library is around for Solaris thread debugging. |
8253 | # Note that we must explicitly test for version 1 of the library | |
8254 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8255 | # the same API. | |
c906108c | 8256 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
72cfdc76 | 8257 | echo "configure:8258: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8258 | if test -f /usr/lib/libthread_db.so.1 ; then |
8259 | echo "$ac_t""yes" 1>&6 | |
8260 | cat >> confdefs.h <<\EOF | |
8261 | #define HAVE_THREAD_DB_LIB 1 | |
8262 | EOF | |
8263 | ||
66b965bb | 8264 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8265 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8266 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
72cfdc76 | 8267 | echo "configure:8268: checking for dlopen in -ldl" >&5 |
c906108c SS |
8268 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8269 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8271 | else | |
8272 | ac_save_LIBS="$LIBS" | |
8273 | LIBS="-ldl $LIBS" | |
8274 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8275 | #line 8276 "configure" |
c906108c SS |
8276 | #include "confdefs.h" |
8277 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8278 | /* We use char because int might match the return type of a gcc2 | |
8279 | builtin and then its argument prototype would still apply. */ | |
8280 | char dlopen(); | |
8281 | ||
8282 | int main() { | |
8283 | dlopen() | |
8284 | ; return 0; } | |
8285 | EOF | |
72cfdc76 | 8286 | if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8287 | rm -rf conftest* |
8288 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8289 | else | |
8290 | echo "configure: failed program was:" >&5 | |
8291 | cat conftest.$ac_ext >&5 | |
8292 | rm -rf conftest* | |
8293 | eval "ac_cv_lib_$ac_lib_var=no" | |
8294 | fi | |
8295 | rm -f conftest* | |
8296 | LIBS="$ac_save_LIBS" | |
8297 | ||
8298 | fi | |
8299 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8300 | echo "$ac_t""yes" 1>&6 | |
8301 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8302 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8303 | cat >> confdefs.h <<EOF | |
8304 | #define $ac_tr_lib 1 | |
8305 | EOF | |
8306 | ||
8307 | LIBS="-ldl $LIBS" | |
8308 | ||
8309 | else | |
8310 | echo "$ac_t""no" 1>&6 | |
8311 | fi | |
8312 | ||
8313 | if test "$GCC" = "yes" ; then | |
8314 | # The GNU linker requires the -export-dynamic option to make | |
8315 | # all symbols visible in the dynamic symbol table. | |
8316 | hold_ldflags=$LDFLAGS | |
8317 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
72cfdc76 | 8318 | echo "configure:8319: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8319 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8320 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8321 | #line 8322 "configure" |
c906108c SS |
8322 | #include "confdefs.h" |
8323 | ||
8324 | int main() { | |
8325 | int i; | |
8326 | ; return 0; } | |
8327 | EOF | |
72cfdc76 | 8328 | if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8329 | rm -rf conftest* |
8330 | found=yes | |
8331 | else | |
8332 | echo "configure: failed program was:" >&5 | |
8333 | cat conftest.$ac_ext >&5 | |
8334 | rm -rf conftest* | |
8335 | found=no | |
8336 | fi | |
8337 | rm -f conftest* | |
8338 | LDFLAGS=$hold_ldflags | |
8339 | echo "$ac_t""$found" 1>&6 | |
8340 | if test $found = yes; then | |
8341 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8342 | fi | |
8343 | fi | |
8344 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8345 | # at one point. | |
8346 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
72cfdc76 | 8347 | echo "configure:8348: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8348 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8349 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8350 | else | |
8351 | ||
8352 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8353 | #line 8354 "configure" |
c906108c SS |
8354 | #include "confdefs.h" |
8355 | ||
8356 | #include <proc_service.h> | |
8357 | ps_err_e ps_pdwrite | |
8358 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8359 | ||
8360 | int main() { | |
8361 | ||
8362 | ; return 0; } | |
8363 | EOF | |
72cfdc76 | 8364 | if { (eval echo configure:8365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8365 | rm -rf conftest* |
8366 | gdb_cv_proc_service_is_old=no | |
8367 | else | |
8368 | echo "configure: failed program was:" >&5 | |
8369 | cat conftest.$ac_ext >&5 | |
8370 | rm -rf conftest* | |
8371 | gdb_cv_proc_service_is_old=yes | |
8372 | fi | |
8373 | rm -f conftest* | |
8374 | ||
8375 | fi | |
8376 | ||
8377 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8378 | if test $gdb_cv_proc_service_is_old = yes; then | |
8379 | cat >> confdefs.h <<\EOF | |
8380 | #define PROC_SERVICE_IS_OLD 1 | |
8381 | EOF | |
8382 | ||
8383 | fi | |
8384 | else | |
8385 | echo "$ac_t""no" 1>&6 | |
8386 | fi | |
8387 | ;; | |
d92419e5 JB |
8388 | aix*) |
8389 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
72cfdc76 | 8390 | echo "configure:8391: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8391 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8392 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8393 | else | |
8394 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8395 | #line 8396 "configure" |
d92419e5 JB |
8396 | #include "confdefs.h" |
8397 | #include <sys/pthdebug.h> | |
8398 | int main() { | |
8399 | #ifndef PTHDB_VERSION_3 | |
8400 | #error | |
8401 | #endif | |
8402 | ; return 0; } | |
8403 | EOF | |
72cfdc76 | 8404 | if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8405 | rm -rf conftest* |
8406 | gdb_cv_have_aix_thread_debug=yes | |
8407 | else | |
8408 | echo "configure: failed program was:" >&5 | |
8409 | cat conftest.$ac_ext >&5 | |
8410 | rm -rf conftest* | |
8411 | gdb_cv_have_aix_thread_debug=no | |
8412 | fi | |
8413 | rm -f conftest* | |
8414 | fi | |
8415 | ||
8416 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8417 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8418 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8419 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8420 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8421 | fi | |
8422 | ;; | |
c906108c SS |
8423 | esac |
8424 | ||
8425 | fi | |
8426 | ||
3f47be5c EZ |
8427 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8428 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
72cfdc76 | 8429 | echo "configure:8430: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8430 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8431 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8432 | else | |
8433 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8434 | #line 8435 "configure" |
3f47be5c EZ |
8435 | #include "confdefs.h" |
8436 | #include <thread_db.h> | |
8437 | int main() { | |
8438 | int i = TD_NOTALLOC; | |
8439 | ; return 0; } | |
8440 | EOF | |
72cfdc76 | 8441 | if { (eval echo configure:8442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8442 | rm -rf conftest* |
8443 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8444 | else | |
8445 | echo "configure: failed program was:" >&5 | |
8446 | cat conftest.$ac_ext >&5 | |
8447 | rm -rf conftest* | |
8448 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8449 | ||
8450 | fi | |
8451 | rm -f conftest* | |
8452 | ||
8453 | fi | |
8454 | ||
8455 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8456 | fi | |
8457 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8458 | cat >> confdefs.h <<\EOF | |
8459 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8460 | EOF | |
8461 | ||
8462 | fi | |
8463 | ||
fb40c209 | 8464 | |
3b851bce AC |
8465 | # NOTE: Don't add -Wall or -Wunused, they both include |
8466 | # -Wunused-parameter which reports bogus warnings. | |
8467 | # NOTE: If you add to this list, remember to update | |
8468 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8469 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8470 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8471 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8472 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8473 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8474 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8475 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8476 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8477 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8478 | if test "${enable_build_warnings+set}" = set; then | |
8479 | enableval="$enable_build_warnings" | |
1decb323 | 8480 | case "${enableval}" in |
c906108c SS |
8481 | yes) ;; |
8482 | no) build_warnings="-w";; | |
8483 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8484 | build_warnings="${build_warnings} ${t}";; | |
8485 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8486 | build_warnings="${t} ${build_warnings}";; | |
8487 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8488 | esac | |
d4f3574e | 8489 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8490 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8491 | fi |
1decb323 | 8492 | fi |
3b851bce AC |
8493 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8494 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8495 | enableval="$enable_gdb_build_warnings" | |
8496 | case "${enableval}" in | |
8497 | yes) ;; | |
8498 | no) build_warnings="-w";; | |
8499 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8500 | build_warnings="${build_warnings} ${t}";; | |
8501 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8502 | build_warnings="${t} ${build_warnings}";; | |
8503 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8504 | esac | |
8505 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8506 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8507 | fi | |
8508 | fi | |
104c1213 JM |
8509 | WARN_CFLAGS="" |
8510 | WERROR_CFLAGS="" | |
c906108c SS |
8511 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8512 | then | |
746a987d | 8513 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
72cfdc76 | 8514 | echo "configure:8515: checking compiler warning flags" >&5 |
746a987d AC |
8515 | # Separate out the -Werror flag as some files just cannot be |
8516 | # compiled with it enabled. | |
8517 | for w in ${build_warnings}; do | |
8518 | case $w in | |
8519 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8520 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8521 | saved_CFLAGS="$CFLAGS" |
8522 | CFLAGS="$CFLAGS $w" | |
8523 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8524 | #line 8525 "configure" |
4536bbc6 AC |
8525 | #include "confdefs.h" |
8526 | ||
8527 | int main() { | |
8528 | ||
8529 | ; return 0; } | |
8530 | EOF | |
72cfdc76 | 8531 | if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8532 | rm -rf conftest* |
8533 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8534 | else | |
8535 | echo "configure: failed program was:" >&5 | |
8536 | cat conftest.$ac_ext >&5 | |
8537 | fi | |
8538 | rm -f conftest* | |
8539 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8540 | esac |
8541 | done | |
8542 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8543 | fi |
8544 | ||
8545 | ||
104c1213 | 8546 | |
c906108c SS |
8547 | MMALLOC_CFLAGS= |
8548 | MMALLOC= | |
8549 | ||
8550 | ||
8551 | ||
8552 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8553 | if test "${with_mmalloc+set}" = set; then | |
8554 | withval="$with_mmalloc" | |
8555 | case "${withval}" in | |
8556 | yes) want_mmalloc=true ;; | |
8557 | no) want_mmalloc=false;; | |
8558 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8559 | esac | |
8560 | else | |
8561 | want_mmalloc=false | |
8562 | fi | |
8563 | ||
8564 | if test x$want_mmalloc = xtrue; then | |
8565 | cat >> confdefs.h <<\EOF | |
8566 | #define USE_MMALLOC 1 | |
8567 | EOF | |
8568 | ||
8569 | cat >> confdefs.h <<\EOF | |
8570 | #define MMCHECK_FORCE 1 | |
8571 | EOF | |
8572 | ||
8573 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8574 | MMALLOC='../mmalloc/libmmalloc.a' | |
8575 | fi | |
8576 | ||
7a292a7a SS |
8577 | # In the Cygwin environment, we need some additional flags. |
8578 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
72cfdc76 | 8579 | echo "configure:8580: checking for cygwin" >&5 |
7a292a7a SS |
8580 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8582 | else | |
8583 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8584 | #line 8585 "configure" |
7a292a7a SS |
8585 | #include "confdefs.h" |
8586 | ||
8587 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8588 | lose | |
8589 | #endif | |
8590 | EOF | |
8591 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8592 | egrep "lose" >/dev/null 2>&1; then | |
8593 | rm -rf conftest* | |
8594 | gdb_cv_os_cygwin=yes | |
8595 | else | |
8596 | rm -rf conftest* | |
8597 | gdb_cv_os_cygwin=no | |
8598 | fi | |
8599 | rm -f conftest* | |
8600 | ||
8601 | fi | |
8602 | ||
8603 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8604 | ||
aff38e61 AC |
8605 | |
8606 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8607 | case ${host} in | |
95cbc983 AC |
8608 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8609 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8610 | esac |
8611 | ||
8612 | ||
cd0fc7c3 SS |
8613 | # libreadline needs libuser32.a in a cygwin environment |
8614 | WIN32LIBS= | |
8615 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8616 | WIN32LIBS="-luser32" |
8617 | case "${target}" in | |
8618 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8619 | ;; | |
8620 | esac | |
cd0fc7c3 | 8621 | fi |
c906108c | 8622 | |
7a292a7a | 8623 | |
3fc11d3e JM |
8624 | LIBGUI="../libgui/src/libgui.a" |
8625 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8626 | ||
8627 | ||
7a292a7a | 8628 | |
3fc11d3e JM |
8629 | WIN32LDAPP= |
8630 | ||
8631 | ||
8632 | ||
8633 | configdir="unix" | |
8634 | ||
8635 | GDBTKLIBS= | |
8636 | if test "${enable_gdbtk}" = "yes"; then | |
8637 | ||
d1c3b63a KS |
8638 | # Gdbtk must have an absolute path to srcdir in order to run |
8639 | # properly when not installed. | |
8640 | here=`pwd` | |
8641 | cd ${srcdir} | |
8642 | GDBTK_SRC_DIR=`pwd` | |
8643 | cd $here | |
8644 | ||
3fc11d3e JM |
8645 | |
8646 | # | |
8647 | # Ok, lets find the tcl configuration | |
8648 | # First, look for one uninstalled. | |
8649 | # the alternative search directory is invoked by --with-tclconfig | |
8650 | # | |
8651 | ||
8652 | if test x"${no_tcl}" = x ; then | |
8653 | # we reset no_tcl in case something fails here | |
8654 | no_tcl=true | |
8655 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8656 | if test "${with_tclconfig+set}" = set; then | |
8657 | withval="$with_tclconfig" | |
8658 | with_tclconfig=${withval} | |
8659 | fi | |
8660 | ||
8661 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
72cfdc76 | 8662 | echo "configure:8663: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8663 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8664 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8665 | else | |
8666 | ||
8667 | ||
8668 | # First check to see if --with-tclconfig was specified. | |
8669 | if test x"${with_tclconfig}" != x ; then | |
8670 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8671 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8672 | else | |
8673 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8674 | fi | |
8675 | fi | |
8676 | ||
8677 | # then check for a private Tcl installation | |
8678 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8679 | for i in \ | |
8680 | ../tcl \ | |
8681 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8682 | ../../tcl \ | |
8683 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8684 | ../../../tcl \ | |
8685 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8686 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8687 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8688 | break | |
8689 | fi | |
8690 | done | |
8691 | fi | |
8692 | # check in a few common install locations | |
8693 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8694 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8695 | if test -f "$i/tclConfig.sh" ; then | |
8696 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8697 | break | |
8698 | fi | |
8699 | done | |
8700 | fi | |
8701 | # check in a few other private locations | |
8702 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8703 | for i in \ | |
8704 | ${srcdir}/../tcl \ | |
8705 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8706 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8707 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8708 | break | |
8709 | fi | |
8710 | done | |
8711 | fi | |
8712 | ||
8713 | fi | |
8714 | ||
8715 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8716 | TCLCONFIG="# no Tcl configs found" | |
8717 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8718 | else | |
8719 | no_tcl= | |
8720 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8721 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8722 | fi | |
8723 | fi | |
8724 | ||
8725 | if test -z "${no_tcl}"; then | |
8726 | ||
8727 | . $TCLCONFIG | |
8728 | ||
8729 | ||
8730 | ||
8731 | ||
8732 | ||
8733 | ||
8734 | ||
8735 | ||
8736 | ||
8737 | ||
8738 | ||
8739 | ||
8740 | ||
8741 | ||
8742 | ||
8743 | ||
8744 | ||
8745 | ||
8746 | ||
8747 | ||
8748 | ||
8749 | ||
8750 | ||
8751 | ||
8752 | ||
8753 | ||
8754 | # | |
8755 | # Ok, lets find the tk configuration | |
8756 | # First, look for one uninstalled. | |
8757 | # the alternative search directory is invoked by --with-tkconfig | |
8758 | # | |
8759 | ||
8760 | if test x"${no_tk}" = x ; then | |
8761 | # we reset no_tk in case something fails here | |
8762 | no_tk=true | |
8763 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8764 | if test "${with_tkconfig+set}" = set; then | |
8765 | withval="$with_tkconfig" | |
8766 | with_tkconfig=${withval} | |
8767 | fi | |
8768 | ||
8769 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
72cfdc76 | 8770 | echo "configure:8771: checking for Tk configuration" >&5 |
3fc11d3e JM |
8771 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8773 | else | |
8774 | ||
8775 | ||
8776 | # First check to see if --with-tkconfig was specified. | |
8777 | if test x"${with_tkconfig}" != x ; then | |
8778 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8779 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8780 | else | |
8781 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8782 | fi | |
8783 | fi | |
8784 | ||
8785 | # then check for a private Tk library | |
8786 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8787 | for i in \ | |
8788 | ../tk \ | |
8789 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8790 | ../../tk \ | |
8791 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8792 | ../../../tk \ | |
8793 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8794 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8795 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8796 | break | |
8797 | fi | |
8798 | done | |
8799 | fi | |
8800 | # check in a few common install locations | |
8801 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8802 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8803 | if test -f "$i/tkConfig.sh" ; then | |
8804 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8805 | break | |
8806 | fi | |
8807 | done | |
8808 | fi | |
8809 | # check in a few other private locations | |
8810 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8811 | for i in \ | |
8812 | ${srcdir}/../tk \ | |
8813 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8814 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8815 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8816 | break | |
8817 | fi | |
8818 | done | |
8819 | fi | |
8820 | ||
8821 | fi | |
8822 | ||
8823 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8824 | TKCONFIG="# no Tk configs found" | |
8825 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8826 | else | |
8827 | no_tk= | |
8828 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8829 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8830 | fi | |
8831 | fi | |
8832 | ||
8833 | ||
8834 | ||
dd2504ab JM |
8835 | # now look for Tcl library stuff |
8836 | ||
8837 | case "${host}" in | |
8838 | *-*-cygwin*) | |
8839 | tcldir=../tcl/win/ | |
8840 | ;; | |
8841 | *) | |
8842 | tcldir=../tcl/unix/ | |
8843 | ;; | |
8844 | esac | |
8845 | ||
8846 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
8847 | ||
3fc11d3e JM |
8848 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
8849 | # point to doing Tcl. | |
8850 | if test -z "${no_tk}"; then | |
8851 | ||
8852 | if test -f "$TKCONFIG" ; then | |
8853 | . $TKCONFIG | |
8854 | fi | |
8855 | ||
8856 | ||
8857 | ||
8858 | ||
8859 | ||
8860 | ||
8861 | ||
8862 | ||
8863 | ||
8864 | ||
8865 | ||
8866 | ||
8867 | ||
8868 | ||
8869 | # | |
8870 | # Ok, lets find the tcl source trees so we can use the headers | |
8871 | # Warning: transition of version 9 to 10 will break this algorithm | |
8872 | # because 10 sorts before 9. We also look for just tcl. We have to | |
8873 | # be careful that we don't match stuff like tclX by accident. | |
8874 | # the alternative search directory is involked by --with-tclinclude | |
8875 | # | |
8876 | ||
8877 | no_tcl=true | |
8878 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
72cfdc76 | 8879 | echo "configure:8880: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
8880 | # Check whether --with-tclinclude or --without-tclinclude was given. |
8881 | if test "${with_tclinclude+set}" = set; then | |
8882 | withval="$with_tclinclude" | |
8883 | with_tclinclude=${withval} | |
8884 | fi | |
8885 | ||
8886 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
8887 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8888 | else | |
8889 | ||
8890 | # first check to see if --with-tclinclude was specified | |
8891 | if test x"${with_tclinclude}" != x ; then | |
8892 | if test -f ${with_tclinclude}/tclInt.h ; then | |
8893 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
8894 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
8895 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
8896 | else | |
8897 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
8898 | fi | |
8899 | fi | |
8900 | ||
8901 | # next check if it came with Tcl configuration file | |
8902 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8903 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
8904 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
8905 | fi | |
8906 | fi | |
8907 | ||
8908 | # next check in private source directory | |
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 | ${srcdir}/../tcl \ | |
8914 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
8915 | ${srcdir}/../../tcl \ | |
8916 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
8917 | ${srcdir}/../../../tcl \ | |
8918 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
8919 | if test -f $i/generic/tclInt.h ; then | |
8920 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8921 | break | |
8922 | fi | |
8923 | done | |
8924 | fi | |
8925 | # finally check in a few common install locations | |
8926 | # | |
8927 | # since ls returns lowest version numbers first, reverse its output | |
8928 | if test x"${ac_cv_c_tclh}" = x ; then | |
8929 | for i in \ | |
8930 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
8931 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
8932 | /usr/local/src/tcl \ | |
8933 | /usr/local/lib/tcl \ | |
8934 | ${prefix}/include ; do | |
8935 | if test -f $i/generic/tclInt.h ; then | |
8936 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8937 | break | |
8938 | fi | |
8939 | done | |
8940 | fi | |
8941 | # see if one is installed | |
8942 | if test x"${ac_cv_c_tclh}" = x ; then | |
8943 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
8944 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
72cfdc76 | 8945 | echo "configure:8946: checking for tclInt.h" >&5 |
3fc11d3e JM |
8946 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
8947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8948 | else | |
8949 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 8950 | #line 8951 "configure" |
3fc11d3e JM |
8951 | #include "confdefs.h" |
8952 | #include <tclInt.h> | |
8953 | EOF | |
8954 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 8955 | { (eval echo configure:8956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
8956 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8957 | if test -z "$ac_err"; then | |
8958 | rm -rf conftest* | |
8959 | eval "ac_cv_header_$ac_safe=yes" | |
8960 | else | |
8961 | echo "$ac_err" >&5 | |
8962 | echo "configure: failed program was:" >&5 | |
8963 | cat conftest.$ac_ext >&5 | |
8964 | rm -rf conftest* | |
8965 | eval "ac_cv_header_$ac_safe=no" | |
8966 | fi | |
8967 | rm -f conftest* | |
8968 | fi | |
8969 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
8970 | echo "$ac_t""yes" 1>&6 | |
8971 | ac_cv_c_tclh=installed | |
8972 | else | |
8973 | echo "$ac_t""no" 1>&6 | |
8974 | ac_cv_c_tclh="" | |
8975 | fi | |
8976 | ||
8977 | fi | |
8978 | ||
8979 | fi | |
8980 | ||
8981 | if test x"${ac_cv_c_tclh}" = x ; then | |
8982 | TCLHDIR="# no Tcl private headers found" | |
8983 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
8984 | fi | |
8985 | if test x"${ac_cv_c_tclh}" != x ; then | |
8986 | no_tcl="" | |
8987 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
8988 | echo "$ac_t""is installed" 1>&6 | |
8989 | TCLHDIR="" | |
8990 | else | |
8991 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
8992 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
8993 | TCLHDIR="-I${ac_cv_c_tclh}" | |
8994 | fi | |
8995 | fi | |
8996 | ||
8997 | ||
8998 | ||
8999 | ||
9000 | # | |
9001 | # Ok, lets find the tk source trees so we can use the headers | |
9002 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9003 | # in preference to any others. Same logic is used when choosing library | |
9004 | # and again with Tcl. The search order is the best place to look first, then in | |
9005 | # decreasing significance. The loop breaks if the trigger file is found. | |
9006 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9007 | # directory. This converts the path from a relative to an absolute, so | |
9008 | # recursive cache variables for the path will work right. We check all | |
9009 | # the possible paths in one loop rather than many seperate loops to speed | |
9010 | # things up. | |
9011 | # the alternative search directory is involked by --with-tkinclude | |
9012 | # | |
9013 | no_tk=true | |
9014 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
72cfdc76 | 9015 | echo "configure:9016: checking for Tk private headers" >&5 |
3fc11d3e JM |
9016 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9017 | if test "${with_tkinclude+set}" = set; then | |
9018 | withval="$with_tkinclude" | |
9019 | with_tkinclude=${withval} | |
9020 | fi | |
9021 | ||
9022 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9023 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9024 | else | |
9025 | ||
9026 | # first check to see if --with-tkinclude was specified | |
9027 | if test x"${with_tkinclude}" != x ; then | |
9028 | if test -f ${with_tkinclude}/tk.h ; then | |
9029 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9030 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9031 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9032 | else | |
9033 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9034 | fi | |
9035 | fi | |
9036 | ||
9037 | # next check if it came with Tk configuration file | |
9038 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9039 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9040 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9041 | fi | |
9042 | fi | |
9043 | ||
9044 | # next check in private source directory | |
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 | ${srcdir}/../tk \ | |
9050 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9051 | ${srcdir}/../../tk \ | |
9052 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9053 | ${srcdir}/../../../tk \ | |
9054 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9055 | if test -f $i/generic/tk.h ; then | |
9056 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9057 | break | |
9058 | fi | |
9059 | done | |
9060 | fi | |
9061 | # finally check in a few common install locations | |
9062 | # | |
9063 | # since ls returns lowest version numbers first, reverse its output | |
9064 | if test x"${ac_cv_c_tkh}" = x ; then | |
9065 | for i in \ | |
9066 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9067 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9068 | /usr/local/src/tk \ | |
9069 | /usr/local/lib/tk \ | |
9070 | ${prefix}/include ; do | |
9071 | if test -f $i/generic/tk.h ; then | |
9072 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9073 | break | |
9074 | fi | |
9075 | done | |
9076 | fi | |
9077 | # see if one is installed | |
9078 | if test x"${ac_cv_c_tkh}" = x ; then | |
9079 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9080 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
72cfdc76 | 9081 | echo "configure:9082: checking for tk.h" >&5 |
3fc11d3e JM |
9082 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9084 | else | |
9085 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 9086 | #line 9087 "configure" |
3fc11d3e JM |
9087 | #include "confdefs.h" |
9088 | #include <tk.h> | |
9089 | EOF | |
9090 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 9091 | { (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9092 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9093 | if test -z "$ac_err"; then | |
9094 | rm -rf conftest* | |
9095 | eval "ac_cv_header_$ac_safe=yes" | |
9096 | else | |
9097 | echo "$ac_err" >&5 | |
9098 | echo "configure: failed program was:" >&5 | |
9099 | cat conftest.$ac_ext >&5 | |
9100 | rm -rf conftest* | |
9101 | eval "ac_cv_header_$ac_safe=no" | |
9102 | fi | |
9103 | rm -f conftest* | |
9104 | fi | |
9105 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9106 | echo "$ac_t""yes" 1>&6 | |
9107 | ac_cv_c_tkh=installed | |
9108 | else | |
9109 | echo "$ac_t""no" 1>&6 | |
9110 | ac_cv_c_tkh="" | |
9111 | fi | |
9112 | ||
9113 | fi | |
9114 | ||
9115 | fi | |
9116 | ||
9117 | if test x"${ac_cv_c_tkh}" != x ; then | |
9118 | no_tk="" | |
9119 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9120 | echo "$ac_t""is installed" 1>&6 | |
9121 | TKHDIR="" | |
9122 | else | |
9123 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9124 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9125 | TKHDIR="-I${ac_cv_c_tkh}" | |
9126 | fi | |
9127 | else | |
9128 | TKHDIR="# no Tk directory found" | |
9129 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9130 | no_tk=true | |
9131 | fi | |
9132 | ||
9133 | ||
9134 | ||
9135 | ||
9136 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
72cfdc76 | 9137 | echo "configure:9138: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9138 | if test x"${ac_cv_c_itclh}" = x ; then |
9139 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9140 | if test -f $i/generic/itcl.h ; then | |
9141 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9142 | break | |
9143 | fi | |
9144 | done | |
9145 | fi | |
9146 | if test x"${ac_cv_c_itclh}" = x ; then | |
9147 | ITCLHDIR="# no Itcl private headers found" | |
9148 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9149 | fi | |
9150 | if test x"${ac_cv_c_itclh}" != x ; then | |
9151 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9152 | fi | |
9153 | # should always be here | |
9154 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9155 | ||
9156 | #AC_SUBST(ITCLLIB) | |
9157 | ||
9158 | ||
9159 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
72cfdc76 | 9160 | echo "configure:9161: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9161 | if test x"${ac_cv_c_itkh}" = x ; then |
9162 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9163 | if test -f $i/generic/itk.h ; then | |
9164 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9165 | break | |
9166 | fi | |
9167 | done | |
9168 | fi | |
9169 | if test x"${ac_cv_c_itkh}" = x ; then | |
9170 | ITKHDIR="# no Itk private headers found" | |
9171 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9172 | fi | |
9173 | if test x"${ac_cv_c_itkh}" != x ; then | |
9174 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9175 | fi | |
9176 | # should always be here | |
9177 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9178 | ||
9179 | #AC_SUBST(ITKLIB) | |
9180 | ||
3fc11d3e | 9181 | |
dd2504ab JM |
9182 | |
9183 | # now look for Tk library stuff | |
9184 | ||
9185 | case "${host}" in | |
9186 | *-*-cygwin*) | |
9187 | tkdir=../tk/win/ | |
9188 | ;; | |
9189 | *) | |
9190 | tkdir=../tk/unix/ | |
9191 | ;; | |
9192 | esac | |
9193 | ||
9194 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9195 | ||
3fc11d3e JM |
9196 | # now look for Itcl library stuff |
9197 | ||
9198 | ||
9199 | # | |
9200 | # Ok, lets find the itcl configuration | |
9201 | # First, look for one uninstalled. | |
9202 | # the alternative search directory is invoked by --with-itclconfig | |
9203 | # | |
9204 | ||
9205 | if test x"${no_itcl}" = x ; then | |
9206 | # we reset no_itcl in case something fails here | |
9207 | no_itcl=true | |
9208 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9209 | if test "${with_itclconfig+set}" = set; then | |
9210 | withval="$with_itclconfig" | |
9211 | with_itclconfig=${withval} | |
9212 | fi | |
9213 | ||
9214 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
72cfdc76 | 9215 | echo "configure:9216: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9216 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9217 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9218 | else | |
9219 | ||
9220 | ||
9221 | # First check to see if --with-itclconfig was specified. | |
9222 | if test x"${with_itclconfig}" != x ; then | |
9223 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9224 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9225 | else | |
9226 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9227 | fi | |
9228 | fi | |
9229 | ||
9230 | # then check for a private Itcl library | |
9231 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9232 | for i in \ | |
9233 | ../itcl/itcl \ | |
9234 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9235 | ../../itcl \ | |
9236 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9237 | ../../../itcl \ | |
9238 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9239 | if test -f "$i/itclConfig.sh" ; then | |
9240 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9241 | break | |
9242 | fi | |
9243 | done | |
9244 | fi | |
9245 | # check in a few common install locations | |
9246 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9247 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9248 | if test -f "$i/itclConfig.sh" ; then | |
9249 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9250 | break | |
9251 | fi | |
9252 | done | |
9253 | fi | |
9254 | # check in a few other private locations | |
9255 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9256 | for i in \ | |
9257 | ${srcdir}/../itcl/itcl \ | |
9258 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9259 | if test -f "$i/itclConfig.sh" ; then | |
9260 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9261 | break | |
9262 | fi | |
9263 | done | |
9264 | fi | |
9265 | ||
9266 | fi | |
9267 | ||
9268 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9269 | ITCLCONFIG="# no Itcl configs found" | |
9270 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9271 | else | |
9272 | no_itcl= | |
9273 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9274 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9275 | fi | |
9276 | fi | |
9277 | ||
9278 | if test -z "${no_itcl}"; then | |
9279 | ||
9280 | if test -f "$ITCLCONFIG" ; then | |
9281 | . $ITCLCONFIG | |
9282 | fi | |
9283 | ||
9284 | ||
9285 | ||
9286 | ||
9287 | ||
9288 | ||
9289 | ||
9290 | ||
9291 | ||
9292 | ||
3fc11d3e JM |
9293 | |
9294 | ||
9295 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9296 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9297 | fi |
9298 | ||
9299 | ||
9300 | # now look for Itk library stuff | |
9301 | ||
9302 | # | |
9303 | # Ok, lets find the itk configuration | |
9304 | # First, look for one uninstalled. | |
9305 | # the alternative search directory is invoked by --with-itkconfig | |
9306 | # | |
9307 | ||
9308 | if test x"${no_itk}" = x ; then | |
9309 | # we reset no_itk in case something fails here | |
9310 | no_itk=true | |
9311 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9312 | if test "${with_itkconfig+set}" = set; then | |
9313 | withval="$with_itkconfig" | |
9314 | with_itkconfig=${withval} | |
9315 | fi | |
9316 | ||
9317 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
72cfdc76 | 9318 | echo "configure:9319: checking for Itk configuration" >&5 |
3fc11d3e JM |
9319 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9321 | else | |
9322 | ||
9323 | ||
9324 | # First check to see if --with-itkconfig was specified. | |
9325 | if test x"${with_itkconfig}" != x ; then | |
9326 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9327 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9328 | else | |
9329 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9330 | fi | |
9331 | fi | |
9332 | ||
9333 | # then check for a private Itk library | |
9334 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9335 | for i in \ | |
9336 | ../itcl/itk \ | |
9337 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9338 | ../../itk \ | |
9339 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9340 | ../../../itk \ | |
9341 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9342 | if test -f "$i/itkConfig.sh" ; then | |
9343 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9344 | break | |
9345 | fi | |
9346 | done | |
9347 | fi | |
9348 | # check in a few common install locations | |
9349 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9350 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9351 | if test -f "$i/itkConfig.sh" ; then | |
9352 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9353 | break | |
9354 | fi | |
9355 | done | |
9356 | fi | |
9357 | # check in a few other private locations | |
9358 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9359 | for i in \ | |
9360 | ${srcdir}/../itcl/itk \ | |
9361 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9362 | if test -f "$i/itkConfig.sh" ; then | |
9363 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9364 | break | |
9365 | fi | |
9366 | done | |
9367 | fi | |
9368 | ||
9369 | fi | |
9370 | ||
9371 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9372 | ITKCONFIG="# no Itk configs found" | |
9373 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9374 | else | |
9375 | no_itk= | |
9376 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9377 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9378 | fi | |
9379 | fi | |
9380 | ||
9381 | ||
9382 | if test -z "${no_itcl}"; then | |
9383 | ||
9384 | if test -f "$ITKCONFIG" ; then | |
9385 | . $ITKCONFIG | |
9386 | fi | |
9387 | ||
9388 | ||
9389 | ||
9390 | ||
9391 | ||
9392 | ||
9393 | ||
9394 | ||
9395 | ||
9396 | ||
9397 | ||
9398 | ||
3fc11d3e | 9399 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9400 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9401 | fi |
9402 | ||
4226a5a5 | 9403 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9404 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9405 | # know whether 8.2 will or not, but I bet it will. | |
9406 | # I don't have to worry about 7.x since we don't support it. | |
9407 | GDBTK_CFLAGS="" | |
9408 | if test "$GCC" = "yes"; then | |
9409 | if test "$TCL_VERSION" != "8.0" ; then | |
9410 | GDBTK_CFLAGS="-fwritable-strings" | |
9411 | fi | |
9412 | fi | |
9413 | ||
9414 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9415 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9416 | # Yes, the ordering seems wrong here. But it isn't. |
9417 | # TK_LIBS is the list of libraries that need to be linked | |
9418 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9419 | # were in LIBS then any link tests after this point would | |
9420 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9421 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9422 | |
9423 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9424 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9425 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9426 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9427 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9428 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9429 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9430 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9431 | |
9432 | if test x$gdb_cv_os_cygwin = xyes; then | |
9433 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9434 | WIN32LDAPP="-Wl,--subsystem,console" | |
9435 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9436 | fi | |
9437 | fi | |
9438 | fi | |
ffc6a242 | 9439 | |
ffc6a242 | 9440 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9441 | fi |
9442 | ||
9443 | ||
9444 | ||
9445 | ||
9446 | ||
9447 | ||
9448 | ||
9449 | ||
9450 | ||
9451 | ||
9452 | ||
9453 | ||
9454 | ||
dd2504ab | 9455 | |
c906108c SS |
9456 | # If we find X, set shell vars x_includes and x_libraries to the |
9457 | # paths, otherwise set no_x=yes. | |
9458 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9459 | # --without-x overrides everything else, but does not touch the cache. | |
9460 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
72cfdc76 | 9461 | echo "configure:9462: checking for X" >&5 |
c906108c SS |
9462 | |
9463 | # Check whether --with-x or --without-x was given. | |
9464 | if test "${with_x+set}" = set; then | |
9465 | withval="$with_x" | |
9466 | : | |
9467 | fi | |
9468 | ||
9469 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9470 | if test "x$with_x" = xno; then | |
9471 | # The user explicitly disabled X. | |
9472 | have_x=disabled | |
9473 | else | |
9474 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9475 | # Both variables are already set. | |
9476 | have_x=yes | |
9477 | else | |
9478 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9480 | else | |
9481 | # One or both of the vars are not set, and there is no cached value. | |
9482 | ac_x_includes=NO ac_x_libraries=NO | |
9483 | rm -fr conftestdir | |
9484 | if mkdir conftestdir; then | |
9485 | cd conftestdir | |
9486 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9487 | cat > Imakefile <<'EOF' | |
9488 | acfindx: | |
9489 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9490 | EOF | |
9491 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9492 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9493 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9494 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9495 | for ac_extension in a so sl; do | |
9496 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9497 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9498 | ac_im_usrlibdir=$ac_im_libdir; break | |
9499 | fi | |
9500 | done | |
9501 | # Screen out bogus values from the imake configuration. They are | |
9502 | # bogus both because they are the default anyway, and because | |
9503 | # using them would break gcc on systems where it needs fixed includes. | |
9504 | case "$ac_im_incroot" in | |
9505 | /usr/include) ;; | |
9506 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9507 | esac | |
9508 | case "$ac_im_usrlibdir" in | |
9509 | /usr/lib | /lib) ;; | |
9510 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9511 | esac | |
9512 | fi | |
9513 | cd .. | |
9514 | rm -fr conftestdir | |
9515 | fi | |
9516 | ||
9517 | if test "$ac_x_includes" = NO; then | |
9518 | # Guess where to find include files, by looking for this one X11 .h file. | |
9519 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9520 | ||
9521 | # First, try using that file with no special directory specified. | |
9522 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 9523 | #line 9524 "configure" |
c906108c SS |
9524 | #include "confdefs.h" |
9525 | #include <$x_direct_test_include> | |
9526 | EOF | |
9527 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
72cfdc76 | 9528 | { (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9529 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9530 | if test -z "$ac_err"; then | |
9531 | rm -rf conftest* | |
9532 | # We can compile using X headers with no special include directory. | |
9533 | ac_x_includes= | |
9534 | else | |
9535 | echo "$ac_err" >&5 | |
9536 | echo "configure: failed program was:" >&5 | |
9537 | cat conftest.$ac_ext >&5 | |
9538 | rm -rf conftest* | |
9539 | # Look for the header file in a standard set of common directories. | |
9540 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9541 | for ac_dir in \ | |
9542 | /usr/X11/include \ | |
9543 | /usr/X11R6/include \ | |
9544 | /usr/X11R5/include \ | |
9545 | /usr/X11R4/include \ | |
9546 | \ | |
9547 | /usr/include/X11 \ | |
9548 | /usr/include/X11R6 \ | |
9549 | /usr/include/X11R5 \ | |
9550 | /usr/include/X11R4 \ | |
9551 | \ | |
9552 | /usr/local/X11/include \ | |
9553 | /usr/local/X11R6/include \ | |
9554 | /usr/local/X11R5/include \ | |
9555 | /usr/local/X11R4/include \ | |
9556 | \ | |
9557 | /usr/local/include/X11 \ | |
9558 | /usr/local/include/X11R6 \ | |
9559 | /usr/local/include/X11R5 \ | |
9560 | /usr/local/include/X11R4 \ | |
9561 | \ | |
9562 | /usr/X386/include \ | |
9563 | /usr/x386/include \ | |
9564 | /usr/XFree86/include/X11 \ | |
9565 | \ | |
9566 | /usr/include \ | |
9567 | /usr/local/include \ | |
9568 | /usr/unsupported/include \ | |
9569 | /usr/athena/include \ | |
9570 | /usr/local/x11r5/include \ | |
9571 | /usr/lpp/Xamples/include \ | |
9572 | \ | |
9573 | /usr/openwin/include \ | |
9574 | /usr/openwin/share/include \ | |
9575 | ; \ | |
9576 | do | |
9577 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9578 | ac_x_includes=$ac_dir | |
9579 | break | |
9580 | fi | |
9581 | done | |
9582 | fi | |
9583 | rm -f conftest* | |
9584 | fi # $ac_x_includes = NO | |
9585 | ||
9586 | if test "$ac_x_libraries" = NO; then | |
9587 | # Check for the libraries. | |
9588 | ||
9589 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9590 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9591 | ||
9592 | # See if we find them without any special options. | |
9593 | # Don't add to $LIBS permanently. | |
9594 | ac_save_LIBS="$LIBS" | |
9595 | LIBS="-l$x_direct_test_library $LIBS" | |
9596 | cat > conftest.$ac_ext <<EOF | |
72cfdc76 | 9597 | #line 9598 "configure" |
c906108c SS |
9598 | #include "confdefs.h" |
9599 | ||
9600 | int main() { | |
9601 | ${x_direct_test_function}() | |
9602 | ; return 0; } | |
9603 | EOF | |
72cfdc76 | 9604 | if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9605 | rm -rf conftest* |
9606 | LIBS="$ac_save_LIBS" | |
9607 | # We can link X programs with no special library path. | |
9608 | ac_x_libraries= | |
9609 | else | |
9610 | echo "configure: failed program was:" >&5 | |
9611 | cat conftest.$ac_ext >&5 | |
9612 | rm -rf conftest* | |
9613 | LIBS="$ac_save_LIBS" | |
9614 | # First see if replacing the include by lib works. | |
9615 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9616 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9617 | /usr/X11/lib \ | |
9618 | /usr/X11R6/lib \ | |
9619 | /usr/X11R5/lib \ | |
9620 | /usr/X11R4/lib \ | |
9621 | \ | |
9622 | /usr/lib/X11 \ | |
9623 | /usr/lib/X11R6 \ | |
9624 | /usr/lib/X11R5 \ | |
9625 | /usr/lib/X11R4 \ | |
9626 | \ | |
9627 | /usr/local/X11/lib \ | |
9628 | /usr/local/X11R6/lib \ | |
9629 | /usr/local/X11R5/lib \ | |
9630 | /usr/local/X11R4/lib \ | |
9631 | \ | |
9632 | /usr/local/lib/X11 \ | |
9633 | /usr/local/lib/X11R6 \ | |
9634 | /usr/local/lib/X11R5 \ | |
9635 | /usr/local/lib/X11R4 \ | |
9636 | \ | |
9637 | /usr/X386/lib \ | |
9638 | /usr/x386/lib \ | |
9639 | /usr/XFree86/lib/X11 \ | |
9640 | \ | |
9641 | /usr/lib \ | |
9642 | /usr/local/lib \ | |
9643 | /usr/unsupported/lib \ | |
9644 | /usr/athena/lib \ | |
9645 | /usr/local/x11r5/lib \ | |
9646 | /usr/lpp/Xamples/lib \ | |
9647 | /lib/usr/lib/X11 \ | |
9648 | \ | |
9649 | /usr/openwin/lib \ | |
9650 | /usr/openwin/share/lib \ | |
9651 | ; \ | |
9652 | do | |
9653 | for ac_extension in a so sl; do | |
9654 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9655 | ac_x_libraries=$ac_dir | |
9656 | break 2 | |
9657 | fi | |
9658 | done | |
9659 | done | |
9660 | fi | |
9661 | rm -f conftest* | |
9662 | fi # $ac_x_libraries = NO | |
9663 | ||
9664 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9665 | # Didn't find X anywhere. Cache the known absence of X. | |
9666 | ac_cv_have_x="have_x=no" | |
9667 | else | |
9668 | # Record where we found X for the cache. | |
9669 | ac_cv_have_x="have_x=yes \ | |
9670 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9671 | fi | |
9672 | fi | |
9673 | fi | |
9674 | eval "$ac_cv_have_x" | |
9675 | fi # $with_x != no | |
9676 | ||
9677 | if test "$have_x" != yes; then | |
9678 | echo "$ac_t""$have_x" 1>&6 | |
9679 | no_x=yes | |
9680 | else | |
9681 | # If each of the values was on the command line, it overrides each guess. | |
9682 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9683 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9684 | # Update the cache value to reflect the command line values. | |
9685 | ac_cv_have_x="have_x=yes \ | |
9686 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9687 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9688 | fi | |
9689 | ||
9690 | ||
7a292a7a SS |
9691 | |
9692 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9693 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9694 | # This code just checks for a few cases where we'd like to ignore those | |
9695 | # definitions, even when they're present in the '.mt' file. These cases | |
9696 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9697 | # not part of the source tree. |
7a292a7a SS |
9698 | # |
9699 | # Check whether --enable-sim or --disable-sim was given. | |
9700 | if test "${enable_sim+set}" = set; then | |
9701 | enableval="$enable_sim" | |
9702 | echo "enable_sim = $enable_sim"; | |
9703 | echo "enableval = ${enableval}"; | |
9704 | case "${enableval}" in | |
9705 | yes) ignore_sim=false ;; | |
9706 | no) ignore_sim=true ;; | |
9707 | *) ignore_sim=false ;; | |
9708 | esac | |
9709 | else | |
9710 | ignore_sim=false | |
9711 | fi | |
9712 | ||
9713 | ||
9714 | if test ! -d "${srcdir}/../sim"; then | |
9715 | ignore_sim=true | |
9716 | fi | |
9717 | ||
9718 | if test "${ignore_sim}" = "true"; then | |
9719 | IGNORE_SIM="SIM=" | |
9720 | IGNORE_SIM_OBS="SIM_OBS=" | |
9721 | else | |
9722 | IGNORE_SIM="" | |
9723 | IGNORE_SIM_OBS="" | |
9724 | cat >> confdefs.h <<\EOF | |
9725 | #define WITH_SIM 1 | |
9726 | EOF | |
9727 | ||
9728 | fi | |
9729 | ||
9730 | ||
9731 | ||
c906108c SS |
9732 | |
9733 | ||
9734 | ||
9735 | ||
9736 | ||
9737 | ||
dfcd3bfb | 9738 | |
e56ac5c3 AC |
9739 | |
9740 | ||
b3a90332 AC |
9741 | |
9742 | ||
b46cd165 | 9743 | |
c906108c SS |
9744 | # target_subdir is used by the testsuite to find the target libraries. |
9745 | target_subdir= | |
9746 | if test "${host}" != "${target}"; then | |
9747 | target_subdir="${target_alias}/" | |
9748 | fi | |
9749 | ||
9750 | ||
9751 | frags= | |
9752 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9753 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9754 | # When building a native debuger the .mh file containing things |
9755 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9756 | # since it no longer contains anything useful. | |
9757 | if test "${target}" = "${host}"; then | |
9758 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9759 | else | |
9760 | host_makefile_frag=/dev/null | |
9761 | fi | |
c906108c SS |
9762 | fi |
9763 | frags="$frags $host_makefile_frag" | |
9764 | ||
9765 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9766 | if test ! -f ${target_makefile_frag}; then | |
9767 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9768 | fi | |
9769 | frags="$frags $target_makefile_frag" | |
9770 | ||
9771 | ||
9772 | ||
9773 | ||
9774 | ||
9775 | hostfile=`sed -n ' | |
9776 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9777 | ' ${host_makefile_frag}` | |
9778 | ||
9779 | targetfile=`sed -n ' | |
9780 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9781 | ' ${target_makefile_frag}` | |
9782 | ||
6166d547 AC |
9783 | GDB_MULTI_ARCH=`sed -n ' |
9784 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9785 | ' ${target_makefile_frag}` | |
9786 | ||
c906108c | 9787 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9788 | # We pick this up from the host configuration file (.mh) because we |
9789 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9790 | nativefile=`sed -n ' |
9791 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9792 | ' ${host_makefile_frag}` | |
c906108c SS |
9793 | fi |
9794 | ||
9795 | ||
6166d547 AC |
9796 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9797 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9798 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9799 | # will be the default. | |
9800 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9801 | case "${gdb_multi_arch}" in | |
9802 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9803 | no ) GDB_MULTI_ARCH=0 ;; | |
9804 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9805 | esac | |
9806 | fi | |
9807 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9808 | cat >> confdefs.h <<EOF | |
9809 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9810 | EOF | |
9811 | ||
9812 | fi | |
6c5cfe5b | 9813 | # Warn the user when they use an old practice |
6166d547 AC |
9814 | case "${GDB_MULTI_ARCH}" in |
9815 | "" ) ;; | |
9816 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
9817 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
9818 | GDB_MULTI_ARCH_PURE ) | |
9819 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 9820 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 9821 | targetfile="" |
6166d547 AC |
9822 | fi ;; |
9823 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
9824 | esac | |
9825 | ||
b00a8037 DJ |
9826 | if test x"${gdb_osabi}" != x ; then |
9827 | cat >> confdefs.h <<EOF | |
9828 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
9829 | EOF | |
9830 | ||
9831 | fi | |
9832 | ||
8dcde887 MK |
9833 | # Enable multi-ice-gdb-server. |
9834 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
9835 | if test "${enable_multi_ice+set}" = set; then | |
9836 | enableval="$enable_multi_ice" | |
9837 | case $enableval in | |
9838 | yes | no) | |
9839 | ;; | |
9840 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
9841 | esac | |
96baa820 JM |
9842 | fi |
9843 | ||
8dcde887 MK |
9844 | if test "x$enable_multi_ice" = xyes; then |
9845 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
9846 | fi |
9847 | ||
8dcde887 MK |
9848 | # We only build gdbserver automatically if host and target are the same. |
9849 | if test "x$target" = "x$host"; then | |
9850 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
b00a8037 | 9851 | echo "configure:9852: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
9852 | if test "x$build_gdbserver" = xyes; then |
9853 | configdirs="$configdirs gdbserver" | |
9854 | echo "$ac_t""yes" 1>&6 | |
9855 | else | |
9856 | echo "$ac_t""no" 1>&6 | |
9857 | fi | |
9858 | fi | |
9859 | ||
9860 | subdirs="doc testsuite $configdirs" | |
9861 | ||
96baa820 | 9862 | |
c906108c | 9863 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
9864 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
9865 | # version. | |
c906108c SS |
9866 | |
9867 | files= | |
9868 | links= | |
5a2402b8 | 9869 | |
c906108c | 9870 | rm -f xm.h |
5a2402b8 | 9871 | xm_h="" |
c906108c | 9872 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
9873 | xm_h=xm.h |
9874 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
9875 | files="${files} ${GDB_XM_FILE}" | |
9876 | links="${links} xm.h" | |
9877 | cat >> confdefs.h <<EOF | |
9878 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
9879 | EOF | |
9880 | ||
c906108c | 9881 | fi |
5a2402b8 AC |
9882 | |
9883 | ||
c906108c | 9884 | rm -f tm.h |
5a2402b8 | 9885 | tm_h="" |
c906108c | 9886 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
9887 | tm_h=tm.h |
9888 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
9889 | files="${files} ${GDB_TM_FILE}" | |
9890 | links="${links} tm.h" | |
9891 | cat >> confdefs.h <<EOF | |
9892 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
9893 | EOF | |
9894 | ||
c906108c | 9895 | fi |
5a2402b8 AC |
9896 | |
9897 | ||
c906108c | 9898 | rm -f nm.h |
5a2402b8 | 9899 | nm_h="" |
c906108c | 9900 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
9901 | nm_h=nm.h |
9902 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
9903 | files="${files} ${GDB_NM_FILE}" | |
9904 | links="${links} nm.h" | |
9905 | cat >> confdefs.h <<EOF | |
9906 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
9907 | EOF | |
9908 | ||
c906108c | 9909 | fi |
5a2402b8 AC |
9910 | |
9911 | ||
c906108c SS |
9912 | |
9913 | ||
9914 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
b00a8037 | 9915 | echo "configure:9916: checking for Cygwin environment" >&5 |
c906108c SS |
9916 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
9917 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9918 | else | |
9919 | cat > conftest.$ac_ext <<EOF | |
b00a8037 | 9920 | #line 9921 "configure" |
c906108c SS |
9921 | #include "confdefs.h" |
9922 | ||
9923 | int main() { | |
9924 | ||
9925 | #ifndef __CYGWIN__ | |
9926 | #define __CYGWIN__ __CYGWIN32__ | |
9927 | #endif | |
9928 | return __CYGWIN__; | |
9929 | ; return 0; } | |
9930 | EOF | |
b00a8037 | 9931 | if { (eval echo configure:9932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9932 | rm -rf conftest* |
9933 | ac_cv_cygwin=yes | |
9934 | else | |
9935 | echo "configure: failed program was:" >&5 | |
9936 | cat conftest.$ac_ext >&5 | |
9937 | rm -rf conftest* | |
9938 | ac_cv_cygwin=no | |
9939 | fi | |
9940 | rm -f conftest* | |
9941 | rm -f conftest* | |
9942 | fi | |
9943 | ||
9944 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
9945 | CYGWIN= | |
9946 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
9947 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
b00a8037 | 9948 | echo "configure:9949: checking for mingw32 environment" >&5 |
c906108c SS |
9949 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
9950 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9951 | else | |
9952 | cat > conftest.$ac_ext <<EOF | |
b00a8037 | 9953 | #line 9954 "configure" |
c906108c SS |
9954 | #include "confdefs.h" |
9955 | ||
9956 | int main() { | |
9957 | return __MINGW32__; | |
9958 | ; return 0; } | |
9959 | EOF | |
b00a8037 | 9960 | if { (eval echo configure:9961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9961 | rm -rf conftest* |
9962 | ac_cv_mingw32=yes | |
9963 | else | |
9964 | echo "configure: failed program was:" >&5 | |
9965 | cat conftest.$ac_ext >&5 | |
9966 | rm -rf conftest* | |
9967 | ac_cv_mingw32=no | |
9968 | fi | |
9969 | rm -f conftest* | |
9970 | rm -f conftest* | |
9971 | fi | |
9972 | ||
9973 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
9974 | MINGW32= | |
9975 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
9976 | ||
9977 | ||
9978 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b00a8037 | 9979 | echo "configure:9980: checking for executable suffix" >&5 |
c906108c SS |
9980 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
9981 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9982 | else | |
9983 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
9984 | ac_cv_exeext=.exe | |
9985 | else | |
9986 | rm -f conftest* | |
9987 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
9988 | ac_cv_exeext= | |
b00a8037 | 9989 | if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
9990 | for file in conftest.*; do |
9991 | case $file in | |
b00a8037 | 9992 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
9993 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
9994 | esac | |
9995 | done | |
9996 | else | |
9997 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
9998 | fi | |
9999 | rm -f conftest* | |
10000 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10001 | fi | |
10002 | fi | |
10003 | ||
10004 | EXEEXT="" | |
10005 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10006 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10007 | ac_exeext=$EXEEXT | |
10008 | ||
10009 | ||
234b45d4 KB |
10010 | |
10011 | cat >> confdefs.h <<\EOF | |
10012 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10013 | EOF | |
10014 | ||
10015 | ||
10016 | ||
10017 | ||
10018 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10019 | if test "${with_libiconv_prefix+set}" = set; then | |
10020 | withval="$with_libiconv_prefix" | |
10021 | ||
10022 | for dir in `echo "$withval" | tr : ' '`; do | |
10023 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10024 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10025 | done | |
10026 | ||
10027 | fi | |
10028 | ||
10029 | ||
10030 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
b00a8037 | 10031 | echo "configure:10032: checking for iconv" >&5 |
234b45d4 KB |
10032 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10034 | else | |
10035 | ||
10036 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10037 | am_cv_lib_iconv=no | |
10038 | cat > conftest.$ac_ext <<EOF | |
b00a8037 | 10039 | #line 10040 "configure" |
234b45d4 KB |
10040 | #include "confdefs.h" |
10041 | #include <stdlib.h> | |
10042 | #include <iconv.h> | |
10043 | int main() { | |
10044 | iconv_t cd = iconv_open("",""); | |
10045 | iconv(cd,NULL,NULL,NULL,NULL); | |
10046 | iconv_close(cd); | |
10047 | ; return 0; } | |
10048 | EOF | |
b00a8037 | 10049 | if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10050 | rm -rf conftest* |
10051 | am_cv_func_iconv=yes | |
10052 | else | |
10053 | echo "configure: failed program was:" >&5 | |
10054 | cat conftest.$ac_ext >&5 | |
10055 | fi | |
10056 | rm -f conftest* | |
10057 | if test "$am_cv_func_iconv" != yes; then | |
10058 | am_save_LIBS="$LIBS" | |
10059 | LIBS="$LIBS -liconv" | |
10060 | cat > conftest.$ac_ext <<EOF | |
b00a8037 | 10061 | #line 10062 "configure" |
234b45d4 KB |
10062 | #include "confdefs.h" |
10063 | #include <stdlib.h> | |
10064 | #include <iconv.h> | |
10065 | int main() { | |
10066 | iconv_t cd = iconv_open("",""); | |
10067 | iconv(cd,NULL,NULL,NULL,NULL); | |
10068 | iconv_close(cd); | |
10069 | ; return 0; } | |
10070 | EOF | |
b00a8037 | 10071 | if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10072 | rm -rf conftest* |
10073 | am_cv_lib_iconv=yes | |
10074 | am_cv_func_iconv=yes | |
10075 | else | |
10076 | echo "configure: failed program was:" >&5 | |
10077 | cat conftest.$ac_ext >&5 | |
10078 | fi | |
10079 | rm -f conftest* | |
10080 | LIBS="$am_save_LIBS" | |
10081 | fi | |
10082 | ||
10083 | fi | |
10084 | ||
10085 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10086 | if test "$am_cv_func_iconv" = yes; then | |
10087 | cat >> confdefs.h <<\EOF | |
10088 | #define HAVE_ICONV 1 | |
10089 | EOF | |
10090 | ||
10091 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
b00a8037 | 10092 | echo "configure:10093: checking for iconv declaration" >&5 |
234b45d4 KB |
10093 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10094 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10095 | else | |
10096 | ||
10097 | cat > conftest.$ac_ext <<EOF | |
b00a8037 | 10098 | #line 10099 "configure" |
234b45d4 KB |
10099 | #include "confdefs.h" |
10100 | ||
10101 | #include <stdlib.h> | |
10102 | #include <iconv.h> | |
10103 | extern | |
10104 | #ifdef __cplusplus | |
10105 | "C" | |
10106 | #endif | |
10107 | #if defined(__STDC__) || defined(__cplusplus) | |
10108 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10109 | #else | |
10110 | size_t iconv(); | |
10111 | #endif | |
10112 | ||
10113 | int main() { | |
10114 | ||
10115 | ; return 0; } | |
10116 | EOF | |
b00a8037 | 10117 | if { (eval echo configure:10118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10118 | rm -rf conftest* |
10119 | am_cv_proto_iconv_arg1="" | |
10120 | else | |
10121 | echo "configure: failed program was:" >&5 | |
10122 | cat conftest.$ac_ext >&5 | |
10123 | rm -rf conftest* | |
10124 | am_cv_proto_iconv_arg1="const" | |
10125 | fi | |
10126 | rm -f conftest* | |
10127 | 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);" | |
10128 | fi | |
10129 | ||
10130 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10131 | echo "$ac_t""${ac_t:- | |
10132 | }$am_cv_proto_iconv" 1>&6 | |
10133 | cat >> confdefs.h <<EOF | |
10134 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10135 | EOF | |
10136 | ||
10137 | fi | |
10138 | LIBICONV= | |
10139 | if test "$am_cv_lib_iconv" = yes; then | |
10140 | LIBICONV="-liconv" | |
10141 | fi | |
10142 | ||
10143 | ||
10144 | ||
c906108c SS |
10145 | trap '' 1 2 15 |
10146 | cat > confcache <<\EOF | |
10147 | # This file is a shell script that caches the results of configure | |
10148 | # tests run on this system so they can be shared between configure | |
10149 | # scripts and configure runs. It is not useful on other systems. | |
10150 | # If it contains results you don't want to keep, you may remove or edit it. | |
10151 | # | |
10152 | # By default, configure uses ./config.cache as the cache file, | |
10153 | # creating it if it does not exist already. You can give configure | |
10154 | # the --cache-file=FILE option to use a different cache file; that is | |
10155 | # what configure does when it calls configure scripts in | |
10156 | # subdirectories, so they share the cache. | |
10157 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10158 | # config.status only pays attention to the cache file if you give it the | |
10159 | # --recheck option to rerun configure. | |
10160 | # | |
10161 | EOF | |
10162 | # The following way of writing the cache mishandles newlines in values, | |
10163 | # but we know of no workaround that is simple, portable, and efficient. | |
10164 | # So, don't put newlines in cache variables' values. | |
10165 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10166 | # and sets the high bit in the cache file unless we assign to the vars. | |
10167 | (set) 2>&1 | | |
10168 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10169 | *ac_space=\ *) | |
10170 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10171 | # turns \\\\ into \\, and sed turns \\ into \). | |
10172 | sed -n \ | |
10173 | -e "s/'/'\\\\''/g" \ | |
10174 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10175 | ;; | |
10176 | *) | |
10177 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10178 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10179 | ;; | |
10180 | esac >> confcache | |
10181 | if cmp -s $cache_file confcache; then | |
10182 | : | |
10183 | else | |
10184 | if test -w $cache_file; then | |
10185 | echo "updating cache $cache_file" | |
10186 | cat confcache > $cache_file | |
10187 | else | |
10188 | echo "not updating unwritable cache $cache_file" | |
10189 | fi | |
10190 | fi | |
10191 | rm -f confcache | |
10192 | ||
10193 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10194 | ||
10195 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10196 | # Let make expand exec_prefix. | |
10197 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10198 | ||
10199 | # Any assignment to VPATH causes Sun make to only execute | |
10200 | # the first set of double-colon rules, so remove it if not needed. | |
10201 | # If there is a colon in the path, we need to keep it. | |
10202 | if test "x$srcdir" = x.; then | |
10203 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10204 | fi | |
10205 | ||
10206 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10207 | ||
10208 | DEFS=-DHAVE_CONFIG_H | |
10209 | ||
10210 | # Without the "./", some shells look in PATH for config.status. | |
10211 | : ${CONFIG_STATUS=./config.status} | |
10212 | ||
10213 | echo creating $CONFIG_STATUS | |
10214 | rm -f $CONFIG_STATUS | |
10215 | cat > $CONFIG_STATUS <<EOF | |
10216 | #! /bin/sh | |
10217 | # Generated automatically by configure. | |
10218 | # Run this file to recreate the current configuration. | |
10219 | # This directory was configured as follows, | |
10220 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10221 | # | |
10222 | # $0 $ac_configure_args | |
10223 | # | |
10224 | # Compiler output produced by configure, useful for debugging | |
10225 | # configure, is in ./config.log if it exists. | |
10226 | ||
10227 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10228 | for ac_option | |
10229 | do | |
10230 | case "\$ac_option" in | |
10231 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10232 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10233 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10234 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10235 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10236 | exit 0 ;; | |
10237 | -help | --help | --hel | --he | --h) | |
10238 | echo "\$ac_cs_usage"; exit 0 ;; | |
10239 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10240 | esac | |
10241 | done | |
10242 | ||
10243 | ac_given_srcdir=$srcdir | |
10244 | ac_given_INSTALL="$INSTALL" | |
10245 | ||
ed952ac5 | 10246 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10247 | EOF |
10248 | cat >> $CONFIG_STATUS <<EOF | |
10249 | ||
10250 | # Protect against being on the right side of a sed subst in config.status. | |
10251 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10252 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10253 | $ac_vpsub | |
10254 | $extrasub | |
10255 | s%@SHELL@%$SHELL%g | |
10256 | s%@CFLAGS@%$CFLAGS%g | |
10257 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10258 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10259 | s%@FFLAGS@%$FFLAGS%g | |
10260 | s%@DEFS@%$DEFS%g | |
10261 | s%@LDFLAGS@%$LDFLAGS%g | |
10262 | s%@LIBS@%$LIBS%g | |
10263 | s%@exec_prefix@%$exec_prefix%g | |
10264 | s%@prefix@%$prefix%g | |
10265 | s%@program_transform_name@%$program_transform_name%g | |
10266 | s%@bindir@%$bindir%g | |
10267 | s%@sbindir@%$sbindir%g | |
10268 | s%@libexecdir@%$libexecdir%g | |
10269 | s%@datadir@%$datadir%g | |
10270 | s%@sysconfdir@%$sysconfdir%g | |
10271 | s%@sharedstatedir@%$sharedstatedir%g | |
10272 | s%@localstatedir@%$localstatedir%g | |
10273 | s%@libdir@%$libdir%g | |
10274 | s%@includedir@%$includedir%g | |
10275 | s%@oldincludedir@%$oldincludedir%g | |
10276 | s%@infodir@%$infodir%g | |
10277 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10278 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10279 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10280 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10281 | s%@CC@%$CC%g |
10282 | s%@CPP@%$CPP%g | |
10283 | s%@host@%$host%g | |
10284 | s%@host_alias@%$host_alias%g | |
10285 | s%@host_cpu@%$host_cpu%g | |
10286 | s%@host_vendor@%$host_vendor%g | |
10287 | s%@host_os@%$host_os%g | |
10288 | s%@target@%$target%g | |
10289 | s%@target_alias@%$target_alias%g | |
10290 | s%@target_cpu@%$target_cpu%g | |
10291 | s%@target_vendor@%$target_vendor%g | |
10292 | s%@target_os@%$target_os%g | |
10293 | s%@build@%$build%g | |
10294 | s%@build_alias@%$build_alias%g | |
10295 | s%@build_cpu@%$build_cpu%g | |
10296 | s%@build_vendor@%$build_vendor%g | |
10297 | s%@build_os@%$build_os%g | |
c906108c | 10298 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10299 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10300 | s%@ALLOCA@%$ALLOCA%g |
10301 | s%@USE_NLS@%$USE_NLS%g | |
10302 | s%@MSGFMT@%$MSGFMT%g | |
10303 | s%@GMSGFMT@%$GMSGFMT%g | |
10304 | s%@XGETTEXT@%$XGETTEXT%g | |
10305 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10306 | s%@CATALOGS@%$CATALOGS%g | |
10307 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10308 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10309 | s%@GMOFILES@%$GMOFILES%g | |
10310 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10311 | s%@INTLDEPS@%$INTLDEPS%g | |
10312 | s%@INTLLIBS@%$INTLLIBS%g | |
10313 | s%@INTLOBJS@%$INTLOBJS%g | |
10314 | s%@POFILES@%$POFILES%g | |
10315 | s%@POSUB@%$POSUB%g | |
10316 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10317 | s%@GT_NO@%$GT_NO%g | |
10318 | s%@GT_YES@%$GT_YES%g | |
10319 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10320 | s%@l@%$l%g | |
8dcde887 | 10321 | s%@subdirs@%$subdirs%g |
7a292a7a | 10322 | s%@AWK@%$AWK%g |
c906108c SS |
10323 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10324 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10325 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10326 | s%@LN_S@%$LN_S%g |
10327 | s%@YACC@%$YACC%g | |
c906108c | 10328 | s%@AR@%$AR%g |
95ca63c4 CF |
10329 | s%@DLLTOOL@%$DLLTOOL%g |
10330 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10331 | s%@MIG@%$MIG%g |
c906108c | 10332 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 10333 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10334 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10335 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10336 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10337 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10338 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10339 | s%@LIBGUI@%$LIBGUI%g |
10340 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10341 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10342 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10343 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10344 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10345 | s%@TCL_CC@%$TCL_CC%g | |
10346 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10347 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10348 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10349 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10350 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10351 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10352 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10353 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10354 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10355 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10356 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10357 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10358 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10359 | s%@TK_VERSION@%$TK_VERSION%g | |
10360 | s%@TK_DEFS@%$TK_DEFS%g | |
10361 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10362 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10363 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10364 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10365 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10366 | s%@TCLHDIR@%$TCLHDIR%g | |
10367 | s%@TKHDIR@%$TKHDIR%g | |
10368 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10369 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10370 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10371 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10372 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10373 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10374 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10375 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10376 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10377 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10378 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10379 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10380 | s%@X_CFLAGS@%$X_CFLAGS%g |
10381 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10382 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10383 | s%@TCL_DEPS@%$TCL_DEPS%g |
10384 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10385 | s%@ITCLLIB@%$ITCLLIB%g |
10386 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10387 | s%@ITKLIB@%$ITKLIB%g | |
10388 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10389 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10390 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10391 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10392 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10393 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
10394 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
10395 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 10396 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10397 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10398 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10399 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10400 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10401 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10402 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10403 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10404 | s%@target_subdir@%$target_subdir%g |
10405 | /@host_makefile_frag@/r $host_makefile_frag | |
10406 | s%@host_makefile_frag@%%g | |
10407 | /@target_makefile_frag@/r $target_makefile_frag | |
10408 | s%@target_makefile_frag@%%g | |
10409 | s%@frags@%$frags%g | |
5a2402b8 AC |
10410 | s%@xm_h@%$xm_h%g |
10411 | s%@tm_h@%$tm_h%g | |
10412 | s%@nm_h@%$nm_h%g | |
c906108c | 10413 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10414 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10415 | |
10416 | CEOF | |
10417 | EOF | |
10418 | ||
10419 | cat >> $CONFIG_STATUS <<\EOF | |
10420 | ||
10421 | # Split the substitutions into bite-sized pieces for seds with | |
10422 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10423 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10424 | ac_file=1 # Number of current file. |
10425 | ac_beg=1 # First line for current file. | |
10426 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10427 | ac_more_lines=: | |
10428 | ac_sed_cmds="" | |
10429 | while $ac_more_lines; do | |
10430 | if test $ac_beg -gt 1; then | |
10431 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10432 | else | |
10433 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10434 | fi | |
10435 | if test ! -s conftest.s$ac_file; then | |
10436 | ac_more_lines=false | |
10437 | rm -f conftest.s$ac_file | |
10438 | else | |
10439 | if test -z "$ac_sed_cmds"; then | |
10440 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10441 | else | |
10442 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10443 | fi | |
10444 | ac_file=`expr $ac_file + 1` | |
10445 | ac_beg=$ac_end | |
10446 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10447 | fi | |
10448 | done | |
10449 | if test -z "$ac_sed_cmds"; then | |
10450 | ac_sed_cmds=cat | |
10451 | fi | |
10452 | EOF | |
10453 | ||
10454 | cat >> $CONFIG_STATUS <<EOF | |
10455 | ||
ed952ac5 | 10456 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10457 | EOF |
10458 | cat >> $CONFIG_STATUS <<\EOF | |
10459 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10460 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10461 | case "$ac_file" in | |
10462 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10463 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10464 | *) ac_file_in="${ac_file}.in" ;; | |
10465 | esac | |
10466 | ||
10467 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10468 | ||
10469 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10470 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10471 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10472 | # The file is in a subdirectory. | |
10473 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10474 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10475 | # A "../" for each directory in $ac_dir_suffix. | |
10476 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10477 | else | |
10478 | ac_dir_suffix= ac_dots= | |
10479 | fi | |
10480 | ||
10481 | case "$ac_given_srcdir" in | |
10482 | .) srcdir=. | |
10483 | if test -z "$ac_dots"; then top_srcdir=. | |
10484 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10485 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10486 | *) # Relative path. | |
10487 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10488 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10489 | esac | |
10490 | ||
10491 | case "$ac_given_INSTALL" in | |
10492 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10493 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10494 | esac | |
10495 | ||
10496 | echo creating "$ac_file" | |
10497 | rm -f "$ac_file" | |
10498 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10499 | case "$ac_file" in | |
10500 | *Makefile*) ac_comsub="1i\\ | |
10501 | # $configure_input" ;; | |
10502 | *) ac_comsub= ;; | |
10503 | esac | |
10504 | ||
10505 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10506 | sed -e "$ac_comsub | |
10507 | s%@configure_input@%$configure_input%g | |
10508 | s%@srcdir@%$srcdir%g | |
10509 | s%@top_srcdir@%$top_srcdir%g | |
10510 | s%@INSTALL@%$INSTALL%g | |
10511 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10512 | fi; done | |
10513 | rm -f conftest.s* | |
10514 | ||
10515 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10516 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10517 | # | |
10518 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10519 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10520 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10521 | ac_dC='\3' | |
10522 | ac_dD='%g' | |
10523 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10524 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10525 | ac_uB='\([ ]\)%\1#\2define\3' | |
10526 | ac_uC=' ' | |
10527 | ac_uD='\4%g' | |
10528 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10529 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10530 | ac_eB='$%\1#\2define\3' | |
10531 | ac_eC=' ' | |
10532 | ac_eD='%g' | |
10533 | ||
10534 | if test "${CONFIG_HEADERS+set}" != set; then | |
10535 | EOF | |
10536 | cat >> $CONFIG_STATUS <<EOF | |
10537 | CONFIG_HEADERS="config.h:config.in" | |
10538 | EOF | |
10539 | cat >> $CONFIG_STATUS <<\EOF | |
10540 | fi | |
10541 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10542 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10543 | case "$ac_file" in | |
10544 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10545 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10546 | *) ac_file_in="${ac_file}.in" ;; | |
10547 | esac | |
10548 | ||
10549 | echo creating $ac_file | |
10550 | ||
10551 | rm -f conftest.frag conftest.in conftest.out | |
10552 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10553 | cat $ac_file_inputs > conftest.in | |
10554 | ||
10555 | EOF | |
10556 | ||
10557 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10558 | # the proper values into config.h.in to produce config.h. And first: | |
10559 | # Protect against being on the right side of a sed subst in config.status. | |
10560 | # Protect against being in an unquoted here document in config.status. | |
10561 | rm -f conftest.vals | |
10562 | cat > conftest.hdr <<\EOF | |
10563 | s/[\\&%]/\\&/g | |
10564 | s%[\\$`]%\\&%g | |
10565 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10566 | s%ac_d%ac_u%gp | |
10567 | s%ac_u%ac_e%gp | |
10568 | EOF | |
10569 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10570 | rm -f conftest.hdr | |
10571 | ||
10572 | # This sed command replaces #undef with comments. This is necessary, for | |
10573 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10574 | # on some systems where configure will not decide to define it. | |
10575 | cat >> conftest.vals <<\EOF | |
10576 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10577 | EOF | |
10578 | ||
10579 | # Break up conftest.vals because some shells have a limit on | |
10580 | # the size of here documents, and old seds have small limits too. | |
10581 | ||
10582 | rm -f conftest.tail | |
10583 | while : | |
10584 | do | |
10585 | ac_lines=`grep -c . conftest.vals` | |
10586 | # grep -c gives empty output for an empty file on some AIX systems. | |
10587 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10588 | # Write a limited-size here document to conftest.frag. | |
10589 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10590 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10591 | echo 'CEOF | |
10592 | sed -f conftest.frag conftest.in > conftest.out | |
10593 | rm -f conftest.in | |
10594 | mv conftest.out conftest.in | |
10595 | ' >> $CONFIG_STATUS | |
10596 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10597 | rm -f conftest.vals | |
10598 | mv conftest.tail conftest.vals | |
10599 | done | |
10600 | rm -f conftest.vals | |
10601 | ||
10602 | cat >> $CONFIG_STATUS <<\EOF | |
10603 | rm -f conftest.frag conftest.h | |
10604 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10605 | cat conftest.in >> conftest.h | |
10606 | rm -f conftest.in | |
10607 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10608 | echo "$ac_file is unchanged" | |
10609 | rm -f conftest.h | |
10610 | else | |
10611 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10612 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10613 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10614 | # The file is in a subdirectory. | |
10615 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10616 | fi | |
10617 | rm -f $ac_file | |
10618 | mv conftest.h $ac_file | |
10619 | fi | |
10620 | fi; done | |
10621 | ||
10622 | EOF | |
10623 | ||
10624 | cat >> $CONFIG_STATUS <<EOF | |
10625 | ac_sources="$files" | |
10626 | ac_dests="$links" | |
10627 | EOF | |
10628 | ||
10629 | cat >> $CONFIG_STATUS <<\EOF | |
10630 | srcdir=$ac_given_srcdir | |
10631 | while test -n "$ac_sources"; do | |
10632 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10633 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10634 | ||
10635 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10636 | ||
10637 | if test ! -r $srcdir/$ac_source; then | |
10638 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10639 | fi | |
10640 | rm -f $ac_dest | |
10641 | ||
10642 | # Make relative symlinks. | |
10643 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10644 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10645 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10646 | # The dest file is in a subdirectory. | |
10647 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10648 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10649 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10650 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10651 | else | |
10652 | ac_dest_dir_suffix= ac_dots= | |
10653 | fi | |
10654 | ||
10655 | case "$srcdir" in | |
10656 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10657 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10658 | esac | |
10659 | ||
10660 | # Make a symlink if possible; otherwise try a hard link. | |
10661 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10662 | ln $srcdir/$ac_source $ac_dest; then : | |
10663 | else | |
10664 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10665 | fi | |
10666 | done | |
10667 | EOF | |
10668 | cat >> $CONFIG_STATUS <<EOF | |
10669 | ||
10670 | gdb_host_cpu=$gdb_host_cpu | |
10671 | gdb_target_cpu=$gdb_target_cpu | |
10672 | nativefile=$nativefile | |
10673 | ||
10674 | EOF | |
10675 | cat >> $CONFIG_STATUS <<\EOF | |
10676 | ||
10677 | if test "${nativefile}" = ""; then | |
c4620205 | 10678 | < Makefile \ |
e27da16d JT |
10679 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10680 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10681 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10682 | > Makefile.tem | |
c906108c SS |
10683 | mv -f Makefile.tem Makefile |
10684 | fi | |
10685 | ||
10686 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10687 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10688 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10689 | mv -f Makefile.tmp Makefile | |
10690 | ||
2acceee2 | 10691 | |
c906108c SS |
10692 | case x$CONFIG_HEADERS in |
10693 | xconfig.h:config.in) | |
10694 | echo > stamp-h ;; | |
10695 | esac | |
10696 | ||
10697 | exit 0 | |
10698 | EOF | |
10699 | chmod +x $CONFIG_STATUS | |
10700 | rm -fr confdefs* $ac_clean_files | |
10701 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10702 | ||
10703 | if test "$no_recursion" != yes; then | |
10704 | ||
10705 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10706 | ac_sub_configure_args= | |
10707 | ac_prev= | |
10708 | for ac_arg in $ac_configure_args; do | |
10709 | if test -n "$ac_prev"; then | |
10710 | ac_prev= | |
10711 | continue | |
10712 | fi | |
10713 | case "$ac_arg" in | |
10714 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10715 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10716 | ac_prev=cache_file ;; | |
10717 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10718 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10719 | ;; | |
10720 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10721 | ac_prev=srcdir ;; | |
10722 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10723 | ;; | |
10724 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10725 | esac | |
10726 | done | |
10727 | ||
8dcde887 | 10728 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
10729 | |
10730 | # Do not complain, so a configure script can configure whichever | |
10731 | # parts of a large source tree are present. | |
10732 | if test ! -d $srcdir/$ac_config_dir; then | |
10733 | continue | |
10734 | fi | |
10735 | ||
10736 | echo configuring in $ac_config_dir | |
10737 | ||
10738 | case "$srcdir" in | |
10739 | .) ;; | |
10740 | *) | |
10741 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10742 | else | |
10743 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10744 | fi | |
10745 | ;; | |
10746 | esac | |
10747 | ||
10748 | ac_popdir=`pwd` | |
10749 | cd $ac_config_dir | |
10750 | ||
10751 | # A "../" for each directory in /$ac_config_dir. | |
10752 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10753 | ||
10754 | case "$srcdir" in | |
10755 | .) # No --srcdir option. We are building in place. | |
10756 | ac_sub_srcdir=$srcdir ;; | |
10757 | /*) # Absolute path. | |
10758 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10759 | *) # Relative path. | |
10760 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10761 | esac | |
10762 | ||
10763 | # Check for guested configure; otherwise get Cygnus style configure. | |
10764 | if test -f $ac_sub_srcdir/configure; then | |
10765 | ac_sub_configure=$ac_sub_srcdir/configure | |
10766 | elif test -f $ac_sub_srcdir/configure.in; then | |
10767 | ac_sub_configure=$ac_configure | |
10768 | else | |
10769 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10770 | ac_sub_configure= | |
10771 | fi | |
10772 | ||
10773 | # The recursion is here. | |
10774 | if test -n "$ac_sub_configure"; then | |
10775 | ||
10776 | # Make the cache file name correct relative to the subdirectory. | |
10777 | case "$cache_file" in | |
10778 | /*) ac_sub_cache_file=$cache_file ;; | |
10779 | *) # Relative path. | |
10780 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10781 | esac | |
10782 | case "$ac_given_INSTALL" in | |
10783 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10784 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10785 | esac | |
10786 | ||
10787 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10788 | # The eval makes quoting arguments work. | |
10789 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10790 | then : | |
10791 | else | |
10792 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10793 | fi | |
10794 | fi | |
10795 | ||
10796 | cd $ac_popdir | |
10797 | done | |
10798 | fi | |
10799 | ||
10800 | ||
10801 | exit 0 |