]>
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)" | |
030292b7 DJ |
33 | ac_help="$ac_help |
34 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
35 | ac_help="$ac_help |
36 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
37 | ac_help="$ac_help |
38 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
39 | ac_help="$ac_help |
40 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
41 | ac_help="$ac_help |
42 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
45 | ac_help="$ac_help | |
46 | --with-tclinclude=DIR Directory where tcl private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-tkinclude=DIR Directory where tk private headers are" | |
49 | ac_help="$ac_help | |
50 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
53 | ac_help="$ac_help |
54 | --with-x use the X Window System" | |
7a292a7a SS |
55 | ac_help="$ac_help |
56 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
57 | ac_help="$ac_help |
58 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
59 | ac_help="$ac_help |
60 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
61 | |
62 | # Initialize some variables set by options. | |
63 | # The variables have the same names as the options, with | |
64 | # dashes changed to underlines. | |
65 | build=NONE | |
66 | cache_file=./config.cache | |
67 | exec_prefix=NONE | |
68 | host=NONE | |
69 | no_create= | |
70 | nonopt=NONE | |
71 | no_recursion= | |
72 | prefix=NONE | |
73 | program_prefix=NONE | |
74 | program_suffix=NONE | |
75 | program_transform_name=s,x,x, | |
76 | silent= | |
77 | site= | |
c41b7eb1 | 78 | sitefile= |
c906108c SS |
79 | srcdir= |
80 | target=NONE | |
81 | verbose= | |
82 | x_includes=NONE | |
83 | x_libraries=NONE | |
84 | bindir='${exec_prefix}/bin' | |
85 | sbindir='${exec_prefix}/sbin' | |
86 | libexecdir='${exec_prefix}/libexec' | |
87 | datadir='${prefix}/share' | |
88 | sysconfdir='${prefix}/etc' | |
89 | sharedstatedir='${prefix}/com' | |
90 | localstatedir='${prefix}/var' | |
91 | libdir='${exec_prefix}/lib' | |
92 | includedir='${prefix}/include' | |
93 | oldincludedir='/usr/include' | |
94 | infodir='${prefix}/info' | |
95 | mandir='${prefix}/man' | |
96 | ||
97 | # Initialize some other variables. | |
98 | subdirs= | |
99 | MFLAGS= MAKEFLAGS= | |
100 | SHELL=${CONFIG_SHELL-/bin/sh} | |
101 | # Maximum number of lines to put in a shell here document. | |
102 | ac_max_here_lines=12 | |
103 | ||
104 | ac_prev= | |
105 | for ac_option | |
106 | do | |
107 | ||
108 | # If the previous option needs an argument, assign it. | |
109 | if test -n "$ac_prev"; then | |
110 | eval "$ac_prev=\$ac_option" | |
111 | ac_prev= | |
112 | continue | |
113 | fi | |
114 | ||
115 | case "$ac_option" in | |
116 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
117 | *) ac_optarg= ;; | |
118 | esac | |
119 | ||
120 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
121 | ||
122 | case "$ac_option" in | |
123 | ||
124 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
125 | ac_prev=bindir ;; | |
126 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
127 | bindir="$ac_optarg" ;; | |
128 | ||
129 | -build | --build | --buil | --bui | --bu) | |
130 | ac_prev=build ;; | |
131 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
132 | build="$ac_optarg" ;; | |
133 | ||
134 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
135 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
136 | ac_prev=cache_file ;; | |
137 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
138 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
139 | cache_file="$ac_optarg" ;; | |
140 | ||
141 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
142 | ac_prev=datadir ;; | |
143 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
144 | | --da=*) | |
145 | datadir="$ac_optarg" ;; | |
146 | ||
147 | -disable-* | --disable-*) | |
148 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
149 | # Reject names that are not valid shell variable names. | |
150 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
151 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
152 | fi | |
153 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
154 | eval "enable_${ac_feature}=no" ;; | |
155 | ||
156 | -enable-* | --enable-*) | |
157 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
158 | # Reject names that are not valid shell variable names. | |
159 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
160 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
161 | fi | |
162 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
163 | case "$ac_option" in | |
164 | *=*) ;; | |
165 | *) ac_optarg=yes ;; | |
166 | esac | |
167 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
168 | ||
169 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
170 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
171 | | --exec | --exe | --ex) | |
172 | ac_prev=exec_prefix ;; | |
173 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
174 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
175 | | --exec=* | --exe=* | --ex=*) | |
176 | exec_prefix="$ac_optarg" ;; | |
177 | ||
178 | -gas | --gas | --ga | --g) | |
179 | # Obsolete; use --with-gas. | |
180 | with_gas=yes ;; | |
181 | ||
182 | -help | --help | --hel | --he) | |
183 | # Omit some internal or obsolete options to make the list less imposing. | |
184 | # This message is too long to be a string in the A/UX 3.1 sh. | |
185 | cat << EOF | |
186 | Usage: configure [options] [host] | |
187 | Options: [defaults in brackets after descriptions] | |
188 | Configuration: | |
189 | --cache-file=FILE cache test results in FILE | |
190 | --help print this message | |
191 | --no-create do not create output files | |
192 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 193 | --site-file=FILE use FILE as the site file |
c906108c SS |
194 | --version print the version of autoconf that created configure |
195 | Directory and file names: | |
196 | --prefix=PREFIX install architecture-independent files in PREFIX | |
197 | [$ac_default_prefix] | |
198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
199 | [same as prefix] | |
200 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
203 | --datadir=DIR read-only architecture-independent data in DIR | |
204 | [PREFIX/share] | |
205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
207 | [PREFIX/com] | |
208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
210 | --includedir=DIR C header files in DIR [PREFIX/include] | |
211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
212 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
213 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
214 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
215 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
216 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
217 | --program-transform-name=PROGRAM | |
218 | run sed PROGRAM on installed program names | |
219 | EOF | |
220 | cat << EOF | |
221 | Host type: | |
222 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
223 | --host=HOST configure for HOST [guessed] | |
224 | --target=TARGET configure for TARGET [TARGET=HOST] | |
225 | Features and packages: | |
226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
230 | --x-includes=DIR X include files are in DIR | |
231 | --x-libraries=DIR X library files are in DIR | |
232 | EOF | |
233 | if test -n "$ac_help"; then | |
234 | echo "--enable and --with options recognized:$ac_help" | |
235 | fi | |
236 | exit 0 ;; | |
237 | ||
238 | -host | --host | --hos | --ho) | |
239 | ac_prev=host ;; | |
240 | -host=* | --host=* | --hos=* | --ho=*) | |
241 | host="$ac_optarg" ;; | |
242 | ||
243 | -includedir | --includedir | --includedi | --included | --include \ | |
244 | | --includ | --inclu | --incl | --inc) | |
245 | ac_prev=includedir ;; | |
246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
247 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
248 | includedir="$ac_optarg" ;; | |
249 | ||
250 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
251 | ac_prev=infodir ;; | |
252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
253 | infodir="$ac_optarg" ;; | |
254 | ||
255 | -libdir | --libdir | --libdi | --libd) | |
256 | ac_prev=libdir ;; | |
257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
258 | libdir="$ac_optarg" ;; | |
259 | ||
260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
261 | | --libexe | --libex | --libe) | |
262 | ac_prev=libexecdir ;; | |
263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
264 | | --libexe=* | --libex=* | --libe=*) | |
265 | libexecdir="$ac_optarg" ;; | |
266 | ||
267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
268 | | --localstate | --localstat | --localsta | --localst \ | |
269 | | --locals | --local | --loca | --loc | --lo) | |
270 | ac_prev=localstatedir ;; | |
271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
274 | localstatedir="$ac_optarg" ;; | |
275 | ||
276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
277 | ac_prev=mandir ;; | |
278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
279 | mandir="$ac_optarg" ;; | |
280 | ||
281 | -nfp | --nfp | --nf) | |
282 | # Obsolete; use --without-fp. | |
283 | with_fp=no ;; | |
284 | ||
285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
286 | | --no-cr | --no-c) | |
287 | no_create=yes ;; | |
288 | ||
289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
291 | no_recursion=yes ;; | |
292 | ||
293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
295 | | --oldin | --oldi | --old | --ol | --o) | |
296 | ac_prev=oldincludedir ;; | |
297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
300 | oldincludedir="$ac_optarg" ;; | |
301 | ||
302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
303 | ac_prev=prefix ;; | |
304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
305 | prefix="$ac_optarg" ;; | |
306 | ||
307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
308 | | --program-pre | --program-pr | --program-p) | |
309 | ac_prev=program_prefix ;; | |
310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
312 | program_prefix="$ac_optarg" ;; | |
313 | ||
314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
315 | | --program-suf | --program-su | --program-s) | |
316 | ac_prev=program_suffix ;; | |
317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
319 | program_suffix="$ac_optarg" ;; | |
320 | ||
321 | -program-transform-name | --program-transform-name \ | |
322 | | --program-transform-nam | --program-transform-na \ | |
323 | | --program-transform-n | --program-transform- \ | |
324 | | --program-transform | --program-transfor \ | |
325 | | --program-transfo | --program-transf \ | |
326 | | --program-trans | --program-tran \ | |
327 | | --progr-tra | --program-tr | --program-t) | |
328 | ac_prev=program_transform_name ;; | |
329 | -program-transform-name=* | --program-transform-name=* \ | |
330 | | --program-transform-nam=* | --program-transform-na=* \ | |
331 | | --program-transform-n=* | --program-transform-=* \ | |
332 | | --program-transform=* | --program-transfor=* \ | |
333 | | --program-transfo=* | --program-transf=* \ | |
334 | | --program-trans=* | --program-tran=* \ | |
335 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
336 | program_transform_name="$ac_optarg" ;; | |
337 | ||
338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
339 | | -silent | --silent | --silen | --sile | --sil) | |
340 | silent=yes ;; | |
341 | ||
342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
343 | ac_prev=sbindir ;; | |
344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
345 | | --sbi=* | --sb=*) | |
346 | sbindir="$ac_optarg" ;; | |
347 | ||
348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
350 | | --sharedst | --shareds | --shared | --share | --shar \ | |
351 | | --sha | --sh) | |
352 | ac_prev=sharedstatedir ;; | |
353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
356 | | --sha=* | --sh=*) | |
357 | sharedstatedir="$ac_optarg" ;; | |
358 | ||
359 | -site | --site | --sit) | |
360 | ac_prev=site ;; | |
361 | -site=* | --site=* | --sit=*) | |
362 | site="$ac_optarg" ;; | |
363 | ||
c41b7eb1 JB |
364 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
365 | ac_prev=sitefile ;; | |
366 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
367 | sitefile="$ac_optarg" ;; | |
368 | ||
c906108c SS |
369 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
370 | ac_prev=srcdir ;; | |
371 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
372 | srcdir="$ac_optarg" ;; | |
373 | ||
374 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
375 | | --syscon | --sysco | --sysc | --sys | --sy) | |
376 | ac_prev=sysconfdir ;; | |
377 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
378 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
379 | sysconfdir="$ac_optarg" ;; | |
380 | ||
381 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
382 | ac_prev=target ;; | |
383 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
384 | target="$ac_optarg" ;; | |
385 | ||
386 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
387 | verbose=yes ;; | |
388 | ||
389 | -version | --version | --versio | --versi | --vers) | |
390 | echo "configure generated by autoconf version 2.13" | |
391 | exit 0 ;; | |
392 | ||
393 | -with-* | --with-*) | |
394 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
395 | # Reject names that are not valid shell variable names. | |
396 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
397 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
398 | fi | |
399 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
400 | case "$ac_option" in | |
401 | *=*) ;; | |
402 | *) ac_optarg=yes ;; | |
403 | esac | |
404 | eval "with_${ac_package}='$ac_optarg'" ;; | |
405 | ||
406 | -without-* | --without-*) | |
407 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
408 | # Reject names that are not valid shell variable names. | |
409 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
410 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
411 | fi | |
412 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
413 | eval "with_${ac_package}=no" ;; | |
414 | ||
415 | --x) | |
416 | # Obsolete; use --with-x. | |
417 | with_x=yes ;; | |
418 | ||
419 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
420 | | --x-incl | --x-inc | --x-in | --x-i) | |
421 | ac_prev=x_includes ;; | |
422 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
423 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
424 | x_includes="$ac_optarg" ;; | |
425 | ||
426 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
427 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
428 | ac_prev=x_libraries ;; | |
429 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
430 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
431 | x_libraries="$ac_optarg" ;; | |
432 | ||
433 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
434 | ;; | |
435 | ||
436 | *) | |
437 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
438 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
439 | fi | |
440 | if test "x$nonopt" != xNONE; then | |
441 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
442 | fi | |
443 | nonopt="$ac_option" | |
444 | ;; | |
445 | ||
446 | esac | |
447 | done | |
448 | ||
449 | if test -n "$ac_prev"; then | |
450 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
451 | fi | |
452 | ||
453 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
454 | ||
455 | # File descriptor usage: | |
456 | # 0 standard input | |
457 | # 1 file creation | |
458 | # 2 errors and warnings | |
459 | # 3 some systems may open it to /dev/tty | |
460 | # 4 used on the Kubota Titan | |
461 | # 6 checking for... messages and results | |
462 | # 5 compiler messages saved in config.log | |
463 | if test "$silent" = yes; then | |
464 | exec 6>/dev/null | |
465 | else | |
466 | exec 6>&1 | |
467 | fi | |
468 | exec 5>./config.log | |
469 | ||
470 | echo "\ | |
471 | This file contains any messages produced by compilers while | |
472 | running configure, to aid debugging if configure makes a mistake. | |
473 | " 1>&5 | |
474 | ||
475 | # Strip out --no-create and --no-recursion so they do not pile up. | |
476 | # Also quote any args containing shell metacharacters. | |
477 | ac_configure_args= | |
478 | for ac_arg | |
479 | do | |
480 | case "$ac_arg" in | |
481 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
482 | | --no-cr | --no-c) ;; | |
483 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
484 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
485 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
486 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
487 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
488 | esac | |
489 | done | |
490 | ||
491 | # NLS nuisances. | |
492 | # Only set these to C if already set. These must not be set unconditionally | |
493 | # because not all systems understand e.g. LANG=C (notably SCO). | |
494 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
495 | # Non-C LC_CTYPE values break the ctype check. | |
496 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
497 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
498 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
499 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
500 | ||
501 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
502 | rm -rf conftest* confdefs.h | |
503 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
504 | echo > confdefs.h | |
505 | ||
506 | # A filename unique to this package, relative to the directory that | |
507 | # configure is in, which we can look for to find out if srcdir is correct. | |
508 | ac_unique_file=main.c | |
509 | ||
510 | # Find the source files, if location was not specified. | |
511 | if test -z "$srcdir"; then | |
512 | ac_srcdir_defaulted=yes | |
513 | # Try the directory containing this script, then its parent. | |
514 | ac_prog=$0 | |
515 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
516 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
517 | srcdir=$ac_confdir | |
518 | if test ! -r $srcdir/$ac_unique_file; then | |
519 | srcdir=.. | |
520 | fi | |
521 | else | |
522 | ac_srcdir_defaulted=no | |
523 | fi | |
524 | if test ! -r $srcdir/$ac_unique_file; then | |
525 | if test "$ac_srcdir_defaulted" = yes; then | |
526 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
527 | else | |
528 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
529 | fi | |
530 | fi | |
531 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
532 | ||
533 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
534 | if test -z "$sitefile"; then |
535 | if test -z "$CONFIG_SITE"; then | |
536 | if test "x$prefix" != xNONE; then | |
537 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
538 | else | |
539 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
540 | fi | |
c906108c | 541 | fi |
c41b7eb1 JB |
542 | else |
543 | CONFIG_SITE="$sitefile" | |
c906108c SS |
544 | fi |
545 | for ac_site_file in $CONFIG_SITE; do | |
546 | if test -r "$ac_site_file"; then | |
547 | echo "loading site script $ac_site_file" | |
548 | . "$ac_site_file" | |
549 | fi | |
550 | done | |
551 | ||
552 | if test -r "$cache_file"; then | |
553 | echo "loading cache $cache_file" | |
554 | . $cache_file | |
555 | else | |
556 | echo "creating cache $cache_file" | |
557 | > $cache_file | |
558 | fi | |
559 | ||
560 | ac_ext=c | |
561 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
562 | ac_cpp='$CPP $CPPFLAGS' | |
563 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
564 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
565 | cross_compiling=$ac_cv_prog_cc_cross | |
566 | ||
567 | ac_exeext= | |
568 | ac_objext=o | |
569 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
570 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
571 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
572 | ac_n= ac_c=' | |
573 | ' ac_t=' ' | |
574 | else | |
575 | ac_n=-n ac_c= ac_t= | |
576 | fi | |
577 | else | |
578 | ac_n= ac_c='\c' ac_t= | |
579 | fi | |
580 | ||
581 | ||
582 | ||
413ccac7 | 583 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
030292b7 | 584 | echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
585 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
586 | if test "${enable_maintainer_mode+set}" = set; then | |
587 | enableval="$enable_maintainer_mode" | |
588 | USE_MAINTAINER_MODE=$enableval | |
589 | else | |
590 | USE_MAINTAINER_MODE=no | |
591 | fi | |
592 | ||
593 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
594 | ||
595 | ||
596 | if test $USE_MAINTAINER_MODE = yes; then | |
597 | MAINTAINER_MODE_TRUE= | |
598 | MAINTAINER_MODE_FALSE='#' | |
599 | else | |
600 | MAINTAINER_MODE_TRUE='#' | |
601 | MAINTAINER_MODE_FALSE= | |
602 | fi | |
603 | MAINT=$MAINTAINER_MODE_TRUE | |
604 | ||
605 | ||
c906108c SS |
606 | |
607 | # Extract the first word of "gcc", so it can be a program name with args. | |
608 | set dummy gcc; ac_word=$2 | |
609 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 610 | echo "configure:611: checking for $ac_word" >&5 |
c906108c SS |
611 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
613 | else | |
614 | if test -n "$CC"; then | |
615 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
616 | else | |
617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
618 | ac_dummy="$PATH" | |
619 | for ac_dir in $ac_dummy; do | |
620 | test -z "$ac_dir" && ac_dir=. | |
621 | if test -f $ac_dir/$ac_word; then | |
622 | ac_cv_prog_CC="gcc" | |
623 | break | |
624 | fi | |
625 | done | |
626 | IFS="$ac_save_ifs" | |
627 | fi | |
628 | fi | |
629 | CC="$ac_cv_prog_CC" | |
630 | if test -n "$CC"; then | |
631 | echo "$ac_t""$CC" 1>&6 | |
632 | else | |
633 | echo "$ac_t""no" 1>&6 | |
634 | fi | |
635 | ||
636 | if test -z "$CC"; then | |
637 | # Extract the first word of "cc", so it can be a program name with args. | |
638 | set dummy cc; ac_word=$2 | |
639 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 640 | echo "configure:641: checking for $ac_word" >&5 |
c906108c SS |
641 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
643 | else | |
644 | if test -n "$CC"; then | |
645 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
646 | else | |
647 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
648 | ac_prog_rejected=no | |
649 | ac_dummy="$PATH" | |
650 | for ac_dir in $ac_dummy; do | |
651 | test -z "$ac_dir" && ac_dir=. | |
652 | if test -f $ac_dir/$ac_word; then | |
653 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
654 | ac_prog_rejected=yes | |
655 | continue | |
656 | fi | |
657 | ac_cv_prog_CC="cc" | |
658 | break | |
659 | fi | |
660 | done | |
661 | IFS="$ac_save_ifs" | |
662 | if test $ac_prog_rejected = yes; then | |
663 | # We found a bogon in the path, so make sure we never use it. | |
664 | set dummy $ac_cv_prog_CC | |
665 | shift | |
666 | if test $# -gt 0; then | |
667 | # We chose a different compiler from the bogus one. | |
668 | # However, it has the same basename, so the bogon will be chosen | |
669 | # first if we set CC to just the basename; use the full file name. | |
670 | shift | |
671 | set dummy "$ac_dir/$ac_word" "$@" | |
672 | shift | |
673 | ac_cv_prog_CC="$@" | |
674 | fi | |
675 | fi | |
676 | fi | |
677 | fi | |
678 | CC="$ac_cv_prog_CC" | |
679 | if test -n "$CC"; then | |
680 | echo "$ac_t""$CC" 1>&6 | |
681 | else | |
682 | echo "$ac_t""no" 1>&6 | |
683 | fi | |
684 | ||
685 | if test -z "$CC"; then | |
686 | case "`uname -s`" in | |
687 | *win32* | *WIN32*) | |
688 | # Extract the first word of "cl", so it can be a program name with args. | |
689 | set dummy cl; ac_word=$2 | |
690 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 691 | echo "configure:692: checking for $ac_word" >&5 |
c906108c SS |
692 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
694 | else | |
695 | if test -n "$CC"; then | |
696 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
697 | else | |
698 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
699 | ac_dummy="$PATH" | |
700 | for ac_dir in $ac_dummy; do | |
701 | test -z "$ac_dir" && ac_dir=. | |
702 | if test -f $ac_dir/$ac_word; then | |
703 | ac_cv_prog_CC="cl" | |
704 | break | |
705 | fi | |
706 | done | |
707 | IFS="$ac_save_ifs" | |
708 | fi | |
709 | fi | |
710 | CC="$ac_cv_prog_CC" | |
711 | if test -n "$CC"; then | |
712 | echo "$ac_t""$CC" 1>&6 | |
713 | else | |
714 | echo "$ac_t""no" 1>&6 | |
715 | fi | |
716 | ;; | |
717 | esac | |
718 | fi | |
719 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
720 | fi | |
721 | ||
722 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
030292b7 | 723 | echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
724 | |
725 | ac_ext=c | |
726 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
727 | ac_cpp='$CPP $CPPFLAGS' | |
728 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
729 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
730 | cross_compiling=$ac_cv_prog_cc_cross | |
731 | ||
732 | cat > conftest.$ac_ext << EOF | |
733 | ||
030292b7 | 734 | #line 735 "configure" |
c906108c SS |
735 | #include "confdefs.h" |
736 | ||
737 | main(){return(0);} | |
738 | EOF | |
030292b7 | 739 | if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
740 | ac_cv_prog_cc_works=yes |
741 | # If we can't run a trivial program, we are probably using a cross compiler. | |
742 | if (./conftest; exit) 2>/dev/null; then | |
743 | ac_cv_prog_cc_cross=no | |
744 | else | |
745 | ac_cv_prog_cc_cross=yes | |
746 | fi | |
747 | else | |
748 | echo "configure: failed program was:" >&5 | |
749 | cat conftest.$ac_ext >&5 | |
750 | ac_cv_prog_cc_works=no | |
751 | fi | |
752 | rm -fr conftest* | |
753 | ac_ext=c | |
754 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
755 | ac_cpp='$CPP $CPPFLAGS' | |
756 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
757 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
758 | cross_compiling=$ac_cv_prog_cc_cross | |
759 | ||
760 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
761 | if test $ac_cv_prog_cc_works = no; then | |
762 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
763 | fi | |
764 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
030292b7 | 765 | echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
766 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
767 | cross_compiling=$ac_cv_prog_cc_cross | |
768 | ||
769 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
030292b7 | 770 | echo "configure:771: checking whether we are using GNU C" >&5 |
c906108c SS |
771 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftest.c <<EOF | |
775 | #ifdef __GNUC__ | |
776 | yes; | |
777 | #endif | |
778 | EOF | |
030292b7 | 779 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
780 | ac_cv_prog_gcc=yes |
781 | else | |
782 | ac_cv_prog_gcc=no | |
783 | fi | |
784 | fi | |
785 | ||
786 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
787 | ||
788 | if test $ac_cv_prog_gcc = yes; then | |
789 | GCC=yes | |
790 | else | |
791 | GCC= | |
792 | fi | |
793 | ||
794 | ac_test_CFLAGS="${CFLAGS+set}" | |
795 | ac_save_CFLAGS="$CFLAGS" | |
796 | CFLAGS= | |
797 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
030292b7 | 798 | echo "configure:799: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
799 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
801 | else | |
802 | echo 'void f(){}' > conftest.c | |
803 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
804 | ac_cv_prog_cc_g=yes | |
805 | else | |
806 | ac_cv_prog_cc_g=no | |
807 | fi | |
808 | rm -f conftest* | |
809 | ||
810 | fi | |
811 | ||
812 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
813 | if test "$ac_test_CFLAGS" = set; then | |
814 | CFLAGS="$ac_save_CFLAGS" | |
815 | elif test $ac_cv_prog_cc_g = yes; then | |
816 | if test "$GCC" = yes; then | |
817 | CFLAGS="-g -O2" | |
818 | else | |
819 | CFLAGS="-g" | |
820 | fi | |
821 | else | |
822 | if test "$GCC" = yes; then | |
823 | CFLAGS="-O2" | |
824 | else | |
825 | CFLAGS= | |
826 | fi | |
827 | fi | |
828 | ||
14abd0fb MK |
829 | cat >> confdefs.h <<\EOF |
830 | #define _GNU_SOURCE 1 | |
831 | EOF | |
832 | ||
833 | ||
c906108c | 834 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
030292b7 | 835 | echo "configure:836: checking how to run the C preprocessor" >&5 |
c906108c SS |
836 | # On Suns, sometimes $CPP names a directory. |
837 | if test -n "$CPP" && test -d "$CPP"; then | |
838 | CPP= | |
839 | fi | |
840 | if test -z "$CPP"; then | |
841 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
842 | echo $ac_n "(cached) $ac_c" 1>&6 | |
843 | else | |
844 | # This must be in double quotes, not single quotes, because CPP may get | |
845 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
846 | CPP="${CC-cc} -E" | |
847 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
848 | # not just through cpp. | |
849 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 850 | #line 851 "configure" |
c906108c SS |
851 | #include "confdefs.h" |
852 | #include <assert.h> | |
853 | Syntax Error | |
854 | EOF | |
855 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 856 | { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
857 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
858 | if test -z "$ac_err"; then | |
859 | : | |
860 | else | |
861 | echo "$ac_err" >&5 | |
862 | echo "configure: failed program was:" >&5 | |
863 | cat conftest.$ac_ext >&5 | |
864 | rm -rf conftest* | |
865 | CPP="${CC-cc} -E -traditional-cpp" | |
866 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 867 | #line 868 "configure" |
c906108c SS |
868 | #include "confdefs.h" |
869 | #include <assert.h> | |
870 | Syntax Error | |
871 | EOF | |
872 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 873 | { (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
874 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
875 | if test -z "$ac_err"; then | |
876 | : | |
877 | else | |
878 | echo "$ac_err" >&5 | |
879 | echo "configure: failed program was:" >&5 | |
880 | cat conftest.$ac_ext >&5 | |
881 | rm -rf conftest* | |
882 | CPP="${CC-cc} -nologo -E" | |
883 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 884 | #line 885 "configure" |
c906108c SS |
885 | #include "confdefs.h" |
886 | #include <assert.h> | |
887 | Syntax Error | |
888 | EOF | |
889 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 890 | { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
891 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
892 | if test -z "$ac_err"; then | |
893 | : | |
894 | else | |
895 | echo "$ac_err" >&5 | |
896 | echo "configure: failed program was:" >&5 | |
897 | cat conftest.$ac_ext >&5 | |
898 | rm -rf conftest* | |
899 | CPP=/lib/cpp | |
900 | fi | |
901 | rm -f conftest* | |
902 | fi | |
903 | rm -f conftest* | |
904 | fi | |
905 | rm -f conftest* | |
906 | ac_cv_prog_CPP="$CPP" | |
907 | fi | |
908 | CPP="$ac_cv_prog_CPP" | |
909 | else | |
910 | ac_cv_prog_CPP="$CPP" | |
911 | fi | |
912 | echo "$ac_t""$CPP" 1>&6 | |
913 | ||
914 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
030292b7 | 915 | echo "configure:916: checking for AIX" >&5 |
c906108c | 916 | cat > conftest.$ac_ext <<EOF |
030292b7 | 917 | #line 918 "configure" |
c906108c SS |
918 | #include "confdefs.h" |
919 | #ifdef _AIX | |
920 | yes | |
921 | #endif | |
922 | ||
923 | EOF | |
924 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
925 | egrep "yes" >/dev/null 2>&1; then | |
926 | rm -rf conftest* | |
927 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
928 | #define _ALL_SOURCE 1 | |
929 | EOF | |
930 | ||
931 | else | |
932 | rm -rf conftest* | |
933 | echo "$ac_t""no" 1>&6 | |
934 | fi | |
935 | rm -f conftest* | |
936 | ||
937 | ||
56157b4a | 938 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
030292b7 | 939 | echo "configure:940: checking for POSIXized ISC" >&5 |
56157b4a AC |
940 | if test -d /etc/conf/kconfig.d && |
941 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
942 | then | |
943 | echo "$ac_t""yes" 1>&6 | |
944 | ISC=yes # If later tests want to check for ISC. | |
945 | cat >> confdefs.h <<\EOF | |
946 | #define _POSIX_SOURCE 1 | |
c906108c SS |
947 | EOF |
948 | ||
56157b4a AC |
949 | if test "$GCC" = yes; then |
950 | CC="$CC -posix" | |
951 | else | |
952 | CC="$CC -Xp" | |
953 | fi | |
c906108c SS |
954 | else |
955 | echo "$ac_t""no" 1>&6 | |
56157b4a | 956 | ISC= |
c906108c SS |
957 | fi |
958 | ||
959 | ||
960 | ||
961 | ||
962 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
030292b7 | 963 | echo "configure:964: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
964 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
965 | echo $ac_n "(cached) $ac_c" 1>&6 | |
966 | else | |
967 | am_cv_prog_cc_stdc=no | |
968 | ac_save_CC="$CC" | |
969 | # Don't try gcc -ansi; that turns off useful extensions and | |
970 | # breaks some systems' header files. | |
971 | # AIX -qlanglvl=ansi | |
972 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
973 | # HP-UX 10.20 and later -Ae |
974 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 975 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 976 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
977 | do |
978 | CC="$ac_save_CC $ac_arg" | |
979 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 980 | #line 981 "configure" |
c906108c SS |
981 | #include "confdefs.h" |
982 | #include <stdarg.h> | |
983 | #include <stdio.h> | |
984 | #include <sys/types.h> | |
985 | #include <sys/stat.h> | |
986 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
987 | struct buf { int x; }; | |
988 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
989 | static char *e (p, i) | |
990 | char **p; | |
991 | int i; | |
992 | { | |
993 | return p[i]; | |
994 | } | |
995 | static char *f (char * (*g) (char **, int), char **p, ...) | |
996 | { | |
997 | char *s; | |
998 | va_list v; | |
999 | va_start (v,p); | |
1000 | s = g (p, va_arg (v,int)); | |
1001 | va_end (v); | |
1002 | return s; | |
1003 | } | |
1004 | int test (int i, double x); | |
1005 | struct s1 {int (*f) (int a);}; | |
1006 | struct s2 {int (*f) (double a);}; | |
1007 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1008 | int argc; | |
1009 | char **argv; | |
1010 | ||
1011 | int main() { | |
1012 | ||
1013 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1014 | ||
1015 | ; return 0; } | |
1016 | EOF | |
030292b7 | 1017 | if { (eval echo configure:1018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1018 | rm -rf conftest* |
1019 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1020 | else | |
1021 | echo "configure: failed program was:" >&5 | |
1022 | cat conftest.$ac_ext >&5 | |
1023 | fi | |
1024 | rm -f conftest* | |
1025 | done | |
1026 | CC="$ac_save_CC" | |
1027 | ||
1028 | fi | |
1029 | ||
1030 | if test -z "$am_cv_prog_cc_stdc"; then | |
1031 | echo "$ac_t""none needed" 1>&6 | |
1032 | else | |
1033 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1034 | fi | |
1035 | case "x$am_cv_prog_cc_stdc" in | |
1036 | x|xno) ;; | |
1037 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1038 | esac | |
1039 | ||
1040 | ||
1041 | ac_aux_dir= | |
1042 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1043 | if test -f $ac_dir/install-sh; then | |
1044 | ac_aux_dir=$ac_dir | |
1045 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1046 | break | |
1047 | elif test -f $ac_dir/install.sh; then | |
1048 | ac_aux_dir=$ac_dir | |
1049 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1050 | break | |
1051 | fi | |
1052 | done | |
1053 | if test -z "$ac_aux_dir"; then | |
1054 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1055 | fi | |
1056 | ac_config_guess=$ac_aux_dir/config.guess | |
1057 | ac_config_sub=$ac_aux_dir/config.sub | |
1058 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1059 | ||
1060 | ||
1061 | # Do some error checking and defaulting for the host and target type. | |
1062 | # The inputs are: | |
1063 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1064 | # | |
1065 | # The rules are: | |
1066 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1067 | # same time. | |
1068 | # 2. Host defaults to nonopt. | |
1069 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1070 | # as determined by config.guess. | |
1071 | # 4. Target and build default to nonopt. | |
1072 | # 5. If nonopt is not specified, then target and build default to host. | |
1073 | ||
1074 | # The aliases save the names the user supplied, while $host etc. | |
1075 | # will get canonicalized. | |
1076 | case $host---$target---$nonopt in | |
1077 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1078 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1079 | esac | |
1080 | ||
1081 | ||
1082 | # Make sure we can run config.sub. | |
1083 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1084 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1085 | fi | |
1086 | ||
1087 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
030292b7 | 1088 | echo "configure:1089: checking host system type" >&5 |
c906108c SS |
1089 | |
1090 | host_alias=$host | |
1091 | case "$host_alias" in | |
1092 | NONE) | |
1093 | case $nonopt in | |
1094 | NONE) | |
1095 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1096 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1097 | fi ;; | |
1098 | *) host_alias=$nonopt ;; | |
1099 | esac ;; | |
1100 | esac | |
1101 | ||
1102 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1103 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1104 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1105 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1106 | echo "$ac_t""$host" 1>&6 | |
1107 | ||
1108 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
030292b7 | 1109 | echo "configure:1110: checking target system type" >&5 |
c906108c SS |
1110 | |
1111 | target_alias=$target | |
1112 | case "$target_alias" in | |
1113 | NONE) | |
1114 | case $nonopt in | |
1115 | NONE) target_alias=$host_alias ;; | |
1116 | *) target_alias=$nonopt ;; | |
1117 | esac ;; | |
1118 | esac | |
1119 | ||
1120 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1121 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1122 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1123 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1124 | echo "$ac_t""$target" 1>&6 | |
1125 | ||
1126 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
030292b7 | 1127 | echo "configure:1128: checking build system type" >&5 |
c906108c SS |
1128 | |
1129 | build_alias=$build | |
1130 | case "$build_alias" in | |
1131 | NONE) | |
1132 | case $nonopt in | |
1133 | NONE) build_alias=$host_alias ;; | |
1134 | *) build_alias=$nonopt ;; | |
1135 | esac ;; | |
1136 | esac | |
1137 | ||
1138 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1139 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1140 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1141 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1142 | echo "$ac_t""$build" 1>&6 | |
1143 | ||
1144 | test "$host_alias" != "$target_alias" && | |
1145 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1146 | NONENONEs,x,x, && | |
1147 | program_prefix=${target_alias}- | |
1148 | ||
1149 | ||
8bb2c122 MK |
1150 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1151 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1152 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1153 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1154 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1155 | # 2.5x. | |
1156 | if test $host != $build; then | |
1157 | ac_tool_prefix=${host_alias}- | |
1158 | else | |
1159 | ac_tool_prefix= | |
1160 | fi | |
1161 | ||
1162 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1163 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1164 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 1165 | echo "configure:1166: checking for $ac_word" >&5 |
8bb2c122 MK |
1166 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1167 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1168 | else | |
1169 | if test -n "$RANLIB"; then | |
1170 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1171 | else | |
1172 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1173 | ac_dummy="$PATH" | |
1174 | for ac_dir in $ac_dummy; do | |
1175 | test -z "$ac_dir" && ac_dir=. | |
1176 | if test -f $ac_dir/$ac_word; then | |
1177 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1178 | break | |
1179 | fi | |
1180 | done | |
1181 | IFS="$ac_save_ifs" | |
1182 | fi | |
1183 | fi | |
1184 | RANLIB="$ac_cv_prog_RANLIB" | |
1185 | if test -n "$RANLIB"; then | |
1186 | echo "$ac_t""$RANLIB" 1>&6 | |
1187 | else | |
1188 | echo "$ac_t""no" 1>&6 | |
1189 | fi | |
1190 | ||
1191 | ||
1192 | if test -z "$ac_cv_prog_RANLIB"; then | |
1193 | if test -n "$ac_tool_prefix"; then | |
1194 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1195 | set dummy ranlib; ac_word=$2 | |
1196 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 1197 | echo "configure:1198: checking for $ac_word" >&5 |
8bb2c122 MK |
1198 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1199 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1200 | else | |
1201 | if test -n "$RANLIB"; then | |
1202 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1203 | else | |
1204 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1205 | ac_dummy="$PATH" | |
1206 | for ac_dir in $ac_dummy; do | |
1207 | test -z "$ac_dir" && ac_dir=. | |
1208 | if test -f $ac_dir/$ac_word; then | |
1209 | ac_cv_prog_RANLIB="ranlib" | |
1210 | break | |
1211 | fi | |
1212 | done | |
1213 | IFS="$ac_save_ifs" | |
1214 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1215 | fi | |
1216 | fi | |
1217 | RANLIB="$ac_cv_prog_RANLIB" | |
1218 | if test -n "$RANLIB"; then | |
1219 | echo "$ac_t""$RANLIB" 1>&6 | |
1220 | else | |
1221 | echo "$ac_t""no" 1>&6 | |
1222 | fi | |
1223 | ||
1224 | else | |
1225 | RANLIB=":" | |
1226 | fi | |
1227 | fi | |
1228 | ||
1229 | ||
c906108c SS |
1230 | ALL_LINGUAS= |
1231 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
030292b7 | 1232 | echo "configure:1233: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1233 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1234 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1236 | else | |
1237 | cat > conftestmake <<\EOF | |
1238 | all: | |
1239 | @echo 'ac_maketemp="${MAKE}"' | |
1240 | EOF | |
1241 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1242 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1243 | if test -n "$ac_maketemp"; then | |
1244 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1245 | else | |
1246 | eval ac_cv_prog_make_${ac_make}_set=no | |
1247 | fi | |
1248 | rm -f conftestmake | |
1249 | fi | |
1250 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1251 | echo "$ac_t""yes" 1>&6 | |
1252 | SET_MAKE= | |
1253 | else | |
1254 | echo "$ac_t""no" 1>&6 | |
1255 | SET_MAKE="MAKE=${MAKE-make}" | |
1256 | fi | |
1257 | ||
1258 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1259 | set dummy ranlib; ac_word=$2 | |
1260 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 1261 | echo "configure:1262: checking for $ac_word" >&5 |
c906108c SS |
1262 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1264 | else | |
1265 | if test -n "$RANLIB"; then | |
1266 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1267 | else | |
1268 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1269 | ac_dummy="$PATH" | |
1270 | for ac_dir in $ac_dummy; do | |
1271 | test -z "$ac_dir" && ac_dir=. | |
1272 | if test -f $ac_dir/$ac_word; then | |
1273 | ac_cv_prog_RANLIB="ranlib" | |
1274 | break | |
1275 | fi | |
1276 | done | |
1277 | IFS="$ac_save_ifs" | |
1278 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1279 | fi | |
1280 | fi | |
1281 | RANLIB="$ac_cv_prog_RANLIB" | |
1282 | if test -n "$RANLIB"; then | |
1283 | echo "$ac_t""$RANLIB" 1>&6 | |
1284 | else | |
1285 | echo "$ac_t""no" 1>&6 | |
1286 | fi | |
1287 | ||
1288 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
030292b7 | 1289 | echo "configure:1290: checking for ANSI C header files" >&5 |
c906108c SS |
1290 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1292 | else | |
1293 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1294 | #line 1295 "configure" |
c906108c SS |
1295 | #include "confdefs.h" |
1296 | #include <stdlib.h> | |
1297 | #include <stdarg.h> | |
1298 | #include <string.h> | |
1299 | #include <float.h> | |
1300 | EOF | |
1301 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 1302 | { (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1303 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1304 | if test -z "$ac_err"; then | |
1305 | rm -rf conftest* | |
1306 | ac_cv_header_stdc=yes | |
1307 | else | |
1308 | echo "$ac_err" >&5 | |
1309 | echo "configure: failed program was:" >&5 | |
1310 | cat conftest.$ac_ext >&5 | |
1311 | rm -rf conftest* | |
1312 | ac_cv_header_stdc=no | |
1313 | fi | |
1314 | rm -f conftest* | |
1315 | ||
1316 | if test $ac_cv_header_stdc = yes; then | |
1317 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1318 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1319 | #line 1320 "configure" |
c906108c SS |
1320 | #include "confdefs.h" |
1321 | #include <string.h> | |
1322 | EOF | |
1323 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1324 | egrep "memchr" >/dev/null 2>&1; then | |
1325 | : | |
1326 | else | |
1327 | rm -rf conftest* | |
1328 | ac_cv_header_stdc=no | |
1329 | fi | |
1330 | rm -f conftest* | |
1331 | ||
1332 | fi | |
1333 | ||
1334 | if test $ac_cv_header_stdc = yes; then | |
1335 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1336 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1337 | #line 1338 "configure" |
c906108c SS |
1338 | #include "confdefs.h" |
1339 | #include <stdlib.h> | |
1340 | EOF | |
1341 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1342 | egrep "free" >/dev/null 2>&1; then | |
1343 | : | |
1344 | else | |
1345 | rm -rf conftest* | |
1346 | ac_cv_header_stdc=no | |
1347 | fi | |
1348 | rm -f conftest* | |
1349 | ||
1350 | fi | |
1351 | ||
1352 | if test $ac_cv_header_stdc = yes; then | |
1353 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1354 | if test "$cross_compiling" = yes; then | |
1355 | : | |
1356 | else | |
1357 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1358 | #line 1359 "configure" |
c906108c SS |
1359 | #include "confdefs.h" |
1360 | #include <ctype.h> | |
1361 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1362 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1363 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1364 | int main () { int i; for (i = 0; i < 256; i++) | |
1365 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1366 | exit (0); } | |
1367 | ||
1368 | EOF | |
030292b7 | 1369 | if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1370 | then |
1371 | : | |
1372 | else | |
1373 | echo "configure: failed program was:" >&5 | |
1374 | cat conftest.$ac_ext >&5 | |
1375 | rm -fr conftest* | |
1376 | ac_cv_header_stdc=no | |
1377 | fi | |
1378 | rm -fr conftest* | |
1379 | fi | |
1380 | ||
1381 | fi | |
1382 | fi | |
1383 | ||
1384 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1385 | if test $ac_cv_header_stdc = yes; then | |
1386 | cat >> confdefs.h <<\EOF | |
1387 | #define STDC_HEADERS 1 | |
1388 | EOF | |
1389 | ||
1390 | fi | |
1391 | ||
1392 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
030292b7 | 1393 | echo "configure:1394: checking for working const" >&5 |
c906108c SS |
1394 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1396 | else | |
1397 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1398 | #line 1399 "configure" |
c906108c SS |
1399 | #include "confdefs.h" |
1400 | ||
1401 | int main() { | |
1402 | ||
1403 | /* Ultrix mips cc rejects this. */ | |
1404 | typedef int charset[2]; const charset x; | |
1405 | /* SunOS 4.1.1 cc rejects this. */ | |
1406 | char const *const *ccp; | |
1407 | char **p; | |
1408 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1409 | struct point {int x, y;}; | |
1410 | static struct point const zero = {0,0}; | |
1411 | /* AIX XL C 1.02.0.0 rejects this. | |
1412 | It does not let you subtract one const X* pointer from another in an arm | |
1413 | of an if-expression whose if-part is not a constant expression */ | |
1414 | const char *g = "string"; | |
1415 | ccp = &g + (g ? g-g : 0); | |
1416 | /* HPUX 7.0 cc rejects these. */ | |
1417 | ++ccp; | |
1418 | p = (char**) ccp; | |
1419 | ccp = (char const *const *) p; | |
1420 | { /* SCO 3.2v4 cc rejects this. */ | |
1421 | char *t; | |
1422 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1423 | ||
1424 | *t++ = 0; | |
1425 | } | |
1426 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1427 | int x[] = {25, 17}; | |
1428 | const int *foo = &x[0]; | |
1429 | ++foo; | |
1430 | } | |
1431 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1432 | typedef const int *iptr; | |
1433 | iptr p = 0; | |
1434 | ++p; | |
1435 | } | |
1436 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1437 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1438 | struct s { int j; const int *ap[3]; }; | |
1439 | struct s *b; b->j = 5; | |
1440 | } | |
1441 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1442 | const int foo = 10; | |
1443 | } | |
1444 | ||
1445 | ; return 0; } | |
1446 | EOF | |
030292b7 | 1447 | if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1448 | rm -rf conftest* |
1449 | ac_cv_c_const=yes | |
1450 | else | |
1451 | echo "configure: failed program was:" >&5 | |
1452 | cat conftest.$ac_ext >&5 | |
1453 | rm -rf conftest* | |
1454 | ac_cv_c_const=no | |
1455 | fi | |
1456 | rm -f conftest* | |
1457 | fi | |
1458 | ||
1459 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1460 | if test $ac_cv_c_const = no; then | |
1461 | cat >> confdefs.h <<\EOF | |
1462 | #define const | |
1463 | EOF | |
1464 | ||
1465 | fi | |
1466 | ||
1467 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
030292b7 | 1468 | echo "configure:1469: checking for inline" >&5 |
c906108c SS |
1469 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1470 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1471 | else | |
1472 | ac_cv_c_inline=no | |
1473 | for ac_kw in inline __inline__ __inline; do | |
1474 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1475 | #line 1476 "configure" |
c906108c SS |
1476 | #include "confdefs.h" |
1477 | ||
1478 | int main() { | |
1479 | } $ac_kw foo() { | |
1480 | ; return 0; } | |
1481 | EOF | |
030292b7 | 1482 | if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1483 | rm -rf conftest* |
1484 | ac_cv_c_inline=$ac_kw; break | |
1485 | else | |
1486 | echo "configure: failed program was:" >&5 | |
1487 | cat conftest.$ac_ext >&5 | |
1488 | fi | |
1489 | rm -f conftest* | |
1490 | done | |
1491 | ||
1492 | fi | |
1493 | ||
1494 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1495 | case "$ac_cv_c_inline" in | |
1496 | inline | yes) ;; | |
1497 | no) cat >> confdefs.h <<\EOF | |
1498 | #define inline | |
1499 | EOF | |
1500 | ;; | |
1501 | *) cat >> confdefs.h <<EOF | |
1502 | #define inline $ac_cv_c_inline | |
1503 | EOF | |
1504 | ;; | |
1505 | esac | |
1506 | ||
1507 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
030292b7 | 1508 | echo "configure:1509: checking for off_t" >&5 |
c906108c SS |
1509 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1510 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1511 | else | |
1512 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1513 | #line 1514 "configure" |
c906108c SS |
1514 | #include "confdefs.h" |
1515 | #include <sys/types.h> | |
1516 | #if STDC_HEADERS | |
1517 | #include <stdlib.h> | |
1518 | #include <stddef.h> | |
1519 | #endif | |
1520 | EOF | |
1521 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1522 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1523 | rm -rf conftest* | |
1524 | ac_cv_type_off_t=yes | |
1525 | else | |
1526 | rm -rf conftest* | |
1527 | ac_cv_type_off_t=no | |
1528 | fi | |
1529 | rm -f conftest* | |
1530 | ||
1531 | fi | |
1532 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1533 | if test $ac_cv_type_off_t = no; then | |
1534 | cat >> confdefs.h <<\EOF | |
1535 | #define off_t long | |
1536 | EOF | |
1537 | ||
1538 | fi | |
1539 | ||
1540 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
030292b7 | 1541 | echo "configure:1542: checking for size_t" >&5 |
c906108c SS |
1542 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1543 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1544 | else | |
1545 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1546 | #line 1547 "configure" |
c906108c SS |
1547 | #include "confdefs.h" |
1548 | #include <sys/types.h> | |
1549 | #if STDC_HEADERS | |
1550 | #include <stdlib.h> | |
1551 | #include <stddef.h> | |
1552 | #endif | |
1553 | EOF | |
1554 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1555 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1556 | rm -rf conftest* | |
1557 | ac_cv_type_size_t=yes | |
1558 | else | |
1559 | rm -rf conftest* | |
1560 | ac_cv_type_size_t=no | |
1561 | fi | |
1562 | rm -f conftest* | |
1563 | ||
1564 | fi | |
1565 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1566 | if test $ac_cv_type_size_t = no; then | |
1567 | cat >> confdefs.h <<\EOF | |
1568 | #define size_t unsigned | |
1569 | EOF | |
1570 | ||
1571 | fi | |
1572 | ||
1573 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1574 | # for constant arguments. Useless! | |
1575 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
030292b7 | 1576 | echo "configure:1577: checking for working alloca.h" >&5 |
c906108c SS |
1577 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1578 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1579 | else | |
1580 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1581 | #line 1582 "configure" |
c906108c SS |
1582 | #include "confdefs.h" |
1583 | #include <alloca.h> | |
1584 | int main() { | |
1585 | char *p = alloca(2 * sizeof(int)); | |
1586 | ; return 0; } | |
1587 | EOF | |
030292b7 | 1588 | if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1589 | rm -rf conftest* |
1590 | ac_cv_header_alloca_h=yes | |
1591 | else | |
1592 | echo "configure: failed program was:" >&5 | |
1593 | cat conftest.$ac_ext >&5 | |
1594 | rm -rf conftest* | |
1595 | ac_cv_header_alloca_h=no | |
1596 | fi | |
1597 | rm -f conftest* | |
1598 | fi | |
1599 | ||
1600 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1601 | if test $ac_cv_header_alloca_h = yes; then | |
1602 | cat >> confdefs.h <<\EOF | |
1603 | #define HAVE_ALLOCA_H 1 | |
1604 | EOF | |
1605 | ||
1606 | fi | |
1607 | ||
1608 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
030292b7 | 1609 | echo "configure:1610: checking for alloca" >&5 |
c906108c SS |
1610 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1611 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1612 | else | |
1613 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1614 | #line 1615 "configure" |
c906108c SS |
1615 | #include "confdefs.h" |
1616 | ||
1617 | #ifdef __GNUC__ | |
1618 | # define alloca __builtin_alloca | |
1619 | #else | |
1620 | # ifdef _MSC_VER | |
1621 | # include <malloc.h> | |
1622 | # define alloca _alloca | |
1623 | # else | |
1624 | # if HAVE_ALLOCA_H | |
1625 | # include <alloca.h> | |
1626 | # else | |
1627 | # ifdef _AIX | |
1628 | #pragma alloca | |
1629 | # else | |
1630 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1631 | char *alloca (); | |
1632 | # endif | |
1633 | # endif | |
1634 | # endif | |
1635 | # endif | |
1636 | #endif | |
1637 | ||
1638 | int main() { | |
1639 | char *p = (char *) alloca(1); | |
1640 | ; return 0; } | |
1641 | EOF | |
030292b7 | 1642 | if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1643 | rm -rf conftest* |
1644 | ac_cv_func_alloca_works=yes | |
1645 | else | |
1646 | echo "configure: failed program was:" >&5 | |
1647 | cat conftest.$ac_ext >&5 | |
1648 | rm -rf conftest* | |
1649 | ac_cv_func_alloca_works=no | |
1650 | fi | |
1651 | rm -f conftest* | |
1652 | fi | |
1653 | ||
1654 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1655 | if test $ac_cv_func_alloca_works = yes; then | |
1656 | cat >> confdefs.h <<\EOF | |
1657 | #define HAVE_ALLOCA 1 | |
1658 | EOF | |
1659 | ||
1660 | fi | |
1661 | ||
1662 | if test $ac_cv_func_alloca_works = no; then | |
1663 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1664 | # that cause trouble. Some versions do not even contain alloca or | |
1665 | # contain a buggy version. If you still want to use their alloca, | |
1666 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1667 | ALLOCA=alloca.${ac_objext} | |
1668 | cat >> confdefs.h <<\EOF | |
1669 | #define C_ALLOCA 1 | |
1670 | EOF | |
1671 | ||
1672 | ||
1673 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
030292b7 | 1674 | echo "configure:1675: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1675 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1676 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1677 | else | |
1678 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1679 | #line 1680 "configure" |
c906108c SS |
1680 | #include "confdefs.h" |
1681 | #if defined(CRAY) && ! defined(CRAY2) | |
1682 | webecray | |
1683 | #else | |
1684 | wenotbecray | |
1685 | #endif | |
1686 | ||
1687 | EOF | |
1688 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1689 | egrep "webecray" >/dev/null 2>&1; then | |
1690 | rm -rf conftest* | |
1691 | ac_cv_os_cray=yes | |
1692 | else | |
1693 | rm -rf conftest* | |
1694 | ac_cv_os_cray=no | |
1695 | fi | |
1696 | rm -f conftest* | |
1697 | ||
1698 | fi | |
1699 | ||
1700 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1701 | if test $ac_cv_os_cray = yes; then | |
1702 | for ac_func in _getb67 GETB67 getb67; do | |
1703 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 1704 | echo "configure:1705: checking for $ac_func" >&5 |
c906108c SS |
1705 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1706 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1707 | else | |
1708 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1709 | #line 1710 "configure" |
c906108c SS |
1710 | #include "confdefs.h" |
1711 | /* System header to define __stub macros and hopefully few prototypes, | |
1712 | which can conflict with char $ac_func(); below. */ | |
1713 | #include <assert.h> | |
1714 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1715 | /* We use char because int might match the return type of a gcc2 | |
1716 | builtin and then its argument prototype would still apply. */ | |
1717 | char $ac_func(); | |
1718 | ||
1719 | int main() { | |
1720 | ||
1721 | /* The GNU C library defines this for functions which it implements | |
1722 | to always fail with ENOSYS. Some functions are actually named | |
1723 | something starting with __ and the normal name is an alias. */ | |
1724 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1725 | choke me | |
1726 | #else | |
1727 | $ac_func(); | |
1728 | #endif | |
1729 | ||
1730 | ; return 0; } | |
1731 | EOF | |
030292b7 | 1732 | if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1733 | rm -rf conftest* |
1734 | eval "ac_cv_func_$ac_func=yes" | |
1735 | else | |
1736 | echo "configure: failed program was:" >&5 | |
1737 | cat conftest.$ac_ext >&5 | |
1738 | rm -rf conftest* | |
1739 | eval "ac_cv_func_$ac_func=no" | |
1740 | fi | |
1741 | rm -f conftest* | |
1742 | fi | |
1743 | ||
1744 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1745 | echo "$ac_t""yes" 1>&6 | |
1746 | cat >> confdefs.h <<EOF | |
1747 | #define CRAY_STACKSEG_END $ac_func | |
1748 | EOF | |
1749 | ||
1750 | break | |
1751 | else | |
1752 | echo "$ac_t""no" 1>&6 | |
1753 | fi | |
1754 | ||
1755 | done | |
1756 | fi | |
1757 | ||
1758 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
030292b7 | 1759 | echo "configure:1760: checking stack direction for C alloca" >&5 |
c906108c SS |
1760 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1761 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1762 | else | |
1763 | if test "$cross_compiling" = yes; then | |
1764 | ac_cv_c_stack_direction=0 | |
1765 | else | |
1766 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1767 | #line 1768 "configure" |
c906108c SS |
1768 | #include "confdefs.h" |
1769 | find_stack_direction () | |
1770 | { | |
1771 | static char *addr = 0; | |
1772 | auto char dummy; | |
1773 | if (addr == 0) | |
1774 | { | |
1775 | addr = &dummy; | |
1776 | return find_stack_direction (); | |
1777 | } | |
1778 | else | |
1779 | return (&dummy > addr) ? 1 : -1; | |
1780 | } | |
1781 | main () | |
1782 | { | |
1783 | exit (find_stack_direction() < 0); | |
1784 | } | |
1785 | EOF | |
030292b7 | 1786 | if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1787 | then |
1788 | ac_cv_c_stack_direction=1 | |
1789 | else | |
1790 | echo "configure: failed program was:" >&5 | |
1791 | cat conftest.$ac_ext >&5 | |
1792 | rm -fr conftest* | |
1793 | ac_cv_c_stack_direction=-1 | |
1794 | fi | |
1795 | rm -fr conftest* | |
1796 | fi | |
1797 | ||
1798 | fi | |
1799 | ||
1800 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1801 | cat >> confdefs.h <<EOF | |
1802 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1803 | EOF | |
1804 | ||
1805 | fi | |
1806 | ||
c41b7eb1 | 1807 | for ac_hdr in unistd.h |
c906108c SS |
1808 | do |
1809 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1810 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 1811 | echo "configure:1812: checking for $ac_hdr" >&5 |
c906108c SS |
1812 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1814 | else | |
1815 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1816 | #line 1817 "configure" |
c906108c SS |
1817 | #include "confdefs.h" |
1818 | #include <$ac_hdr> | |
1819 | EOF | |
1820 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 1821 | { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1822 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1823 | if test -z "$ac_err"; then | |
1824 | rm -rf conftest* | |
1825 | eval "ac_cv_header_$ac_safe=yes" | |
1826 | else | |
1827 | echo "$ac_err" >&5 | |
1828 | echo "configure: failed program was:" >&5 | |
1829 | cat conftest.$ac_ext >&5 | |
1830 | rm -rf conftest* | |
1831 | eval "ac_cv_header_$ac_safe=no" | |
1832 | fi | |
1833 | rm -f conftest* | |
1834 | fi | |
1835 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1836 | echo "$ac_t""yes" 1>&6 | |
1837 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1838 | cat >> confdefs.h <<EOF | |
1839 | #define $ac_tr_hdr 1 | |
1840 | EOF | |
1841 | ||
1842 | else | |
1843 | echo "$ac_t""no" 1>&6 | |
1844 | fi | |
1845 | done | |
1846 | ||
1847 | for ac_func in getpagesize | |
1848 | do | |
1849 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 1850 | echo "configure:1851: checking for $ac_func" >&5 |
c906108c SS |
1851 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1852 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1853 | else | |
1854 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1855 | #line 1856 "configure" |
c906108c SS |
1856 | #include "confdefs.h" |
1857 | /* System header to define __stub macros and hopefully few prototypes, | |
1858 | which can conflict with char $ac_func(); below. */ | |
1859 | #include <assert.h> | |
1860 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1861 | /* We use char because int might match the return type of a gcc2 | |
1862 | builtin and then its argument prototype would still apply. */ | |
1863 | char $ac_func(); | |
1864 | ||
1865 | int main() { | |
1866 | ||
1867 | /* The GNU C library defines this for functions which it implements | |
1868 | to always fail with ENOSYS. Some functions are actually named | |
1869 | something starting with __ and the normal name is an alias. */ | |
1870 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1871 | choke me | |
1872 | #else | |
1873 | $ac_func(); | |
1874 | #endif | |
1875 | ||
1876 | ; return 0; } | |
1877 | EOF | |
030292b7 | 1878 | if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1879 | rm -rf conftest* |
1880 | eval "ac_cv_func_$ac_func=yes" | |
1881 | else | |
1882 | echo "configure: failed program was:" >&5 | |
1883 | cat conftest.$ac_ext >&5 | |
1884 | rm -rf conftest* | |
1885 | eval "ac_cv_func_$ac_func=no" | |
1886 | fi | |
1887 | rm -f conftest* | |
1888 | fi | |
1889 | ||
1890 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1891 | echo "$ac_t""yes" 1>&6 | |
1892 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1893 | cat >> confdefs.h <<EOF | |
1894 | #define $ac_tr_func 1 | |
1895 | EOF | |
1896 | ||
1897 | else | |
1898 | echo "$ac_t""no" 1>&6 | |
1899 | fi | |
1900 | done | |
1901 | ||
1902 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
030292b7 | 1903 | echo "configure:1904: checking for working mmap" >&5 |
c906108c SS |
1904 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1905 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1906 | else | |
1907 | if test "$cross_compiling" = yes; then | |
1908 | ac_cv_func_mmap_fixed_mapped=no | |
1909 | else | |
1910 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 1911 | #line 1912 "configure" |
c906108c SS |
1912 | #include "confdefs.h" |
1913 | ||
1914 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1915 | Here is a matrix of mmap possibilities: | |
1916 | mmap private not fixed | |
1917 | mmap private fixed at somewhere currently unmapped | |
1918 | mmap private fixed at somewhere already mapped | |
1919 | mmap shared not fixed | |
1920 | mmap shared fixed at somewhere currently unmapped | |
1921 | mmap shared fixed at somewhere already mapped | |
1922 | For private mappings, we should verify that changes cannot be read() | |
1923 | back from the file, nor mmap's back from the file at a different | |
1924 | address. (There have been systems where private was not correctly | |
1925 | implemented like the infamous i386 svr4.0, and systems where the | |
1926 | VM page cache was not coherent with the filesystem buffer cache | |
1927 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1928 | For shared mappings, we should conversely verify that changes get | |
1929 | propogated back to all the places they're supposed to be. | |
1930 | ||
1931 | Grep wants private fixed already mapped. | |
1932 | The main things grep needs to know about mmap are: | |
1933 | * does it exist and is it safe to write into the mmap'd area | |
1934 | * how to use it (BSD variants) */ | |
1935 | #include <sys/types.h> | |
1936 | #include <fcntl.h> | |
1937 | #include <sys/mman.h> | |
1938 | ||
1939 | /* This mess was copied from the GNU getpagesize.h. */ | |
1940 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1941 | # ifdef HAVE_UNISTD_H |
1942 | # include <unistd.h> | |
1943 | # endif | |
c906108c SS |
1944 | |
1945 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1946 | # ifndef HAVE_SYS_PARAM_H | |
1947 | # define HAVE_SYS_PARAM_H 1 | |
1948 | # endif | |
1949 | ||
1950 | # ifdef _SC_PAGESIZE | |
1951 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1952 | # else /* no _SC_PAGESIZE */ | |
1953 | # ifdef HAVE_SYS_PARAM_H | |
1954 | # include <sys/param.h> | |
1955 | # ifdef EXEC_PAGESIZE | |
1956 | # define getpagesize() EXEC_PAGESIZE | |
1957 | # else /* no EXEC_PAGESIZE */ | |
1958 | # ifdef NBPG | |
1959 | # define getpagesize() NBPG * CLSIZE | |
1960 | # ifndef CLSIZE | |
1961 | # define CLSIZE 1 | |
1962 | # endif /* no CLSIZE */ | |
1963 | # else /* no NBPG */ | |
1964 | # ifdef NBPC | |
1965 | # define getpagesize() NBPC | |
1966 | # else /* no NBPC */ | |
1967 | # ifdef PAGESIZE | |
1968 | # define getpagesize() PAGESIZE | |
1969 | # endif /* PAGESIZE */ | |
1970 | # endif /* no NBPC */ | |
1971 | # endif /* no NBPG */ | |
1972 | # endif /* no EXEC_PAGESIZE */ | |
1973 | # else /* no HAVE_SYS_PARAM_H */ | |
1974 | # define getpagesize() 8192 /* punt totally */ | |
1975 | # endif /* no HAVE_SYS_PARAM_H */ | |
1976 | # endif /* no _SC_PAGESIZE */ | |
1977 | ||
1978 | #endif /* no HAVE_GETPAGESIZE */ | |
1979 | ||
1980 | #ifdef __cplusplus | |
1981 | extern "C" { void *malloc(unsigned); } | |
1982 | #else | |
1983 | char *malloc(); | |
1984 | #endif | |
1985 | ||
1986 | int | |
1987 | main() | |
1988 | { | |
1989 | char *data, *data2, *data3; | |
1990 | int i, pagesize; | |
1991 | int fd; | |
1992 | ||
1993 | pagesize = getpagesize(); | |
1994 | ||
1995 | /* | |
1996 | * First, make a file with some known garbage in it. | |
1997 | */ | |
1998 | data = malloc(pagesize); | |
1999 | if (!data) | |
2000 | exit(1); | |
2001 | for (i = 0; i < pagesize; ++i) | |
2002 | *(data + i) = rand(); | |
2003 | umask(0); | |
2004 | fd = creat("conftestmmap", 0600); | |
2005 | if (fd < 0) | |
2006 | exit(1); | |
2007 | if (write(fd, data, pagesize) != pagesize) | |
2008 | exit(1); | |
2009 | close(fd); | |
2010 | ||
2011 | /* | |
2012 | * Next, try to mmap the file at a fixed address which | |
2013 | * already has something else allocated at it. If we can, | |
2014 | * also make sure that we see the same garbage. | |
2015 | */ | |
2016 | fd = open("conftestmmap", O_RDWR); | |
2017 | if (fd < 0) | |
2018 | exit(1); | |
2019 | data2 = malloc(2 * pagesize); | |
2020 | if (!data2) | |
2021 | exit(1); | |
2022 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2023 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2024 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2025 | exit(1); | |
2026 | for (i = 0; i < pagesize; ++i) | |
2027 | if (*(data + i) != *(data2 + i)) | |
2028 | exit(1); | |
2029 | ||
2030 | /* | |
2031 | * Finally, make sure that changes to the mapped area | |
2032 | * do not percolate back to the file as seen by read(). | |
2033 | * (This is a bug on some variants of i386 svr4.0.) | |
2034 | */ | |
2035 | for (i = 0; i < pagesize; ++i) | |
2036 | *(data2 + i) = *(data2 + i) + 1; | |
2037 | data3 = malloc(pagesize); | |
2038 | if (!data3) | |
2039 | exit(1); | |
2040 | if (read(fd, data3, pagesize) != pagesize) | |
2041 | exit(1); | |
2042 | for (i = 0; i < pagesize; ++i) | |
2043 | if (*(data + i) != *(data3 + i)) | |
2044 | exit(1); | |
2045 | close(fd); | |
2046 | unlink("conftestmmap"); | |
2047 | exit(0); | |
2048 | } | |
2049 | ||
2050 | EOF | |
030292b7 | 2051 | if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2052 | then |
2053 | ac_cv_func_mmap_fixed_mapped=yes | |
2054 | else | |
2055 | echo "configure: failed program was:" >&5 | |
2056 | cat conftest.$ac_ext >&5 | |
2057 | rm -fr conftest* | |
2058 | ac_cv_func_mmap_fixed_mapped=no | |
2059 | fi | |
2060 | rm -fr conftest* | |
2061 | fi | |
2062 | ||
2063 | fi | |
2064 | ||
2065 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2066 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2067 | cat >> confdefs.h <<\EOF | |
2068 | #define HAVE_MMAP 1 | |
2069 | EOF | |
2070 | ||
2071 | fi | |
2072 | ||
2073 | ||
2074 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2075 | unistd.h values.h sys/param.h | |
2076 | do | |
2077 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2078 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 2079 | echo "configure:2080: checking for $ac_hdr" >&5 |
c906108c SS |
2080 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2082 | else | |
2083 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2084 | #line 2085 "configure" |
c906108c SS |
2085 | #include "confdefs.h" |
2086 | #include <$ac_hdr> | |
2087 | EOF | |
2088 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 2089 | { (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2090 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2091 | if test -z "$ac_err"; then | |
2092 | rm -rf conftest* | |
2093 | eval "ac_cv_header_$ac_safe=yes" | |
2094 | else | |
2095 | echo "$ac_err" >&5 | |
2096 | echo "configure: failed program was:" >&5 | |
2097 | cat conftest.$ac_ext >&5 | |
2098 | rm -rf conftest* | |
2099 | eval "ac_cv_header_$ac_safe=no" | |
2100 | fi | |
2101 | rm -f conftest* | |
2102 | fi | |
2103 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2104 | echo "$ac_t""yes" 1>&6 | |
2105 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2106 | cat >> confdefs.h <<EOF | |
2107 | #define $ac_tr_hdr 1 | |
2108 | EOF | |
2109 | ||
2110 | else | |
2111 | echo "$ac_t""no" 1>&6 | |
2112 | fi | |
2113 | done | |
2114 | ||
2115 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2116 | __argz_count __argz_stringify __argz_next | |
2117 | do | |
2118 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 2119 | echo "configure:2120: checking for $ac_func" >&5 |
c906108c SS |
2120 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2122 | else | |
2123 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2124 | #line 2125 "configure" |
c906108c SS |
2125 | #include "confdefs.h" |
2126 | /* System header to define __stub macros and hopefully few prototypes, | |
2127 | which can conflict with char $ac_func(); below. */ | |
2128 | #include <assert.h> | |
2129 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2130 | /* We use char because int might match the return type of a gcc2 | |
2131 | builtin and then its argument prototype would still apply. */ | |
2132 | char $ac_func(); | |
2133 | ||
2134 | int main() { | |
2135 | ||
2136 | /* The GNU C library defines this for functions which it implements | |
2137 | to always fail with ENOSYS. Some functions are actually named | |
2138 | something starting with __ and the normal name is an alias. */ | |
2139 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2140 | choke me | |
2141 | #else | |
2142 | $ac_func(); | |
2143 | #endif | |
2144 | ||
2145 | ; return 0; } | |
2146 | EOF | |
030292b7 | 2147 | if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2148 | rm -rf conftest* |
2149 | eval "ac_cv_func_$ac_func=yes" | |
2150 | else | |
2151 | echo "configure: failed program was:" >&5 | |
2152 | cat conftest.$ac_ext >&5 | |
2153 | rm -rf conftest* | |
2154 | eval "ac_cv_func_$ac_func=no" | |
2155 | fi | |
2156 | rm -f conftest* | |
2157 | fi | |
2158 | ||
2159 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2160 | echo "$ac_t""yes" 1>&6 | |
2161 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2162 | cat >> confdefs.h <<EOF | |
2163 | #define $ac_tr_func 1 | |
2164 | EOF | |
2165 | ||
2166 | else | |
2167 | echo "$ac_t""no" 1>&6 | |
2168 | fi | |
2169 | done | |
2170 | ||
2171 | ||
2172 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2173 | for ac_func in stpcpy | |
2174 | do | |
2175 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 2176 | echo "configure:2177: checking for $ac_func" >&5 |
c906108c SS |
2177 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2178 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2179 | else | |
2180 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2181 | #line 2182 "configure" |
c906108c SS |
2182 | #include "confdefs.h" |
2183 | /* System header to define __stub macros and hopefully few prototypes, | |
2184 | which can conflict with char $ac_func(); below. */ | |
2185 | #include <assert.h> | |
2186 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2187 | /* We use char because int might match the return type of a gcc2 | |
2188 | builtin and then its argument prototype would still apply. */ | |
2189 | char $ac_func(); | |
2190 | ||
2191 | int main() { | |
2192 | ||
2193 | /* The GNU C library defines this for functions which it implements | |
2194 | to always fail with ENOSYS. Some functions are actually named | |
2195 | something starting with __ and the normal name is an alias. */ | |
2196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2197 | choke me | |
2198 | #else | |
2199 | $ac_func(); | |
2200 | #endif | |
2201 | ||
2202 | ; return 0; } | |
2203 | EOF | |
030292b7 | 2204 | if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2205 | rm -rf conftest* |
2206 | eval "ac_cv_func_$ac_func=yes" | |
2207 | else | |
2208 | echo "configure: failed program was:" >&5 | |
2209 | cat conftest.$ac_ext >&5 | |
2210 | rm -rf conftest* | |
2211 | eval "ac_cv_func_$ac_func=no" | |
2212 | fi | |
2213 | rm -f conftest* | |
2214 | fi | |
2215 | ||
2216 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2217 | echo "$ac_t""yes" 1>&6 | |
2218 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2219 | cat >> confdefs.h <<EOF | |
2220 | #define $ac_tr_func 1 | |
2221 | EOF | |
2222 | ||
2223 | else | |
2224 | echo "$ac_t""no" 1>&6 | |
2225 | fi | |
2226 | done | |
2227 | ||
2228 | fi | |
2229 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2230 | cat >> confdefs.h <<\EOF | |
2231 | #define HAVE_STPCPY 1 | |
2232 | EOF | |
2233 | ||
2234 | fi | |
2235 | ||
2236 | if test $ac_cv_header_locale_h = yes; then | |
2237 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
030292b7 | 2238 | echo "configure:2239: checking for LC_MESSAGES" >&5 |
c906108c SS |
2239 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2240 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2241 | else | |
2242 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2243 | #line 2244 "configure" |
c906108c SS |
2244 | #include "confdefs.h" |
2245 | #include <locale.h> | |
2246 | int main() { | |
2247 | return LC_MESSAGES | |
2248 | ; return 0; } | |
2249 | EOF | |
030292b7 | 2250 | if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2251 | rm -rf conftest* |
2252 | am_cv_val_LC_MESSAGES=yes | |
2253 | else | |
2254 | echo "configure: failed program was:" >&5 | |
2255 | cat conftest.$ac_ext >&5 | |
2256 | rm -rf conftest* | |
2257 | am_cv_val_LC_MESSAGES=no | |
2258 | fi | |
2259 | rm -f conftest* | |
2260 | fi | |
2261 | ||
2262 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2263 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2264 | cat >> confdefs.h <<\EOF | |
2265 | #define HAVE_LC_MESSAGES 1 | |
2266 | EOF | |
2267 | ||
2268 | fi | |
2269 | fi | |
2270 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
030292b7 | 2271 | echo "configure:2272: checking whether NLS is requested" >&5 |
c906108c SS |
2272 | # Check whether --enable-nls or --disable-nls was given. |
2273 | if test "${enable_nls+set}" = set; then | |
2274 | enableval="$enable_nls" | |
2275 | USE_NLS=$enableval | |
2276 | else | |
2277 | USE_NLS=yes | |
2278 | fi | |
2279 | ||
2280 | echo "$ac_t""$USE_NLS" 1>&6 | |
2281 | ||
2282 | ||
2283 | USE_INCLUDED_LIBINTL=no | |
2284 | ||
2285 | if test "$USE_NLS" = "yes"; then | |
2286 | cat >> confdefs.h <<\EOF | |
2287 | #define ENABLE_NLS 1 | |
2288 | EOF | |
2289 | ||
2290 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
030292b7 | 2291 | echo "configure:2292: checking whether included gettext is requested" >&5 |
c906108c SS |
2292 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2293 | if test "${with_included_gettext+set}" = set; then | |
2294 | withval="$with_included_gettext" | |
2295 | nls_cv_force_use_gnu_gettext=$withval | |
2296 | else | |
2297 | nls_cv_force_use_gnu_gettext=no | |
2298 | fi | |
2299 | ||
2300 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2301 | ||
2302 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2303 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2304 | nls_cv_header_intl= | |
2305 | nls_cv_header_libgt= | |
2306 | CATOBJEXT=NONE | |
2307 | ||
2308 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2309 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
030292b7 | 2310 | echo "configure:2311: checking for libintl.h" >&5 |
c906108c SS |
2311 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2312 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2313 | else | |
2314 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2315 | #line 2316 "configure" |
c906108c SS |
2316 | #include "confdefs.h" |
2317 | #include <libintl.h> | |
2318 | EOF | |
2319 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 2320 | { (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2321 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2322 | if test -z "$ac_err"; then | |
2323 | rm -rf conftest* | |
2324 | eval "ac_cv_header_$ac_safe=yes" | |
2325 | else | |
2326 | echo "$ac_err" >&5 | |
2327 | echo "configure: failed program was:" >&5 | |
2328 | cat conftest.$ac_ext >&5 | |
2329 | rm -rf conftest* | |
2330 | eval "ac_cv_header_$ac_safe=no" | |
2331 | fi | |
2332 | rm -f conftest* | |
2333 | fi | |
2334 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2335 | echo "$ac_t""yes" 1>&6 | |
2336 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
030292b7 | 2337 | echo "configure:2338: checking for gettext in libc" >&5 |
c906108c SS |
2338 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2339 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2340 | else | |
2341 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2342 | #line 2343 "configure" |
c906108c SS |
2343 | #include "confdefs.h" |
2344 | #include <libintl.h> | |
2345 | int main() { | |
2346 | return (int) gettext ("") | |
2347 | ; return 0; } | |
2348 | EOF | |
030292b7 | 2349 | if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2350 | rm -rf conftest* |
2351 | gt_cv_func_gettext_libc=yes | |
2352 | else | |
2353 | echo "configure: failed program was:" >&5 | |
2354 | cat conftest.$ac_ext >&5 | |
2355 | rm -rf conftest* | |
2356 | gt_cv_func_gettext_libc=no | |
2357 | fi | |
2358 | rm -f conftest* | |
2359 | fi | |
2360 | ||
2361 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2362 | ||
2363 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2364 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
030292b7 | 2365 | echo "configure:2366: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2366 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2367 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2368 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2369 | else | |
2370 | ac_save_LIBS="$LIBS" | |
2371 | LIBS="-lintl $LIBS" | |
2372 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2373 | #line 2374 "configure" |
c906108c SS |
2374 | #include "confdefs.h" |
2375 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2376 | /* We use char because int might match the return type of a gcc2 | |
2377 | builtin and then its argument prototype would still apply. */ | |
2378 | char bindtextdomain(); | |
2379 | ||
2380 | int main() { | |
2381 | bindtextdomain() | |
2382 | ; return 0; } | |
2383 | EOF | |
030292b7 | 2384 | if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2385 | rm -rf conftest* |
2386 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2387 | else | |
2388 | echo "configure: failed program was:" >&5 | |
2389 | cat conftest.$ac_ext >&5 | |
2390 | rm -rf conftest* | |
2391 | eval "ac_cv_lib_$ac_lib_var=no" | |
2392 | fi | |
2393 | rm -f conftest* | |
2394 | LIBS="$ac_save_LIBS" | |
2395 | ||
2396 | fi | |
2397 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2398 | echo "$ac_t""yes" 1>&6 | |
2399 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
030292b7 | 2400 | echo "configure:2401: checking for gettext in libintl" >&5 |
c906108c SS |
2401 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2402 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2403 | else | |
2404 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2405 | #line 2406 "configure" |
c906108c SS |
2406 | #include "confdefs.h" |
2407 | ||
2408 | int main() { | |
2409 | return (int) gettext ("") | |
2410 | ; return 0; } | |
2411 | EOF | |
030292b7 | 2412 | if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2413 | rm -rf conftest* |
2414 | gt_cv_func_gettext_libintl=yes | |
2415 | else | |
2416 | echo "configure: failed program was:" >&5 | |
2417 | cat conftest.$ac_ext >&5 | |
2418 | rm -rf conftest* | |
2419 | gt_cv_func_gettext_libintl=no | |
2420 | fi | |
2421 | rm -f conftest* | |
2422 | fi | |
2423 | ||
2424 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2425 | else | |
2426 | echo "$ac_t""no" 1>&6 | |
2427 | fi | |
2428 | ||
2429 | fi | |
2430 | ||
2431 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2432 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2433 | cat >> confdefs.h <<\EOF | |
2434 | #define HAVE_GETTEXT 1 | |
2435 | EOF | |
2436 | ||
2437 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2438 | set dummy msgfmt; ac_word=$2 | |
2439 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2440 | echo "configure:2441: checking for $ac_word" >&5 |
c906108c SS |
2441 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2442 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2443 | else | |
2444 | case "$MSGFMT" in | |
2445 | /*) | |
2446 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2447 | ;; | |
2448 | *) | |
2449 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2450 | for ac_dir in $PATH; do | |
2451 | test -z "$ac_dir" && ac_dir=. | |
2452 | if test -f $ac_dir/$ac_word; then | |
2453 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2454 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2455 | break | |
2456 | fi | |
2457 | fi | |
2458 | done | |
2459 | IFS="$ac_save_ifs" | |
2460 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2461 | ;; | |
2462 | esac | |
2463 | fi | |
2464 | MSGFMT="$ac_cv_path_MSGFMT" | |
2465 | if test -n "$MSGFMT"; then | |
2466 | echo "$ac_t""$MSGFMT" 1>&6 | |
2467 | else | |
2468 | echo "$ac_t""no" 1>&6 | |
2469 | fi | |
2470 | if test "$MSGFMT" != "no"; then | |
2471 | for ac_func in dcgettext | |
2472 | do | |
2473 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 2474 | echo "configure:2475: checking for $ac_func" >&5 |
c906108c SS |
2475 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2476 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2477 | else | |
2478 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2479 | #line 2480 "configure" |
c906108c SS |
2480 | #include "confdefs.h" |
2481 | /* System header to define __stub macros and hopefully few prototypes, | |
2482 | which can conflict with char $ac_func(); below. */ | |
2483 | #include <assert.h> | |
2484 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2485 | /* We use char because int might match the return type of a gcc2 | |
2486 | builtin and then its argument prototype would still apply. */ | |
2487 | char $ac_func(); | |
2488 | ||
2489 | int main() { | |
2490 | ||
2491 | /* The GNU C library defines this for functions which it implements | |
2492 | to always fail with ENOSYS. Some functions are actually named | |
2493 | something starting with __ and the normal name is an alias. */ | |
2494 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2495 | choke me | |
2496 | #else | |
2497 | $ac_func(); | |
2498 | #endif | |
2499 | ||
2500 | ; return 0; } | |
2501 | EOF | |
030292b7 | 2502 | if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2503 | rm -rf conftest* |
2504 | eval "ac_cv_func_$ac_func=yes" | |
2505 | else | |
2506 | echo "configure: failed program was:" >&5 | |
2507 | cat conftest.$ac_ext >&5 | |
2508 | rm -rf conftest* | |
2509 | eval "ac_cv_func_$ac_func=no" | |
2510 | fi | |
2511 | rm -f conftest* | |
2512 | fi | |
2513 | ||
2514 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2515 | echo "$ac_t""yes" 1>&6 | |
2516 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2517 | cat >> confdefs.h <<EOF | |
2518 | #define $ac_tr_func 1 | |
2519 | EOF | |
2520 | ||
2521 | else | |
2522 | echo "$ac_t""no" 1>&6 | |
2523 | fi | |
2524 | done | |
2525 | ||
2526 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2527 | set dummy gmsgfmt; ac_word=$2 | |
2528 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2529 | echo "configure:2530: checking for $ac_word" >&5 |
c906108c SS |
2530 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2531 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2532 | else | |
2533 | case "$GMSGFMT" in | |
2534 | /*) | |
2535 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2536 | ;; | |
2537 | ?:/*) | |
2538 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2539 | ;; | |
2540 | *) | |
2541 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2542 | ac_dummy="$PATH" | |
2543 | for ac_dir in $ac_dummy; do | |
2544 | test -z "$ac_dir" && ac_dir=. | |
2545 | if test -f $ac_dir/$ac_word; then | |
2546 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2547 | break | |
2548 | fi | |
2549 | done | |
2550 | IFS="$ac_save_ifs" | |
2551 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2552 | ;; | |
2553 | esac | |
2554 | fi | |
2555 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2556 | if test -n "$GMSGFMT"; then | |
2557 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2558 | else | |
2559 | echo "$ac_t""no" 1>&6 | |
2560 | fi | |
2561 | ||
2562 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2563 | set dummy xgettext; ac_word=$2 | |
2564 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2565 | echo "configure:2566: checking for $ac_word" >&5 |
c906108c SS |
2566 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2567 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2568 | else | |
2569 | case "$XGETTEXT" in | |
2570 | /*) | |
2571 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2572 | ;; | |
2573 | *) | |
2574 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2575 | for ac_dir in $PATH; do | |
2576 | test -z "$ac_dir" && ac_dir=. | |
2577 | if test -f $ac_dir/$ac_word; then | |
2578 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2579 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2580 | break | |
2581 | fi | |
2582 | fi | |
2583 | done | |
2584 | IFS="$ac_save_ifs" | |
2585 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2586 | ;; | |
2587 | esac | |
2588 | fi | |
2589 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2590 | if test -n "$XGETTEXT"; then | |
2591 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2592 | else | |
2593 | echo "$ac_t""no" 1>&6 | |
2594 | fi | |
2595 | ||
2596 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2597 | #line 2598 "configure" |
c906108c SS |
2598 | #include "confdefs.h" |
2599 | ||
2600 | int main() { | |
2601 | extern int _nl_msg_cat_cntr; | |
2602 | return _nl_msg_cat_cntr | |
2603 | ; return 0; } | |
2604 | EOF | |
030292b7 | 2605 | if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2606 | rm -rf conftest* |
2607 | CATOBJEXT=.gmo | |
2608 | DATADIRNAME=share | |
2609 | else | |
2610 | echo "configure: failed program was:" >&5 | |
2611 | cat conftest.$ac_ext >&5 | |
2612 | rm -rf conftest* | |
2613 | CATOBJEXT=.mo | |
2614 | DATADIRNAME=lib | |
2615 | fi | |
2616 | rm -f conftest* | |
2617 | INSTOBJEXT=.mo | |
2618 | fi | |
2619 | fi | |
2620 | ||
2621 | else | |
2622 | echo "$ac_t""no" 1>&6 | |
2623 | fi | |
2624 | ||
2625 | ||
2626 | ||
2627 | if test "$CATOBJEXT" = "NONE"; then | |
2628 | nls_cv_use_gnu_gettext=yes | |
2629 | fi | |
2630 | fi | |
2631 | ||
2632 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2633 | INTLOBJS="\$(GETTOBJS)" | |
2634 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2635 | set dummy msgfmt; ac_word=$2 | |
2636 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2637 | echo "configure:2638: checking for $ac_word" >&5 |
c906108c SS |
2638 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2640 | else | |
2641 | case "$MSGFMT" in | |
2642 | /*) | |
2643 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2644 | ;; | |
2645 | *) | |
2646 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2647 | for ac_dir in $PATH; do | |
2648 | test -z "$ac_dir" && ac_dir=. | |
2649 | if test -f $ac_dir/$ac_word; then | |
2650 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2651 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2652 | break | |
2653 | fi | |
2654 | fi | |
2655 | done | |
2656 | IFS="$ac_save_ifs" | |
2657 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2658 | ;; | |
2659 | esac | |
2660 | fi | |
2661 | MSGFMT="$ac_cv_path_MSGFMT" | |
2662 | if test -n "$MSGFMT"; then | |
2663 | echo "$ac_t""$MSGFMT" 1>&6 | |
2664 | else | |
2665 | echo "$ac_t""no" 1>&6 | |
2666 | fi | |
2667 | ||
2668 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2669 | set dummy gmsgfmt; ac_word=$2 | |
2670 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2671 | echo "configure:2672: checking for $ac_word" >&5 |
c906108c SS |
2672 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2674 | else | |
2675 | case "$GMSGFMT" in | |
2676 | /*) | |
2677 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2678 | ;; | |
2679 | ?:/*) | |
2680 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2681 | ;; | |
2682 | *) | |
2683 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2684 | ac_dummy="$PATH" | |
2685 | for ac_dir in $ac_dummy; do | |
2686 | test -z "$ac_dir" && ac_dir=. | |
2687 | if test -f $ac_dir/$ac_word; then | |
2688 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2689 | break | |
2690 | fi | |
2691 | done | |
2692 | IFS="$ac_save_ifs" | |
2693 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2694 | ;; | |
2695 | esac | |
2696 | fi | |
2697 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2698 | if test -n "$GMSGFMT"; then | |
2699 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2700 | else | |
2701 | echo "$ac_t""no" 1>&6 | |
2702 | fi | |
2703 | ||
2704 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2705 | set dummy xgettext; ac_word=$2 | |
2706 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 2707 | echo "configure:2708: checking for $ac_word" >&5 |
c906108c SS |
2708 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2710 | else | |
2711 | case "$XGETTEXT" in | |
2712 | /*) | |
2713 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2714 | ;; | |
2715 | *) | |
2716 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2717 | for ac_dir in $PATH; do | |
2718 | test -z "$ac_dir" && ac_dir=. | |
2719 | if test -f $ac_dir/$ac_word; then | |
2720 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2721 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2722 | break | |
2723 | fi | |
2724 | fi | |
2725 | done | |
2726 | IFS="$ac_save_ifs" | |
2727 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2728 | ;; | |
2729 | esac | |
2730 | fi | |
2731 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2732 | if test -n "$XGETTEXT"; then | |
2733 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2734 | else | |
2735 | echo "$ac_t""no" 1>&6 | |
2736 | fi | |
2737 | ||
2738 | ||
2739 | USE_INCLUDED_LIBINTL=yes | |
2740 | CATOBJEXT=.gmo | |
2741 | INSTOBJEXT=.mo | |
2742 | DATADIRNAME=share | |
2743 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2744 | INTLLIBS=$INTLDEPS | |
2745 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2746 | nls_cv_header_intl=libintl.h | |
2747 | nls_cv_header_libgt=libgettext.h | |
2748 | fi | |
2749 | ||
2750 | if test "$XGETTEXT" != ":"; then | |
2751 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2752 | : ; | |
2753 | else | |
2754 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2755 | XGETTEXT=":" | |
2756 | fi | |
2757 | fi | |
2758 | ||
2759 | # We need to process the po/ directory. | |
2760 | POSUB=po | |
2761 | else | |
2762 | DATADIRNAME=share | |
2763 | nls_cv_header_intl=libintl.h | |
2764 | nls_cv_header_libgt=libgettext.h | |
2765 | fi | |
2766 | ||
2767 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2768 | # because some of the sources are only built for this goal. | |
2769 | if test "$PACKAGE" = gettext; then | |
2770 | USE_NLS=yes | |
2771 | USE_INCLUDED_LIBINTL=yes | |
2772 | fi | |
2773 | ||
2774 | for lang in $ALL_LINGUAS; do | |
2775 | GMOFILES="$GMOFILES $lang.gmo" | |
2776 | POFILES="$POFILES $lang.po" | |
2777 | done | |
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | if test "x$CATOBJEXT" != "x"; then | |
2793 | if test "x$ALL_LINGUAS" = "x"; then | |
2794 | LINGUAS= | |
2795 | else | |
2796 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
030292b7 | 2797 | echo "configure:2798: checking for catalogs to be installed" >&5 |
c906108c SS |
2798 | NEW_LINGUAS= |
2799 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2800 | case "$ALL_LINGUAS" in | |
2801 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2802 | esac | |
2803 | done | |
2804 | LINGUAS=$NEW_LINGUAS | |
2805 | echo "$ac_t""$LINGUAS" 1>&6 | |
2806 | fi | |
2807 | ||
2808 | if test -n "$LINGUAS"; then | |
2809 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2810 | fi | |
2811 | fi | |
2812 | ||
2813 | if test $ac_cv_header_locale_h = yes; then | |
2814 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2815 | else | |
2816 | INCLUDE_LOCALE_H="\ | |
2817 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2818 | fi | |
2819 | ||
2820 | ||
2821 | if test -f $srcdir/po2tbl.sed.in; then | |
2822 | if test "$CATOBJEXT" = ".cat"; then | |
2823 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2824 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
030292b7 | 2825 | echo "configure:2826: checking for linux/version.h" >&5 |
c906108c SS |
2826 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2828 | else | |
2829 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 2830 | #line 2831 "configure" |
c906108c SS |
2831 | #include "confdefs.h" |
2832 | #include <linux/version.h> | |
2833 | EOF | |
2834 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 2835 | { (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2836 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2837 | if test -z "$ac_err"; then | |
2838 | rm -rf conftest* | |
2839 | eval "ac_cv_header_$ac_safe=yes" | |
2840 | else | |
2841 | echo "$ac_err" >&5 | |
2842 | echo "configure: failed program was:" >&5 | |
2843 | cat conftest.$ac_ext >&5 | |
2844 | rm -rf conftest* | |
2845 | eval "ac_cv_header_$ac_safe=no" | |
2846 | fi | |
2847 | rm -f conftest* | |
2848 | fi | |
2849 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2850 | echo "$ac_t""yes" 1>&6 | |
2851 | msgformat=linux | |
2852 | else | |
2853 | echo "$ac_t""no" 1>&6 | |
2854 | msgformat=xopen | |
2855 | fi | |
2856 | ||
2857 | ||
2858 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2859 | fi | |
2860 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2861 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2862 | fi | |
2863 | ||
2864 | if test "$PACKAGE" = "gettext"; then | |
2865 | GT_NO="#NO#" | |
2866 | GT_YES= | |
2867 | else | |
2868 | GT_NO= | |
2869 | GT_YES="#YES#" | |
2870 | fi | |
2871 | ||
2872 | ||
2873 | ||
2874 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2875 | ||
2876 | ||
2877 | l= | |
2878 | ||
2879 | ||
4536bbc6 | 2880 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2881 | test -d po || mkdir po |
2882 | if test "x$srcdir" != "x."; then | |
2883 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2884 | posrcprefix="$srcdir/" | |
2885 | else | |
2886 | posrcprefix="../$srcdir/" | |
2887 | fi | |
2888 | else | |
2889 | posrcprefix="../" | |
2890 | fi | |
2891 | rm -f po/POTFILES | |
2892 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2893 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2894 | fi | |
2895 | ||
0fbb3da7 TT |
2896 | cat >> confdefs.h <<\EOF |
2897 | #define PACKAGE "gdb" | |
2898 | EOF | |
2899 | ||
2900 | ||
c906108c SS |
2901 | |
2902 | ||
2903 | CONFIG_OBS= | |
66b965bb | 2904 | CONFIG_LIB_OBS= |
c906108c SS |
2905 | CONFIG_DEPS= |
2906 | CONFIG_SRCS= | |
fb40c209 AC |
2907 | CONFIG_INITS= |
2908 | ENABLE_CFLAGS= | |
b3a90332 AC |
2909 | CONFIG_ALL= |
2910 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2911 | CONFIG_INSTALL= |
2912 | CONFIG_UNINSTALL= | |
c906108c | 2913 | |
8dcde887 | 2914 | subdirs="doc testsuite" |
96baa820 | 2915 | |
8dcde887 | 2916 | configdirs= |
96baa820 | 2917 | |
27e9bf90 | 2918 | . $srcdir/configure.host |
c906108c | 2919 | |
27e9bf90 | 2920 | . $srcdir/configure.tgt |
c906108c | 2921 | |
27e9bf90 MK |
2922 | # Fetch the default architecture and default target vector from BFD. |
2923 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2924 | |
27e9bf90 MK |
2925 | # We only want the first architecture, so strip off the others if |
2926 | # there is more than one. | |
2927 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2928 | |
27e9bf90 MK |
2929 | if test "x$targ_archs" != x; then |
2930 | cat >> confdefs.h <<EOF | |
2931 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2932 | EOF |
2933 | ||
2934 | fi | |
27e9bf90 MK |
2935 | if test "x$targ_defvec" != x; then |
2936 | cat >> confdefs.h <<EOF | |
2937 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2938 | EOF |
2939 | ||
2940 | fi | |
c906108c | 2941 | |
8bb2c122 MK |
2942 | if test "$program_transform_name" = s,x,x,; then |
2943 | program_transform_name= | |
2944 | else | |
2945 | # Double any \ or $. echo might interpret backslashes. | |
2946 | cat <<\EOF_SED > conftestsed | |
2947 | s,\\,\\\\,g; s,\$,$$,g | |
2948 | EOF_SED | |
2949 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2950 | rm -f conftestsed | |
2951 | fi | |
2952 | test "$program_prefix" != NONE && | |
2953 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2954 | # Use a double $ so make ignores it. | |
2955 | test "$program_suffix" != NONE && | |
2956 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2957 | ||
2958 | # sed with no file args requires a program. | |
2959 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2960 | ||
2961 | ||
627af7ea MK |
2962 | # The CLI cannot be disabled yet, but may be in the future. |
2963 | ||
2964 | # Enable CLI. | |
2965 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2966 | if test "${enable_gdbcli+set}" = set; then | |
2967 | enableval="$enable_gdbcli" | |
2968 | case $enableval in | |
2969 | yes) | |
2970 | ;; | |
2971 | no) | |
2972 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2973 | *) | |
2974 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2975 | esac | |
2976 | else | |
2977 | enable_gdbcli=yes | |
2978 | fi | |
2979 | ||
2980 | if test x"$enable_gdbcli" = xyes; then | |
2981 | if test -d $srcdir/cli; then | |
2982 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
2983 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
2984 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
2985 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
2986 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
2987 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
2988 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
2989 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
2990 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
2991 | fi | |
2992 | fi | |
2993 | ||
2994 | # Enable MI. | |
2995 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
2996 | if test "${enable_gdbmi+set}" = set; then | |
2997 | enableval="$enable_gdbmi" | |
2998 | case $enableval in | |
2999 | yes | no) | |
3000 | ;; | |
3001 | *) | |
3002 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3003 | esac | |
3004 | else | |
3005 | enable_gdbmi=yes | |
3006 | fi | |
3007 | ||
3008 | if test x"$enable_gdbmi" = xyes; then | |
3009 | if test -d $srcdir/mi; then | |
3010 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3011 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3012 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3013 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3014 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3015 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3016 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3017 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3018 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3019 | fi | |
3020 | fi | |
3021 | ||
06825bd1 MK |
3022 | # Enable TUI. |
3023 | # Check whether --enable-tui or --disable-tui was given. | |
3024 | if test "${enable_tui+set}" = set; then | |
3025 | enableval="$enable_tui" | |
3026 | case $enableval in | |
3027 | yes | no) | |
3028 | ;; | |
3029 | *) | |
3030 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3031 | esac | |
3032 | fi | |
3033 | ||
3034 | if test x"$enable_tui" = xyes; then | |
3035 | if test -d $srcdir/tui; then | |
3036 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3037 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3038 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3039 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3040 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3041 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3042 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3043 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3044 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3045 | need_curses=yes | |
3046 | fi | |
3047 | fi | |
3048 | ||
8ee53726 MK |
3049 | # Enable gdbtk. |
3050 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3051 | if test "${enable_gdbtk+set}" = set; then | |
3052 | enableval="$enable_gdbtk" | |
3053 | case $enableval in | |
3054 | yes | no) | |
3055 | ;; | |
3056 | *) | |
3057 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3058 | esac | |
3059 | else | |
3060 | if test -d $srcdir/gdbtk; then | |
3061 | enable_gdbtk=yes | |
3062 | else | |
3063 | enable_gdbtk=no | |
3064 | fi | |
3065 | fi | |
3066 | ||
3067 | # We unconditionally disable gdbtk tests on selected platforms. | |
3068 | case $host_os in | |
3069 | go32* | windows*) | |
3070 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3071 | enable_gdbtk=no ;; | |
3072 | esac | |
3073 | ||
8bb2c122 MK |
3074 | # --------------------- # |
3075 | # Checks for programs. # | |
3076 | # --------------------- # | |
3077 | ||
c41b7eb1 | 3078 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3079 | do |
3080 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3081 | set dummy $ac_prog; ac_word=$2 | |
3082 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 3083 | echo "configure:3084: checking for $ac_word" >&5 |
7a292a7a SS |
3084 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3086 | else | |
3087 | if test -n "$AWK"; then | |
3088 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3089 | else | |
3090 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3091 | ac_dummy="$PATH" | |
3092 | for ac_dir in $ac_dummy; do | |
3093 | test -z "$ac_dir" && ac_dir=. | |
3094 | if test -f $ac_dir/$ac_word; then | |
3095 | ac_cv_prog_AWK="$ac_prog" | |
3096 | break | |
3097 | fi | |
3098 | done | |
3099 | IFS="$ac_save_ifs" | |
3100 | fi | |
3101 | fi | |
3102 | AWK="$ac_cv_prog_AWK" | |
3103 | if test -n "$AWK"; then | |
3104 | echo "$ac_t""$AWK" 1>&6 | |
3105 | else | |
3106 | echo "$ac_t""no" 1>&6 | |
3107 | fi | |
3108 | ||
3109 | test -n "$AWK" && break | |
3110 | done | |
3111 | ||
c906108c SS |
3112 | # Find a good install program. We prefer a C program (faster), |
3113 | # so one script is as good as another. But avoid the broken or | |
3114 | # incompatible versions: | |
3115 | # SysV /etc/install, /usr/sbin/install | |
3116 | # SunOS /usr/etc/install | |
3117 | # IRIX /sbin/install | |
3118 | # AIX /bin/install | |
3119 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3120 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3121 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3122 | # ./install, which can be erroneously created by make from ./install.sh. | |
3123 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
030292b7 | 3124 | echo "configure:3125: checking for a BSD compatible install" >&5 |
c906108c SS |
3125 | if test -z "$INSTALL"; then |
3126 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3128 | else | |
3129 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3130 | for ac_dir in $PATH; do | |
3131 | # Account for people who put trailing slashes in PATH elements. | |
3132 | case "$ac_dir/" in | |
3133 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3134 | *) | |
3135 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3136 | # Don't use installbsd from OSF since it installs stuff as root | |
3137 | # by default. | |
3138 | for ac_prog in ginstall scoinst install; do | |
3139 | if test -f $ac_dir/$ac_prog; then | |
3140 | if test $ac_prog = install && | |
3141 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3142 | # AIX install. It has an incompatible calling convention. | |
3143 | : | |
3144 | else | |
3145 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3146 | break 2 | |
3147 | fi | |
3148 | fi | |
3149 | done | |
3150 | ;; | |
3151 | esac | |
3152 | done | |
3153 | IFS="$ac_save_IFS" | |
3154 | ||
3155 | fi | |
3156 | if test "${ac_cv_path_install+set}" = set; then | |
3157 | INSTALL="$ac_cv_path_install" | |
3158 | else | |
3159 | # As a last resort, use the slow shell script. We don't cache a | |
3160 | # path for INSTALL within a source directory, because that will | |
3161 | # break other packages using the cache if that directory is | |
3162 | # removed, or if the path is relative. | |
3163 | INSTALL="$ac_install_sh" | |
3164 | fi | |
3165 | fi | |
3166 | echo "$ac_t""$INSTALL" 1>&6 | |
3167 | ||
3168 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3169 | # It thinks the first close brace ends the variable substitution. | |
3170 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3171 | ||
3172 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3173 | ||
3174 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3175 | ||
8bb2c122 | 3176 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
030292b7 | 3177 | echo "configure:3178: checking whether ln -s works" >&5 |
8bb2c122 MK |
3178 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3180 | else |
8bb2c122 MK |
3181 | rm -f conftestdata |
3182 | if ln -s X conftestdata 2>/dev/null | |
3183 | then | |
3184 | rm -f conftestdata | |
3185 | ac_cv_prog_LN_S="ln -s" | |
3186 | else | |
3187 | ac_cv_prog_LN_S=ln | |
3188 | fi | |
3189 | fi | |
3190 | LN_S="$ac_cv_prog_LN_S" | |
3191 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3192 | echo "$ac_t""yes" 1>&6 | |
3193 | else | |
3194 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3195 | fi |
3196 | ||
8bb2c122 MK |
3197 | # Extract the first word of "ranlib", so it can be a program name with args. |
3198 | set dummy ranlib; ac_word=$2 | |
c906108c | 3199 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
030292b7 | 3200 | echo "configure:3201: checking for $ac_word" >&5 |
8bb2c122 | 3201 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3202 | echo $ac_n "(cached) $ac_c" 1>&6 |
3203 | else | |
8bb2c122 MK |
3204 | if test -n "$RANLIB"; then |
3205 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3206 | else |
3207 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3208 | ac_dummy="$PATH" | |
3209 | for ac_dir in $ac_dummy; do | |
3210 | test -z "$ac_dir" && ac_dir=. | |
3211 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3212 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3213 | break |
3214 | fi | |
3215 | done | |
3216 | IFS="$ac_save_ifs" | |
8bb2c122 | 3217 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3218 | fi |
3219 | fi | |
8bb2c122 MK |
3220 | RANLIB="$ac_cv_prog_RANLIB" |
3221 | if test -n "$RANLIB"; then | |
3222 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3223 | else |
3224 | echo "$ac_t""no" 1>&6 | |
3225 | fi | |
3226 | ||
8bb2c122 MK |
3227 | for ac_prog in 'bison -y' byacc |
3228 | do | |
3229 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3230 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3231 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
030292b7 | 3232 | echo "configure:3233: checking for $ac_word" >&5 |
8bb2c122 | 3233 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3234 | echo $ac_n "(cached) $ac_c" 1>&6 |
3235 | else | |
8bb2c122 MK |
3236 | if test -n "$YACC"; then |
3237 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3238 | else |
3239 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3240 | ac_dummy="$PATH" | |
3241 | for ac_dir in $ac_dummy; do | |
3242 | test -z "$ac_dir" && ac_dir=. | |
3243 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3244 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3245 | break |
3246 | fi | |
3247 | done | |
3248 | IFS="$ac_save_ifs" | |
3249 | fi | |
3250 | fi | |
8bb2c122 MK |
3251 | YACC="$ac_cv_prog_YACC" |
3252 | if test -n "$YACC"; then | |
3253 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3254 | else |
3255 | echo "$ac_t""no" 1>&6 | |
3256 | fi | |
3257 | ||
8bb2c122 MK |
3258 | test -n "$YACC" && break |
3259 | done | |
3260 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3261 | |
8bb2c122 MK |
3262 | |
3263 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3264 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3265 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
030292b7 | 3266 | echo "configure:3267: checking for $ac_word" >&5 |
8bb2c122 | 3267 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3268 | echo $ac_n "(cached) $ac_c" 1>&6 |
3269 | else | |
8bb2c122 MK |
3270 | if test -n "$AR"; then |
3271 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3272 | else |
3273 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3274 | ac_dummy="$PATH" | |
3275 | for ac_dir in $ac_dummy; do | |
3276 | test -z "$ac_dir" && ac_dir=. | |
3277 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3278 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3279 | break |
3280 | fi | |
3281 | done | |
3282 | IFS="$ac_save_ifs" | |
8bb2c122 | 3283 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3284 | fi |
3285 | fi | |
8bb2c122 MK |
3286 | AR="$ac_cv_prog_AR" |
3287 | if test -n "$AR"; then | |
3288 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3289 | else |
3290 | echo "$ac_t""no" 1>&6 | |
3291 | fi | |
3292 | ||
8bb2c122 | 3293 | |
c906108c | 3294 | |
95ca63c4 CF |
3295 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3296 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3297 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 3298 | echo "configure:3299: checking for $ac_word" >&5 |
95ca63c4 CF |
3299 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3300 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3301 | else | |
3302 | if test -n "$DLLTOOL"; then | |
3303 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3304 | else | |
3305 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3306 | ac_dummy="$PATH" | |
3307 | for ac_dir in $ac_dummy; do | |
3308 | test -z "$ac_dir" && ac_dir=. | |
3309 | if test -f $ac_dir/$ac_word; then | |
3310 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3311 | break | |
3312 | fi | |
3313 | done | |
3314 | IFS="$ac_save_ifs" | |
3315 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3316 | fi | |
3317 | fi | |
3318 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3319 | if test -n "$DLLTOOL"; then | |
3320 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3321 | else | |
3322 | echo "$ac_t""no" 1>&6 | |
3323 | fi | |
3324 | ||
3325 | ||
3326 | ||
3327 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3328 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3329 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 3330 | echo "configure:3331: checking for $ac_word" >&5 |
95ca63c4 CF |
3331 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3332 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3333 | else | |
3334 | if test -n "$WINDRES"; then | |
3335 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3336 | else | |
3337 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3338 | ac_dummy="$PATH" | |
3339 | for ac_dir in $ac_dummy; do | |
3340 | test -z "$ac_dir" && ac_dir=. | |
3341 | if test -f $ac_dir/$ac_word; then | |
3342 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3343 | break | |
3344 | fi | |
3345 | done | |
3346 | IFS="$ac_save_ifs" | |
3347 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3348 | fi | |
3349 | fi | |
3350 | WINDRES="$ac_cv_prog_WINDRES" | |
3351 | if test -n "$WINDRES"; then | |
3352 | echo "$ac_t""$WINDRES" 1>&6 | |
3353 | else | |
3354 | echo "$ac_t""no" 1>&6 | |
3355 | fi | |
3356 | ||
3357 | ||
3358 | ||
c906108c | 3359 | |
8bb2c122 | 3360 | # Needed for GNU/Hurd. |
75c6e08a MK |
3361 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3362 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3363 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
030292b7 | 3364 | echo "configure:3365: checking for $ac_word" >&5 |
75c6e08a MK |
3365 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3367 | else | |
3368 | if test -n "$MIG"; then | |
3369 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3370 | else | |
3371 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3372 | ac_dummy="$PATH" | |
3373 | for ac_dir in $ac_dummy; do | |
3374 | test -z "$ac_dir" && ac_dir=. | |
3375 | if test -f $ac_dir/$ac_word; then | |
3376 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3377 | break | |
3378 | fi | |
3379 | done | |
3380 | IFS="$ac_save_ifs" | |
3381 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3382 | fi | |
3383 | fi | |
3384 | MIG="$ac_cv_prog_MIG" | |
3385 | if test -n "$MIG"; then | |
3386 | echo "$ac_t""$MIG" 1>&6 | |
3387 | else | |
3388 | echo "$ac_t""no" 1>&6 | |
3389 | fi | |
3390 | ||
3391 | ||
3392 | ||
3393 | ||
9a156167 MK |
3394 | # ---------------------- # |
3395 | # Checks for libraries. # | |
3396 | # ---------------------- # | |
3397 | ||
3398 | # We might need to link with -lm; most simulators need it. | |
3399 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
030292b7 | 3400 | echo "configure:3401: checking for main in -lm" >&5 |
9a156167 MK |
3401 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3402 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3403 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3404 | else | |
3405 | ac_save_LIBS="$LIBS" | |
3406 | LIBS="-lm $LIBS" | |
3407 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3408 | #line 3409 "configure" |
9a156167 MK |
3409 | #include "confdefs.h" |
3410 | ||
3411 | int main() { | |
3412 | main() | |
3413 | ; return 0; } | |
3414 | EOF | |
030292b7 | 3415 | if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3416 | rm -rf conftest* |
3417 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3418 | else | |
3419 | echo "configure: failed program was:" >&5 | |
3420 | cat conftest.$ac_ext >&5 | |
3421 | rm -rf conftest* | |
3422 | eval "ac_cv_lib_$ac_lib_var=no" | |
3423 | fi | |
3424 | rm -f conftest* | |
3425 | LIBS="$ac_save_LIBS" | |
3426 | ||
3427 | fi | |
3428 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3429 | echo "$ac_t""yes" 1>&6 | |
3430 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3431 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3432 | cat >> confdefs.h <<EOF | |
3433 | #define $ac_tr_lib 1 | |
3434 | EOF | |
3435 | ||
3436 | LIBS="-lm $LIBS" | |
3437 | ||
3438 | else | |
3439 | echo "$ac_t""no" 1>&6 | |
3440 | fi | |
3441 | ||
3442 | ||
3443 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3444 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3445 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3446 | # is known to have this problem). Therefore we avoid libw if we can. | |
3447 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
030292b7 | 3448 | echo "configure:3449: checking for wctype" >&5 |
9a156167 MK |
3449 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3450 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3451 | else | |
3452 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3453 | #line 3454 "configure" |
9a156167 MK |
3454 | #include "confdefs.h" |
3455 | /* System header to define __stub macros and hopefully few prototypes, | |
3456 | which can conflict with char wctype(); below. */ | |
3457 | #include <assert.h> | |
3458 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3459 | /* We use char because int might match the return type of a gcc2 | |
3460 | builtin and then its argument prototype would still apply. */ | |
3461 | char wctype(); | |
3462 | ||
3463 | int main() { | |
3464 | ||
3465 | /* The GNU C library defines this for functions which it implements | |
3466 | to always fail with ENOSYS. Some functions are actually named | |
3467 | something starting with __ and the normal name is an alias. */ | |
3468 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3469 | choke me | |
3470 | #else | |
3471 | wctype(); | |
3472 | #endif | |
3473 | ||
3474 | ; return 0; } | |
3475 | EOF | |
030292b7 | 3476 | if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3477 | rm -rf conftest* |
3478 | eval "ac_cv_func_wctype=yes" | |
3479 | else | |
3480 | echo "configure: failed program was:" >&5 | |
3481 | cat conftest.$ac_ext >&5 | |
3482 | rm -rf conftest* | |
3483 | eval "ac_cv_func_wctype=no" | |
3484 | fi | |
3485 | rm -f conftest* | |
3486 | fi | |
3487 | ||
3488 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3489 | echo "$ac_t""yes" 1>&6 | |
3490 | : | |
3491 | else | |
3492 | echo "$ac_t""no" 1>&6 | |
3493 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
030292b7 | 3494 | echo "configure:3495: checking for wctype in -lw" >&5 |
9a156167 MK |
3495 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3496 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3497 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3498 | else | |
3499 | ac_save_LIBS="$LIBS" | |
3500 | LIBS="-lw $LIBS" | |
3501 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3502 | #line 3503 "configure" |
9a156167 MK |
3503 | #include "confdefs.h" |
3504 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3505 | /* We use char because int might match the return type of a gcc2 | |
3506 | builtin and then its argument prototype would still apply. */ | |
3507 | char wctype(); | |
3508 | ||
3509 | int main() { | |
3510 | wctype() | |
3511 | ; return 0; } | |
3512 | EOF | |
030292b7 | 3513 | if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3514 | rm -rf conftest* |
3515 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3516 | else | |
3517 | echo "configure: failed program was:" >&5 | |
3518 | cat conftest.$ac_ext >&5 | |
3519 | rm -rf conftest* | |
3520 | eval "ac_cv_lib_$ac_lib_var=no" | |
3521 | fi | |
3522 | rm -f conftest* | |
3523 | LIBS="$ac_save_LIBS" | |
3524 | ||
3525 | fi | |
3526 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3527 | echo "$ac_t""yes" 1>&6 | |
3528 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3529 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3530 | cat >> confdefs.h <<EOF | |
3531 | #define $ac_tr_lib 1 | |
3532 | EOF | |
3533 | ||
3534 | LIBS="-lw $LIBS" | |
3535 | ||
3536 | else | |
3537 | echo "$ac_t""no" 1>&6 | |
3538 | fi | |
3539 | ||
3540 | fi | |
3541 | ||
3542 | ||
3543 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3544 | ||
3545 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
030292b7 | 3546 | echo "configure:3547: checking for library containing socketpair" >&5 |
9a156167 MK |
3547 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3548 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3549 | else | |
3550 | ac_func_search_save_LIBS="$LIBS" | |
3551 | ac_cv_search_socketpair="no" | |
3552 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3553 | #line 3554 "configure" |
9a156167 MK |
3554 | #include "confdefs.h" |
3555 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3556 | /* We use char because int might match the return type of a gcc2 | |
3557 | builtin and then its argument prototype would still apply. */ | |
3558 | char socketpair(); | |
3559 | ||
3560 | int main() { | |
3561 | socketpair() | |
3562 | ; return 0; } | |
3563 | EOF | |
030292b7 | 3564 | if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3565 | rm -rf conftest* |
3566 | ac_cv_search_socketpair="none required" | |
3567 | else | |
3568 | echo "configure: failed program was:" >&5 | |
3569 | cat conftest.$ac_ext >&5 | |
3570 | fi | |
3571 | rm -f conftest* | |
3572 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3573 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3574 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3575 | #line 3576 "configure" |
9a156167 MK |
3576 | #include "confdefs.h" |
3577 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3578 | /* We use char because int might match the return type of a gcc2 | |
3579 | builtin and then its argument prototype would still apply. */ | |
3580 | char socketpair(); | |
3581 | ||
3582 | int main() { | |
3583 | socketpair() | |
3584 | ; return 0; } | |
3585 | EOF | |
030292b7 | 3586 | if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3587 | rm -rf conftest* |
3588 | ac_cv_search_socketpair="-l$i" | |
3589 | break | |
3590 | else | |
3591 | echo "configure: failed program was:" >&5 | |
3592 | cat conftest.$ac_ext >&5 | |
3593 | fi | |
3594 | rm -f conftest* | |
3595 | done | |
3596 | LIBS="$ac_func_search_save_LIBS" | |
3597 | fi | |
3598 | ||
3599 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3600 | if test "$ac_cv_search_socketpair" != "no"; then | |
3601 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3602 | ||
3603 | else : | |
3604 | ||
3605 | fi | |
3606 | ||
06825bd1 MK |
3607 | # Since GDB uses Readline, we need termcap functionality, so we need |
3608 | # to find a library that provides that. When GDB is configured with | |
3609 | # --enable-tui, we need full curses functionality. | |
3610 | # | |
3611 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3612 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3613 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3614 | # `curses'. I don't see why we should use HP curses if a more | |
3615 | # standard curses is available, except that according to HP's | |
3616 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3617 | # HP-UX 10.10 and 10.20. | |
3618 | ||
3619 | if test "$need_curses" = yes; then | |
3620 | ||
3621 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
030292b7 | 3622 | echo "configure:3623: checking for library containing initscr" >&5 |
06825bd1 MK |
3623 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3625 | else | |
3626 | ac_func_search_save_LIBS="$LIBS" | |
3627 | ac_cv_search_initscr="no" | |
3628 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3629 | #line 3630 "configure" |
06825bd1 MK |
3630 | #include "confdefs.h" |
3631 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3632 | /* We use char because int might match the return type of a gcc2 | |
3633 | builtin and then its argument prototype would still apply. */ | |
3634 | char initscr(); | |
3635 | ||
3636 | int main() { | |
3637 | initscr() | |
3638 | ; return 0; } | |
3639 | EOF | |
030292b7 | 3640 | if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3641 | rm -rf conftest* |
3642 | ac_cv_search_initscr="none required" | |
3643 | else | |
3644 | echo "configure: failed program was:" >&5 | |
3645 | cat conftest.$ac_ext >&5 | |
3646 | fi | |
3647 | rm -f conftest* | |
3648 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3649 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3650 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3651 | #line 3652 "configure" |
06825bd1 MK |
3652 | #include "confdefs.h" |
3653 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3654 | /* We use char because int might match the return type of a gcc2 | |
3655 | builtin and then its argument prototype would still apply. */ | |
3656 | char initscr(); | |
3657 | ||
3658 | int main() { | |
3659 | initscr() | |
3660 | ; return 0; } | |
3661 | EOF | |
030292b7 | 3662 | if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3663 | rm -rf conftest* |
3664 | ac_cv_search_initscr="-l$i" | |
3665 | break | |
3666 | else | |
3667 | echo "configure: failed program was:" >&5 | |
3668 | cat conftest.$ac_ext >&5 | |
3669 | fi | |
3670 | rm -f conftest* | |
3671 | done | |
3672 | LIBS="$ac_func_search_save_LIBS" | |
3673 | fi | |
3674 | ||
3675 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3676 | if test "$ac_cv_search_initscr" != "no"; then | |
3677 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3678 | ||
3679 | else : | |
3680 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3681 | fi | |
3682 | fi | |
3683 | ||
3684 | case $host_os in | |
3685 | cygwin*) | |
3686 | if test -d $srcdir/libtermcap; then | |
3687 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3688 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3689 | fi ;; | |
3690 | go32*) | |
3691 | # ??? Is this really true? | |
3692 | ac_cv_search_tgetent="none required" | |
3693 | ;; | |
3694 | aix*) | |
3695 | # Readline prefers curses over termcap on AIX. | |
3696 | # ??? Why? | |
3697 | ||
3698 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
030292b7 | 3699 | echo "configure:3700: checking for library containing tgetent" >&5 |
06825bd1 MK |
3700 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3702 | else | |
3703 | ac_func_search_save_LIBS="$LIBS" | |
3704 | ac_cv_search_tgetent="no" | |
3705 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3706 | #line 3707 "configure" |
06825bd1 MK |
3707 | #include "confdefs.h" |
3708 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3709 | /* We use char because int might match the return type of a gcc2 | |
3710 | builtin and then its argument prototype would still apply. */ | |
3711 | char tgetent(); | |
3712 | ||
3713 | int main() { | |
3714 | tgetent() | |
3715 | ; return 0; } | |
3716 | EOF | |
030292b7 | 3717 | if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3718 | rm -rf conftest* |
3719 | ac_cv_search_tgetent="none required" | |
3720 | else | |
3721 | echo "configure: failed program was:" >&5 | |
3722 | cat conftest.$ac_ext >&5 | |
3723 | fi | |
3724 | rm -f conftest* | |
3725 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3726 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3727 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3728 | #line 3729 "configure" |
06825bd1 MK |
3729 | #include "confdefs.h" |
3730 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3731 | /* We use char because int might match the return type of a gcc2 | |
3732 | builtin and then its argument prototype would still apply. */ | |
3733 | char tgetent(); | |
3734 | ||
3735 | int main() { | |
3736 | tgetent() | |
3737 | ; return 0; } | |
3738 | EOF | |
030292b7 | 3739 | if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3740 | rm -rf conftest* |
3741 | ac_cv_search_tgetent="-l$i" | |
3742 | break | |
3743 | else | |
3744 | echo "configure: failed program was:" >&5 | |
3745 | cat conftest.$ac_ext >&5 | |
3746 | fi | |
3747 | rm -f conftest* | |
3748 | done | |
3749 | LIBS="$ac_func_search_save_LIBS" | |
3750 | fi | |
3751 | ||
3752 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3753 | if test "$ac_cv_search_tgetent" != "no"; then | |
3754 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3755 | ||
3756 | else : | |
3757 | ||
3758 | fi | |
3759 | ;; | |
3760 | esac | |
3761 | ||
3762 | # Note: We used to check for libtermlib and libterminfo too, but | |
3763 | # Readline doesn't, so I think we're safe with leaving them out. | |
3764 | ||
3765 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
030292b7 | 3766 | echo "configure:3767: checking for library containing tgetent" >&5 |
06825bd1 MK |
3767 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3768 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3769 | else | |
3770 | ac_func_search_save_LIBS="$LIBS" | |
3771 | ac_cv_search_tgetent="no" | |
3772 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3773 | #line 3774 "configure" |
06825bd1 MK |
3774 | #include "confdefs.h" |
3775 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3776 | /* We use char because int might match the return type of a gcc2 | |
3777 | builtin and then its argument prototype would still apply. */ | |
3778 | char tgetent(); | |
3779 | ||
3780 | int main() { | |
3781 | tgetent() | |
3782 | ; return 0; } | |
3783 | EOF | |
030292b7 | 3784 | if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3785 | rm -rf conftest* |
3786 | ac_cv_search_tgetent="none required" | |
3787 | else | |
3788 | echo "configure: failed program was:" >&5 | |
3789 | cat conftest.$ac_ext >&5 | |
3790 | fi | |
3791 | rm -f conftest* | |
3792 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3793 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3794 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3795 | #line 3796 "configure" |
06825bd1 MK |
3796 | #include "confdefs.h" |
3797 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3798 | /* We use char because int might match the return type of a gcc2 | |
3799 | builtin and then its argument prototype would still apply. */ | |
3800 | char tgetent(); | |
3801 | ||
3802 | int main() { | |
3803 | tgetent() | |
3804 | ; return 0; } | |
3805 | EOF | |
030292b7 | 3806 | if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3807 | rm -rf conftest* |
3808 | ac_cv_search_tgetent="-l$i" | |
3809 | break | |
3810 | else | |
3811 | echo "configure: failed program was:" >&5 | |
3812 | cat conftest.$ac_ext >&5 | |
3813 | fi | |
3814 | rm -f conftest* | |
3815 | done | |
3816 | LIBS="$ac_func_search_save_LIBS" | |
3817 | fi | |
3818 | ||
3819 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3820 | if test "$ac_cv_search_tgetent" != "no"; then | |
3821 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3822 | ||
3823 | else : | |
3824 | ||
3825 | fi | |
3826 | ||
3827 | if test "$ac_cv_search_tgetent" = no; then | |
3828 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3829 | fi | |
3830 | ||
5ee754fc MK |
3831 | # ------------------------- # |
3832 | # Checks for header files. # | |
3833 | # ------------------------- # | |
3834 | ||
3835 | ac_header_dirent=no | |
3836 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3837 | do | |
3838 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3839 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
030292b7 | 3840 | echo "configure:3841: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3841 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3842 | echo $ac_n "(cached) $ac_c" 1>&6 |
3843 | else | |
3844 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3845 | #line 3846 "configure" |
c906108c SS |
3846 | #include "confdefs.h" |
3847 | #include <sys/types.h> | |
5ee754fc MK |
3848 | #include <$ac_hdr> |
3849 | int main() { | |
3850 | DIR *dirp = 0; | |
3851 | ; return 0; } | |
3852 | EOF | |
030292b7 | 3853 | if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
3854 | rm -rf conftest* |
3855 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3856 | else | |
3857 | echo "configure: failed program was:" >&5 | |
3858 | cat conftest.$ac_ext >&5 | |
3859 | rm -rf conftest* | |
3860 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3861 | fi | |
3862 | rm -f conftest* | |
3863 | fi | |
3864 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3865 | echo "$ac_t""yes" 1>&6 | |
3866 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3867 | cat >> confdefs.h <<EOF | |
3868 | #define $ac_tr_hdr 1 | |
3869 | EOF | |
3870 | ac_header_dirent=$ac_hdr; break | |
3871 | else | |
3872 | echo "$ac_t""no" 1>&6 | |
3873 | fi | |
3874 | done | |
3875 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
3876 | if test $ac_header_dirent = dirent.h; then | |
3877 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
030292b7 | 3878 | echo "configure:3879: checking for opendir in -ldir" >&5 |
5ee754fc MK |
3879 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
3880 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3881 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3882 | else | |
3883 | ac_save_LIBS="$LIBS" | |
3884 | LIBS="-ldir $LIBS" | |
3885 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3886 | #line 3887 "configure" |
5ee754fc MK |
3887 | #include "confdefs.h" |
3888 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3889 | /* We use char because int might match the return type of a gcc2 | |
3890 | builtin and then its argument prototype would still apply. */ | |
3891 | char opendir(); | |
c906108c SS |
3892 | |
3893 | int main() { | |
5ee754fc | 3894 | opendir() |
c906108c SS |
3895 | ; return 0; } |
3896 | EOF | |
030292b7 | 3897 | if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 3898 | rm -rf conftest* |
5ee754fc | 3899 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
3900 | else |
3901 | echo "configure: failed program was:" >&5 | |
3902 | cat conftest.$ac_ext >&5 | |
3903 | rm -rf conftest* | |
5ee754fc | 3904 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
3905 | fi |
3906 | rm -f conftest* | |
5ee754fc MK |
3907 | LIBS="$ac_save_LIBS" |
3908 | ||
3909 | fi | |
3910 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3911 | echo "$ac_t""yes" 1>&6 | |
3912 | LIBS="$LIBS -ldir" | |
3913 | else | |
3914 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3915 | fi |
3916 | ||
5ee754fc MK |
3917 | else |
3918 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
030292b7 | 3919 | echo "configure:3920: checking for opendir in -lx" >&5 |
5ee754fc MK |
3920 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
3921 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3922 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3923 | else | |
3924 | ac_save_LIBS="$LIBS" | |
3925 | LIBS="-lx $LIBS" | |
3926 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3927 | #line 3928 "configure" |
5ee754fc MK |
3928 | #include "confdefs.h" |
3929 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3930 | /* We use char because int might match the return type of a gcc2 | |
3931 | builtin and then its argument prototype would still apply. */ | |
3932 | char opendir(); | |
3933 | ||
3934 | int main() { | |
3935 | opendir() | |
3936 | ; return 0; } | |
c906108c | 3937 | EOF |
030292b7 | 3938 | if { (eval echo configure:3939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
3939 | rm -rf conftest* |
3940 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3941 | else | |
3942 | echo "configure: failed program was:" >&5 | |
3943 | cat conftest.$ac_ext >&5 | |
3944 | rm -rf conftest* | |
3945 | eval "ac_cv_lib_$ac_lib_var=no" | |
3946 | fi | |
3947 | rm -f conftest* | |
3948 | LIBS="$ac_save_LIBS" | |
c906108c | 3949 | |
5ee754fc MK |
3950 | fi |
3951 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3952 | echo "$ac_t""yes" 1>&6 | |
3953 | LIBS="$LIBS -lx" | |
3954 | else | |
3955 | echo "$ac_t""no" 1>&6 | |
3956 | fi | |
c906108c | 3957 | |
5ee754fc | 3958 | fi |
c906108c | 3959 | |
5ee754fc | 3960 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
030292b7 | 3961 | echo "configure:3962: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 3962 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
3963 | echo $ac_n "(cached) $ac_c" 1>&6 |
3964 | else | |
3965 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 3966 | #line 3967 "configure" |
9608ab8b MK |
3967 | #include "confdefs.h" |
3968 | #include <sys/types.h> | |
5ee754fc MK |
3969 | #include <sys/stat.h> |
3970 | ||
3971 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3972 | # if S_ISBLK (S_IFDIR) | |
3973 | You lose. | |
3974 | # endif | |
3975 | #endif | |
3976 | ||
3977 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3978 | # if S_ISBLK (S_IFCHR) | |
3979 | You lose. | |
3980 | # endif | |
3981 | #endif | |
3982 | ||
3983 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3984 | # if S_ISLNK (S_IFREG) | |
3985 | You lose. | |
3986 | # endif | |
3987 | #endif | |
3988 | ||
3989 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3990 | # if S_ISSOCK (S_IFREG) | |
3991 | You lose. | |
3992 | # endif | |
3993 | #endif | |
3994 | ||
9608ab8b | 3995 | EOF |
5ee754fc MK |
3996 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3997 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 3998 | rm -rf conftest* |
5ee754fc MK |
3999 | ac_cv_header_stat_broken=yes |
4000 | else | |
4001 | rm -rf conftest* | |
4002 | ac_cv_header_stat_broken=no | |
4003 | fi | |
4004 | rm -f conftest* | |
4005 | ||
4006 | fi | |
4007 | ||
4008 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4009 | if test $ac_cv_header_stat_broken = yes; then | |
4010 | cat >> confdefs.h <<\EOF | |
4011 | #define STAT_MACROS_BROKEN 1 | |
4012 | EOF | |
4013 | ||
4014 | fi | |
4015 | ||
4016 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
030292b7 | 4017 | echo "configure:4018: checking for ANSI C header files" >&5 |
5ee754fc MK |
4018 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4019 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4020 | else | |
4021 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4022 | #line 4023 "configure" |
5ee754fc MK |
4023 | #include "confdefs.h" |
4024 | #include <stdlib.h> | |
4025 | #include <stdarg.h> | |
4026 | #include <string.h> | |
4027 | #include <float.h> | |
4028 | EOF | |
4029 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4030 | { (eval echo configure:4031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4031 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4032 | if test -z "$ac_err"; then | |
4033 | rm -rf conftest* | |
4034 | ac_cv_header_stdc=yes | |
4035 | else | |
4036 | echo "$ac_err" >&5 | |
4037 | echo "configure: failed program was:" >&5 | |
4038 | cat conftest.$ac_ext >&5 | |
4039 | rm -rf conftest* | |
4040 | ac_cv_header_stdc=no | |
4041 | fi | |
4042 | rm -f conftest* | |
4043 | ||
4044 | if test $ac_cv_header_stdc = yes; then | |
4045 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4046 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4047 | #line 4048 "configure" |
5ee754fc MK |
4048 | #include "confdefs.h" |
4049 | #include <string.h> | |
4050 | EOF | |
4051 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4052 | egrep "memchr" >/dev/null 2>&1; then | |
4053 | : | |
4054 | else | |
4055 | rm -rf conftest* | |
4056 | ac_cv_header_stdc=no | |
4057 | fi | |
4058 | rm -f conftest* | |
4059 | ||
4060 | fi | |
4061 | ||
4062 | if test $ac_cv_header_stdc = yes; then | |
4063 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4064 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4065 | #line 4066 "configure" |
5ee754fc MK |
4066 | #include "confdefs.h" |
4067 | #include <stdlib.h> | |
4068 | EOF | |
4069 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4070 | egrep "free" >/dev/null 2>&1; then | |
4071 | : | |
4072 | else | |
4073 | rm -rf conftest* | |
4074 | ac_cv_header_stdc=no | |
4075 | fi | |
4076 | rm -f conftest* | |
4077 | ||
4078 | fi | |
4079 | ||
4080 | if test $ac_cv_header_stdc = yes; then | |
4081 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4082 | if test "$cross_compiling" = yes; then | |
4083 | : | |
4084 | else | |
4085 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4086 | #line 4087 "configure" |
5ee754fc MK |
4087 | #include "confdefs.h" |
4088 | #include <ctype.h> | |
4089 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4090 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4091 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4092 | int main () { int i; for (i = 0; i < 256; i++) | |
4093 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4094 | exit (0); } | |
4095 | ||
4096 | EOF | |
030292b7 | 4097 | if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4098 | then |
4099 | : | |
9608ab8b | 4100 | else |
5ee754fc MK |
4101 | echo "configure: failed program was:" >&5 |
4102 | cat conftest.$ac_ext >&5 | |
4103 | rm -fr conftest* | |
4104 | ac_cv_header_stdc=no | |
4105 | fi | |
4106 | rm -fr conftest* | |
4107 | fi | |
4108 | ||
4109 | fi | |
4110 | fi | |
4111 | ||
4112 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4113 | if test $ac_cv_header_stdc = yes; then | |
4114 | cat >> confdefs.h <<\EOF | |
4115 | #define STDC_HEADERS 1 | |
4116 | EOF | |
4117 | ||
4118 | fi | |
4119 | ||
4120 | for ac_hdr in link.h | |
4121 | do | |
4122 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4123 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4124 | echo "configure:4125: checking for $ac_hdr" >&5 |
5ee754fc MK |
4125 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4126 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4127 | else | |
4128 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4129 | #line 4130 "configure" |
5ee754fc MK |
4130 | #include "confdefs.h" |
4131 | #include <$ac_hdr> | |
4132 | EOF | |
4133 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4134 | { (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4135 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4136 | if test -z "$ac_err"; then | |
4137 | rm -rf conftest* | |
4138 | eval "ac_cv_header_$ac_safe=yes" | |
4139 | else | |
4140 | echo "$ac_err" >&5 | |
4141 | echo "configure: failed program was:" >&5 | |
4142 | cat conftest.$ac_ext >&5 | |
4143 | rm -rf conftest* | |
4144 | eval "ac_cv_header_$ac_safe=no" | |
4145 | fi | |
4146 | rm -f conftest* | |
4147 | fi | |
4148 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4149 | echo "$ac_t""yes" 1>&6 | |
4150 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4151 | cat >> confdefs.h <<EOF | |
4152 | #define $ac_tr_hdr 1 | |
4153 | EOF | |
4154 | ||
4155 | else | |
4156 | echo "$ac_t""no" 1>&6 | |
4157 | fi | |
4158 | done | |
4159 | ||
4160 | for ac_hdr in nlist.h | |
4161 | do | |
4162 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4163 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4164 | echo "configure:4165: checking for $ac_hdr" >&5 |
5ee754fc MK |
4165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4167 | else | |
4168 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4169 | #line 4170 "configure" |
5ee754fc MK |
4170 | #include "confdefs.h" |
4171 | #include <$ac_hdr> | |
4172 | EOF | |
4173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4174 | { (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4176 | if test -z "$ac_err"; then | |
4177 | rm -rf conftest* | |
4178 | eval "ac_cv_header_$ac_safe=yes" | |
4179 | else | |
4180 | echo "$ac_err" >&5 | |
4181 | echo "configure: failed program was:" >&5 | |
4182 | cat conftest.$ac_ext >&5 | |
4183 | rm -rf conftest* | |
4184 | eval "ac_cv_header_$ac_safe=no" | |
4185 | fi | |
4186 | rm -f conftest* | |
4187 | fi | |
4188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4189 | echo "$ac_t""yes" 1>&6 | |
4190 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4191 | cat >> confdefs.h <<EOF | |
4192 | #define $ac_tr_hdr 1 | |
4193 | EOF | |
4194 | ||
4195 | else | |
4196 | echo "$ac_t""no" 1>&6 | |
4197 | fi | |
4198 | done | |
4199 | ||
4200 | for ac_hdr in poll.h sys/poll.h | |
4201 | do | |
4202 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4203 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4204 | echo "configure:4205: checking for $ac_hdr" >&5 |
5ee754fc MK |
4205 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4206 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4207 | else | |
4208 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4209 | #line 4210 "configure" |
5ee754fc MK |
4210 | #include "confdefs.h" |
4211 | #include <$ac_hdr> | |
4212 | EOF | |
4213 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4214 | { (eval echo configure:4215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4215 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4216 | if test -z "$ac_err"; then | |
4217 | rm -rf conftest* | |
4218 | eval "ac_cv_header_$ac_safe=yes" | |
4219 | else | |
4220 | echo "$ac_err" >&5 | |
4221 | echo "configure: failed program was:" >&5 | |
4222 | cat conftest.$ac_ext >&5 | |
4223 | rm -rf conftest* | |
4224 | eval "ac_cv_header_$ac_safe=no" | |
4225 | fi | |
4226 | rm -f conftest* | |
4227 | fi | |
4228 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4229 | echo "$ac_t""yes" 1>&6 | |
4230 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4231 | cat >> confdefs.h <<EOF | |
4232 | #define $ac_tr_hdr 1 | |
4233 | EOF | |
4234 | ||
4235 | else | |
4236 | echo "$ac_t""no" 1>&6 | |
4237 | fi | |
4238 | done | |
4239 | ||
4240 | for ac_hdr in proc_service.h thread_db.h | |
4241 | do | |
4242 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4243 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4244 | echo "configure:4245: checking for $ac_hdr" >&5 |
5ee754fc MK |
4245 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4247 | else | |
4248 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4249 | #line 4250 "configure" |
5ee754fc MK |
4250 | #include "confdefs.h" |
4251 | #include <$ac_hdr> | |
4252 | EOF | |
4253 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4254 | { (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4255 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4256 | if test -z "$ac_err"; then | |
4257 | rm -rf conftest* | |
4258 | eval "ac_cv_header_$ac_safe=yes" | |
4259 | else | |
4260 | echo "$ac_err" >&5 | |
4261 | echo "configure: failed program was:" >&5 | |
4262 | cat conftest.$ac_ext >&5 | |
4263 | rm -rf conftest* | |
4264 | eval "ac_cv_header_$ac_safe=no" | |
4265 | fi | |
4266 | rm -f conftest* | |
4267 | fi | |
4268 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4269 | echo "$ac_t""yes" 1>&6 | |
4270 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4271 | cat >> confdefs.h <<EOF | |
4272 | #define $ac_tr_hdr 1 | |
4273 | EOF | |
4274 | ||
4275 | else | |
4276 | echo "$ac_t""no" 1>&6 | |
4277 | fi | |
4278 | done | |
4279 | ||
4280 | for ac_hdr in stddef.h | |
4281 | do | |
4282 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4283 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4284 | echo "configure:4285: checking for $ac_hdr" >&5 |
5ee754fc MK |
4285 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4287 | else | |
4288 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4289 | #line 4290 "configure" |
5ee754fc MK |
4290 | #include "confdefs.h" |
4291 | #include <$ac_hdr> | |
4292 | EOF | |
4293 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4294 | { (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4295 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4296 | if test -z "$ac_err"; then | |
4297 | rm -rf conftest* | |
4298 | eval "ac_cv_header_$ac_safe=yes" | |
4299 | else | |
4300 | echo "$ac_err" >&5 | |
4301 | echo "configure: failed program was:" >&5 | |
4302 | cat conftest.$ac_ext >&5 | |
4303 | rm -rf conftest* | |
4304 | eval "ac_cv_header_$ac_safe=no" | |
4305 | fi | |
4306 | rm -f conftest* | |
4307 | fi | |
4308 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4309 | echo "$ac_t""yes" 1>&6 | |
4310 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4311 | cat >> confdefs.h <<EOF | |
4312 | #define $ac_tr_hdr 1 | |
4313 | EOF | |
4314 | ||
4315 | else | |
4316 | echo "$ac_t""no" 1>&6 | |
4317 | fi | |
4318 | done | |
4319 | ||
4320 | for ac_hdr in stdlib.h | |
4321 | do | |
4322 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4323 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4324 | echo "configure:4325: checking for $ac_hdr" >&5 |
5ee754fc MK |
4325 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4327 | else | |
4328 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4329 | #line 4330 "configure" |
5ee754fc MK |
4330 | #include "confdefs.h" |
4331 | #include <$ac_hdr> | |
4332 | EOF | |
4333 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4334 | { (eval echo configure:4335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4335 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4336 | if test -z "$ac_err"; then | |
4337 | rm -rf conftest* | |
4338 | eval "ac_cv_header_$ac_safe=yes" | |
4339 | else | |
4340 | echo "$ac_err" >&5 | |
4341 | echo "configure: failed program was:" >&5 | |
4342 | cat conftest.$ac_ext >&5 | |
4343 | rm -rf conftest* | |
4344 | eval "ac_cv_header_$ac_safe=no" | |
4345 | fi | |
4346 | rm -f conftest* | |
4347 | fi | |
4348 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4349 | echo "$ac_t""yes" 1>&6 | |
4350 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4351 | cat >> confdefs.h <<EOF | |
4352 | #define $ac_tr_hdr 1 | |
4353 | EOF | |
4354 | ||
4355 | else | |
4356 | echo "$ac_t""no" 1>&6 | |
4357 | fi | |
4358 | done | |
4359 | ||
4360 | for ac_hdr in stdint.h | |
4361 | do | |
4362 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4363 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4364 | echo "configure:4365: checking for $ac_hdr" >&5 |
5ee754fc MK |
4365 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4367 | else | |
4368 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4369 | #line 4370 "configure" |
5ee754fc MK |
4370 | #include "confdefs.h" |
4371 | #include <$ac_hdr> | |
4372 | EOF | |
4373 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4374 | { (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4375 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4376 | if test -z "$ac_err"; then | |
4377 | rm -rf conftest* | |
4378 | eval "ac_cv_header_$ac_safe=yes" | |
4379 | else | |
4380 | echo "$ac_err" >&5 | |
4381 | echo "configure: failed program was:" >&5 | |
4382 | cat conftest.$ac_ext >&5 | |
4383 | rm -rf conftest* | |
4384 | eval "ac_cv_header_$ac_safe=no" | |
4385 | fi | |
4386 | rm -f conftest* | |
4387 | fi | |
4388 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4389 | echo "$ac_t""yes" 1>&6 | |
4390 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4391 | cat >> confdefs.h <<EOF | |
4392 | #define $ac_tr_hdr 1 | |
4393 | EOF | |
4394 | ||
4395 | else | |
4396 | echo "$ac_t""no" 1>&6 | |
4397 | fi | |
4398 | done | |
4399 | ||
4400 | for ac_hdr in string.h memory.h strings.h | |
4401 | do | |
4402 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4403 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4404 | echo "configure:4405: checking for $ac_hdr" >&5 |
5ee754fc MK |
4405 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4407 | else | |
4408 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4409 | #line 4410 "configure" |
5ee754fc MK |
4410 | #include "confdefs.h" |
4411 | #include <$ac_hdr> | |
4412 | EOF | |
4413 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4414 | { (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4415 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4416 | if test -z "$ac_err"; then | |
4417 | rm -rf conftest* | |
4418 | eval "ac_cv_header_$ac_safe=yes" | |
4419 | else | |
4420 | echo "$ac_err" >&5 | |
4421 | echo "configure: failed program was:" >&5 | |
4422 | cat conftest.$ac_ext >&5 | |
4423 | rm -rf conftest* | |
4424 | eval "ac_cv_header_$ac_safe=no" | |
4425 | fi | |
4426 | rm -f conftest* | |
4427 | fi | |
4428 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4429 | echo "$ac_t""yes" 1>&6 | |
4430 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4431 | cat >> confdefs.h <<EOF | |
4432 | #define $ac_tr_hdr 1 | |
4433 | EOF | |
4434 | ||
4435 | else | |
4436 | echo "$ac_t""no" 1>&6 | |
4437 | fi | |
4438 | done | |
4439 | ||
4440 | for ac_hdr in sys/fault.h | |
4441 | do | |
4442 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4443 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4444 | echo "configure:4445: checking for $ac_hdr" >&5 |
5ee754fc MK |
4445 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4447 | else | |
4448 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4449 | #line 4450 "configure" |
5ee754fc MK |
4450 | #include "confdefs.h" |
4451 | #include <$ac_hdr> | |
4452 | EOF | |
4453 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4454 | { (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4455 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4456 | if test -z "$ac_err"; then | |
4457 | rm -rf conftest* | |
4458 | eval "ac_cv_header_$ac_safe=yes" | |
4459 | else | |
4460 | echo "$ac_err" >&5 | |
4461 | echo "configure: failed program was:" >&5 | |
4462 | cat conftest.$ac_ext >&5 | |
4463 | rm -rf conftest* | |
4464 | eval "ac_cv_header_$ac_safe=no" | |
4465 | fi | |
4466 | rm -f conftest* | |
4467 | fi | |
4468 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4469 | echo "$ac_t""yes" 1>&6 | |
4470 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4471 | cat >> confdefs.h <<EOF | |
4472 | #define $ac_tr_hdr 1 | |
4473 | EOF | |
4474 | ||
4475 | else | |
4476 | echo "$ac_t""no" 1>&6 | |
4477 | fi | |
4478 | done | |
4479 | ||
4480 | for ac_hdr in sys/file.h | |
4481 | do | |
4482 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4483 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4484 | echo "configure:4485: checking for $ac_hdr" >&5 |
5ee754fc MK |
4485 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4487 | else | |
4488 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4489 | #line 4490 "configure" |
5ee754fc MK |
4490 | #include "confdefs.h" |
4491 | #include <$ac_hdr> | |
4492 | EOF | |
4493 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4494 | { (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4495 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4496 | if test -z "$ac_err"; then | |
4497 | rm -rf conftest* | |
4498 | eval "ac_cv_header_$ac_safe=yes" | |
4499 | else | |
4500 | echo "$ac_err" >&5 | |
4501 | echo "configure: failed program was:" >&5 | |
4502 | cat conftest.$ac_ext >&5 | |
4503 | rm -rf conftest* | |
4504 | eval "ac_cv_header_$ac_safe=no" | |
4505 | fi | |
4506 | rm -f conftest* | |
4507 | fi | |
4508 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4509 | echo "$ac_t""yes" 1>&6 | |
4510 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4511 | cat >> confdefs.h <<EOF | |
4512 | #define $ac_tr_hdr 1 | |
4513 | EOF | |
4514 | ||
4515 | else | |
4516 | echo "$ac_t""no" 1>&6 | |
4517 | fi | |
4518 | done | |
4519 | ||
4520 | for ac_hdr in sys/filio.h | |
4521 | do | |
4522 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4523 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4524 | echo "configure:4525: checking for $ac_hdr" >&5 |
5ee754fc MK |
4525 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4527 | else | |
4528 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4529 | #line 4530 "configure" |
5ee754fc MK |
4530 | #include "confdefs.h" |
4531 | #include <$ac_hdr> | |
4532 | EOF | |
4533 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4534 | { (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4535 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4536 | if test -z "$ac_err"; then | |
4537 | rm -rf conftest* | |
4538 | eval "ac_cv_header_$ac_safe=yes" | |
4539 | else | |
4540 | echo "$ac_err" >&5 | |
4541 | echo "configure: failed program was:" >&5 | |
4542 | cat conftest.$ac_ext >&5 | |
4543 | rm -rf conftest* | |
4544 | eval "ac_cv_header_$ac_safe=no" | |
4545 | fi | |
4546 | rm -f conftest* | |
4547 | fi | |
4548 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4549 | echo "$ac_t""yes" 1>&6 | |
4550 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4551 | cat >> confdefs.h <<EOF | |
4552 | #define $ac_tr_hdr 1 | |
4553 | EOF | |
4554 | ||
4555 | else | |
4556 | echo "$ac_t""no" 1>&6 | |
4557 | fi | |
4558 | done | |
4559 | ||
4560 | for ac_hdr in sys/ioctl.h | |
4561 | do | |
4562 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4563 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4564 | echo "configure:4565: checking for $ac_hdr" >&5 |
5ee754fc MK |
4565 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4566 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4567 | else | |
4568 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4569 | #line 4570 "configure" |
5ee754fc MK |
4570 | #include "confdefs.h" |
4571 | #include <$ac_hdr> | |
4572 | EOF | |
4573 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4574 | { (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4575 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4576 | if test -z "$ac_err"; then | |
4577 | rm -rf conftest* | |
4578 | eval "ac_cv_header_$ac_safe=yes" | |
4579 | else | |
4580 | echo "$ac_err" >&5 | |
4581 | echo "configure: failed program was:" >&5 | |
4582 | cat conftest.$ac_ext >&5 | |
4583 | rm -rf conftest* | |
4584 | eval "ac_cv_header_$ac_safe=no" | |
4585 | fi | |
4586 | rm -f conftest* | |
4587 | fi | |
4588 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4589 | echo "$ac_t""yes" 1>&6 | |
4590 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4591 | cat >> confdefs.h <<EOF | |
4592 | #define $ac_tr_hdr 1 | |
4593 | EOF | |
4594 | ||
4595 | else | |
4596 | echo "$ac_t""no" 1>&6 | |
4597 | fi | |
4598 | done | |
4599 | ||
4600 | for ac_hdr in sys/param.h | |
4601 | do | |
4602 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4603 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4604 | echo "configure:4605: checking for $ac_hdr" >&5 |
5ee754fc MK |
4605 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4606 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4607 | else | |
4608 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4609 | #line 4610 "configure" |
5ee754fc MK |
4610 | #include "confdefs.h" |
4611 | #include <$ac_hdr> | |
4612 | EOF | |
4613 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4614 | { (eval echo configure:4615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4615 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4616 | if test -z "$ac_err"; then | |
4617 | rm -rf conftest* | |
4618 | eval "ac_cv_header_$ac_safe=yes" | |
4619 | else | |
4620 | echo "$ac_err" >&5 | |
4621 | echo "configure: failed program was:" >&5 | |
4622 | cat conftest.$ac_ext >&5 | |
4623 | rm -rf conftest* | |
4624 | eval "ac_cv_header_$ac_safe=no" | |
4625 | fi | |
4626 | rm -f conftest* | |
4627 | fi | |
4628 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4629 | echo "$ac_t""yes" 1>&6 | |
4630 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4631 | cat >> confdefs.h <<EOF | |
4632 | #define $ac_tr_hdr 1 | |
4633 | EOF | |
4634 | ||
4635 | else | |
4636 | echo "$ac_t""no" 1>&6 | |
4637 | fi | |
4638 | done | |
4639 | ||
4640 | for ac_hdr in sys/proc.h | |
4641 | do | |
4642 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4643 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4644 | echo "configure:4645: checking for $ac_hdr" >&5 |
5ee754fc MK |
4645 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4647 | else | |
4648 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4649 | #line 4650 "configure" |
5ee754fc MK |
4650 | #include "confdefs.h" |
4651 | #include <$ac_hdr> | |
4652 | EOF | |
4653 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4654 | { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4655 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4656 | if test -z "$ac_err"; then | |
4657 | rm -rf conftest* | |
4658 | eval "ac_cv_header_$ac_safe=yes" | |
4659 | else | |
4660 | echo "$ac_err" >&5 | |
4661 | echo "configure: failed program was:" >&5 | |
4662 | cat conftest.$ac_ext >&5 | |
4663 | rm -rf conftest* | |
4664 | eval "ac_cv_header_$ac_safe=no" | |
4665 | fi | |
4666 | rm -f conftest* | |
4667 | fi | |
4668 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4669 | echo "$ac_t""yes" 1>&6 | |
4670 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4671 | cat >> confdefs.h <<EOF | |
4672 | #define $ac_tr_hdr 1 | |
4673 | EOF | |
4674 | ||
4675 | else | |
4676 | echo "$ac_t""no" 1>&6 | |
4677 | fi | |
4678 | done | |
4679 | ||
4680 | for ac_hdr in sys/procfs.h | |
4681 | do | |
4682 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4683 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4684 | echo "configure:4685: checking for $ac_hdr" >&5 |
5ee754fc MK |
4685 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4687 | else | |
4688 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4689 | #line 4690 "configure" |
5ee754fc MK |
4690 | #include "confdefs.h" |
4691 | #include <$ac_hdr> | |
4692 | EOF | |
4693 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4694 | { (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4695 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4696 | if test -z "$ac_err"; then | |
4697 | rm -rf conftest* | |
4698 | eval "ac_cv_header_$ac_safe=yes" | |
4699 | else | |
4700 | echo "$ac_err" >&5 | |
4701 | echo "configure: failed program was:" >&5 | |
4702 | cat conftest.$ac_ext >&5 | |
4703 | rm -rf conftest* | |
4704 | eval "ac_cv_header_$ac_safe=no" | |
4705 | fi | |
4706 | rm -f conftest* | |
4707 | fi | |
4708 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4709 | echo "$ac_t""yes" 1>&6 | |
4710 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4711 | cat >> confdefs.h <<EOF | |
4712 | #define $ac_tr_hdr 1 | |
4713 | EOF | |
4714 | ||
4715 | else | |
4716 | echo "$ac_t""no" 1>&6 | |
4717 | fi | |
4718 | done | |
4719 | ||
4720 | for ac_hdr in sys/ptrace.h ptrace.h | |
4721 | do | |
4722 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4723 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4724 | echo "configure:4725: checking for $ac_hdr" >&5 |
5ee754fc MK |
4725 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4727 | else | |
4728 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4729 | #line 4730 "configure" |
5ee754fc MK |
4730 | #include "confdefs.h" |
4731 | #include <$ac_hdr> | |
4732 | EOF | |
4733 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4734 | { (eval echo configure:4735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4735 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4736 | if test -z "$ac_err"; then | |
4737 | rm -rf conftest* | |
4738 | eval "ac_cv_header_$ac_safe=yes" | |
4739 | else | |
4740 | echo "$ac_err" >&5 | |
4741 | echo "configure: failed program was:" >&5 | |
4742 | cat conftest.$ac_ext >&5 | |
4743 | rm -rf conftest* | |
4744 | eval "ac_cv_header_$ac_safe=no" | |
4745 | fi | |
4746 | rm -f conftest* | |
4747 | fi | |
4748 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4749 | echo "$ac_t""yes" 1>&6 | |
4750 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4751 | cat >> confdefs.h <<EOF | |
4752 | #define $ac_tr_hdr 1 | |
4753 | EOF | |
4754 | ||
4755 | else | |
4756 | echo "$ac_t""no" 1>&6 | |
4757 | fi | |
4758 | done | |
4759 | ||
4760 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4761 | do | |
4762 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4763 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4764 | echo "configure:4765: checking for $ac_hdr" >&5 |
5ee754fc MK |
4765 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4766 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4767 | else | |
4768 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4769 | #line 4770 "configure" |
5ee754fc MK |
4770 | #include "confdefs.h" |
4771 | #include <$ac_hdr> | |
4772 | EOF | |
4773 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4774 | { (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4775 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4776 | if test -z "$ac_err"; then | |
4777 | rm -rf conftest* | |
4778 | eval "ac_cv_header_$ac_safe=yes" | |
4779 | else | |
4780 | echo "$ac_err" >&5 | |
4781 | echo "configure: failed program was:" >&5 | |
4782 | cat conftest.$ac_ext >&5 | |
4783 | rm -rf conftest* | |
4784 | eval "ac_cv_header_$ac_safe=no" | |
4785 | fi | |
4786 | rm -f conftest* | |
4787 | fi | |
4788 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4789 | echo "$ac_t""yes" 1>&6 | |
4790 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4791 | cat >> confdefs.h <<EOF | |
4792 | #define $ac_tr_hdr 1 | |
4793 | EOF | |
4794 | ||
4795 | else | |
4796 | echo "$ac_t""no" 1>&6 | |
4797 | fi | |
4798 | done | |
4799 | ||
4800 | for ac_hdr in sys/select.h | |
4801 | do | |
4802 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4803 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4804 | echo "configure:4805: checking for $ac_hdr" >&5 |
5ee754fc MK |
4805 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4806 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4807 | else | |
4808 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4809 | #line 4810 "configure" |
5ee754fc MK |
4810 | #include "confdefs.h" |
4811 | #include <$ac_hdr> | |
4812 | EOF | |
4813 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4814 | { (eval echo configure:4815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4815 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4816 | if test -z "$ac_err"; then | |
4817 | rm -rf conftest* | |
4818 | eval "ac_cv_header_$ac_safe=yes" | |
4819 | else | |
4820 | echo "$ac_err" >&5 | |
4821 | echo "configure: failed program was:" >&5 | |
4822 | cat conftest.$ac_ext >&5 | |
4823 | rm -rf conftest* | |
4824 | eval "ac_cv_header_$ac_safe=no" | |
4825 | fi | |
4826 | rm -f conftest* | |
4827 | fi | |
4828 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4829 | echo "$ac_t""yes" 1>&6 | |
4830 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4831 | cat >> confdefs.h <<EOF | |
4832 | #define $ac_tr_hdr 1 | |
4833 | EOF | |
4834 | ||
4835 | else | |
4836 | echo "$ac_t""no" 1>&6 | |
4837 | fi | |
4838 | done | |
4839 | ||
4840 | for ac_hdr in sys/syscall.h | |
4841 | do | |
4842 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4843 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4844 | echo "configure:4845: checking for $ac_hdr" >&5 |
5ee754fc MK |
4845 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4847 | else | |
4848 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4849 | #line 4850 "configure" |
5ee754fc MK |
4850 | #include "confdefs.h" |
4851 | #include <$ac_hdr> | |
4852 | EOF | |
4853 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4854 | { (eval echo configure:4855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4855 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4856 | if test -z "$ac_err"; then | |
4857 | rm -rf conftest* | |
4858 | eval "ac_cv_header_$ac_safe=yes" | |
4859 | else | |
4860 | echo "$ac_err" >&5 | |
4861 | echo "configure: failed program was:" >&5 | |
4862 | cat conftest.$ac_ext >&5 | |
4863 | rm -rf conftest* | |
4864 | eval "ac_cv_header_$ac_safe=no" | |
4865 | fi | |
4866 | rm -f conftest* | |
4867 | fi | |
4868 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4869 | echo "$ac_t""yes" 1>&6 | |
4870 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4871 | cat >> confdefs.h <<EOF | |
4872 | #define $ac_tr_hdr 1 | |
4873 | EOF | |
4874 | ||
4875 | else | |
4876 | echo "$ac_t""no" 1>&6 | |
4877 | fi | |
4878 | done | |
4879 | ||
4880 | for ac_hdr in sys/user.h | |
4881 | do | |
4882 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4883 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4884 | echo "configure:4885: checking for $ac_hdr" >&5 |
5ee754fc MK |
4885 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4886 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4887 | else | |
4888 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4889 | #line 4890 "configure" |
5ee754fc MK |
4890 | #include "confdefs.h" |
4891 | #include <$ac_hdr> | |
4892 | EOF | |
4893 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4894 | { (eval echo configure:4895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4895 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4896 | if test -z "$ac_err"; then | |
4897 | rm -rf conftest* | |
4898 | eval "ac_cv_header_$ac_safe=yes" | |
4899 | else | |
4900 | echo "$ac_err" >&5 | |
4901 | echo "configure: failed program was:" >&5 | |
4902 | cat conftest.$ac_ext >&5 | |
4903 | rm -rf conftest* | |
4904 | eval "ac_cv_header_$ac_safe=no" | |
4905 | fi | |
4906 | rm -f conftest* | |
4907 | fi | |
4908 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4909 | echo "$ac_t""yes" 1>&6 | |
4910 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4911 | cat >> confdefs.h <<EOF | |
4912 | #define $ac_tr_hdr 1 | |
4913 | EOF | |
4914 | ||
4915 | else | |
4916 | echo "$ac_t""no" 1>&6 | |
4917 | fi | |
4918 | done | |
4919 | ||
4920 | for ac_hdr in sys/wait.h wait.h | |
4921 | do | |
4922 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4923 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4924 | echo "configure:4925: checking for $ac_hdr" >&5 |
5ee754fc MK |
4925 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4927 | else | |
4928 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 4929 | #line 4930 "configure" |
5ee754fc MK |
4930 | #include "confdefs.h" |
4931 | #include <$ac_hdr> | |
4932 | EOF | |
4933 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 4934 | { (eval echo configure:4935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4935 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4936 | if test -z "$ac_err"; then | |
4937 | rm -rf conftest* | |
4938 | eval "ac_cv_header_$ac_safe=yes" | |
4939 | else | |
4940 | echo "$ac_err" >&5 | |
9608ab8b MK |
4941 | echo "configure: failed program was:" >&5 |
4942 | cat conftest.$ac_ext >&5 | |
4943 | rm -rf conftest* | |
5ee754fc | 4944 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4945 | fi |
4946 | rm -f conftest* | |
4947 | fi | |
5ee754fc | 4948 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
4949 | echo "$ac_t""yes" 1>&6 |
4950 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4951 | cat >> confdefs.h <<EOF | |
4952 | #define $ac_tr_hdr 1 | |
4953 | EOF | |
5ee754fc | 4954 | |
9608ab8b MK |
4955 | else |
4956 | echo "$ac_t""no" 1>&6 | |
4957 | fi | |
4958 | done | |
5ee754fc MK |
4959 | |
4960 | for ac_hdr in termios.h termio.h sgtty.h | |
4961 | do | |
4962 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4963 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 4964 | echo "configure:4965: checking for $ac_hdr" >&5 |
5ee754fc | 4965 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4966 | echo $ac_n "(cached) $ac_c" 1>&6 |
4967 | else | |
5ee754fc | 4968 | cat > conftest.$ac_ext <<EOF |
030292b7 | 4969 | #line 4970 "configure" |
9608ab8b | 4970 | #include "confdefs.h" |
5ee754fc | 4971 | #include <$ac_hdr> |
9608ab8b | 4972 | EOF |
5ee754fc | 4973 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
030292b7 | 4974 | { (eval echo configure:4975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4975 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4976 | if test -z "$ac_err"; then | |
9608ab8b | 4977 | rm -rf conftest* |
5ee754fc | 4978 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4979 | else |
5ee754fc | 4980 | echo "$ac_err" >&5 |
9608ab8b MK |
4981 | echo "configure: failed program was:" >&5 |
4982 | cat conftest.$ac_ext >&5 | |
4983 | rm -rf conftest* | |
5ee754fc | 4984 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4985 | fi |
4986 | rm -f conftest* | |
9608ab8b | 4987 | fi |
5ee754fc | 4988 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4989 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4990 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4991 | cat >> confdefs.h <<EOF | |
4992 | #define $ac_tr_hdr 1 | |
4993 | EOF | |
4994 | ||
9608ab8b MK |
4995 | else |
4996 | echo "$ac_t""no" 1>&6 | |
4997 | fi | |
5ee754fc | 4998 | done |
9608ab8b | 4999 | |
5ee754fc MK |
5000 | for ac_hdr in unistd.h |
5001 | do | |
5002 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5003 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 5004 | echo "configure:5005: checking for $ac_hdr" >&5 |
5ee754fc | 5005 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5006 | echo $ac_n "(cached) $ac_c" 1>&6 |
5007 | else | |
5ee754fc | 5008 | cat > conftest.$ac_ext <<EOF |
030292b7 | 5009 | #line 5010 "configure" |
9608ab8b | 5010 | #include "confdefs.h" |
5ee754fc | 5011 | #include <$ac_hdr> |
9608ab8b | 5012 | EOF |
5ee754fc | 5013 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
030292b7 | 5014 | { (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5015 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5016 | if test -z "$ac_err"; then | |
9608ab8b | 5017 | rm -rf conftest* |
5ee754fc | 5018 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5019 | else |
5ee754fc | 5020 | echo "$ac_err" >&5 |
9608ab8b MK |
5021 | echo "configure: failed program was:" >&5 |
5022 | cat conftest.$ac_ext >&5 | |
5023 | rm -rf conftest* | |
5ee754fc | 5024 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5025 | fi |
5026 | rm -f conftest* | |
9608ab8b | 5027 | fi |
5ee754fc | 5028 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5029 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5030 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5031 | cat >> confdefs.h <<EOF | |
5032 | #define $ac_tr_hdr 1 | |
5033 | EOF | |
5034 | ||
9608ab8b MK |
5035 | else |
5036 | echo "$ac_t""no" 1>&6 | |
5037 | fi | |
5ee754fc | 5038 | done |
9608ab8b | 5039 | |
9608ab8b | 5040 | |
5ee754fc MK |
5041 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5042 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5043 | # think that we don't have <curses.h> if we're using GCC. | |
5044 | case $host_os in | |
5045 | solaris2.[78]) | |
5046 | if test "$GCC" = yes; then | |
5047 | cat >> confdefs.h <<\EOF | |
5048 | #define _MSE_INT_H 1 | |
5049 | EOF | |
5050 | ||
5051 | fi ;; | |
5052 | esac | |
5053 | for ac_hdr in curses.h ncurses.h term.h | |
5054 | do | |
5055 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5056 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 5057 | echo "configure:5058: checking for $ac_hdr" >&5 |
5ee754fc | 5058 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5059 | echo $ac_n "(cached) $ac_c" 1>&6 |
5060 | else | |
5061 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5062 | #line 5063 "configure" |
c906108c | 5063 | #include "confdefs.h" |
5ee754fc | 5064 | #include <$ac_hdr> |
c906108c SS |
5065 | EOF |
5066 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 5067 | { (eval echo configure:5068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5068 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5069 | if test -z "$ac_err"; then | |
5070 | rm -rf conftest* | |
5ee754fc | 5071 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5072 | else |
5073 | echo "$ac_err" >&5 | |
5074 | echo "configure: failed program was:" >&5 | |
5075 | cat conftest.$ac_ext >&5 | |
5076 | rm -rf conftest* | |
5ee754fc | 5077 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5078 | fi |
5079 | rm -f conftest* | |
c906108c | 5080 | fi |
5ee754fc MK |
5081 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5082 | echo "$ac_t""yes" 1>&6 | |
5083 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5084 | cat >> confdefs.h <<EOF | |
5085 | #define $ac_tr_hdr 1 | |
c906108c | 5086 | EOF |
5ee754fc | 5087 | |
c906108c | 5088 | else |
5ee754fc | 5089 | echo "$ac_t""no" 1>&6 |
c906108c | 5090 | fi |
5ee754fc | 5091 | done |
c906108c SS |
5092 | |
5093 | ||
5ee754fc MK |
5094 | # FIXME: kettenis/20030102: In most cases we include these |
5095 | # unconditionally, so what's the point in checking these? | |
5096 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5097 | do |
5098 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5099 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 5100 | echo "configure:5101: checking for $ac_hdr" >&5 |
c906108c SS |
5101 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5102 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5103 | else | |
5104 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5105 | #line 5106 "configure" |
c906108c SS |
5106 | #include "confdefs.h" |
5107 | #include <$ac_hdr> | |
5108 | EOF | |
5109 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 5110 | { (eval echo configure:5111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5111 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5112 | if test -z "$ac_err"; then | |
5113 | rm -rf conftest* | |
5114 | eval "ac_cv_header_$ac_safe=yes" | |
5115 | else | |
5116 | echo "$ac_err" >&5 | |
5117 | echo "configure: failed program was:" >&5 | |
5118 | cat conftest.$ac_ext >&5 | |
5119 | rm -rf conftest* | |
5120 | eval "ac_cv_header_$ac_safe=no" | |
5121 | fi | |
5122 | rm -f conftest* | |
5123 | fi | |
5124 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5125 | echo "$ac_t""yes" 1>&6 | |
5126 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5127 | cat >> confdefs.h <<EOF | |
5128 | #define $ac_tr_hdr 1 | |
5129 | EOF | |
5130 | ||
5131 | else | |
5132 | echo "$ac_t""no" 1>&6 | |
5133 | fi | |
5134 | done | |
5135 | ||
5ee754fc MK |
5136 | |
5137 | # ------------------ # | |
5138 | # Checks for types. # | |
5139 | # ------------------ # | |
5140 | ||
5141 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
030292b7 | 5142 | echo "configure:5143: checking return type of signal handlers" >&5 |
5ee754fc | 5143 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5144 | echo $ac_n "(cached) $ac_c" 1>&6 |
5145 | else | |
5146 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5147 | #line 5148 "configure" |
c906108c SS |
5148 | #include "confdefs.h" |
5149 | #include <sys/types.h> | |
5ee754fc MK |
5150 | #include <signal.h> |
5151 | #ifdef signal | |
5152 | #undef signal | |
c906108c | 5153 | #endif |
5ee754fc MK |
5154 | #ifdef __cplusplus |
5155 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5156 | #else | |
5157 | void (*signal ()) (); | |
c906108c SS |
5158 | #endif |
5159 | ||
5ee754fc MK |
5160 | int main() { |
5161 | int i; | |
5162 | ; return 0; } | |
c906108c | 5163 | EOF |
030292b7 | 5164 | if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5165 | rm -rf conftest* |
5ee754fc | 5166 | ac_cv_type_signal=void |
c906108c | 5167 | else |
5ee754fc MK |
5168 | echo "configure: failed program was:" >&5 |
5169 | cat conftest.$ac_ext >&5 | |
c906108c | 5170 | rm -rf conftest* |
5ee754fc | 5171 | ac_cv_type_signal=int |
c906108c SS |
5172 | fi |
5173 | rm -f conftest* | |
c906108c SS |
5174 | fi |
5175 | ||
5ee754fc MK |
5176 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5177 | cat >> confdefs.h <<EOF | |
5178 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5179 | EOF |
5180 | ||
c906108c SS |
5181 | |
5182 | ||
5ee754fc MK |
5183 | # ------------------------------------- # |
5184 | # Checks for compiler characteristics. # | |
5185 | # ------------------------------------- # | |
5186 | ||
c906108c | 5187 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
030292b7 | 5188 | echo "configure:5189: checking for working const" >&5 |
c906108c SS |
5189 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5191 | else | |
5192 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5193 | #line 5194 "configure" |
c906108c SS |
5194 | #include "confdefs.h" |
5195 | ||
5196 | int main() { | |
5197 | ||
5198 | /* Ultrix mips cc rejects this. */ | |
5199 | typedef int charset[2]; const charset x; | |
5200 | /* SunOS 4.1.1 cc rejects this. */ | |
5201 | char const *const *ccp; | |
5202 | char **p; | |
5203 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5204 | struct point {int x, y;}; | |
5205 | static struct point const zero = {0,0}; | |
5206 | /* AIX XL C 1.02.0.0 rejects this. | |
5207 | It does not let you subtract one const X* pointer from another in an arm | |
5208 | of an if-expression whose if-part is not a constant expression */ | |
5209 | const char *g = "string"; | |
5210 | ccp = &g + (g ? g-g : 0); | |
5211 | /* HPUX 7.0 cc rejects these. */ | |
5212 | ++ccp; | |
5213 | p = (char**) ccp; | |
5214 | ccp = (char const *const *) p; | |
5215 | { /* SCO 3.2v4 cc rejects this. */ | |
5216 | char *t; | |
5217 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5218 | ||
5219 | *t++ = 0; | |
5220 | } | |
5221 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5222 | int x[] = {25, 17}; | |
5223 | const int *foo = &x[0]; | |
5224 | ++foo; | |
5225 | } | |
5226 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5227 | typedef const int *iptr; | |
5228 | iptr p = 0; | |
5229 | ++p; | |
5230 | } | |
5231 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5232 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5233 | struct s { int j; const int *ap[3]; }; | |
5234 | struct s *b; b->j = 5; | |
5235 | } | |
5236 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5237 | const int foo = 10; | |
5238 | } | |
5239 | ||
5240 | ; return 0; } | |
5241 | EOF | |
030292b7 | 5242 | if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5243 | rm -rf conftest* |
5244 | ac_cv_c_const=yes | |
5245 | else | |
5246 | echo "configure: failed program was:" >&5 | |
5247 | cat conftest.$ac_ext >&5 | |
5248 | rm -rf conftest* | |
5249 | ac_cv_c_const=no | |
5250 | fi | |
5251 | rm -f conftest* | |
5252 | fi | |
5253 | ||
5254 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5255 | if test $ac_cv_c_const = no; then | |
5256 | cat >> confdefs.h <<\EOF | |
5257 | #define const | |
5258 | EOF | |
5259 | ||
5260 | fi | |
5261 | ||
bce58c09 | 5262 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
030292b7 | 5263 | echo "configure:5264: checking for inline" >&5 |
bce58c09 JB |
5264 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5265 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5266 | else | |
5267 | ac_cv_c_inline=no | |
5268 | for ac_kw in inline __inline__ __inline; do | |
5269 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5270 | #line 5271 "configure" |
bce58c09 JB |
5271 | #include "confdefs.h" |
5272 | ||
5273 | int main() { | |
5274 | } $ac_kw foo() { | |
5275 | ; return 0; } | |
5276 | EOF | |
030292b7 | 5277 | if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5278 | rm -rf conftest* |
5279 | ac_cv_c_inline=$ac_kw; break | |
5280 | else | |
5281 | echo "configure: failed program was:" >&5 | |
5282 | cat conftest.$ac_ext >&5 | |
5283 | fi | |
5284 | rm -f conftest* | |
5285 | done | |
5286 | ||
5287 | fi | |
5288 | ||
5289 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5290 | case "$ac_cv_c_inline" in | |
5291 | inline | yes) ;; | |
5292 | no) cat >> confdefs.h <<\EOF | |
5293 | #define inline | |
5294 | EOF | |
5295 | ;; | |
5296 | *) cat >> confdefs.h <<EOF | |
5297 | #define inline $ac_cv_c_inline | |
5298 | EOF | |
5299 | ;; | |
5300 | esac | |
5301 | ||
c906108c | 5302 | |
5ee754fc MK |
5303 | # ------------------------------ # |
5304 | # Checks for library functions. # | |
5305 | # ------------------------------ # | |
5306 | ||
46711df8 MK |
5307 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5308 | # for constant arguments. Useless! | |
5309 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
030292b7 | 5310 | echo "configure:5311: checking for working alloca.h" >&5 |
46711df8 MK |
5311 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5312 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5313 | else | |
5314 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5315 | #line 5316 "configure" |
46711df8 MK |
5316 | #include "confdefs.h" |
5317 | #include <alloca.h> | |
5318 | int main() { | |
5319 | char *p = alloca(2 * sizeof(int)); | |
5320 | ; return 0; } | |
5321 | EOF | |
030292b7 | 5322 | if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5323 | rm -rf conftest* |
5324 | ac_cv_header_alloca_h=yes | |
5325 | else | |
5326 | echo "configure: failed program was:" >&5 | |
5327 | cat conftest.$ac_ext >&5 | |
5328 | rm -rf conftest* | |
5329 | ac_cv_header_alloca_h=no | |
5330 | fi | |
5331 | rm -f conftest* | |
5332 | fi | |
5333 | ||
5334 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5335 | if test $ac_cv_header_alloca_h = yes; then | |
5336 | cat >> confdefs.h <<\EOF | |
5337 | #define HAVE_ALLOCA_H 1 | |
5338 | EOF | |
5339 | ||
5340 | fi | |
5341 | ||
5342 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
030292b7 | 5343 | echo "configure:5344: checking for alloca" >&5 |
46711df8 MK |
5344 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5346 | else | |
5347 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5348 | #line 5349 "configure" |
46711df8 MK |
5349 | #include "confdefs.h" |
5350 | ||
5351 | #ifdef __GNUC__ | |
5352 | # define alloca __builtin_alloca | |
5353 | #else | |
5354 | # ifdef _MSC_VER | |
5355 | # include <malloc.h> | |
5356 | # define alloca _alloca | |
5357 | # else | |
5358 | # if HAVE_ALLOCA_H | |
5359 | # include <alloca.h> | |
5360 | # else | |
5361 | # ifdef _AIX | |
5362 | #pragma alloca | |
5363 | # else | |
5364 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5365 | char *alloca (); | |
5366 | # endif | |
5367 | # endif | |
5368 | # endif | |
5369 | # endif | |
5370 | #endif | |
5371 | ||
5372 | int main() { | |
5373 | char *p = (char *) alloca(1); | |
5374 | ; return 0; } | |
5375 | EOF | |
030292b7 | 5376 | if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5377 | rm -rf conftest* |
5378 | ac_cv_func_alloca_works=yes | |
5379 | else | |
5380 | echo "configure: failed program was:" >&5 | |
5381 | cat conftest.$ac_ext >&5 | |
5382 | rm -rf conftest* | |
5383 | ac_cv_func_alloca_works=no | |
5384 | fi | |
5385 | rm -f conftest* | |
5386 | fi | |
5387 | ||
5388 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5389 | if test $ac_cv_func_alloca_works = yes; then | |
5390 | cat >> confdefs.h <<\EOF | |
5391 | #define HAVE_ALLOCA 1 | |
5392 | EOF | |
5393 | ||
5394 | fi | |
5395 | ||
5396 | if test $ac_cv_func_alloca_works = no; then | |
5397 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5398 | # that cause trouble. Some versions do not even contain alloca or | |
5399 | # contain a buggy version. If you still want to use their alloca, | |
5400 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5401 | ALLOCA=alloca.${ac_objext} | |
5402 | cat >> confdefs.h <<\EOF | |
5403 | #define C_ALLOCA 1 | |
5404 | EOF | |
5405 | ||
5406 | ||
5407 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
030292b7 | 5408 | echo "configure:5409: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5409 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5410 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5411 | else | |
5412 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5413 | #line 5414 "configure" |
46711df8 MK |
5414 | #include "confdefs.h" |
5415 | #if defined(CRAY) && ! defined(CRAY2) | |
5416 | webecray | |
5417 | #else | |
5418 | wenotbecray | |
5419 | #endif | |
5420 | ||
5421 | EOF | |
5422 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5423 | egrep "webecray" >/dev/null 2>&1; then | |
5424 | rm -rf conftest* | |
5425 | ac_cv_os_cray=yes | |
5426 | else | |
5427 | rm -rf conftest* | |
5428 | ac_cv_os_cray=no | |
5429 | fi | |
5430 | rm -f conftest* | |
5431 | ||
5432 | fi | |
5433 | ||
5434 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5435 | if test $ac_cv_os_cray = yes; then | |
5436 | for ac_func in _getb67 GETB67 getb67; do | |
5437 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 5438 | echo "configure:5439: checking for $ac_func" >&5 |
46711df8 MK |
5439 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5440 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5441 | else | |
5442 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5443 | #line 5444 "configure" |
46711df8 MK |
5444 | #include "confdefs.h" |
5445 | /* System header to define __stub macros and hopefully few prototypes, | |
5446 | which can conflict with char $ac_func(); below. */ | |
5447 | #include <assert.h> | |
5448 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5449 | /* We use char because int might match the return type of a gcc2 | |
5450 | builtin and then its argument prototype would still apply. */ | |
5451 | char $ac_func(); | |
5452 | ||
5453 | int main() { | |
5454 | ||
5455 | /* The GNU C library defines this for functions which it implements | |
5456 | to always fail with ENOSYS. Some functions are actually named | |
5457 | something starting with __ and the normal name is an alias. */ | |
5458 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5459 | choke me | |
5460 | #else | |
5461 | $ac_func(); | |
5462 | #endif | |
5463 | ||
5464 | ; return 0; } | |
5465 | EOF | |
030292b7 | 5466 | if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5467 | rm -rf conftest* |
5468 | eval "ac_cv_func_$ac_func=yes" | |
5469 | else | |
5470 | echo "configure: failed program was:" >&5 | |
5471 | cat conftest.$ac_ext >&5 | |
5472 | rm -rf conftest* | |
5473 | eval "ac_cv_func_$ac_func=no" | |
5474 | fi | |
5475 | rm -f conftest* | |
5476 | fi | |
5477 | ||
5478 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5479 | echo "$ac_t""yes" 1>&6 | |
5480 | cat >> confdefs.h <<EOF | |
5481 | #define CRAY_STACKSEG_END $ac_func | |
5482 | EOF | |
5483 | ||
5484 | break | |
5485 | else | |
5486 | echo "$ac_t""no" 1>&6 | |
5487 | fi | |
5488 | ||
5489 | done | |
5490 | fi | |
5491 | ||
5492 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
030292b7 | 5493 | echo "configure:5494: checking stack direction for C alloca" >&5 |
46711df8 MK |
5494 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5495 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5496 | else | |
5497 | if test "$cross_compiling" = yes; then | |
5498 | ac_cv_c_stack_direction=0 | |
5499 | else | |
5500 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5501 | #line 5502 "configure" |
46711df8 MK |
5502 | #include "confdefs.h" |
5503 | find_stack_direction () | |
5504 | { | |
5505 | static char *addr = 0; | |
5506 | auto char dummy; | |
5507 | if (addr == 0) | |
5508 | { | |
5509 | addr = &dummy; | |
5510 | return find_stack_direction (); | |
5511 | } | |
5512 | else | |
5513 | return (&dummy > addr) ? 1 : -1; | |
5514 | } | |
5515 | main () | |
5516 | { | |
5517 | exit (find_stack_direction() < 0); | |
5518 | } | |
5519 | EOF | |
030292b7 | 5520 | if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5521 | then |
5522 | ac_cv_c_stack_direction=1 | |
5523 | else | |
5524 | echo "configure: failed program was:" >&5 | |
5525 | cat conftest.$ac_ext >&5 | |
5526 | rm -fr conftest* | |
5527 | ac_cv_c_stack_direction=-1 | |
5528 | fi | |
5529 | rm -fr conftest* | |
5530 | fi | |
5531 | ||
5532 | fi | |
5533 | ||
5534 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5535 | cat >> confdefs.h <<EOF | |
5536 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5537 | EOF | |
5538 | ||
5539 | fi | |
5540 | ||
97bf5e38 MK |
5541 | for ac_hdr in unistd.h |
5542 | do | |
5543 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5544 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
030292b7 | 5545 | echo "configure:5546: checking for $ac_hdr" >&5 |
74c1b268 AC |
5546 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5548 | else | |
5549 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5550 | #line 5551 "configure" |
74c1b268 | 5551 | #include "confdefs.h" |
97bf5e38 | 5552 | #include <$ac_hdr> |
74c1b268 AC |
5553 | EOF |
5554 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 5555 | { (eval echo configure:5556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5556 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5557 | if test -z "$ac_err"; then | |
5558 | rm -rf conftest* | |
5559 | eval "ac_cv_header_$ac_safe=yes" | |
5560 | else | |
5561 | echo "$ac_err" >&5 | |
5562 | echo "configure: failed program was:" >&5 | |
5563 | cat conftest.$ac_ext >&5 | |
5564 | rm -rf conftest* | |
5565 | eval "ac_cv_header_$ac_safe=no" | |
5566 | fi | |
5567 | rm -f conftest* | |
5568 | fi | |
5569 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5570 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5571 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5572 | cat >> confdefs.h <<EOF | |
5573 | #define $ac_tr_hdr 1 | |
74c1b268 | 5574 | EOF |
97bf5e38 | 5575 | |
74c1b268 AC |
5576 | else |
5577 | echo "$ac_t""no" 1>&6 | |
5578 | fi | |
97bf5e38 | 5579 | done |
74c1b268 | 5580 | |
97bf5e38 MK |
5581 | for ac_func in getpagesize |
5582 | do | |
5583 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 5584 | echo "configure:5585: checking for $ac_func" >&5 |
97bf5e38 | 5585 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5586 | echo $ac_n "(cached) $ac_c" 1>&6 |
5587 | else | |
5588 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5589 | #line 5590 "configure" |
74c1b268 AC |
5590 | #include "confdefs.h" |
5591 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5592 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5593 | #include <assert.h> |
5594 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5595 | /* We use char because int might match the return type of a gcc2 | |
5596 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5597 | char $ac_func(); |
74c1b268 AC |
5598 | |
5599 | int main() { | |
5600 | ||
5601 | /* The GNU C library defines this for functions which it implements | |
5602 | to always fail with ENOSYS. Some functions are actually named | |
5603 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5604 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5605 | choke me |
5606 | #else | |
97bf5e38 | 5607 | $ac_func(); |
74c1b268 AC |
5608 | #endif |
5609 | ||
5610 | ; return 0; } | |
5611 | EOF | |
030292b7 | 5612 | if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5613 | rm -rf conftest* |
97bf5e38 | 5614 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5615 | else |
5616 | echo "configure: failed program was:" >&5 | |
5617 | cat conftest.$ac_ext >&5 | |
5618 | rm -rf conftest* | |
97bf5e38 | 5619 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5620 | fi |
5621 | rm -f conftest* | |
5622 | fi | |
5623 | ||
97bf5e38 | 5624 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5625 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5626 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5627 | cat >> confdefs.h <<EOF | |
5628 | #define $ac_tr_func 1 | |
5629 | EOF | |
5630 | ||
74c1b268 AC |
5631 | else |
5632 | echo "$ac_t""no" 1>&6 | |
5633 | fi | |
97bf5e38 | 5634 | done |
74c1b268 | 5635 | |
97bf5e38 | 5636 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
030292b7 | 5637 | echo "configure:5638: checking for working mmap" >&5 |
97bf5e38 MK |
5638 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5640 | else | |
5641 | if test "$cross_compiling" = yes; then | |
5642 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5643 | else |
5644 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5645 | #line 5646 "configure" |
74c1b268 | 5646 | #include "confdefs.h" |
97bf5e38 MK |
5647 | |
5648 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5649 | Here is a matrix of mmap possibilities: | |
5650 | mmap private not fixed | |
5651 | mmap private fixed at somewhere currently unmapped | |
5652 | mmap private fixed at somewhere already mapped | |
5653 | mmap shared not fixed | |
5654 | mmap shared fixed at somewhere currently unmapped | |
5655 | mmap shared fixed at somewhere already mapped | |
5656 | For private mappings, we should verify that changes cannot be read() | |
5657 | back from the file, nor mmap's back from the file at a different | |
5658 | address. (There have been systems where private was not correctly | |
5659 | implemented like the infamous i386 svr4.0, and systems where the | |
5660 | VM page cache was not coherent with the filesystem buffer cache | |
5661 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5662 | For shared mappings, we should conversely verify that changes get | |
5663 | propogated back to all the places they're supposed to be. | |
5664 | ||
5665 | Grep wants private fixed already mapped. | |
5666 | The main things grep needs to know about mmap are: | |
5667 | * does it exist and is it safe to write into the mmap'd area | |
5668 | * how to use it (BSD variants) */ | |
74c1b268 | 5669 | #include <sys/types.h> |
97bf5e38 MK |
5670 | #include <fcntl.h> |
5671 | #include <sys/mman.h> | |
5672 | ||
5673 | /* This mess was copied from the GNU getpagesize.h. */ | |
5674 | #ifndef HAVE_GETPAGESIZE | |
5675 | # ifdef HAVE_UNISTD_H | |
5676 | # include <unistd.h> | |
5677 | # endif | |
5678 | ||
5679 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5680 | # ifndef HAVE_SYS_PARAM_H | |
5681 | # define HAVE_SYS_PARAM_H 1 | |
5682 | # endif | |
5683 | ||
5684 | # ifdef _SC_PAGESIZE | |
5685 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5686 | # else /* no _SC_PAGESIZE */ | |
5687 | # ifdef HAVE_SYS_PARAM_H | |
5688 | # include <sys/param.h> | |
5689 | # ifdef EXEC_PAGESIZE | |
5690 | # define getpagesize() EXEC_PAGESIZE | |
5691 | # else /* no EXEC_PAGESIZE */ | |
5692 | # ifdef NBPG | |
5693 | # define getpagesize() NBPG * CLSIZE | |
5694 | # ifndef CLSIZE | |
5695 | # define CLSIZE 1 | |
5696 | # endif /* no CLSIZE */ | |
5697 | # else /* no NBPG */ | |
5698 | # ifdef NBPC | |
5699 | # define getpagesize() NBPC | |
5700 | # else /* no NBPC */ | |
5701 | # ifdef PAGESIZE | |
5702 | # define getpagesize() PAGESIZE | |
5703 | # endif /* PAGESIZE */ | |
5704 | # endif /* no NBPC */ | |
5705 | # endif /* no NBPG */ | |
5706 | # endif /* no EXEC_PAGESIZE */ | |
5707 | # else /* no HAVE_SYS_PARAM_H */ | |
5708 | # define getpagesize() 8192 /* punt totally */ | |
5709 | # endif /* no HAVE_SYS_PARAM_H */ | |
5710 | # endif /* no _SC_PAGESIZE */ | |
5711 | ||
5712 | #endif /* no HAVE_GETPAGESIZE */ | |
5713 | ||
74c1b268 | 5714 | #ifdef __cplusplus |
97bf5e38 | 5715 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5716 | #else |
97bf5e38 | 5717 | char *malloc(); |
74c1b268 | 5718 | #endif |
74c1b268 | 5719 | |
97bf5e38 MK |
5720 | int |
5721 | main() | |
5722 | { | |
5723 | char *data, *data2, *data3; | |
5724 | int i, pagesize; | |
5725 | int fd; | |
74c1b268 | 5726 | |
97bf5e38 | 5727 | pagesize = getpagesize(); |
74c1b268 | 5728 | |
97bf5e38 MK |
5729 | /* |
5730 | * First, make a file with some known garbage in it. | |
5731 | */ | |
5732 | data = malloc(pagesize); | |
5733 | if (!data) | |
5734 | exit(1); | |
5735 | for (i = 0; i < pagesize; ++i) | |
5736 | *(data + i) = rand(); | |
5737 | umask(0); | |
5738 | fd = creat("conftestmmap", 0600); | |
5739 | if (fd < 0) | |
5740 | exit(1); | |
5741 | if (write(fd, data, pagesize) != pagesize) | |
5742 | exit(1); | |
5743 | close(fd); | |
74c1b268 | 5744 | |
97bf5e38 MK |
5745 | /* |
5746 | * Next, try to mmap the file at a fixed address which | |
5747 | * already has something else allocated at it. If we can, | |
5748 | * also make sure that we see the same garbage. | |
5749 | */ | |
5750 | fd = open("conftestmmap", O_RDWR); | |
5751 | if (fd < 0) | |
5752 | exit(1); | |
5753 | data2 = malloc(2 * pagesize); | |
5754 | if (!data2) | |
5755 | exit(1); | |
5756 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5757 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5758 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5759 | exit(1); | |
5760 | for (i = 0; i < pagesize; ++i) | |
5761 | if (*(data + i) != *(data2 + i)) | |
5762 | exit(1); | |
74c1b268 | 5763 | |
97bf5e38 MK |
5764 | /* |
5765 | * Finally, make sure that changes to the mapped area | |
5766 | * do not percolate back to the file as seen by read(). | |
5767 | * (This is a bug on some variants of i386 svr4.0.) | |
5768 | */ | |
5769 | for (i = 0; i < pagesize; ++i) | |
5770 | *(data2 + i) = *(data2 + i) + 1; | |
5771 | data3 = malloc(pagesize); | |
5772 | if (!data3) | |
5773 | exit(1); | |
5774 | if (read(fd, data3, pagesize) != pagesize) | |
5775 | exit(1); | |
5776 | for (i = 0; i < pagesize; ++i) | |
5777 | if (*(data + i) != *(data3 + i)) | |
5778 | exit(1); | |
5779 | close(fd); | |
5780 | unlink("conftestmmap"); | |
5781 | exit(0); | |
74c1b268 | 5782 | } |
97bf5e38 | 5783 | |
74c1b268 | 5784 | EOF |
030292b7 | 5785 | if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5786 | then |
97bf5e38 | 5787 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5788 | else |
5789 | echo "configure: failed program was:" >&5 | |
5790 | cat conftest.$ac_ext >&5 | |
5791 | rm -fr conftest* | |
97bf5e38 | 5792 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5793 | fi |
5794 | rm -fr conftest* | |
5795 | fi | |
5796 | ||
5797 | fi | |
5798 | ||
97bf5e38 MK |
5799 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5800 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5801 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5802 | #define HAVE_MMAP 1 |
74c1b268 AC |
5803 | EOF |
5804 | ||
5805 | fi | |
5806 | ||
97bf5e38 | 5807 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
030292b7 | 5808 | echo "configure:5809: checking for pid_t" >&5 |
97bf5e38 | 5809 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5810 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5811 | else |
5812 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5813 | #line 5814 "configure" |
0200359f | 5814 | #include "confdefs.h" |
97bf5e38 MK |
5815 | #include <sys/types.h> |
5816 | #if STDC_HEADERS | |
5817 | #include <stdlib.h> | |
5818 | #include <stddef.h> | |
0200359f | 5819 | #endif |
0200359f | 5820 | EOF |
97bf5e38 MK |
5821 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5822 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5823 | rm -rf conftest* | |
5824 | ac_cv_type_pid_t=yes | |
0200359f | 5825 | else |
97bf5e38 MK |
5826 | rm -rf conftest* |
5827 | ac_cv_type_pid_t=no | |
0200359f | 5828 | fi |
97bf5e38 | 5829 | rm -f conftest* |
0200359f MK |
5830 | |
5831 | fi | |
97bf5e38 MK |
5832 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5833 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5834 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5835 | #define pid_t int |
0200359f MK |
5836 | EOF |
5837 | ||
5838 | fi | |
5839 | ||
97bf5e38 MK |
5840 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5841 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
030292b7 | 5842 | echo "configure:5843: checking for vfork.h" >&5 |
97bf5e38 | 5843 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5844 | echo $ac_n "(cached) $ac_c" 1>&6 |
5845 | else | |
5846 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5847 | #line 5848 "configure" |
72473524 | 5848 | #include "confdefs.h" |
97bf5e38 | 5849 | #include <vfork.h> |
72473524 | 5850 | EOF |
97bf5e38 | 5851 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
030292b7 | 5852 | { (eval echo configure:5853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
5853 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5854 | if test -z "$ac_err"; then | |
72473524 | 5855 | rm -rf conftest* |
97bf5e38 | 5856 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5857 | else |
97bf5e38 | 5858 | echo "$ac_err" >&5 |
72473524 DJ |
5859 | echo "configure: failed program was:" >&5 |
5860 | cat conftest.$ac_ext >&5 | |
5861 | rm -rf conftest* | |
97bf5e38 | 5862 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5863 | fi |
5864 | rm -f conftest* | |
5865 | fi | |
97bf5e38 MK |
5866 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5867 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5868 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5869 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5870 | EOF |
5871 | ||
97bf5e38 MK |
5872 | else |
5873 | echo "$ac_t""no" 1>&6 | |
72473524 | 5874 | fi |
c906108c | 5875 | |
97bf5e38 | 5876 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
030292b7 | 5877 | echo "configure:5878: checking for working vfork" >&5 |
97bf5e38 MK |
5878 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
5879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5880 | else | |
5881 | if test "$cross_compiling" = yes; then | |
5882 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
030292b7 | 5883 | echo "configure:5884: checking for vfork" >&5 |
97bf5e38 | 5884 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
5885 | echo $ac_n "(cached) $ac_c" 1>&6 |
5886 | else | |
5887 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5888 | #line 5889 "configure" |
2b2d558c | 5889 | #include "confdefs.h" |
97bf5e38 MK |
5890 | /* System header to define __stub macros and hopefully few prototypes, |
5891 | which can conflict with char vfork(); below. */ | |
5892 | #include <assert.h> | |
5893 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5894 | /* We use char because int might match the return type of a gcc2 | |
5895 | builtin and then its argument prototype would still apply. */ | |
5896 | char vfork(); | |
2b2d558c MK |
5897 | |
5898 | int main() { | |
97bf5e38 MK |
5899 | |
5900 | /* The GNU C library defines this for functions which it implements | |
5901 | to always fail with ENOSYS. Some functions are actually named | |
5902 | something starting with __ and the normal name is an alias. */ | |
5903 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
5904 | choke me | |
5905 | #else | |
5906 | vfork(); | |
5907 | #endif | |
5908 | ||
2b2d558c MK |
5909 | ; return 0; } |
5910 | EOF | |
030292b7 | 5911 | if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 5912 | rm -rf conftest* |
97bf5e38 | 5913 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
5914 | else |
5915 | echo "configure: failed program was:" >&5 | |
5916 | cat conftest.$ac_ext >&5 | |
5917 | rm -rf conftest* | |
97bf5e38 | 5918 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
5919 | fi |
5920 | rm -f conftest* | |
5921 | fi | |
5922 | ||
97bf5e38 MK |
5923 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
5924 | echo "$ac_t""yes" 1>&6 | |
5925 | : | |
5926 | else | |
5927 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
5928 | fi |
5929 | ||
97bf5e38 | 5930 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
5931 | else |
5932 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 5933 | #line 5934 "configure" |
7dfa765c | 5934 | #include "confdefs.h" |
97bf5e38 MK |
5935 | /* Thanks to Paul Eggert for this test. */ |
5936 | #include <stdio.h> | |
5937 | #include <sys/types.h> | |
5938 | #include <sys/stat.h> | |
5939 | #ifdef HAVE_UNISTD_H | |
5940 | #include <unistd.h> | |
5941 | #endif | |
5942 | #ifdef HAVE_VFORK_H | |
5943 | #include <vfork.h> | |
5944 | #endif | |
5945 | /* On some sparc systems, changes by the child to local and incoming | |
5946 | argument registers are propagated back to the parent. | |
5947 | The compiler is told about this with #include <vfork.h>, | |
5948 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
5949 | Test for this by using a static variable whose address | |
5950 | is put into a register that is clobbered by the vfork. */ | |
5951 | static | |
5952 | #ifdef __cplusplus | |
5953 | sparc_address_test (int arg) | |
5954 | #else | |
5955 | sparc_address_test (arg) int arg; | |
5956 | #endif | |
5957 | { | |
5958 | static pid_t child; | |
5959 | if (!child) { | |
5960 | child = vfork (); | |
5961 | if (child < 0) { | |
5962 | perror ("vfork"); | |
5963 | _exit(2); | |
5964 | } | |
5965 | if (!child) { | |
5966 | arg = getpid(); | |
5967 | write(-1, "", 0); | |
5968 | _exit (arg); | |
5969 | } | |
5970 | } | |
5971 | } | |
5972 | main() { | |
5973 | pid_t parent = getpid (); | |
5974 | pid_t child; | |
7dfa765c | 5975 | |
97bf5e38 | 5976 | sparc_address_test (); |
7dfa765c | 5977 | |
97bf5e38 | 5978 | child = vfork (); |
7dfa765c | 5979 | |
97bf5e38 MK |
5980 | if (child == 0) { |
5981 | /* Here is another test for sparc vfork register problems. | |
5982 | This test uses lots of local variables, at least | |
5983 | as many local variables as main has allocated so far | |
5984 | including compiler temporaries. 4 locals are enough for | |
5985 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
5986 | A buggy compiler should reuse the register of parent | |
5987 | for one of the local variables, since it will think that | |
5988 | parent can't possibly be used any more in this routine. | |
5989 | Assigning to the local variable will thus munge parent | |
5990 | in the parent process. */ | |
5991 | pid_t | |
5992 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5993 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5994 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5995 | use the same hardware register for all 8 local variables. */ | |
5996 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5997 | || p != p5 || p != p6 || p != p7) | |
5998 | _exit(1); | |
7dfa765c | 5999 | |
97bf5e38 MK |
6000 | /* On some systems (e.g. IRIX 3.3), |
6001 | vfork doesn't separate parent from child file descriptors. | |
6002 | If the child closes a descriptor before it execs or exits, | |
6003 | this munges the parent's descriptor as well. | |
6004 | Test for this by closing stdout in the child. */ | |
6005 | _exit(close(fileno(stdout)) != 0); | |
6006 | } else { | |
6007 | int status; | |
6008 | struct stat st; | |
64bb1671 | 6009 | |
97bf5e38 MK |
6010 | while (wait(&status) != child) |
6011 | ; | |
6012 | exit( | |
6013 | /* Was there some problem with vforking? */ | |
6014 | child < 0 | |
64bb1671 | 6015 | |
97bf5e38 MK |
6016 | /* Did the child fail? (This shouldn't happen.) */ |
6017 | || status | |
64bb1671 | 6018 | |
97bf5e38 MK |
6019 | /* Did the vfork/compiler bug occur? */ |
6020 | || parent != getpid() | |
6021 | ||
6022 | /* Did the file descriptor bug occur? */ | |
6023 | || fstat(fileno(stdout), &st) != 0 | |
6024 | ); | |
6025 | } | |
6026 | } | |
5c44784c | 6027 | EOF |
030292b7 | 6028 | if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6029 | then |
6030 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6031 | else |
6032 | echo "configure: failed program was:" >&5 | |
6033 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6034 | rm -fr conftest* |
6035 | ac_cv_func_vfork_works=no | |
5c44784c | 6036 | fi |
97bf5e38 | 6037 | rm -fr conftest* |
5c44784c JM |
6038 | fi |
6039 | ||
0afdd437 MK |
6040 | fi |
6041 | ||
97bf5e38 MK |
6042 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6043 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6044 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6045 | #define vfork fork |
0afdd437 MK |
6046 | EOF |
6047 | ||
6048 | fi | |
6049 | ||
97bf5e38 MK |
6050 | for ac_func in canonicalize_file_name realpath |
6051 | do | |
6052 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6053 | echo "configure:6054: checking for $ac_func" >&5 |
97bf5e38 | 6054 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6055 | echo $ac_n "(cached) $ac_c" 1>&6 |
6056 | else | |
6057 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6058 | #line 6059 "configure" |
7e89e357 | 6059 | #include "confdefs.h" |
97bf5e38 MK |
6060 | /* System header to define __stub macros and hopefully few prototypes, |
6061 | which can conflict with char $ac_func(); below. */ | |
6062 | #include <assert.h> | |
6063 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6064 | /* We use char because int might match the return type of a gcc2 | |
6065 | builtin and then its argument prototype would still apply. */ | |
6066 | char $ac_func(); | |
6067 | ||
7e89e357 | 6068 | int main() { |
97bf5e38 MK |
6069 | |
6070 | /* The GNU C library defines this for functions which it implements | |
6071 | to always fail with ENOSYS. Some functions are actually named | |
6072 | something starting with __ and the normal name is an alias. */ | |
6073 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6074 | choke me | |
6075 | #else | |
6076 | $ac_func(); | |
6077 | #endif | |
6078 | ||
7e89e357 JT |
6079 | ; return 0; } |
6080 | EOF | |
030292b7 | 6081 | if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6082 | rm -rf conftest* |
97bf5e38 | 6083 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6084 | else |
6085 | echo "configure: failed program was:" >&5 | |
6086 | cat conftest.$ac_ext >&5 | |
6087 | rm -rf conftest* | |
97bf5e38 | 6088 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6089 | fi |
6090 | rm -f conftest* | |
6091 | fi | |
6092 | ||
97bf5e38 MK |
6093 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6094 | echo "$ac_t""yes" 1>&6 | |
6095 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6096 | cat >> confdefs.h <<EOF | |
6097 | #define $ac_tr_func 1 | |
7e89e357 | 6098 | EOF |
97bf5e38 MK |
6099 | |
6100 | else | |
6101 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6102 | fi |
97bf5e38 | 6103 | done |
7e89e357 | 6104 | |
97bf5e38 | 6105 | for ac_func in poll |
7be570e7 JM |
6106 | do |
6107 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6108 | echo "configure:6109: checking for $ac_func" >&5 |
7be570e7 JM |
6109 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6110 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6111 | else | |
6112 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6113 | #line 6114 "configure" |
7be570e7 JM |
6114 | #include "confdefs.h" |
6115 | /* System header to define __stub macros and hopefully few prototypes, | |
6116 | which can conflict with char $ac_func(); below. */ | |
6117 | #include <assert.h> | |
6118 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6119 | /* We use char because int might match the return type of a gcc2 | |
6120 | builtin and then its argument prototype would still apply. */ | |
6121 | char $ac_func(); | |
6122 | ||
6123 | int main() { | |
6124 | ||
6125 | /* The GNU C library defines this for functions which it implements | |
6126 | to always fail with ENOSYS. Some functions are actually named | |
6127 | something starting with __ and the normal name is an alias. */ | |
6128 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6129 | choke me | |
6130 | #else | |
6131 | $ac_func(); | |
6132 | #endif | |
6133 | ||
6134 | ; return 0; } | |
6135 | EOF | |
030292b7 | 6136 | if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6137 | rm -rf conftest* |
6138 | eval "ac_cv_func_$ac_func=yes" | |
6139 | else | |
6140 | echo "configure: failed program was:" >&5 | |
6141 | cat conftest.$ac_ext >&5 | |
6142 | rm -rf conftest* | |
6143 | eval "ac_cv_func_$ac_func=no" | |
6144 | fi | |
6145 | rm -f conftest* | |
6146 | fi | |
6147 | ||
6148 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6149 | echo "$ac_t""yes" 1>&6 | |
6150 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6151 | cat >> confdefs.h <<EOF | |
6152 | #define $ac_tr_func 1 | |
6153 | EOF | |
6154 | ||
6155 | else | |
6156 | echo "$ac_t""no" 1>&6 | |
6157 | fi | |
6158 | done | |
6159 | ||
6160 | for ac_func in pread64 | |
6161 | do | |
6162 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6163 | echo "configure:6164: checking for $ac_func" >&5 |
14abd0fb MK |
6164 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6165 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6166 | else | |
6167 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6168 | #line 6169 "configure" |
14abd0fb MK |
6169 | #include "confdefs.h" |
6170 | /* System header to define __stub macros and hopefully few prototypes, | |
6171 | which can conflict with char $ac_func(); below. */ | |
6172 | #include <assert.h> | |
6173 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6174 | /* We use char because int might match the return type of a gcc2 | |
6175 | builtin and then its argument prototype would still apply. */ | |
6176 | char $ac_func(); | |
6177 | ||
6178 | int main() { | |
6179 | ||
6180 | /* The GNU C library defines this for functions which it implements | |
6181 | to always fail with ENOSYS. Some functions are actually named | |
6182 | something starting with __ and the normal name is an alias. */ | |
6183 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6184 | choke me | |
6185 | #else | |
6186 | $ac_func(); | |
6187 | #endif | |
6188 | ||
6189 | ; return 0; } | |
6190 | EOF | |
030292b7 | 6191 | if { (eval echo configure:6192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6192 | rm -rf conftest* |
6193 | eval "ac_cv_func_$ac_func=yes" | |
6194 | else | |
6195 | echo "configure: failed program was:" >&5 | |
6196 | cat conftest.$ac_ext >&5 | |
6197 | rm -rf conftest* | |
6198 | eval "ac_cv_func_$ac_func=no" | |
6199 | fi | |
6200 | rm -f conftest* | |
6201 | fi | |
6202 | ||
6203 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6204 | echo "$ac_t""yes" 1>&6 | |
6205 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6206 | cat >> confdefs.h <<EOF | |
6207 | #define $ac_tr_func 1 | |
6208 | EOF | |
6209 | ||
6210 | else | |
6211 | echo "$ac_t""no" 1>&6 | |
6212 | fi | |
6213 | done | |
6214 | ||
97bf5e38 MK |
6215 | for ac_func in sbrk |
6216 | do | |
6217 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6218 | echo "configure:6219: checking for $ac_func" >&5 |
97bf5e38 | 6219 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6220 | echo $ac_n "(cached) $ac_c" 1>&6 |
6221 | else | |
6222 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6223 | #line 6224 "configure" |
c906108c | 6224 | #include "confdefs.h" |
97bf5e38 MK |
6225 | /* System header to define __stub macros and hopefully few prototypes, |
6226 | which can conflict with char $ac_func(); below. */ | |
6227 | #include <assert.h> | |
6228 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6229 | /* We use char because int might match the return type of a gcc2 | |
6230 | builtin and then its argument prototype would still apply. */ | |
6231 | char $ac_func(); | |
c906108c | 6232 | |
97bf5e38 MK |
6233 | int main() { |
6234 | ||
6235 | /* The GNU C library defines this for functions which it implements | |
6236 | to always fail with ENOSYS. Some functions are actually named | |
6237 | something starting with __ and the normal name is an alias. */ | |
6238 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6239 | choke me | |
c906108c | 6240 | #else |
97bf5e38 | 6241 | $ac_func(); |
c906108c | 6242 | #endif |
97bf5e38 | 6243 | |
c906108c SS |
6244 | ; return 0; } |
6245 | EOF | |
030292b7 | 6246 | if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6247 | rm -rf conftest* |
97bf5e38 | 6248 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6249 | else |
6250 | echo "configure: failed program was:" >&5 | |
6251 | cat conftest.$ac_ext >&5 | |
6252 | rm -rf conftest* | |
97bf5e38 | 6253 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6254 | fi |
6255 | rm -f conftest* | |
6256 | fi | |
6257 | ||
97bf5e38 MK |
6258 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6259 | echo "$ac_t""yes" 1>&6 | |
6260 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6261 | cat >> confdefs.h <<EOF | |
6262 | #define $ac_tr_func 1 | |
c906108c | 6263 | EOF |
97bf5e38 MK |
6264 | |
6265 | else | |
6266 | echo "$ac_t""no" 1>&6 | |
c906108c | 6267 | fi |
97bf5e38 | 6268 | done |
c906108c | 6269 | |
97bf5e38 MK |
6270 | for ac_func in setpgid setpgrp |
6271 | do | |
6272 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6273 | echo "configure:6274: checking for $ac_func" >&5 |
97bf5e38 | 6274 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6275 | echo $ac_n "(cached) $ac_c" 1>&6 |
6276 | else | |
6277 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6278 | #line 6279 "configure" |
c906108c | 6279 | #include "confdefs.h" |
97bf5e38 MK |
6280 | /* System header to define __stub macros and hopefully few prototypes, |
6281 | which can conflict with char $ac_func(); below. */ | |
6282 | #include <assert.h> | |
6283 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6284 | /* We use char because int might match the return type of a gcc2 | |
6285 | builtin and then its argument prototype would still apply. */ | |
6286 | char $ac_func(); | |
c906108c | 6287 | |
97bf5e38 MK |
6288 | int main() { |
6289 | ||
6290 | /* The GNU C library defines this for functions which it implements | |
6291 | to always fail with ENOSYS. Some functions are actually named | |
6292 | something starting with __ and the normal name is an alias. */ | |
6293 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6294 | choke me | |
c906108c | 6295 | #else |
97bf5e38 | 6296 | $ac_func(); |
c906108c | 6297 | #endif |
97bf5e38 | 6298 | |
c906108c SS |
6299 | ; return 0; } |
6300 | EOF | |
030292b7 | 6301 | if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6302 | rm -rf conftest* |
97bf5e38 | 6303 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6304 | else |
6305 | echo "configure: failed program was:" >&5 | |
6306 | cat conftest.$ac_ext >&5 | |
6307 | rm -rf conftest* | |
97bf5e38 | 6308 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6309 | fi |
6310 | rm -f conftest* | |
6311 | fi | |
6312 | ||
97bf5e38 MK |
6313 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6314 | echo "$ac_t""yes" 1>&6 | |
6315 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6316 | cat >> confdefs.h <<EOF | |
6317 | #define $ac_tr_func 1 | |
c906108c | 6318 | EOF |
97bf5e38 MK |
6319 | |
6320 | else | |
6321 | echo "$ac_t""no" 1>&6 | |
c906108c | 6322 | fi |
97bf5e38 | 6323 | done |
c906108c | 6324 | |
e1ea1d75 | 6325 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6326 | do |
6327 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6328 | echo "configure:6329: checking for $ac_func" >&5 |
97bf5e38 | 6329 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6330 | echo $ac_n "(cached) $ac_c" 1>&6 |
6331 | else | |
6332 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6333 | #line 6334 "configure" |
c906108c | 6334 | #include "confdefs.h" |
97bf5e38 MK |
6335 | /* System header to define __stub macros and hopefully few prototypes, |
6336 | which can conflict with char $ac_func(); below. */ | |
6337 | #include <assert.h> | |
6338 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6339 | /* We use char because int might match the return type of a gcc2 | |
6340 | builtin and then its argument prototype would still apply. */ | |
6341 | char $ac_func(); | |
c906108c | 6342 | |
97bf5e38 MK |
6343 | int main() { |
6344 | ||
6345 | /* The GNU C library defines this for functions which it implements | |
6346 | to always fail with ENOSYS. Some functions are actually named | |
6347 | something starting with __ and the normal name is an alias. */ | |
6348 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6349 | choke me | |
c906108c | 6350 | #else |
97bf5e38 | 6351 | $ac_func(); |
c906108c | 6352 | #endif |
97bf5e38 | 6353 | |
c906108c SS |
6354 | ; return 0; } |
6355 | EOF | |
030292b7 | 6356 | if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6357 | rm -rf conftest* |
97bf5e38 | 6358 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6359 | else |
6360 | echo "configure: failed program was:" >&5 | |
6361 | cat conftest.$ac_ext >&5 | |
6362 | rm -rf conftest* | |
97bf5e38 | 6363 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6364 | fi |
6365 | rm -f conftest* | |
6366 | fi | |
6367 | ||
97bf5e38 MK |
6368 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6369 | echo "$ac_t""yes" 1>&6 | |
6370 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6371 | cat >> confdefs.h <<EOF | |
6372 | #define $ac_tr_func 1 | |
c906108c | 6373 | EOF |
e1ea1d75 | 6374 | |
97bf5e38 MK |
6375 | else |
6376 | echo "$ac_t""no" 1>&6 | |
c906108c | 6377 | fi |
97bf5e38 | 6378 | done |
c906108c | 6379 | |
97bf5e38 MK |
6380 | for ac_func in socketpair |
6381 | do | |
6382 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
030292b7 | 6383 | echo "configure:6384: checking for $ac_func" >&5 |
97bf5e38 | 6384 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6385 | echo $ac_n "(cached) $ac_c" 1>&6 |
6386 | else | |
6387 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6388 | #line 6389 "configure" |
c906108c | 6389 | #include "confdefs.h" |
97bf5e38 MK |
6390 | /* System header to define __stub macros and hopefully few prototypes, |
6391 | which can conflict with char $ac_func(); below. */ | |
6392 | #include <assert.h> | |
6393 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6394 | /* We use char because int might match the return type of a gcc2 | |
6395 | builtin and then its argument prototype would still apply. */ | |
6396 | char $ac_func(); | |
c906108c | 6397 | |
97bf5e38 MK |
6398 | int main() { |
6399 | ||
6400 | /* The GNU C library defines this for functions which it implements | |
6401 | to always fail with ENOSYS. Some functions are actually named | |
6402 | something starting with __ and the normal name is an alias. */ | |
6403 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6404 | choke me | |
c906108c | 6405 | #else |
97bf5e38 | 6406 | $ac_func(); |
c906108c | 6407 | #endif |
97bf5e38 | 6408 | |
c906108c SS |
6409 | ; return 0; } |
6410 | EOF | |
030292b7 | 6411 | if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6412 | rm -rf conftest* |
97bf5e38 | 6413 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6414 | else |
6415 | echo "configure: failed program was:" >&5 | |
6416 | cat conftest.$ac_ext >&5 | |
6417 | rm -rf conftest* | |
97bf5e38 | 6418 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6419 | fi |
6420 | rm -f conftest* | |
6421 | fi | |
6422 | ||
97bf5e38 MK |
6423 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6424 | echo "$ac_t""yes" 1>&6 | |
6425 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6426 | cat >> confdefs.h <<EOF | |
6427 | #define $ac_tr_func 1 | |
c906108c | 6428 | EOF |
97bf5e38 MK |
6429 | |
6430 | else | |
6431 | echo "$ac_t""no" 1>&6 | |
c906108c | 6432 | fi |
97bf5e38 | 6433 | done |
c906108c | 6434 | |
97bf5e38 MK |
6435 | |
6436 | if test "$cross_compiling" = no; then | |
6437 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
030292b7 | 6438 | echo "configure:6439: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6439 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6440 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6441 | else |
6442 | if test "$cross_compiling" = yes; then | |
6443 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6444 | else |
6445 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6446 | #line 6447 "configure" |
c906108c SS |
6447 | #include "confdefs.h" |
6448 | ||
c906108c SS |
6449 | #ifdef HAVE_UNISTD_H |
6450 | #include <unistd.h> | |
6451 | #endif | |
97bf5e38 MK |
6452 | |
6453 | /* | |
6454 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6455 | * successfully. | |
6456 | */ | |
6457 | main() | |
6458 | { | |
6459 | if (setpgrp(1,1) == -1) | |
6460 | exit(0); | |
6461 | else | |
6462 | exit(1); | |
6463 | } | |
6464 | ||
c906108c | 6465 | EOF |
030292b7 | 6466 | if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6467 | then |
6468 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6469 | else |
6470 | echo "configure: failed program was:" >&5 | |
6471 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6472 | rm -fr conftest* |
6473 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6474 | fi |
97bf5e38 | 6475 | rm -fr conftest* |
c906108c SS |
6476 | fi |
6477 | ||
97bf5e38 MK |
6478 | |
6479 | fi | |
6480 | ||
6481 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6482 | if test $ac_cv_func_setpgrp_void = yes; then | |
6483 | cat >> confdefs.h <<\EOF | |
6484 | #define SETPGRP_VOID 1 | |
c906108c SS |
6485 | EOF |
6486 | ||
6487 | fi | |
6488 | ||
97bf5e38 MK |
6489 | else |
6490 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
030292b7 | 6491 | echo "configure:6492: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6492 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6493 | echo $ac_n "(cached) $ac_c" 1>&6 |
6494 | else | |
6495 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6496 | #line 6497 "configure" |
b83266a0 SS |
6497 | #include "confdefs.h" |
6498 | ||
b83266a0 | 6499 | #include <unistd.h> |
97bf5e38 | 6500 | |
b83266a0 | 6501 | int main() { |
97bf5e38 MK |
6502 | |
6503 | if (setpgrp(1,1) == -1) | |
6504 | exit (0); | |
6505 | else | |
6506 | exit (1); | |
6507 | ||
b83266a0 SS |
6508 | ; return 0; } |
6509 | EOF | |
030292b7 | 6510 | if { (eval echo configure:6511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6511 | rm -rf conftest* |
97bf5e38 | 6512 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6513 | else |
6514 | echo "configure: failed program was:" >&5 | |
6515 | cat conftest.$ac_ext >&5 | |
6516 | rm -rf conftest* | |
97bf5e38 | 6517 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6518 | fi |
6519 | rm -f conftest* | |
6520 | fi | |
6521 | ||
97bf5e38 MK |
6522 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6523 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6524 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6525 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6526 | EOF |
6527 | ||
97bf5e38 | 6528 | fi |
b83266a0 SS |
6529 | fi |
6530 | ||
97bf5e38 MK |
6531 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6532 | # since sigsetjmp might only be defined as a macro. | |
6533 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
030292b7 | 6534 | echo "configure:6535: checking for sigsetjmp" >&5 |
97bf5e38 | 6535 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6536 | echo $ac_n "(cached) $ac_c" 1>&6 |
6537 | else | |
6538 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6539 | #line 6540 "configure" |
a4db0f07 RH |
6540 | #include "confdefs.h" |
6541 | ||
97bf5e38 MK |
6542 | #include <setjmp.h> |
6543 | ||
a4db0f07 | 6544 | int main() { |
97bf5e38 | 6545 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6546 | ; return 0; } |
6547 | EOF | |
030292b7 | 6548 | if { (eval echo configure:6549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6549 | rm -rf conftest* |
97bf5e38 | 6550 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6551 | else |
6552 | echo "configure: failed program was:" >&5 | |
6553 | cat conftest.$ac_ext >&5 | |
6554 | rm -rf conftest* | |
97bf5e38 | 6555 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6556 | fi |
6557 | rm -f conftest* | |
6558 | fi | |
6559 | ||
97bf5e38 MK |
6560 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6561 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6562 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6563 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6564 | EOF |
6565 | ||
6566 | fi | |
c906108c | 6567 | |
06825bd1 MK |
6568 | # Assume we'll default to using the included libiberty regex. |
6569 | gdb_use_included_regex=yes | |
6570 | ||
6571 | # However, if the system regex is GNU regex, then default to *not* | |
6572 | # using the included regex. | |
6573 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
030292b7 | 6574 | echo "configure:6575: checking for GNU regex" >&5 |
06825bd1 MK |
6575 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6576 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6577 | else | |
6578 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6579 | #line 6580 "configure" |
06825bd1 MK |
6580 | #include "confdefs.h" |
6581 | #include <gnu-versions.h> | |
6582 | int main() { | |
6583 | #define REGEX_INTERFACE_VERSION 1 | |
6584 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6585 | # error "Version mismatch" | |
6586 | #endif | |
6587 | ; return 0; } | |
6588 | EOF | |
030292b7 | 6589 | if { (eval echo configure:6590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6590 | rm -rf conftest* |
6591 | gdb_cv_have_gnu_regex=yes | |
6592 | else | |
6593 | echo "configure: failed program was:" >&5 | |
6594 | cat conftest.$ac_ext >&5 | |
6595 | rm -rf conftest* | |
6596 | gdb_cv_have_gnu_regex=no | |
6597 | fi | |
6598 | rm -f conftest* | |
6599 | fi | |
6600 | ||
6601 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6602 | if test $gdb_cv_have_gnu_regex = yes; then | |
6603 | gdb_use_included_regex=no | |
6604 | fi | |
6605 | ||
6606 | # Check whether --with-included-regex or --without-included-regex was given. | |
6607 | if test "${with_included_regex+set}" = set; then | |
6608 | withval="$with_included_regex" | |
6609 | gdb_with_regex=$withval | |
6610 | else | |
6611 | gdb_with_regex=$gdb_use_included_regex | |
6612 | fi | |
6613 | ||
6614 | if test "$gdb_with_regex" = yes; then | |
6615 | cat >> confdefs.h <<\EOF | |
6616 | #define USE_INCLUDED_REGEX 1 | |
6617 | EOF | |
6618 | ||
6619 | fi | |
6620 | ||
97bf5e38 MK |
6621 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6622 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6623 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
030292b7 | 6624 | echo "configure:6625: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6625 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6627 | else | |
6628 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6629 | #line 6630 "configure" |
c906108c | 6630 | #include "confdefs.h" |
97bf5e38 MK |
6631 | #include <machine/reg.h> |
6632 | int main() { | |
6633 | struct reg r; r.r_fs; | |
6634 | ; return 0; } | |
c906108c | 6635 | EOF |
030292b7 | 6636 | if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6637 | rm -rf conftest* |
97bf5e38 | 6638 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6639 | else |
97bf5e38 MK |
6640 | echo "configure: failed program was:" >&5 |
6641 | cat conftest.$ac_ext >&5 | |
c906108c | 6642 | rm -rf conftest* |
97bf5e38 | 6643 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6644 | fi |
6645 | rm -f conftest* | |
97bf5e38 | 6646 | fi |
c906108c | 6647 | |
97bf5e38 MK |
6648 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6649 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6650 | cat >> confdefs.h <<\EOF | |
6651 | #define HAVE_STRUCT_REG_R_FS 1 | |
6652 | EOF | |
6653 | ||
6654 | fi | |
6655 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
030292b7 | 6656 | echo "configure:6657: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6657 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6659 | else | |
6660 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6661 | #line 6662 "configure" |
c906108c | 6662 | #include "confdefs.h" |
97bf5e38 MK |
6663 | #include <machine/reg.h> |
6664 | int main() { | |
6665 | struct reg r; r.r_gs; | |
6666 | ; return 0; } | |
c906108c | 6667 | EOF |
030292b7 | 6668 | if { (eval echo configure:6669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6669 | rm -rf conftest* |
97bf5e38 | 6670 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6671 | else |
97bf5e38 MK |
6672 | echo "configure: failed program was:" >&5 |
6673 | cat conftest.$ac_ext >&5 | |
c906108c | 6674 | rm -rf conftest* |
97bf5e38 | 6675 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6676 | fi |
6677 | rm -f conftest* | |
c906108c | 6678 | fi |
c906108c | 6679 | |
97bf5e38 MK |
6680 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6681 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6682 | cat >> confdefs.h <<\EOF | |
6683 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6684 | EOF |
6685 | ||
c906108c SS |
6686 | fi |
6687 | ||
97bf5e38 MK |
6688 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6689 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
030292b7 | 6690 | echo "configure:6691: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6691 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6692 | echo $ac_n "(cached) $ac_c" 1>&6 |
6693 | else | |
6694 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6695 | #line 6696 "configure" |
c906108c | 6696 | #include "confdefs.h" |
97bf5e38 | 6697 | #include <sys/ptrace.h> |
c906108c | 6698 | int main() { |
97bf5e38 | 6699 | PTRACE_GETREGS; |
c906108c SS |
6700 | ; return 0; } |
6701 | EOF | |
030292b7 | 6702 | if { (eval echo configure:6703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6703 | rm -rf conftest* |
97bf5e38 | 6704 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6705 | else |
6706 | echo "configure: failed program was:" >&5 | |
6707 | cat conftest.$ac_ext >&5 | |
6708 | rm -rf conftest* | |
97bf5e38 | 6709 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6710 | fi |
6711 | rm -f conftest* | |
6712 | fi | |
6713 | ||
97bf5e38 MK |
6714 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6715 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6716 | cat >> confdefs.h <<\EOF | |
6717 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6718 | EOF |
6719 | ||
97bf5e38 | 6720 | fi |
c906108c | 6721 | |
97bf5e38 MK |
6722 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6723 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
030292b7 | 6724 | echo "configure:6725: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6725 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6726 | echo $ac_n "(cached) $ac_c" 1>&6 |
6727 | else | |
6728 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6729 | #line 6730 "configure" |
c906108c | 6730 | #include "confdefs.h" |
97bf5e38 | 6731 | #include <sys/ptrace.h> |
c906108c | 6732 | int main() { |
97bf5e38 | 6733 | PTRACE_GETFPXREGS; |
c906108c SS |
6734 | ; return 0; } |
6735 | EOF | |
030292b7 | 6736 | if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6737 | rm -rf conftest* |
97bf5e38 | 6738 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6739 | else |
6740 | echo "configure: failed program was:" >&5 | |
6741 | cat conftest.$ac_ext >&5 | |
6742 | rm -rf conftest* | |
97bf5e38 | 6743 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6744 | fi |
6745 | rm -f conftest* | |
6746 | fi | |
6747 | ||
97bf5e38 MK |
6748 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6749 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6750 | cat >> confdefs.h <<\EOF | |
6751 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6752 | EOF |
6753 | ||
97bf5e38 | 6754 | fi |
c906108c | 6755 | |
97bf5e38 MK |
6756 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6757 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
030292b7 | 6758 | echo "configure:6759: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6759 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6760 | echo $ac_n "(cached) $ac_c" 1>&6 |
6761 | else | |
6762 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6763 | #line 6764 "configure" |
c906108c | 6764 | #include "confdefs.h" |
97bf5e38 MK |
6765 | #include <sys/types.h> |
6766 | #include <sys/ptrace.h> | |
c906108c | 6767 | int main() { |
97bf5e38 | 6768 | PT_GETDBREGS; |
c906108c SS |
6769 | ; return 0; } |
6770 | EOF | |
030292b7 | 6771 | if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6772 | rm -rf conftest* |
97bf5e38 | 6773 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6774 | else |
6775 | echo "configure: failed program was:" >&5 | |
6776 | cat conftest.$ac_ext >&5 | |
6777 | rm -rf conftest* | |
97bf5e38 | 6778 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6779 | fi |
6780 | rm -f conftest* | |
6781 | fi | |
6782 | ||
97bf5e38 MK |
6783 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6784 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6785 | cat >> confdefs.h <<\EOF | |
6786 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6787 | EOF |
6788 | ||
97bf5e38 | 6789 | fi |
c906108c | 6790 | |
97bf5e38 MK |
6791 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6792 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
030292b7 | 6793 | echo "configure:6794: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6794 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6795 | echo $ac_n "(cached) $ac_c" 1>&6 |
6796 | else | |
6797 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6798 | #line 6799 "configure" |
c906108c | 6799 | #include "confdefs.h" |
97bf5e38 MK |
6800 | #include <sys/types.h> |
6801 | #include <sys/ptrace.h> | |
c906108c | 6802 | int main() { |
97bf5e38 | 6803 | PT_GETXMMREGS; |
c906108c SS |
6804 | ; return 0; } |
6805 | EOF | |
030292b7 | 6806 | if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6807 | rm -rf conftest* |
97bf5e38 | 6808 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6809 | else |
6810 | echo "configure: failed program was:" >&5 | |
6811 | cat conftest.$ac_ext >&5 | |
6812 | rm -rf conftest* | |
97bf5e38 | 6813 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6814 | fi |
6815 | rm -f conftest* | |
6816 | fi | |
6817 | ||
97bf5e38 MK |
6818 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6819 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6820 | cat >> confdefs.h <<\EOF | |
6821 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6822 | EOF |
6823 | ||
97bf5e38 | 6824 | fi |
c906108c | 6825 | |
97bf5e38 MK |
6826 | |
6827 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
030292b7 | 6828 | echo "configure:6829: checking whether malloc must be declared" >&5 |
97bf5e38 | 6829 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6830 | echo $ac_n "(cached) $ac_c" 1>&6 |
6831 | else | |
6832 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6833 | #line 6834 "configure" |
3862412b | 6834 | #include "confdefs.h" |
e17bf198 | 6835 | |
97bf5e38 MK |
6836 | #include <stdio.h> |
6837 | #ifdef HAVE_STRING_H | |
6838 | #include <string.h> | |
6839 | #else | |
6840 | #ifdef HAVE_STRINGS_H | |
6841 | #include <strings.h> | |
6842 | #endif | |
6843 | #endif | |
6844 | #ifdef HAVE_STDLIB_H | |
6845 | #include <stdlib.h> | |
6846 | #endif | |
6847 | #ifdef HAVE_UNISTD_H | |
6848 | #include <unistd.h> | |
6849 | #endif | |
3862412b | 6850 | int main() { |
97bf5e38 | 6851 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6852 | ; return 0; } |
6853 | EOF | |
030292b7 | 6854 | if { (eval echo configure:6855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6855 | rm -rf conftest* |
97bf5e38 | 6856 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6857 | else |
6858 | echo "configure: failed program was:" >&5 | |
6859 | cat conftest.$ac_ext >&5 | |
6860 | rm -rf conftest* | |
97bf5e38 | 6861 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6862 | fi |
6863 | rm -f conftest* | |
6864 | fi | |
6865 | ||
97bf5e38 MK |
6866 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6867 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6868 | cat >> confdefs.h <<\EOF | |
6869 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6870 | EOF |
6871 | ||
97bf5e38 | 6872 | fi |
3862412b | 6873 | |
97bf5e38 | 6874 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
030292b7 | 6875 | echo "configure:6876: checking whether realloc must be declared" >&5 |
97bf5e38 | 6876 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
6877 | echo $ac_n "(cached) $ac_c" 1>&6 |
6878 | else | |
6879 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6880 | #line 6881 "configure" |
3862412b | 6881 | #include "confdefs.h" |
e17bf198 | 6882 | |
97bf5e38 MK |
6883 | #include <stdio.h> |
6884 | #ifdef HAVE_STRING_H | |
6885 | #include <string.h> | |
6886 | #else | |
6887 | #ifdef HAVE_STRINGS_H | |
6888 | #include <strings.h> | |
6889 | #endif | |
6890 | #endif | |
6891 | #ifdef HAVE_STDLIB_H | |
6892 | #include <stdlib.h> | |
6893 | #endif | |
6894 | #ifdef HAVE_UNISTD_H | |
6895 | #include <unistd.h> | |
6896 | #endif | |
3862412b | 6897 | int main() { |
97bf5e38 | 6898 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
6899 | ; return 0; } |
6900 | EOF | |
030292b7 | 6901 | if { (eval echo configure:6902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6902 | rm -rf conftest* |
97bf5e38 | 6903 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
6904 | else |
6905 | echo "configure: failed program was:" >&5 | |
6906 | cat conftest.$ac_ext >&5 | |
6907 | rm -rf conftest* | |
97bf5e38 | 6908 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
6909 | fi |
6910 | rm -f conftest* | |
6911 | fi | |
6912 | ||
97bf5e38 MK |
6913 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
6914 | if test $bfd_cv_decl_needed_realloc = yes; then | |
6915 | cat >> confdefs.h <<\EOF | |
6916 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
6917 | EOF |
6918 | ||
97bf5e38 | 6919 | fi |
3862412b | 6920 | |
97bf5e38 | 6921 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
030292b7 | 6922 | echo "configure:6923: checking whether free must be declared" >&5 |
97bf5e38 | 6923 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
6924 | echo $ac_n "(cached) $ac_c" 1>&6 |
6925 | else | |
6926 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6927 | #line 6928 "configure" |
451928c5 | 6928 | #include "confdefs.h" |
e17bf198 | 6929 | |
97bf5e38 MK |
6930 | #include <stdio.h> |
6931 | #ifdef HAVE_STRING_H | |
6932 | #include <string.h> | |
6933 | #else | |
6934 | #ifdef HAVE_STRINGS_H | |
6935 | #include <strings.h> | |
6936 | #endif | |
6937 | #endif | |
6938 | #ifdef HAVE_STDLIB_H | |
6939 | #include <stdlib.h> | |
6940 | #endif | |
6941 | #ifdef HAVE_UNISTD_H | |
6942 | #include <unistd.h> | |
6943 | #endif | |
451928c5 | 6944 | int main() { |
97bf5e38 | 6945 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
6946 | ; return 0; } |
6947 | EOF | |
030292b7 | 6948 | if { (eval echo configure:6949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6949 | rm -rf conftest* |
97bf5e38 | 6950 | bfd_cv_decl_needed_free=no |
451928c5 AC |
6951 | else |
6952 | echo "configure: failed program was:" >&5 | |
6953 | cat conftest.$ac_ext >&5 | |
6954 | rm -rf conftest* | |
97bf5e38 | 6955 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
6956 | fi |
6957 | rm -f conftest* | |
6958 | fi | |
6959 | ||
97bf5e38 MK |
6960 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
6961 | if test $bfd_cv_decl_needed_free = yes; then | |
6962 | cat >> confdefs.h <<\EOF | |
6963 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
6964 | EOF |
6965 | ||
97bf5e38 | 6966 | fi |
451928c5 | 6967 | |
97bf5e38 | 6968 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
030292b7 | 6969 | echo "configure:6970: checking whether strerror must be declared" >&5 |
97bf5e38 | 6970 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
6971 | echo $ac_n "(cached) $ac_c" 1>&6 |
6972 | else | |
6973 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 6974 | #line 6975 "configure" |
451928c5 | 6975 | #include "confdefs.h" |
e17bf198 | 6976 | |
97bf5e38 MK |
6977 | #include <stdio.h> |
6978 | #ifdef HAVE_STRING_H | |
6979 | #include <string.h> | |
6980 | #else | |
6981 | #ifdef HAVE_STRINGS_H | |
6982 | #include <strings.h> | |
6983 | #endif | |
6984 | #endif | |
6985 | #ifdef HAVE_STDLIB_H | |
6986 | #include <stdlib.h> | |
6987 | #endif | |
6988 | #ifdef HAVE_UNISTD_H | |
6989 | #include <unistd.h> | |
6990 | #endif | |
451928c5 | 6991 | int main() { |
97bf5e38 | 6992 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
6993 | ; return 0; } |
6994 | EOF | |
030292b7 | 6995 | if { (eval echo configure:6996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6996 | rm -rf conftest* |
97bf5e38 | 6997 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
6998 | else |
6999 | echo "configure: failed program was:" >&5 | |
7000 | cat conftest.$ac_ext >&5 | |
7001 | rm -rf conftest* | |
97bf5e38 | 7002 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7003 | fi |
7004 | rm -f conftest* | |
7005 | fi | |
7006 | ||
97bf5e38 MK |
7007 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7008 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7009 | cat >> confdefs.h <<\EOF | |
7010 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7011 | EOF |
7012 | ||
97bf5e38 | 7013 | fi |
451928c5 | 7014 | |
97bf5e38 | 7015 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
030292b7 | 7016 | echo "configure:7017: checking whether strdup must be declared" >&5 |
97bf5e38 | 7017 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7018 | echo $ac_n "(cached) $ac_c" 1>&6 |
7019 | else | |
7020 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7021 | #line 7022 "configure" |
3862412b | 7022 | #include "confdefs.h" |
e17bf198 | 7023 | |
97bf5e38 MK |
7024 | #include <stdio.h> |
7025 | #ifdef HAVE_STRING_H | |
7026 | #include <string.h> | |
7027 | #else | |
7028 | #ifdef HAVE_STRINGS_H | |
7029 | #include <strings.h> | |
7030 | #endif | |
7031 | #endif | |
7032 | #ifdef HAVE_STDLIB_H | |
7033 | #include <stdlib.h> | |
7034 | #endif | |
7035 | #ifdef HAVE_UNISTD_H | |
7036 | #include <unistd.h> | |
7037 | #endif | |
3862412b | 7038 | int main() { |
97bf5e38 | 7039 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7040 | ; return 0; } |
7041 | EOF | |
030292b7 | 7042 | if { (eval echo configure:7043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7043 | rm -rf conftest* |
97bf5e38 | 7044 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7045 | else |
7046 | echo "configure: failed program was:" >&5 | |
7047 | cat conftest.$ac_ext >&5 | |
7048 | rm -rf conftest* | |
97bf5e38 | 7049 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7050 | fi |
7051 | rm -f conftest* | |
7052 | fi | |
7053 | ||
97bf5e38 MK |
7054 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7055 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7056 | cat >> confdefs.h <<\EOF | |
7057 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7058 | EOF |
7059 | ||
97bf5e38 | 7060 | fi |
3862412b | 7061 | |
97bf5e38 | 7062 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
030292b7 | 7063 | echo "configure:7064: checking whether strstr must be declared" >&5 |
97bf5e38 | 7064 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7065 | echo $ac_n "(cached) $ac_c" 1>&6 |
7066 | else | |
7067 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7068 | #line 7069 "configure" |
3862412b | 7069 | #include "confdefs.h" |
e17bf198 | 7070 | |
97bf5e38 MK |
7071 | #include <stdio.h> |
7072 | #ifdef HAVE_STRING_H | |
7073 | #include <string.h> | |
7074 | #else | |
7075 | #ifdef HAVE_STRINGS_H | |
7076 | #include <strings.h> | |
7077 | #endif | |
7078 | #endif | |
7079 | #ifdef HAVE_STDLIB_H | |
7080 | #include <stdlib.h> | |
7081 | #endif | |
7082 | #ifdef HAVE_UNISTD_H | |
7083 | #include <unistd.h> | |
7084 | #endif | |
3862412b | 7085 | int main() { |
97bf5e38 | 7086 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7087 | ; return 0; } |
7088 | EOF | |
030292b7 | 7089 | if { (eval echo configure:7090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7090 | rm -rf conftest* |
97bf5e38 | 7091 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7092 | else |
7093 | echo "configure: failed program was:" >&5 | |
7094 | cat conftest.$ac_ext >&5 | |
7095 | rm -rf conftest* | |
97bf5e38 | 7096 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7097 | fi |
7098 | rm -f conftest* | |
7099 | fi | |
7100 | ||
97bf5e38 MK |
7101 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7102 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7103 | cat >> confdefs.h <<\EOF | |
7104 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7105 | EOF |
7106 | ||
97bf5e38 | 7107 | fi |
3862412b | 7108 | |
97bf5e38 | 7109 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
030292b7 | 7110 | echo "configure:7111: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7111 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7112 | echo $ac_n "(cached) $ac_c" 1>&6 |
7113 | else | |
7114 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7115 | #line 7116 "configure" |
596c9d4b KB |
7116 | #include "confdefs.h" |
7117 | ||
97bf5e38 MK |
7118 | #include <stdio.h> |
7119 | #ifdef HAVE_STRING_H | |
7120 | #include <string.h> | |
7121 | #else | |
7122 | #ifdef HAVE_STRINGS_H | |
7123 | #include <strings.h> | |
7124 | #endif | |
7125 | #endif | |
7126 | #ifdef HAVE_STDLIB_H | |
7127 | #include <stdlib.h> | |
7128 | #endif | |
7129 | #ifdef HAVE_UNISTD_H | |
7130 | #include <unistd.h> | |
7131 | #endif | |
596c9d4b | 7132 | int main() { |
97bf5e38 | 7133 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7134 | ; return 0; } |
7135 | EOF | |
030292b7 | 7136 | if { (eval echo configure:7137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7137 | rm -rf conftest* |
97bf5e38 | 7138 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7139 | else |
7140 | echo "configure: failed program was:" >&5 | |
7141 | cat conftest.$ac_ext >&5 | |
7142 | rm -rf conftest* | |
97bf5e38 | 7143 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7144 | fi |
7145 | rm -f conftest* | |
7146 | fi | |
7147 | ||
97bf5e38 MK |
7148 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7149 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7150 | cat >> confdefs.h <<\EOF | |
7151 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7152 | EOF |
7153 | ||
97bf5e38 | 7154 | fi |
596c9d4b | 7155 | |
97bf5e38 MK |
7156 | |
7157 | # The following save_state_t checkery is only necessary for HPUX | |
7158 | # versions earlier than 10.20. When those fade from memory, this | |
7159 | # could be expunged. --jsm 1999-03-22 | |
7160 | ||
7161 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
030292b7 | 7162 | echo "configure:7163: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7163 | cat > conftest.$ac_ext <<EOF |
030292b7 | 7164 | #line 7165 "configure" |
97bf5e38 MK |
7165 | #include "confdefs.h" |
7166 | #include <machine/save_state.h> | |
7167 | EOF | |
7168 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7169 | egrep "save_state_t" >/dev/null 2>&1; then | |
7170 | rm -rf conftest* | |
7171 | gdb_cv_hpux_savestate=yes | |
7172 | else | |
7173 | rm -rf conftest* | |
7174 | gdb_cv_hpux_savestate=no | |
7175 | fi | |
7176 | rm -f conftest* | |
7177 | ||
7178 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7179 | #line 7180 "configure" |
97bf5e38 MK |
7180 | #include "confdefs.h" |
7181 | #include <machine/save_state.h> | |
7182 | EOF | |
7183 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7184 | egrep "ss_wide" >/dev/null 2>&1; then | |
7185 | rm -rf conftest* | |
7186 | gdb_cv_hpux_sswide=yes | |
7187 | else | |
7188 | rm -rf conftest* | |
7189 | gdb_cv_hpux_sswide=no | |
7190 | fi | |
7191 | rm -f conftest* | |
7192 | ||
7193 | if test $gdb_cv_hpux_savestate = yes | |
7194 | then | |
7195 | cat >> confdefs.h <<\EOF | |
7196 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7197 | EOF | |
7198 | ||
7199 | fi | |
7200 | if test $gdb_cv_hpux_sswide = yes | |
7201 | then | |
7202 | cat >> confdefs.h <<\EOF | |
7203 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7204 | EOF | |
7205 | ||
7206 | fi | |
7207 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7208 | ||
7209 | ||
7210 | # If we are configured native on GNU/Linux, work around problems with | |
7211 | # sys/procfs.h | |
7212 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7213 | ||
7214 | if test "${target}" = "${host}"; then | |
7215 | case "${host}" in | |
7216 | i[3456]86-*-linux*) | |
7217 | cat >> confdefs.h <<\EOF | |
7218 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7219 | EOF | |
7220 | ||
7221 | cat >> confdefs.h <<\EOF | |
7222 | #define sys_quotactl 1 | |
7223 | EOF | |
7224 | ||
7225 | ;; | |
7226 | ia64-*-aix*) | |
7227 | cat >> confdefs.h <<\EOF | |
7228 | #define NEW_PROC_API 1 | |
7229 | EOF | |
7230 | ||
7231 | ;; | |
7232 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7233 | cat >> confdefs.h <<\EOF | |
7234 | #define NEW_PROC_API 1 | |
7235 | EOF | |
7236 | ||
7237 | ;; | |
7238 | *-*-solaris2.[678]) | |
7239 | cat >> confdefs.h <<\EOF | |
7240 | #define NEW_PROC_API 1 | |
7241 | EOF | |
7242 | ||
7243 | ;; | |
7244 | esac | |
7245 | fi | |
7246 | ||
7247 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7248 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
030292b7 | 7249 | echo "configure:7250: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7250 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7251 | echo $ac_n "(cached) $ac_c" 1>&6 |
7252 | else | |
7253 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7254 | #line 7255 "configure" |
596c9d4b KB |
7255 | #include "confdefs.h" |
7256 | ||
7257 | #define _SYSCALL32 | |
7258 | #include <sys/procfs.h> | |
7259 | int main() { | |
97bf5e38 | 7260 | pstatus_t avar |
596c9d4b KB |
7261 | ; return 0; } |
7262 | EOF | |
030292b7 | 7263 | if { (eval echo configure:7264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7264 | rm -rf conftest* |
97bf5e38 | 7265 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7266 | else |
7267 | echo "configure: failed program was:" >&5 | |
7268 | cat conftest.$ac_ext >&5 | |
7269 | rm -rf conftest* | |
97bf5e38 | 7270 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7271 | |
7272 | fi | |
7273 | rm -f conftest* | |
7274 | fi | |
7275 | ||
97bf5e38 | 7276 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7277 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7278 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7279 | EOF |
7280 | ||
7281 | fi | |
97bf5e38 | 7282 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7283 | |
97bf5e38 | 7284 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7285 | echo "configure:7286: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7286 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7287 | echo $ac_n "(cached) $ac_c" 1>&6 |
7288 | else | |
7289 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7290 | #line 7291 "configure" |
596c9d4b KB |
7291 | #include "confdefs.h" |
7292 | ||
7293 | #define _SYSCALL32 | |
7294 | #include <sys/procfs.h> | |
7295 | int main() { | |
97bf5e38 | 7296 | prrun_t avar |
596c9d4b KB |
7297 | ; return 0; } |
7298 | EOF | |
030292b7 | 7299 | if { (eval echo configure:7300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7300 | rm -rf conftest* |
97bf5e38 | 7301 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7302 | else |
7303 | echo "configure: failed program was:" >&5 | |
7304 | cat conftest.$ac_ext >&5 | |
7305 | rm -rf conftest* | |
97bf5e38 | 7306 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7307 | |
7308 | fi | |
7309 | rm -f conftest* | |
7310 | fi | |
7311 | ||
97bf5e38 | 7312 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7313 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7314 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7315 | EOF |
7316 | ||
7317 | fi | |
97bf5e38 | 7318 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7319 | |
97bf5e38 | 7320 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7321 | echo "configure:7322: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7322 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7323 | echo $ac_n "(cached) $ac_c" 1>&6 |
7324 | else | |
7325 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7326 | #line 7327 "configure" |
596c9d4b KB |
7327 | #include "confdefs.h" |
7328 | ||
7329 | #define _SYSCALL32 | |
7330 | #include <sys/procfs.h> | |
7331 | int main() { | |
97bf5e38 | 7332 | gregset_t avar |
596c9d4b KB |
7333 | ; return 0; } |
7334 | EOF | |
030292b7 | 7335 | if { (eval echo configure:7336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7336 | rm -rf conftest* |
97bf5e38 | 7337 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7338 | else |
7339 | echo "configure: failed program was:" >&5 | |
7340 | cat conftest.$ac_ext >&5 | |
7341 | rm -rf conftest* | |
97bf5e38 | 7342 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7343 | |
7344 | fi | |
7345 | rm -f conftest* | |
7346 | fi | |
7347 | ||
97bf5e38 | 7348 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7349 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7350 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7351 | EOF |
7352 | ||
7353 | fi | |
97bf5e38 | 7354 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7355 | |
97bf5e38 | 7356 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7357 | echo "configure:7358: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7358 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7359 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7360 | else |
7361 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7362 | #line 7363 "configure" |
d84dd0c5 | 7363 | #include "confdefs.h" |
97bf5e38 MK |
7364 | |
7365 | #define _SYSCALL32 | |
d84dd0c5 | 7366 | #include <sys/procfs.h> |
97bf5e38 MK |
7367 | int main() { |
7368 | fpregset_t avar | |
7369 | ; return 0; } | |
d84dd0c5 | 7370 | EOF |
030292b7 | 7371 | if { (eval echo configure:7372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7372 | rm -rf conftest* |
7373 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7374 | else |
7375 | echo "configure: failed program was:" >&5 | |
7376 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7377 | rm -rf conftest* |
7378 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7379 | ||
d84dd0c5 | 7380 | fi |
97bf5e38 | 7381 | rm -f conftest* |
d84dd0c5 MK |
7382 | fi |
7383 | ||
97bf5e38 MK |
7384 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7385 | cat >> confdefs.h <<\EOF | |
7386 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7387 | EOF |
7388 | ||
97bf5e38 MK |
7389 | fi |
7390 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7391 | |
97bf5e38 | 7392 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7393 | echo "configure:7394: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7394 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7395 | echo $ac_n "(cached) $ac_c" 1>&6 |
7396 | else | |
7397 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7398 | #line 7399 "configure" |
c906108c | 7399 | #include "confdefs.h" |
c906108c | 7400 | |
97bf5e38 MK |
7401 | #define _SYSCALL32 |
7402 | #include <sys/procfs.h> | |
c906108c | 7403 | int main() { |
97bf5e38 | 7404 | prgregset_t avar |
c906108c SS |
7405 | ; return 0; } |
7406 | EOF | |
030292b7 | 7407 | if { (eval echo configure:7408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7408 | rm -rf conftest* |
97bf5e38 | 7409 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7410 | else |
7411 | echo "configure: failed program was:" >&5 | |
7412 | cat conftest.$ac_ext >&5 | |
7413 | rm -rf conftest* | |
97bf5e38 MK |
7414 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7415 | ||
c906108c SS |
7416 | fi |
7417 | rm -f conftest* | |
7418 | fi | |
7419 | ||
97bf5e38 MK |
7420 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7421 | cat >> confdefs.h <<\EOF | |
7422 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7423 | EOF |
7424 | ||
97bf5e38 MK |
7425 | fi |
7426 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7427 | |
97bf5e38 | 7428 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7429 | echo "configure:7430: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7430 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7431 | echo $ac_n "(cached) $ac_c" 1>&6 |
7432 | else | |
7433 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7434 | #line 7435 "configure" |
d45fe813 | 7435 | #include "confdefs.h" |
97bf5e38 MK |
7436 | |
7437 | #define _SYSCALL32 | |
7438 | #include <sys/procfs.h> | |
d45fe813 | 7439 | int main() { |
97bf5e38 | 7440 | prfpregset_t avar |
d45fe813 KB |
7441 | ; return 0; } |
7442 | EOF | |
030292b7 | 7443 | if { (eval echo configure:7444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7444 | rm -rf conftest* |
97bf5e38 | 7445 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7446 | else |
7447 | echo "configure: failed program was:" >&5 | |
7448 | cat conftest.$ac_ext >&5 | |
7449 | rm -rf conftest* | |
97bf5e38 MK |
7450 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7451 | ||
d45fe813 KB |
7452 | fi |
7453 | rm -f conftest* | |
7454 | fi | |
7455 | ||
97bf5e38 MK |
7456 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7457 | cat >> confdefs.h <<\EOF | |
7458 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7459 | EOF |
7460 | ||
97bf5e38 MK |
7461 | fi |
7462 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7463 | |
97bf5e38 | 7464 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7465 | echo "configure:7466: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7466 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7467 | echo $ac_n "(cached) $ac_c" 1>&6 |
7468 | else | |
7469 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7470 | #line 7471 "configure" |
d45fe813 | 7471 | #include "confdefs.h" |
97bf5e38 MK |
7472 | |
7473 | #define _SYSCALL32 | |
7474 | #include <sys/procfs.h> | |
d45fe813 | 7475 | int main() { |
97bf5e38 | 7476 | prgregset32_t avar |
d45fe813 KB |
7477 | ; return 0; } |
7478 | EOF | |
030292b7 | 7479 | if { (eval echo configure:7480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7480 | rm -rf conftest* |
97bf5e38 | 7481 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7482 | else |
7483 | echo "configure: failed program was:" >&5 | |
7484 | cat conftest.$ac_ext >&5 | |
7485 | rm -rf conftest* | |
97bf5e38 MK |
7486 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7487 | ||
d45fe813 KB |
7488 | fi |
7489 | rm -f conftest* | |
7490 | fi | |
7491 | ||
97bf5e38 MK |
7492 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7493 | cat >> confdefs.h <<\EOF | |
7494 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7495 | EOF |
7496 | ||
97bf5e38 MK |
7497 | fi |
7498 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7499 | |
97bf5e38 | 7500 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7501 | echo "configure:7502: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7502 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7503 | echo $ac_n "(cached) $ac_c" 1>&6 |
7504 | else | |
7505 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7506 | #line 7507 "configure" |
d45fe813 | 7507 | #include "confdefs.h" |
97bf5e38 MK |
7508 | |
7509 | #define _SYSCALL32 | |
7510 | #include <sys/procfs.h> | |
d45fe813 | 7511 | int main() { |
97bf5e38 | 7512 | prfpregset32_t avar |
d45fe813 KB |
7513 | ; return 0; } |
7514 | EOF | |
030292b7 | 7515 | if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7516 | rm -rf conftest* |
97bf5e38 | 7517 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7518 | else |
7519 | echo "configure: failed program was:" >&5 | |
7520 | cat conftest.$ac_ext >&5 | |
7521 | rm -rf conftest* | |
97bf5e38 MK |
7522 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7523 | ||
d45fe813 KB |
7524 | fi |
7525 | rm -f conftest* | |
7526 | fi | |
7527 | ||
97bf5e38 MK |
7528 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7529 | cat >> confdefs.h <<\EOF | |
7530 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7531 | EOF |
7532 | ||
97bf5e38 MK |
7533 | fi |
7534 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7535 | |
97bf5e38 | 7536 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7537 | echo "configure:7538: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7538 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7539 | echo $ac_n "(cached) $ac_c" 1>&6 |
7540 | else | |
7541 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7542 | #line 7543 "configure" |
d45fe813 | 7543 | #include "confdefs.h" |
97bf5e38 | 7544 | |
d45fe813 | 7545 | #define _SYSCALL32 |
97bf5e38 | 7546 | #include <sys/procfs.h> |
d45fe813 | 7547 | int main() { |
97bf5e38 | 7548 | lwpid_t avar |
d45fe813 KB |
7549 | ; return 0; } |
7550 | EOF | |
030292b7 | 7551 | if { (eval echo configure:7552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7552 | rm -rf conftest* |
97bf5e38 | 7553 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7554 | else |
7555 | echo "configure: failed program was:" >&5 | |
7556 | cat conftest.$ac_ext >&5 | |
7557 | rm -rf conftest* | |
97bf5e38 MK |
7558 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7559 | ||
d45fe813 KB |
7560 | fi |
7561 | rm -f conftest* | |
7562 | fi | |
7563 | ||
97bf5e38 MK |
7564 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7565 | cat >> confdefs.h <<\EOF | |
7566 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7567 | EOF |
7568 | ||
97bf5e38 MK |
7569 | fi |
7570 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7571 | |
97bf5e38 | 7572 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7573 | echo "configure:7574: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7574 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7575 | echo $ac_n "(cached) $ac_c" 1>&6 |
7576 | else | |
7577 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7578 | #line 7579 "configure" |
c906108c SS |
7579 | #include "confdefs.h" |
7580 | ||
97bf5e38 MK |
7581 | #define _SYSCALL32 |
7582 | #include <sys/procfs.h> | |
c906108c | 7583 | int main() { |
97bf5e38 | 7584 | psaddr_t avar |
c906108c SS |
7585 | ; return 0; } |
7586 | EOF | |
030292b7 | 7587 | if { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7588 | rm -rf conftest* |
97bf5e38 | 7589 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7590 | else |
7591 | echo "configure: failed program was:" >&5 | |
7592 | cat conftest.$ac_ext >&5 | |
7593 | rm -rf conftest* | |
97bf5e38 MK |
7594 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7595 | ||
c906108c SS |
7596 | fi |
7597 | rm -f conftest* | |
7598 | fi | |
7599 | ||
97bf5e38 MK |
7600 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7601 | cat >> confdefs.h <<\EOF | |
7602 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7603 | EOF |
7604 | ||
97bf5e38 MK |
7605 | fi |
7606 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7607 | |
97bf5e38 | 7608 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7609 | echo "configure:7610: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7610 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7611 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7612 | else |
7613 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7614 | #line 7615 "configure" |
c906108c SS |
7615 | #include "confdefs.h" |
7616 | ||
97bf5e38 MK |
7617 | #define _SYSCALL32 |
7618 | #include <sys/procfs.h> | |
7619 | int main() { | |
7620 | prsysent_t avar | |
7621 | ; return 0; } | |
c906108c | 7622 | EOF |
030292b7 | 7623 | if { (eval echo configure:7624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7624 | rm -rf conftest* |
7625 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7626 | else |
7627 | echo "configure: failed program was:" >&5 | |
7628 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7629 | rm -rf conftest* |
7630 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7631 | ||
c906108c | 7632 | fi |
97bf5e38 | 7633 | rm -f conftest* |
c906108c SS |
7634 | fi |
7635 | ||
97bf5e38 MK |
7636 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7637 | cat >> confdefs.h <<\EOF | |
7638 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7639 | EOF |
7640 | ||
97bf5e38 MK |
7641 | fi |
7642 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7643 | |
97bf5e38 | 7644 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7645 | echo "configure:7646: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7646 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7647 | echo $ac_n "(cached) $ac_c" 1>&6 |
7648 | else | |
7649 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7650 | #line 7651 "configure" |
c906108c SS |
7651 | #include "confdefs.h" |
7652 | ||
97bf5e38 MK |
7653 | #define _SYSCALL32 |
7654 | #include <sys/procfs.h> | |
c906108c | 7655 | int main() { |
97bf5e38 | 7656 | pr_sigset_t avar |
c906108c SS |
7657 | ; return 0; } |
7658 | EOF | |
030292b7 | 7659 | if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7660 | rm -rf conftest* |
97bf5e38 | 7661 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7662 | else |
7663 | echo "configure: failed program was:" >&5 | |
7664 | cat conftest.$ac_ext >&5 | |
7665 | rm -rf conftest* | |
97bf5e38 MK |
7666 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7667 | ||
c906108c SS |
7668 | fi |
7669 | rm -f conftest* | |
7670 | fi | |
7671 | ||
97bf5e38 MK |
7672 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7673 | cat >> confdefs.h <<\EOF | |
7674 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7675 | EOF |
7676 | ||
97bf5e38 MK |
7677 | fi |
7678 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7679 | |
97bf5e38 | 7680 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
030292b7 | 7681 | echo "configure:7682: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7682 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7683 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7684 | else |
7685 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7686 | #line 7687 "configure" |
c906108c SS |
7687 | #include "confdefs.h" |
7688 | ||
97bf5e38 MK |
7689 | #define _SYSCALL32 |
7690 | #include <sys/procfs.h> | |
7691 | int main() { | |
7692 | pr_sigaction64_t avar | |
7693 | ; return 0; } | |
c906108c | 7694 | EOF |
030292b7 | 7695 | if { (eval echo configure:7696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7696 | rm -rf conftest* |
7697 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7698 | else |
7699 | echo "configure: failed program was:" >&5 | |
7700 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7701 | rm -rf conftest* |
7702 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7703 | ||
c906108c | 7704 | fi |
97bf5e38 | 7705 | rm -f conftest* |
c906108c SS |
7706 | fi |
7707 | ||
97bf5e38 MK |
7708 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7709 | cat >> confdefs.h <<\EOF | |
7710 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7711 | EOF |
7712 | ||
97bf5e38 MK |
7713 | fi |
7714 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7715 | ||
7716 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
030292b7 | 7717 | echo "configure:7718: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7718 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7719 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7720 | else | |
7721 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7722 | #line 7723 "configure" |
97bf5e38 MK |
7723 | #include "confdefs.h" |
7724 | ||
7725 | #define _SYSCALL32 | |
7726 | #include <sys/procfs.h> | |
7727 | int main() { | |
7728 | pr_siginfo64_t avar | |
7729 | ; return 0; } | |
7730 | EOF | |
030292b7 | 7731 | if { (eval echo configure:7732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7732 | rm -rf conftest* |
7733 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7734 | else | |
7735 | echo "configure: failed program was:" >&5 | |
7736 | cat conftest.$ac_ext >&5 | |
7737 | rm -rf conftest* | |
7738 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7739 | ||
7740 | fi | |
7741 | rm -f conftest* | |
c906108c | 7742 | fi |
c906108c | 7743 | |
97bf5e38 MK |
7744 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7745 | cat >> confdefs.h <<\EOF | |
7746 | #define HAVE_PR_SIGINFO64_T 1 | |
7747 | EOF | |
c906108c | 7748 | |
97bf5e38 MK |
7749 | fi |
7750 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7751 | ||
7752 | ||
7753 | ||
7754 | ||
7755 | ||
7756 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7757 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
030292b7 | 7758 | echo "configure:7759: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7759 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7760 | echo $ac_n "(cached) $ac_c" 1>&6 |
7761 | else | |
7762 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7763 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7764 | else |
7765 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7766 | #line 7767 "configure" |
c906108c | 7767 | #include "confdefs.h" |
97bf5e38 MK |
7768 | #include <sys/procfs.h> |
7769 | int main () | |
7770 | { | |
7771 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7772 | return 1; | |
7773 | return 0; | |
7774 | } | |
c906108c | 7775 | EOF |
030292b7 | 7776 | if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7777 | then |
97bf5e38 | 7778 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7779 | else |
7780 | echo "configure: failed program was:" >&5 | |
7781 | cat conftest.$ac_ext >&5 | |
7782 | rm -fr conftest* | |
97bf5e38 | 7783 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7784 | fi |
7785 | rm -fr conftest* | |
7786 | fi | |
7787 | ||
7788 | fi | |
7789 | ||
97bf5e38 MK |
7790 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7791 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7792 | cat >> confdefs.h <<\EOF | |
7793 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7794 | EOF |
7795 | ||
97bf5e38 MK |
7796 | fi |
7797 | fi | |
c906108c | 7798 | |
97bf5e38 MK |
7799 | |
7800 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
030292b7 | 7801 | echo "configure:7802: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7802 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7803 | echo $ac_n "(cached) $ac_c" 1>&6 |
7804 | else | |
7805 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7806 | #line 7807 "configure" |
c906108c | 7807 | #include "confdefs.h" |
97bf5e38 MK |
7808 | #include <unistd.h> |
7809 | #include <sys/types.h> | |
7810 | #include <sys/procfs.h> | |
7811 | ||
7812 | int main() { | |
7813 | ||
7814 | int dummy;; | |
7815 | dummy = ioctl(0, PIOCSET, &dummy); | |
7816 | ||
7817 | ; return 0; } | |
c906108c | 7818 | EOF |
030292b7 | 7819 | if { (eval echo configure:7820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7820 | rm -rf conftest* |
97bf5e38 | 7821 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7822 | else |
c906108c SS |
7823 | echo "configure: failed program was:" >&5 |
7824 | cat conftest.$ac_ext >&5 | |
7825 | rm -rf conftest* | |
97bf5e38 | 7826 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7827 | fi |
7828 | rm -f conftest* | |
7829 | fi | |
97bf5e38 MK |
7830 | |
7831 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7832 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7833 | cat >> confdefs.h <<\EOF | |
7834 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7835 | EOF |
97bf5e38 MK |
7836 | |
7837 | fi | |
c906108c | 7838 | fi |
c906108c | 7839 | |
97bf5e38 MK |
7840 | if test ${host} = ${target} ; then |
7841 | ||
7842 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
030292b7 | 7843 | echo "configure:7844: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7844 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7845 | echo $ac_n "(cached) $ac_c" 1>&6 |
7846 | else | |
7847 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7848 | #line 7849 "configure" |
c906108c | 7849 | #include "confdefs.h" |
97bf5e38 | 7850 | #include <link.h> |
c906108c | 7851 | int main() { |
97bf5e38 | 7852 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7853 | ; return 0; } |
7854 | EOF | |
030292b7 | 7855 | if { (eval echo configure:7856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7856 | rm -rf conftest* |
97bf5e38 | 7857 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7858 | else |
7859 | echo "configure: failed program was:" >&5 | |
7860 | cat conftest.$ac_ext >&5 | |
7861 | rm -rf conftest* | |
97bf5e38 | 7862 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7863 | fi |
7864 | rm -f conftest* | |
7865 | fi | |
7866 | ||
97bf5e38 MK |
7867 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7868 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7869 | cat >> confdefs.h <<\EOF | |
7870 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7871 | EOF |
97bf5e38 MK |
7872 | |
7873 | fi | |
7874 | ||
7875 | ||
7876 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
030292b7 | 7877 | echo "configure:7878: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
7878 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
7879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 7880 | else |
97bf5e38 | 7881 | cat > conftest.$ac_ext <<EOF |
030292b7 | 7882 | #line 7883 "configure" |
97bf5e38 MK |
7883 | #include "confdefs.h" |
7884 | #include <sys/types.h> | |
7885 | #include <link.h> | |
7886 | int main() { | |
7887 | struct link_map lm; (void) lm.lm_addr; | |
7888 | ; return 0; } | |
7889 | EOF | |
030292b7 | 7890 | if { (eval echo configure:7891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7891 | rm -rf conftest* |
7892 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
7893 | else | |
7894 | echo "configure: failed program was:" >&5 | |
7895 | cat conftest.$ac_ext >&5 | |
7896 | rm -rf conftest* | |
7897 | gdb_cv_have_struct_link_map_with_lm_members=no | |
7898 | fi | |
7899 | rm -f conftest* | |
c906108c | 7900 | fi |
c906108c | 7901 | |
97bf5e38 MK |
7902 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
7903 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
7904 | cat >> confdefs.h <<\EOF | |
7905 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
7906 | EOF | |
7907 | ||
7908 | fi | |
7909 | ||
7910 | ||
7911 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
030292b7 | 7912 | echo "configure:7913: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 7913 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 7914 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7915 | else |
7916 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7917 | #line 7918 "configure" |
c906108c | 7918 | #include "confdefs.h" |
97bf5e38 MK |
7919 | #include <sys/types.h> |
7920 | #ifdef HAVE_NLIST_H | |
7921 | #include <nlist.h> | |
7922 | #endif | |
7923 | #include <link.h> | |
7924 | int main() { | |
7925 | struct so_map lm; (void) lm.som_addr; | |
7926 | ; return 0; } | |
7927 | EOF | |
030292b7 | 7928 | if { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7929 | rm -rf conftest* |
7930 | gdb_cv_have_struct_so_map_with_som_members=yes | |
7931 | else | |
7932 | echo "configure: failed program was:" >&5 | |
7933 | cat conftest.$ac_ext >&5 | |
7934 | rm -rf conftest* | |
7935 | gdb_cv_have_struct_so_map_with_som_members=no | |
7936 | fi | |
7937 | rm -f conftest* | |
7938 | fi | |
c906108c | 7939 | |
97bf5e38 MK |
7940 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
7941 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
7942 | cat >> confdefs.h <<\EOF | |
7943 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
7944 | EOF | |
c906108c | 7945 | |
97bf5e38 | 7946 | fi |
c906108c | 7947 | |
97bf5e38 MK |
7948 | |
7949 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
030292b7 | 7950 | echo "configure:7951: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
7951 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
7952 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7953 | else | |
7954 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7955 | #line 7956 "configure" |
97bf5e38 MK |
7956 | #include "confdefs.h" |
7957 | #define _SYSCALL32 | |
7958 | #include <sys/link.h> | |
7959 | int main() { | |
7960 | struct link_map32 l; | |
7961 | ; return 0; } | |
7962 | EOF | |
030292b7 | 7963 | if { (eval echo configure:7964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7964 | rm -rf conftest* |
7965 | gdb_cv_have_struct_link_map32=yes | |
7966 | else | |
7967 | echo "configure: failed program was:" >&5 | |
7968 | cat conftest.$ac_ext >&5 | |
7969 | rm -rf conftest* | |
7970 | gdb_cv_have_struct_link_map32=no | |
7971 | fi | |
7972 | rm -f conftest* | |
7973 | fi | |
c906108c | 7974 | |
97bf5e38 MK |
7975 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
7976 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
7977 | cat >> confdefs.h <<\EOF | |
7978 | #define HAVE_STRUCT_LINK_MAP32 1 | |
7979 | EOF | |
c906108c | 7980 | |
97bf5e38 MK |
7981 | cat >> confdefs.h <<\EOF |
7982 | #define _SYSCALL32 1 | |
7983 | EOF | |
c906108c | 7984 | |
97bf5e38 MK |
7985 | fi |
7986 | fi | |
c906108c | 7987 | |
c906108c | 7988 | |
97bf5e38 | 7989 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
030292b7 | 7990 | echo "configure:7991: checking for long long support in compiler" >&5 |
97bf5e38 MK |
7991 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
7992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7993 | else | |
7994 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 7995 | #line 7996 "configure" |
97bf5e38 | 7996 | #include "confdefs.h" |
c906108c | 7997 | |
97bf5e38 | 7998 | int main() { |
c906108c | 7999 | |
97bf5e38 MK |
8000 | extern long long foo; |
8001 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8002 | |
97bf5e38 MK |
8003 | ; return 0; } |
8004 | EOF | |
030292b7 | 8005 | if { (eval echo configure:8006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8006 | rm -rf conftest* |
8007 | gdb_cv_c_long_long=yes | |
8008 | else | |
8009 | echo "configure: failed program was:" >&5 | |
8010 | cat conftest.$ac_ext >&5 | |
8011 | rm -rf conftest* | |
8012 | gdb_cv_c_long_long=no | |
8013 | fi | |
8014 | rm -f conftest* | |
8015 | fi | |
c906108c | 8016 | |
97bf5e38 MK |
8017 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8018 | if test $gdb_cv_c_long_long = yes; then | |
8019 | cat >> confdefs.h <<\EOF | |
8020 | #define CC_HAS_LONG_LONG 1 | |
8021 | EOF | |
8022 | ||
8023 | fi | |
8024 | ||
8025 | ||
8026 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
030292b7 | 8027 | echo "configure:8028: checking for long long support in printf" >&5 |
97bf5e38 MK |
8028 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8029 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8030 | else | |
8031 | if test "$cross_compiling" = yes; then | |
8032 | gdb_cv_printf_has_long_long=no | |
8033 | else | |
8034 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8035 | #line 8036 "configure" |
97bf5e38 MK |
8036 | #include "confdefs.h" |
8037 | ||
8038 | int main () { | |
8039 | char buf[32]; | |
8040 | long long l = 0; | |
8041 | l = (l << 16) + 0x0123; | |
8042 | l = (l << 16) + 0x4567; | |
8043 | l = (l << 16) + 0x89ab; | |
8044 | l = (l << 16) + 0xcdef; | |
8045 | sprintf (buf, "0x%016llx", l); | |
8046 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8047 | } |
97bf5e38 | 8048 | EOF |
030292b7 | 8049 | if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8050 | then |
8051 | gdb_cv_printf_has_long_long=yes | |
8052 | else | |
8053 | echo "configure: failed program was:" >&5 | |
8054 | cat conftest.$ac_ext >&5 | |
8055 | rm -fr conftest* | |
8056 | gdb_cv_printf_has_long_long=no | |
8057 | fi | |
8058 | rm -fr conftest* | |
8059 | fi | |
8060 | ||
8061 | fi | |
8062 | ||
8063 | if test $gdb_cv_printf_has_long_long = yes; then | |
8064 | cat >> confdefs.h <<\EOF | |
8065 | #define PRINTF_HAS_LONG_LONG 1 | |
8066 | EOF | |
8067 | ||
8068 | fi | |
8069 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8070 | ||
8071 | ||
8072 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
030292b7 | 8073 | echo "configure:8074: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8074 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8076 | else | |
8077 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8078 | #line 8079 "configure" |
97bf5e38 MK |
8079 | #include "confdefs.h" |
8080 | ||
8081 | int main() { | |
8082 | long double foo; | |
8083 | ; return 0; } | |
8084 | EOF | |
030292b7 | 8085 | if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8086 | rm -rf conftest* |
8087 | ac_cv_c_long_double=yes | |
8088 | else | |
8089 | echo "configure: failed program was:" >&5 | |
8090 | cat conftest.$ac_ext >&5 | |
8091 | rm -rf conftest* | |
8092 | ac_cv_c_long_double=no | |
8093 | fi | |
8094 | rm -f conftest* | |
8095 | fi | |
c906108c | 8096 | |
97bf5e38 MK |
8097 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8098 | if test $ac_cv_c_long_double = yes; then | |
8099 | cat >> confdefs.h <<\EOF | |
8100 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8101 | EOF |
97bf5e38 MK |
8102 | |
8103 | fi | |
8104 | ||
8105 | ||
8106 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
030292b7 | 8107 | echo "configure:8108: checking for long double support in printf" >&5 |
97bf5e38 MK |
8108 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8109 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8110 | else | |
8111 | if test "$cross_compiling" = yes; then | |
8112 | gdb_cv_printf_has_long_double=no | |
8113 | else | |
8114 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8115 | #line 8116 "configure" |
97bf5e38 MK |
8116 | #include "confdefs.h" |
8117 | ||
8118 | int main () { | |
8119 | char buf[16]; | |
8120 | long double f = 3.141592653; | |
8121 | sprintf (buf, "%Lg", f); | |
8122 | return (strncmp ("3.14159", buf, 7)); | |
8123 | } | |
8124 | EOF | |
030292b7 | 8125 | if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8126 | then |
97bf5e38 | 8127 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8128 | else |
8129 | echo "configure: failed program was:" >&5 | |
8130 | cat conftest.$ac_ext >&5 | |
8131 | rm -fr conftest* | |
97bf5e38 | 8132 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8133 | fi |
8134 | rm -fr conftest* | |
8135 | fi | |
8136 | ||
8137 | fi | |
8138 | ||
97bf5e38 | 8139 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8140 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8141 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8142 | EOF | |
8143 | ||
8144 | fi | |
8145 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8146 | ||
8147 | ||
8148 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
030292b7 | 8149 | echo "configure:8150: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8150 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8151 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8152 | else | |
8153 | if test "$cross_compiling" = yes; then | |
8154 | gdb_cv_scanf_has_long_double=no | |
8155 | else | |
8156 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8157 | #line 8158 "configure" |
97bf5e38 MK |
8158 | #include "confdefs.h" |
8159 | ||
8160 | int main () { | |
8161 | char *buf = "3.141592653"; | |
8162 | long double f = 0; | |
8163 | sscanf (buf, "%Lg", &f); | |
8164 | return !(f > 3.14159 && f < 3.14160); | |
8165 | } | |
c906108c | 8166 | EOF |
030292b7 | 8167 | if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8168 | then |
8169 | gdb_cv_scanf_has_long_double=yes | |
8170 | else | |
8171 | echo "configure: failed program was:" >&5 | |
8172 | cat conftest.$ac_ext >&5 | |
8173 | rm -fr conftest* | |
8174 | gdb_cv_scanf_has_long_double=no | |
8175 | fi | |
8176 | rm -fr conftest* | |
8177 | fi | |
c906108c SS |
8178 | |
8179 | fi | |
8180 | ||
97bf5e38 MK |
8181 | if test $gdb_cv_scanf_has_long_double = yes; then |
8182 | cat >> confdefs.h <<\EOF | |
8183 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8184 | EOF | |
8185 | ||
8186 | fi | |
8187 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8188 | |
438013df AO |
8189 | case ${host_os} in |
8190 | aix*) | |
8191 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
030292b7 | 8192 | echo "configure:8193: checking for -bbigtoc option" >&5 |
438013df AO |
8193 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8195 | else | |
8196 | ||
8197 | SAVE_LDFLAGS=$LDFLAGS | |
8198 | ||
8199 | case $GCC in | |
8200 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8201 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8202 | esac | |
8203 | ||
8204 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8205 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8206 | #line 8207 "configure" |
438013df AO |
8207 | #include "confdefs.h" |
8208 | ||
8209 | int main() { | |
8210 | int i; | |
8211 | ; return 0; } | |
8212 | EOF | |
030292b7 | 8213 | if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8214 | : |
8215 | else | |
8216 | echo "configure: failed program was:" >&5 | |
8217 | cat conftest.$ac_ext >&5 | |
8218 | rm -rf conftest* | |
8219 | gdb_cv_bigtoc= | |
8220 | fi | |
8221 | rm -f conftest* | |
8222 | ||
8223 | fi | |
8224 | ||
8225 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8226 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8227 | ;; | |
8228 | esac | |
8229 | ||
c906108c SS |
8230 | |
8231 | ||
8232 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8233 | case ${host_os} in | |
8234 | hpux*) | |
8235 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
030292b7 | 8236 | echo "configure:8237: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8237 | if test -f /usr/include/dce/cma_config.h ; then |
8238 | if test "$GCC" = "yes" ; then | |
8239 | echo "$ac_t""yes" 1>&6 | |
8240 | cat >> confdefs.h <<\EOF | |
8241 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8242 | EOF | |
8243 | ||
66b965bb | 8244 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8245 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8246 | else | |
8247 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8248 | fi | |
8249 | else | |
8250 | echo "$ac_t""no" 1>&6 | |
8251 | fi | |
8252 | ;; | |
8253 | solaris*) | |
d92419e5 JB |
8254 | # See if thread_db library is around for Solaris thread debugging. |
8255 | # Note that we must explicitly test for version 1 of the library | |
8256 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8257 | # the same API. | |
c906108c | 8258 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
030292b7 | 8259 | echo "configure:8260: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8260 | if test -f /usr/lib/libthread_db.so.1 ; then |
8261 | echo "$ac_t""yes" 1>&6 | |
8262 | cat >> confdefs.h <<\EOF | |
8263 | #define HAVE_THREAD_DB_LIB 1 | |
8264 | EOF | |
8265 | ||
66b965bb | 8266 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8267 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8268 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
030292b7 | 8269 | echo "configure:8270: checking for dlopen in -ldl" >&5 |
c906108c SS |
8270 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8271 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8272 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8273 | else | |
8274 | ac_save_LIBS="$LIBS" | |
8275 | LIBS="-ldl $LIBS" | |
8276 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8277 | #line 8278 "configure" |
c906108c SS |
8278 | #include "confdefs.h" |
8279 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8280 | /* We use char because int might match the return type of a gcc2 | |
8281 | builtin and then its argument prototype would still apply. */ | |
8282 | char dlopen(); | |
8283 | ||
8284 | int main() { | |
8285 | dlopen() | |
8286 | ; return 0; } | |
8287 | EOF | |
030292b7 | 8288 | if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8289 | rm -rf conftest* |
8290 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8291 | else | |
8292 | echo "configure: failed program was:" >&5 | |
8293 | cat conftest.$ac_ext >&5 | |
8294 | rm -rf conftest* | |
8295 | eval "ac_cv_lib_$ac_lib_var=no" | |
8296 | fi | |
8297 | rm -f conftest* | |
8298 | LIBS="$ac_save_LIBS" | |
8299 | ||
8300 | fi | |
8301 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8302 | echo "$ac_t""yes" 1>&6 | |
8303 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8304 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8305 | cat >> confdefs.h <<EOF | |
8306 | #define $ac_tr_lib 1 | |
8307 | EOF | |
8308 | ||
8309 | LIBS="-ldl $LIBS" | |
8310 | ||
8311 | else | |
8312 | echo "$ac_t""no" 1>&6 | |
8313 | fi | |
8314 | ||
8315 | if test "$GCC" = "yes" ; then | |
8316 | # The GNU linker requires the -export-dynamic option to make | |
8317 | # all symbols visible in the dynamic symbol table. | |
8318 | hold_ldflags=$LDFLAGS | |
8319 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
030292b7 | 8320 | echo "configure:8321: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8321 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8322 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8323 | #line 8324 "configure" |
c906108c SS |
8324 | #include "confdefs.h" |
8325 | ||
8326 | int main() { | |
8327 | int i; | |
8328 | ; return 0; } | |
8329 | EOF | |
030292b7 | 8330 | if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8331 | rm -rf conftest* |
8332 | found=yes | |
8333 | else | |
8334 | echo "configure: failed program was:" >&5 | |
8335 | cat conftest.$ac_ext >&5 | |
8336 | rm -rf conftest* | |
8337 | found=no | |
8338 | fi | |
8339 | rm -f conftest* | |
8340 | LDFLAGS=$hold_ldflags | |
8341 | echo "$ac_t""$found" 1>&6 | |
8342 | if test $found = yes; then | |
8343 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8344 | fi | |
8345 | fi | |
8346 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8347 | # at one point. | |
8348 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
030292b7 | 8349 | echo "configure:8350: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8350 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8351 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8352 | else | |
8353 | ||
8354 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8355 | #line 8356 "configure" |
c906108c SS |
8356 | #include "confdefs.h" |
8357 | ||
8358 | #include <proc_service.h> | |
8359 | ps_err_e ps_pdwrite | |
8360 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8361 | ||
8362 | int main() { | |
8363 | ||
8364 | ; return 0; } | |
8365 | EOF | |
030292b7 | 8366 | if { (eval echo configure:8367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8367 | rm -rf conftest* |
8368 | gdb_cv_proc_service_is_old=no | |
8369 | else | |
8370 | echo "configure: failed program was:" >&5 | |
8371 | cat conftest.$ac_ext >&5 | |
8372 | rm -rf conftest* | |
8373 | gdb_cv_proc_service_is_old=yes | |
8374 | fi | |
8375 | rm -f conftest* | |
8376 | ||
8377 | fi | |
8378 | ||
8379 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8380 | if test $gdb_cv_proc_service_is_old = yes; then | |
8381 | cat >> confdefs.h <<\EOF | |
8382 | #define PROC_SERVICE_IS_OLD 1 | |
8383 | EOF | |
8384 | ||
8385 | fi | |
8386 | else | |
8387 | echo "$ac_t""no" 1>&6 | |
8388 | fi | |
8389 | ;; | |
d92419e5 JB |
8390 | aix*) |
8391 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
030292b7 | 8392 | echo "configure:8393: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8393 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8395 | else | |
8396 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8397 | #line 8398 "configure" |
d92419e5 JB |
8398 | #include "confdefs.h" |
8399 | #include <sys/pthdebug.h> | |
8400 | int main() { | |
8401 | #ifndef PTHDB_VERSION_3 | |
8402 | #error | |
8403 | #endif | |
8404 | ; return 0; } | |
8405 | EOF | |
030292b7 | 8406 | if { (eval echo configure:8407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8407 | rm -rf conftest* |
8408 | gdb_cv_have_aix_thread_debug=yes | |
8409 | else | |
8410 | echo "configure: failed program was:" >&5 | |
8411 | cat conftest.$ac_ext >&5 | |
8412 | rm -rf conftest* | |
8413 | gdb_cv_have_aix_thread_debug=no | |
8414 | fi | |
8415 | rm -f conftest* | |
8416 | fi | |
8417 | ||
8418 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8419 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8420 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8421 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8422 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8423 | fi | |
8424 | ;; | |
c906108c SS |
8425 | esac |
8426 | ||
8427 | fi | |
8428 | ||
3f47be5c EZ |
8429 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8430 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
030292b7 | 8431 | echo "configure:8432: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8432 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8434 | else | |
8435 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8436 | #line 8437 "configure" |
3f47be5c EZ |
8437 | #include "confdefs.h" |
8438 | #include <thread_db.h> | |
8439 | int main() { | |
8440 | int i = TD_NOTALLOC; | |
8441 | ; return 0; } | |
8442 | EOF | |
030292b7 | 8443 | if { (eval echo configure:8444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8444 | rm -rf conftest* |
8445 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8446 | else | |
8447 | echo "configure: failed program was:" >&5 | |
8448 | cat conftest.$ac_ext >&5 | |
8449 | rm -rf conftest* | |
8450 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8451 | ||
8452 | fi | |
8453 | rm -f conftest* | |
8454 | ||
8455 | fi | |
8456 | ||
8457 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8458 | fi | |
8459 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8460 | cat >> confdefs.h <<\EOF | |
8461 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8462 | EOF | |
8463 | ||
8464 | fi | |
8465 | ||
fb40c209 | 8466 | |
030292b7 DJ |
8467 | # Check whether --with-sysroot or --without-sysroot was given. |
8468 | if test "${with_sysroot+set}" = set; then | |
8469 | withval="$with_sysroot" | |
8470 | ||
8471 | case ${with_sysroot} in | |
8472 | yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;; | |
8473 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; | |
8474 | esac | |
8475 | ||
8476 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
8477 | ||
8478 | if test "x$exec_prefix" = xNONE; then | |
8479 | if test "x$prefix" = xNONE; then | |
8480 | test_prefix=/usr/local | |
8481 | else | |
8482 | test_prefix=$prefix | |
8483 | fi | |
8484 | else | |
8485 | test_prefix=$exec_prefix | |
8486 | fi | |
8487 | case ${TARGET_SYSTEM_ROOT} in | |
8488 | ${test_prefix}*) | |
8489 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" | |
8490 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
8491 | ;; | |
8492 | esac | |
8493 | ||
8494 | else | |
8495 | ||
8496 | TARGET_SYSTEM_ROOT= | |
8497 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
8498 | ||
8499 | fi | |
8500 | ||
8501 | ||
8502 | ||
8503 | ||
3b851bce AC |
8504 | # NOTE: Don't add -Wall or -Wunused, they both include |
8505 | # -Wunused-parameter which reports bogus warnings. | |
8506 | # NOTE: If you add to this list, remember to update | |
8507 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8508 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8509 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8510 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8511 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8512 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8513 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8514 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8515 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8516 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8517 | if test "${enable_build_warnings+set}" = set; then | |
8518 | enableval="$enable_build_warnings" | |
1decb323 | 8519 | case "${enableval}" in |
c906108c SS |
8520 | yes) ;; |
8521 | no) build_warnings="-w";; | |
8522 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8523 | build_warnings="${build_warnings} ${t}";; | |
8524 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8525 | build_warnings="${t} ${build_warnings}";; | |
8526 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8527 | esac | |
d4f3574e | 8528 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8529 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8530 | fi |
1decb323 | 8531 | fi |
3b851bce AC |
8532 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8533 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8534 | enableval="$enable_gdb_build_warnings" | |
8535 | case "${enableval}" in | |
8536 | yes) ;; | |
8537 | no) build_warnings="-w";; | |
8538 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8539 | build_warnings="${build_warnings} ${t}";; | |
8540 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8541 | build_warnings="${t} ${build_warnings}";; | |
8542 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8543 | esac | |
8544 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8545 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8546 | fi | |
8547 | fi | |
104c1213 JM |
8548 | WARN_CFLAGS="" |
8549 | WERROR_CFLAGS="" | |
c906108c SS |
8550 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8551 | then | |
746a987d | 8552 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
030292b7 | 8553 | echo "configure:8554: checking compiler warning flags" >&5 |
746a987d AC |
8554 | # Separate out the -Werror flag as some files just cannot be |
8555 | # compiled with it enabled. | |
8556 | for w in ${build_warnings}; do | |
8557 | case $w in | |
8558 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8559 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8560 | saved_CFLAGS="$CFLAGS" |
8561 | CFLAGS="$CFLAGS $w" | |
8562 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8563 | #line 8564 "configure" |
4536bbc6 AC |
8564 | #include "confdefs.h" |
8565 | ||
8566 | int main() { | |
8567 | ||
8568 | ; return 0; } | |
8569 | EOF | |
030292b7 | 8570 | if { (eval echo configure:8571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8571 | rm -rf conftest* |
8572 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8573 | else | |
8574 | echo "configure: failed program was:" >&5 | |
8575 | cat conftest.$ac_ext >&5 | |
8576 | fi | |
8577 | rm -f conftest* | |
8578 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8579 | esac |
8580 | done | |
8581 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8582 | fi |
8583 | ||
8584 | ||
104c1213 | 8585 | |
c906108c SS |
8586 | MMALLOC_CFLAGS= |
8587 | MMALLOC= | |
8588 | ||
8589 | ||
8590 | ||
8591 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8592 | if test "${with_mmalloc+set}" = set; then | |
8593 | withval="$with_mmalloc" | |
8594 | case "${withval}" in | |
8595 | yes) want_mmalloc=true ;; | |
8596 | no) want_mmalloc=false;; | |
8597 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8598 | esac | |
8599 | else | |
8600 | want_mmalloc=false | |
8601 | fi | |
8602 | ||
8603 | if test x$want_mmalloc = xtrue; then | |
8604 | cat >> confdefs.h <<\EOF | |
8605 | #define USE_MMALLOC 1 | |
8606 | EOF | |
8607 | ||
8608 | cat >> confdefs.h <<\EOF | |
8609 | #define MMCHECK_FORCE 1 | |
8610 | EOF | |
8611 | ||
8612 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8613 | MMALLOC='../mmalloc/libmmalloc.a' | |
8614 | fi | |
8615 | ||
7a292a7a SS |
8616 | # In the Cygwin environment, we need some additional flags. |
8617 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
030292b7 | 8618 | echo "configure:8619: checking for cygwin" >&5 |
7a292a7a SS |
8619 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8621 | else | |
8622 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8623 | #line 8624 "configure" |
7a292a7a SS |
8624 | #include "confdefs.h" |
8625 | ||
8626 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8627 | lose | |
8628 | #endif | |
8629 | EOF | |
8630 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8631 | egrep "lose" >/dev/null 2>&1; then | |
8632 | rm -rf conftest* | |
8633 | gdb_cv_os_cygwin=yes | |
8634 | else | |
8635 | rm -rf conftest* | |
8636 | gdb_cv_os_cygwin=no | |
8637 | fi | |
8638 | rm -f conftest* | |
8639 | ||
8640 | fi | |
8641 | ||
8642 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8643 | ||
aff38e61 AC |
8644 | |
8645 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8646 | case ${host} in | |
95cbc983 AC |
8647 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8648 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8649 | esac |
8650 | ||
8651 | ||
cd0fc7c3 SS |
8652 | # libreadline needs libuser32.a in a cygwin environment |
8653 | WIN32LIBS= | |
8654 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8655 | WIN32LIBS="-luser32" |
8656 | case "${target}" in | |
8657 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8658 | ;; | |
8659 | esac | |
cd0fc7c3 | 8660 | fi |
c906108c | 8661 | |
7a292a7a | 8662 | |
3fc11d3e JM |
8663 | LIBGUI="../libgui/src/libgui.a" |
8664 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8665 | ||
8666 | ||
7a292a7a | 8667 | |
3fc11d3e JM |
8668 | WIN32LDAPP= |
8669 | ||
8670 | ||
8671 | ||
8672 | configdir="unix" | |
8673 | ||
8674 | GDBTKLIBS= | |
8675 | if test "${enable_gdbtk}" = "yes"; then | |
8676 | ||
d1c3b63a KS |
8677 | # Gdbtk must have an absolute path to srcdir in order to run |
8678 | # properly when not installed. | |
8679 | here=`pwd` | |
8680 | cd ${srcdir} | |
8681 | GDBTK_SRC_DIR=`pwd` | |
8682 | cd $here | |
8683 | ||
3fc11d3e JM |
8684 | |
8685 | # | |
8686 | # Ok, lets find the tcl configuration | |
8687 | # First, look for one uninstalled. | |
8688 | # the alternative search directory is invoked by --with-tclconfig | |
8689 | # | |
8690 | ||
8691 | if test x"${no_tcl}" = x ; then | |
8692 | # we reset no_tcl in case something fails here | |
8693 | no_tcl=true | |
8694 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8695 | if test "${with_tclconfig+set}" = set; then | |
8696 | withval="$with_tclconfig" | |
8697 | with_tclconfig=${withval} | |
8698 | fi | |
8699 | ||
8700 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
030292b7 | 8701 | echo "configure:8702: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8702 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8704 | else | |
8705 | ||
8706 | ||
8707 | # First check to see if --with-tclconfig was specified. | |
8708 | if test x"${with_tclconfig}" != x ; then | |
8709 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8710 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8711 | else | |
8712 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8713 | fi | |
8714 | fi | |
8715 | ||
8716 | # then check for a private Tcl installation | |
8717 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8718 | for i in \ | |
8719 | ../tcl \ | |
8720 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8721 | ../../tcl \ | |
8722 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8723 | ../../../tcl \ | |
8724 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8725 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8726 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8727 | break | |
8728 | fi | |
8729 | done | |
8730 | fi | |
8731 | # check in a few common install locations | |
8732 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8733 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8734 | if test -f "$i/tclConfig.sh" ; then | |
8735 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8736 | break | |
8737 | fi | |
8738 | done | |
8739 | fi | |
8740 | # check in a few other private locations | |
8741 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8742 | for i in \ | |
8743 | ${srcdir}/../tcl \ | |
8744 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8745 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8746 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8747 | break | |
8748 | fi | |
8749 | done | |
8750 | fi | |
8751 | ||
8752 | fi | |
8753 | ||
8754 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8755 | TCLCONFIG="# no Tcl configs found" | |
8756 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8757 | else | |
8758 | no_tcl= | |
8759 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8760 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8761 | fi | |
8762 | fi | |
8763 | ||
8764 | if test -z "${no_tcl}"; then | |
8765 | ||
8766 | . $TCLCONFIG | |
8767 | ||
8768 | ||
8769 | ||
8770 | ||
8771 | ||
8772 | ||
8773 | ||
8774 | ||
8775 | ||
8776 | ||
8777 | ||
8778 | ||
8779 | ||
8780 | ||
8781 | ||
8782 | ||
8783 | ||
8784 | ||
8785 | ||
8786 | ||
8787 | ||
8788 | ||
8789 | ||
8790 | ||
8791 | ||
8792 | ||
8793 | # | |
8794 | # Ok, lets find the tk configuration | |
8795 | # First, look for one uninstalled. | |
8796 | # the alternative search directory is invoked by --with-tkconfig | |
8797 | # | |
8798 | ||
8799 | if test x"${no_tk}" = x ; then | |
8800 | # we reset no_tk in case something fails here | |
8801 | no_tk=true | |
8802 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8803 | if test "${with_tkconfig+set}" = set; then | |
8804 | withval="$with_tkconfig" | |
8805 | with_tkconfig=${withval} | |
8806 | fi | |
8807 | ||
8808 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
030292b7 | 8809 | echo "configure:8810: checking for Tk configuration" >&5 |
3fc11d3e JM |
8810 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8811 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8812 | else | |
8813 | ||
8814 | ||
8815 | # First check to see if --with-tkconfig was specified. | |
8816 | if test x"${with_tkconfig}" != x ; then | |
8817 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8818 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8819 | else | |
8820 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8821 | fi | |
8822 | fi | |
8823 | ||
8824 | # then check for a private Tk library | |
8825 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8826 | for i in \ | |
8827 | ../tk \ | |
8828 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8829 | ../../tk \ | |
8830 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8831 | ../../../tk \ | |
8832 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8833 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8834 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8835 | break | |
8836 | fi | |
8837 | done | |
8838 | fi | |
8839 | # check in a few common install locations | |
8840 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8841 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8842 | if test -f "$i/tkConfig.sh" ; then | |
8843 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8844 | break | |
8845 | fi | |
8846 | done | |
8847 | fi | |
8848 | # check in a few other private locations | |
8849 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8850 | for i in \ | |
8851 | ${srcdir}/../tk \ | |
8852 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8853 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8854 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8855 | break | |
8856 | fi | |
8857 | done | |
8858 | fi | |
8859 | ||
8860 | fi | |
8861 | ||
8862 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8863 | TKCONFIG="# no Tk configs found" | |
8864 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8865 | else | |
8866 | no_tk= | |
8867 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8868 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8869 | fi | |
8870 | fi | |
8871 | ||
8872 | ||
8873 | ||
dd2504ab JM |
8874 | # now look for Tcl library stuff |
8875 | ||
8876 | case "${host}" in | |
8877 | *-*-cygwin*) | |
8878 | tcldir=../tcl/win/ | |
8879 | ;; | |
8880 | *) | |
8881 | tcldir=../tcl/unix/ | |
8882 | ;; | |
8883 | esac | |
8884 | ||
8885 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
8886 | ||
3fc11d3e JM |
8887 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
8888 | # point to doing Tcl. | |
8889 | if test -z "${no_tk}"; then | |
8890 | ||
8891 | if test -f "$TKCONFIG" ; then | |
8892 | . $TKCONFIG | |
8893 | fi | |
8894 | ||
8895 | ||
8896 | ||
8897 | ||
8898 | ||
8899 | ||
8900 | ||
8901 | ||
8902 | ||
8903 | ||
8904 | ||
8905 | ||
8906 | ||
8907 | ||
8908 | # | |
8909 | # Ok, lets find the tcl source trees so we can use the headers | |
8910 | # Warning: transition of version 9 to 10 will break this algorithm | |
8911 | # because 10 sorts before 9. We also look for just tcl. We have to | |
8912 | # be careful that we don't match stuff like tclX by accident. | |
8913 | # the alternative search directory is involked by --with-tclinclude | |
8914 | # | |
8915 | ||
8916 | no_tcl=true | |
8917 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
030292b7 | 8918 | echo "configure:8919: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
8919 | # Check whether --with-tclinclude or --without-tclinclude was given. |
8920 | if test "${with_tclinclude+set}" = set; then | |
8921 | withval="$with_tclinclude" | |
8922 | with_tclinclude=${withval} | |
8923 | fi | |
8924 | ||
8925 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
8926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8927 | else | |
8928 | ||
8929 | # first check to see if --with-tclinclude was specified | |
8930 | if test x"${with_tclinclude}" != x ; then | |
8931 | if test -f ${with_tclinclude}/tclInt.h ; then | |
8932 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
8933 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
8934 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
8935 | else | |
8936 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
8937 | fi | |
8938 | fi | |
8939 | ||
8940 | # next check if it came with Tcl configuration file | |
8941 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8942 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
8943 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
8944 | fi | |
8945 | fi | |
8946 | ||
8947 | # next check in private source directory | |
8948 | # | |
8949 | # since ls returns lowest version numbers first, reverse its output | |
8950 | if test x"${ac_cv_c_tclh}" = x ; then | |
8951 | for i in \ | |
8952 | ${srcdir}/../tcl \ | |
8953 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
8954 | ${srcdir}/../../tcl \ | |
8955 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
8956 | ${srcdir}/../../../tcl \ | |
8957 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
8958 | if test -f $i/generic/tclInt.h ; then | |
8959 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8960 | break | |
8961 | fi | |
8962 | done | |
8963 | fi | |
8964 | # finally check in a few common install locations | |
8965 | # | |
8966 | # since ls returns lowest version numbers first, reverse its output | |
8967 | if test x"${ac_cv_c_tclh}" = x ; then | |
8968 | for i in \ | |
8969 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
8970 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
8971 | /usr/local/src/tcl \ | |
8972 | /usr/local/lib/tcl \ | |
8973 | ${prefix}/include ; do | |
8974 | if test -f $i/generic/tclInt.h ; then | |
8975 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8976 | break | |
8977 | fi | |
8978 | done | |
8979 | fi | |
8980 | # see if one is installed | |
8981 | if test x"${ac_cv_c_tclh}" = x ; then | |
8982 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
8983 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
030292b7 | 8984 | echo "configure:8985: checking for tclInt.h" >&5 |
3fc11d3e JM |
8985 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
8986 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8987 | else | |
8988 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 8989 | #line 8990 "configure" |
3fc11d3e JM |
8990 | #include "confdefs.h" |
8991 | #include <tclInt.h> | |
8992 | EOF | |
8993 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 8994 | { (eval echo configure:8995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
8995 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8996 | if test -z "$ac_err"; then | |
8997 | rm -rf conftest* | |
8998 | eval "ac_cv_header_$ac_safe=yes" | |
8999 | else | |
9000 | echo "$ac_err" >&5 | |
9001 | echo "configure: failed program was:" >&5 | |
9002 | cat conftest.$ac_ext >&5 | |
9003 | rm -rf conftest* | |
9004 | eval "ac_cv_header_$ac_safe=no" | |
9005 | fi | |
9006 | rm -f conftest* | |
9007 | fi | |
9008 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9009 | echo "$ac_t""yes" 1>&6 | |
9010 | ac_cv_c_tclh=installed | |
9011 | else | |
9012 | echo "$ac_t""no" 1>&6 | |
9013 | ac_cv_c_tclh="" | |
9014 | fi | |
9015 | ||
9016 | fi | |
9017 | ||
9018 | fi | |
9019 | ||
9020 | if test x"${ac_cv_c_tclh}" = x ; then | |
9021 | TCLHDIR="# no Tcl private headers found" | |
9022 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9023 | fi | |
9024 | if test x"${ac_cv_c_tclh}" != x ; then | |
9025 | no_tcl="" | |
9026 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9027 | echo "$ac_t""is installed" 1>&6 | |
9028 | TCLHDIR="" | |
9029 | else | |
9030 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9031 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9032 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9033 | fi | |
9034 | fi | |
9035 | ||
9036 | ||
9037 | ||
9038 | ||
9039 | # | |
9040 | # Ok, lets find the tk source trees so we can use the headers | |
9041 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9042 | # in preference to any others. Same logic is used when choosing library | |
9043 | # and again with Tcl. The search order is the best place to look first, then in | |
9044 | # decreasing significance. The loop breaks if the trigger file is found. | |
9045 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9046 | # directory. This converts the path from a relative to an absolute, so | |
9047 | # recursive cache variables for the path will work right. We check all | |
9048 | # the possible paths in one loop rather than many seperate loops to speed | |
9049 | # things up. | |
9050 | # the alternative search directory is involked by --with-tkinclude | |
9051 | # | |
9052 | no_tk=true | |
9053 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
030292b7 | 9054 | echo "configure:9055: checking for Tk private headers" >&5 |
3fc11d3e JM |
9055 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9056 | if test "${with_tkinclude+set}" = set; then | |
9057 | withval="$with_tkinclude" | |
9058 | with_tkinclude=${withval} | |
9059 | fi | |
9060 | ||
9061 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9062 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9063 | else | |
9064 | ||
9065 | # first check to see if --with-tkinclude was specified | |
9066 | if test x"${with_tkinclude}" != x ; then | |
9067 | if test -f ${with_tkinclude}/tk.h ; then | |
9068 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9069 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9070 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9071 | else | |
9072 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9073 | fi | |
9074 | fi | |
9075 | ||
9076 | # next check if it came with Tk configuration file | |
9077 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9078 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9079 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9080 | fi | |
9081 | fi | |
9082 | ||
9083 | # next check in private source directory | |
9084 | # | |
9085 | # since ls returns lowest version numbers first, reverse its output | |
9086 | if test x"${ac_cv_c_tkh}" = x ; then | |
9087 | for i in \ | |
9088 | ${srcdir}/../tk \ | |
9089 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9090 | ${srcdir}/../../tk \ | |
9091 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9092 | ${srcdir}/../../../tk \ | |
9093 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9094 | if test -f $i/generic/tk.h ; then | |
9095 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9096 | break | |
9097 | fi | |
9098 | done | |
9099 | fi | |
9100 | # finally check in a few common install locations | |
9101 | # | |
9102 | # since ls returns lowest version numbers first, reverse its output | |
9103 | if test x"${ac_cv_c_tkh}" = x ; then | |
9104 | for i in \ | |
9105 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9106 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9107 | /usr/local/src/tk \ | |
9108 | /usr/local/lib/tk \ | |
9109 | ${prefix}/include ; do | |
9110 | if test -f $i/generic/tk.h ; then | |
9111 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9112 | break | |
9113 | fi | |
9114 | done | |
9115 | fi | |
9116 | # see if one is installed | |
9117 | if test x"${ac_cv_c_tkh}" = x ; then | |
9118 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9119 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
030292b7 | 9120 | echo "configure:9121: checking for tk.h" >&5 |
3fc11d3e JM |
9121 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9123 | else | |
9124 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 9125 | #line 9126 "configure" |
3fc11d3e JM |
9126 | #include "confdefs.h" |
9127 | #include <tk.h> | |
9128 | EOF | |
9129 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 9130 | { (eval echo configure:9131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9131 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9132 | if test -z "$ac_err"; then | |
9133 | rm -rf conftest* | |
9134 | eval "ac_cv_header_$ac_safe=yes" | |
9135 | else | |
9136 | echo "$ac_err" >&5 | |
9137 | echo "configure: failed program was:" >&5 | |
9138 | cat conftest.$ac_ext >&5 | |
9139 | rm -rf conftest* | |
9140 | eval "ac_cv_header_$ac_safe=no" | |
9141 | fi | |
9142 | rm -f conftest* | |
9143 | fi | |
9144 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9145 | echo "$ac_t""yes" 1>&6 | |
9146 | ac_cv_c_tkh=installed | |
9147 | else | |
9148 | echo "$ac_t""no" 1>&6 | |
9149 | ac_cv_c_tkh="" | |
9150 | fi | |
9151 | ||
9152 | fi | |
9153 | ||
9154 | fi | |
9155 | ||
9156 | if test x"${ac_cv_c_tkh}" != x ; then | |
9157 | no_tk="" | |
9158 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9159 | echo "$ac_t""is installed" 1>&6 | |
9160 | TKHDIR="" | |
9161 | else | |
9162 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9163 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9164 | TKHDIR="-I${ac_cv_c_tkh}" | |
9165 | fi | |
9166 | else | |
9167 | TKHDIR="# no Tk directory found" | |
9168 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9169 | no_tk=true | |
9170 | fi | |
9171 | ||
9172 | ||
9173 | ||
9174 | ||
9175 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
030292b7 | 9176 | echo "configure:9177: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9177 | if test x"${ac_cv_c_itclh}" = x ; then |
9178 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9179 | if test -f $i/generic/itcl.h ; then | |
9180 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9181 | break | |
9182 | fi | |
9183 | done | |
9184 | fi | |
9185 | if test x"${ac_cv_c_itclh}" = x ; then | |
9186 | ITCLHDIR="# no Itcl private headers found" | |
9187 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9188 | fi | |
9189 | if test x"${ac_cv_c_itclh}" != x ; then | |
9190 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9191 | fi | |
9192 | # should always be here | |
9193 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9194 | ||
9195 | #AC_SUBST(ITCLLIB) | |
9196 | ||
9197 | ||
9198 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
030292b7 | 9199 | echo "configure:9200: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9200 | if test x"${ac_cv_c_itkh}" = x ; then |
9201 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9202 | if test -f $i/generic/itk.h ; then | |
9203 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9204 | break | |
9205 | fi | |
9206 | done | |
9207 | fi | |
9208 | if test x"${ac_cv_c_itkh}" = x ; then | |
9209 | ITKHDIR="# no Itk private headers found" | |
9210 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9211 | fi | |
9212 | if test x"${ac_cv_c_itkh}" != x ; then | |
9213 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9214 | fi | |
9215 | # should always be here | |
9216 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9217 | ||
9218 | #AC_SUBST(ITKLIB) | |
9219 | ||
3fc11d3e | 9220 | |
dd2504ab JM |
9221 | |
9222 | # now look for Tk library stuff | |
9223 | ||
9224 | case "${host}" in | |
9225 | *-*-cygwin*) | |
9226 | tkdir=../tk/win/ | |
9227 | ;; | |
9228 | *) | |
9229 | tkdir=../tk/unix/ | |
9230 | ;; | |
9231 | esac | |
9232 | ||
9233 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9234 | ||
3fc11d3e JM |
9235 | # now look for Itcl library stuff |
9236 | ||
9237 | ||
9238 | # | |
9239 | # Ok, lets find the itcl configuration | |
9240 | # First, look for one uninstalled. | |
9241 | # the alternative search directory is invoked by --with-itclconfig | |
9242 | # | |
9243 | ||
9244 | if test x"${no_itcl}" = x ; then | |
9245 | # we reset no_itcl in case something fails here | |
9246 | no_itcl=true | |
9247 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9248 | if test "${with_itclconfig+set}" = set; then | |
9249 | withval="$with_itclconfig" | |
9250 | with_itclconfig=${withval} | |
9251 | fi | |
9252 | ||
9253 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
030292b7 | 9254 | echo "configure:9255: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9255 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9257 | else | |
9258 | ||
9259 | ||
9260 | # First check to see if --with-itclconfig was specified. | |
9261 | if test x"${with_itclconfig}" != x ; then | |
9262 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9263 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9264 | else | |
9265 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9266 | fi | |
9267 | fi | |
9268 | ||
9269 | # then check for a private Itcl library | |
9270 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9271 | for i in \ | |
9272 | ../itcl/itcl \ | |
9273 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9274 | ../../itcl \ | |
9275 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9276 | ../../../itcl \ | |
9277 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9278 | if test -f "$i/itclConfig.sh" ; then | |
9279 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9280 | break | |
9281 | fi | |
9282 | done | |
9283 | fi | |
9284 | # check in a few common install locations | |
9285 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9286 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9287 | if test -f "$i/itclConfig.sh" ; then | |
9288 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9289 | break | |
9290 | fi | |
9291 | done | |
9292 | fi | |
9293 | # check in a few other private locations | |
9294 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9295 | for i in \ | |
9296 | ${srcdir}/../itcl/itcl \ | |
9297 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9298 | if test -f "$i/itclConfig.sh" ; then | |
9299 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9300 | break | |
9301 | fi | |
9302 | done | |
9303 | fi | |
9304 | ||
9305 | fi | |
9306 | ||
9307 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9308 | ITCLCONFIG="# no Itcl configs found" | |
9309 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9310 | else | |
9311 | no_itcl= | |
9312 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9313 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9314 | fi | |
9315 | fi | |
9316 | ||
9317 | if test -z "${no_itcl}"; then | |
9318 | ||
9319 | if test -f "$ITCLCONFIG" ; then | |
9320 | . $ITCLCONFIG | |
9321 | fi | |
9322 | ||
9323 | ||
9324 | ||
9325 | ||
9326 | ||
9327 | ||
9328 | ||
9329 | ||
9330 | ||
9331 | ||
3fc11d3e JM |
9332 | |
9333 | ||
9334 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9335 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9336 | fi |
9337 | ||
9338 | ||
9339 | # now look for Itk library stuff | |
9340 | ||
9341 | # | |
9342 | # Ok, lets find the itk configuration | |
9343 | # First, look for one uninstalled. | |
9344 | # the alternative search directory is invoked by --with-itkconfig | |
9345 | # | |
9346 | ||
9347 | if test x"${no_itk}" = x ; then | |
9348 | # we reset no_itk in case something fails here | |
9349 | no_itk=true | |
9350 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9351 | if test "${with_itkconfig+set}" = set; then | |
9352 | withval="$with_itkconfig" | |
9353 | with_itkconfig=${withval} | |
9354 | fi | |
9355 | ||
9356 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
030292b7 | 9357 | echo "configure:9358: checking for Itk configuration" >&5 |
3fc11d3e JM |
9358 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9359 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9360 | else | |
9361 | ||
9362 | ||
9363 | # First check to see if --with-itkconfig was specified. | |
9364 | if test x"${with_itkconfig}" != x ; then | |
9365 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9366 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9367 | else | |
9368 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9369 | fi | |
9370 | fi | |
9371 | ||
9372 | # then check for a private Itk library | |
9373 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9374 | for i in \ | |
9375 | ../itcl/itk \ | |
9376 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9377 | ../../itk \ | |
9378 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9379 | ../../../itk \ | |
9380 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9381 | if test -f "$i/itkConfig.sh" ; then | |
9382 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9383 | break | |
9384 | fi | |
9385 | done | |
9386 | fi | |
9387 | # check in a few common install locations | |
9388 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9389 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9390 | if test -f "$i/itkConfig.sh" ; then | |
9391 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9392 | break | |
9393 | fi | |
9394 | done | |
9395 | fi | |
9396 | # check in a few other private locations | |
9397 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9398 | for i in \ | |
9399 | ${srcdir}/../itcl/itk \ | |
9400 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9401 | if test -f "$i/itkConfig.sh" ; then | |
9402 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9403 | break | |
9404 | fi | |
9405 | done | |
9406 | fi | |
9407 | ||
9408 | fi | |
9409 | ||
9410 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9411 | ITKCONFIG="# no Itk configs found" | |
9412 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9413 | else | |
9414 | no_itk= | |
9415 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9416 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9417 | fi | |
9418 | fi | |
9419 | ||
9420 | ||
9421 | if test -z "${no_itcl}"; then | |
9422 | ||
9423 | if test -f "$ITKCONFIG" ; then | |
9424 | . $ITKCONFIG | |
9425 | fi | |
9426 | ||
9427 | ||
9428 | ||
9429 | ||
9430 | ||
9431 | ||
9432 | ||
9433 | ||
9434 | ||
9435 | ||
9436 | ||
9437 | ||
3fc11d3e | 9438 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9439 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9440 | fi |
9441 | ||
4226a5a5 | 9442 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9443 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9444 | # know whether 8.2 will or not, but I bet it will. | |
9445 | # I don't have to worry about 7.x since we don't support it. | |
9446 | GDBTK_CFLAGS="" | |
9447 | if test "$GCC" = "yes"; then | |
9448 | if test "$TCL_VERSION" != "8.0" ; then | |
9449 | GDBTK_CFLAGS="-fwritable-strings" | |
9450 | fi | |
9451 | fi | |
9452 | ||
9453 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9454 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9455 | # Yes, the ordering seems wrong here. But it isn't. |
9456 | # TK_LIBS is the list of libraries that need to be linked | |
9457 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9458 | # were in LIBS then any link tests after this point would | |
9459 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9460 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9461 | |
9462 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9463 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9464 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9465 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9466 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9467 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9468 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9469 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9470 | |
9471 | if test x$gdb_cv_os_cygwin = xyes; then | |
9472 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9473 | WIN32LDAPP="-Wl,--subsystem,console" | |
9474 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9475 | fi | |
9476 | fi | |
9477 | fi | |
ffc6a242 | 9478 | |
ffc6a242 | 9479 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9480 | fi |
9481 | ||
9482 | ||
9483 | ||
9484 | ||
9485 | ||
9486 | ||
9487 | ||
9488 | ||
9489 | ||
9490 | ||
9491 | ||
9492 | ||
9493 | ||
dd2504ab | 9494 | |
c906108c SS |
9495 | # If we find X, set shell vars x_includes and x_libraries to the |
9496 | # paths, otherwise set no_x=yes. | |
9497 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9498 | # --without-x overrides everything else, but does not touch the cache. | |
9499 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
030292b7 | 9500 | echo "configure:9501: checking for X" >&5 |
c906108c SS |
9501 | |
9502 | # Check whether --with-x or --without-x was given. | |
9503 | if test "${with_x+set}" = set; then | |
9504 | withval="$with_x" | |
9505 | : | |
9506 | fi | |
9507 | ||
9508 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9509 | if test "x$with_x" = xno; then | |
9510 | # The user explicitly disabled X. | |
9511 | have_x=disabled | |
9512 | else | |
9513 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9514 | # Both variables are already set. | |
9515 | have_x=yes | |
9516 | else | |
9517 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9518 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9519 | else | |
9520 | # One or both of the vars are not set, and there is no cached value. | |
9521 | ac_x_includes=NO ac_x_libraries=NO | |
9522 | rm -fr conftestdir | |
9523 | if mkdir conftestdir; then | |
9524 | cd conftestdir | |
9525 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9526 | cat > Imakefile <<'EOF' | |
9527 | acfindx: | |
9528 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9529 | EOF | |
9530 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9531 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9532 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9533 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9534 | for ac_extension in a so sl; do | |
9535 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9536 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9537 | ac_im_usrlibdir=$ac_im_libdir; break | |
9538 | fi | |
9539 | done | |
9540 | # Screen out bogus values from the imake configuration. They are | |
9541 | # bogus both because they are the default anyway, and because | |
9542 | # using them would break gcc on systems where it needs fixed includes. | |
9543 | case "$ac_im_incroot" in | |
9544 | /usr/include) ;; | |
9545 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9546 | esac | |
9547 | case "$ac_im_usrlibdir" in | |
9548 | /usr/lib | /lib) ;; | |
9549 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9550 | esac | |
9551 | fi | |
9552 | cd .. | |
9553 | rm -fr conftestdir | |
9554 | fi | |
9555 | ||
9556 | if test "$ac_x_includes" = NO; then | |
9557 | # Guess where to find include files, by looking for this one X11 .h file. | |
9558 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9559 | ||
9560 | # First, try using that file with no special directory specified. | |
9561 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 9562 | #line 9563 "configure" |
c906108c SS |
9563 | #include "confdefs.h" |
9564 | #include <$x_direct_test_include> | |
9565 | EOF | |
9566 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
030292b7 | 9567 | { (eval echo configure:9568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9568 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9569 | if test -z "$ac_err"; then | |
9570 | rm -rf conftest* | |
9571 | # We can compile using X headers with no special include directory. | |
9572 | ac_x_includes= | |
9573 | else | |
9574 | echo "$ac_err" >&5 | |
9575 | echo "configure: failed program was:" >&5 | |
9576 | cat conftest.$ac_ext >&5 | |
9577 | rm -rf conftest* | |
9578 | # Look for the header file in a standard set of common directories. | |
9579 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9580 | for ac_dir in \ | |
9581 | /usr/X11/include \ | |
9582 | /usr/X11R6/include \ | |
9583 | /usr/X11R5/include \ | |
9584 | /usr/X11R4/include \ | |
9585 | \ | |
9586 | /usr/include/X11 \ | |
9587 | /usr/include/X11R6 \ | |
9588 | /usr/include/X11R5 \ | |
9589 | /usr/include/X11R4 \ | |
9590 | \ | |
9591 | /usr/local/X11/include \ | |
9592 | /usr/local/X11R6/include \ | |
9593 | /usr/local/X11R5/include \ | |
9594 | /usr/local/X11R4/include \ | |
9595 | \ | |
9596 | /usr/local/include/X11 \ | |
9597 | /usr/local/include/X11R6 \ | |
9598 | /usr/local/include/X11R5 \ | |
9599 | /usr/local/include/X11R4 \ | |
9600 | \ | |
9601 | /usr/X386/include \ | |
9602 | /usr/x386/include \ | |
9603 | /usr/XFree86/include/X11 \ | |
9604 | \ | |
9605 | /usr/include \ | |
9606 | /usr/local/include \ | |
9607 | /usr/unsupported/include \ | |
9608 | /usr/athena/include \ | |
9609 | /usr/local/x11r5/include \ | |
9610 | /usr/lpp/Xamples/include \ | |
9611 | \ | |
9612 | /usr/openwin/include \ | |
9613 | /usr/openwin/share/include \ | |
9614 | ; \ | |
9615 | do | |
9616 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9617 | ac_x_includes=$ac_dir | |
9618 | break | |
9619 | fi | |
9620 | done | |
9621 | fi | |
9622 | rm -f conftest* | |
9623 | fi # $ac_x_includes = NO | |
9624 | ||
9625 | if test "$ac_x_libraries" = NO; then | |
9626 | # Check for the libraries. | |
9627 | ||
9628 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9629 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9630 | ||
9631 | # See if we find them without any special options. | |
9632 | # Don't add to $LIBS permanently. | |
9633 | ac_save_LIBS="$LIBS" | |
9634 | LIBS="-l$x_direct_test_library $LIBS" | |
9635 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 9636 | #line 9637 "configure" |
c906108c SS |
9637 | #include "confdefs.h" |
9638 | ||
9639 | int main() { | |
9640 | ${x_direct_test_function}() | |
9641 | ; return 0; } | |
9642 | EOF | |
030292b7 | 9643 | if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9644 | rm -rf conftest* |
9645 | LIBS="$ac_save_LIBS" | |
9646 | # We can link X programs with no special library path. | |
9647 | ac_x_libraries= | |
9648 | else | |
9649 | echo "configure: failed program was:" >&5 | |
9650 | cat conftest.$ac_ext >&5 | |
9651 | rm -rf conftest* | |
9652 | LIBS="$ac_save_LIBS" | |
9653 | # First see if replacing the include by lib works. | |
9654 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9655 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9656 | /usr/X11/lib \ | |
9657 | /usr/X11R6/lib \ | |
9658 | /usr/X11R5/lib \ | |
9659 | /usr/X11R4/lib \ | |
9660 | \ | |
9661 | /usr/lib/X11 \ | |
9662 | /usr/lib/X11R6 \ | |
9663 | /usr/lib/X11R5 \ | |
9664 | /usr/lib/X11R4 \ | |
9665 | \ | |
9666 | /usr/local/X11/lib \ | |
9667 | /usr/local/X11R6/lib \ | |
9668 | /usr/local/X11R5/lib \ | |
9669 | /usr/local/X11R4/lib \ | |
9670 | \ | |
9671 | /usr/local/lib/X11 \ | |
9672 | /usr/local/lib/X11R6 \ | |
9673 | /usr/local/lib/X11R5 \ | |
9674 | /usr/local/lib/X11R4 \ | |
9675 | \ | |
9676 | /usr/X386/lib \ | |
9677 | /usr/x386/lib \ | |
9678 | /usr/XFree86/lib/X11 \ | |
9679 | \ | |
9680 | /usr/lib \ | |
9681 | /usr/local/lib \ | |
9682 | /usr/unsupported/lib \ | |
9683 | /usr/athena/lib \ | |
9684 | /usr/local/x11r5/lib \ | |
9685 | /usr/lpp/Xamples/lib \ | |
9686 | /lib/usr/lib/X11 \ | |
9687 | \ | |
9688 | /usr/openwin/lib \ | |
9689 | /usr/openwin/share/lib \ | |
9690 | ; \ | |
9691 | do | |
9692 | for ac_extension in a so sl; do | |
9693 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9694 | ac_x_libraries=$ac_dir | |
9695 | break 2 | |
9696 | fi | |
9697 | done | |
9698 | done | |
9699 | fi | |
9700 | rm -f conftest* | |
9701 | fi # $ac_x_libraries = NO | |
9702 | ||
9703 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9704 | # Didn't find X anywhere. Cache the known absence of X. | |
9705 | ac_cv_have_x="have_x=no" | |
9706 | else | |
9707 | # Record where we found X for the cache. | |
9708 | ac_cv_have_x="have_x=yes \ | |
9709 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9710 | fi | |
9711 | fi | |
9712 | fi | |
9713 | eval "$ac_cv_have_x" | |
9714 | fi # $with_x != no | |
9715 | ||
9716 | if test "$have_x" != yes; then | |
9717 | echo "$ac_t""$have_x" 1>&6 | |
9718 | no_x=yes | |
9719 | else | |
9720 | # If each of the values was on the command line, it overrides each guess. | |
9721 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9722 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9723 | # Update the cache value to reflect the command line values. | |
9724 | ac_cv_have_x="have_x=yes \ | |
9725 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9726 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9727 | fi | |
9728 | ||
9729 | ||
7a292a7a SS |
9730 | |
9731 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9732 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9733 | # This code just checks for a few cases where we'd like to ignore those | |
9734 | # definitions, even when they're present in the '.mt' file. These cases | |
9735 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9736 | # not part of the source tree. |
7a292a7a SS |
9737 | # |
9738 | # Check whether --enable-sim or --disable-sim was given. | |
9739 | if test "${enable_sim+set}" = set; then | |
9740 | enableval="$enable_sim" | |
9741 | echo "enable_sim = $enable_sim"; | |
9742 | echo "enableval = ${enableval}"; | |
9743 | case "${enableval}" in | |
9744 | yes) ignore_sim=false ;; | |
9745 | no) ignore_sim=true ;; | |
9746 | *) ignore_sim=false ;; | |
9747 | esac | |
9748 | else | |
9749 | ignore_sim=false | |
9750 | fi | |
9751 | ||
9752 | ||
9753 | if test ! -d "${srcdir}/../sim"; then | |
9754 | ignore_sim=true | |
9755 | fi | |
9756 | ||
9757 | if test "${ignore_sim}" = "true"; then | |
9758 | IGNORE_SIM="SIM=" | |
9759 | IGNORE_SIM_OBS="SIM_OBS=" | |
9760 | else | |
9761 | IGNORE_SIM="" | |
9762 | IGNORE_SIM_OBS="" | |
9763 | cat >> confdefs.h <<\EOF | |
9764 | #define WITH_SIM 1 | |
9765 | EOF | |
9766 | ||
9767 | fi | |
9768 | ||
9769 | ||
9770 | ||
c906108c SS |
9771 | |
9772 | ||
9773 | ||
9774 | ||
9775 | ||
9776 | ||
dfcd3bfb | 9777 | |
e56ac5c3 AC |
9778 | |
9779 | ||
b3a90332 AC |
9780 | |
9781 | ||
b46cd165 | 9782 | |
c906108c SS |
9783 | # target_subdir is used by the testsuite to find the target libraries. |
9784 | target_subdir= | |
9785 | if test "${host}" != "${target}"; then | |
9786 | target_subdir="${target_alias}/" | |
9787 | fi | |
9788 | ||
9789 | ||
9790 | frags= | |
9791 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9792 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9793 | # When building a native debuger the .mh file containing things |
9794 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9795 | # since it no longer contains anything useful. | |
9796 | if test "${target}" = "${host}"; then | |
9797 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9798 | else | |
9799 | host_makefile_frag=/dev/null | |
9800 | fi | |
c906108c SS |
9801 | fi |
9802 | frags="$frags $host_makefile_frag" | |
9803 | ||
9804 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9805 | if test ! -f ${target_makefile_frag}; then | |
9806 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9807 | fi | |
9808 | frags="$frags $target_makefile_frag" | |
9809 | ||
9810 | ||
9811 | ||
9812 | ||
9813 | ||
9814 | hostfile=`sed -n ' | |
9815 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9816 | ' ${host_makefile_frag}` | |
9817 | ||
9818 | targetfile=`sed -n ' | |
9819 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9820 | ' ${target_makefile_frag}` | |
9821 | ||
6166d547 AC |
9822 | GDB_MULTI_ARCH=`sed -n ' |
9823 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9824 | ' ${target_makefile_frag}` | |
9825 | ||
c906108c | 9826 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9827 | # We pick this up from the host configuration file (.mh) because we |
9828 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9829 | nativefile=`sed -n ' |
9830 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9831 | ' ${host_makefile_frag}` | |
c906108c SS |
9832 | fi |
9833 | ||
9834 | ||
6166d547 AC |
9835 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9836 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9837 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9838 | # will be the default. | |
9839 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9840 | case "${gdb_multi_arch}" in | |
9841 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9842 | no ) GDB_MULTI_ARCH=0 ;; | |
9843 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9844 | esac | |
9845 | fi | |
9846 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9847 | cat >> confdefs.h <<EOF | |
9848 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9849 | EOF | |
9850 | ||
9851 | fi | |
6c5cfe5b | 9852 | # Warn the user when they use an old practice |
6166d547 AC |
9853 | case "${GDB_MULTI_ARCH}" in |
9854 | "" ) ;; | |
9855 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
9856 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
9857 | GDB_MULTI_ARCH_PURE ) | |
9858 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 9859 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 9860 | targetfile="" |
6166d547 AC |
9861 | fi ;; |
9862 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
9863 | esac | |
9864 | ||
b00a8037 DJ |
9865 | if test x"${gdb_osabi}" != x ; then |
9866 | cat >> confdefs.h <<EOF | |
9867 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
9868 | EOF | |
9869 | ||
9870 | fi | |
9871 | ||
8dcde887 MK |
9872 | # Enable multi-ice-gdb-server. |
9873 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
9874 | if test "${enable_multi_ice+set}" = set; then | |
9875 | enableval="$enable_multi_ice" | |
9876 | case $enableval in | |
9877 | yes | no) | |
9878 | ;; | |
9879 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
9880 | esac | |
96baa820 JM |
9881 | fi |
9882 | ||
8dcde887 MK |
9883 | if test "x$enable_multi_ice" = xyes; then |
9884 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
9885 | fi |
9886 | ||
8dcde887 MK |
9887 | # We only build gdbserver automatically if host and target are the same. |
9888 | if test "x$target" = "x$host"; then | |
9889 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
030292b7 | 9890 | echo "configure:9891: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
9891 | if test "x$build_gdbserver" = xyes; then |
9892 | configdirs="$configdirs gdbserver" | |
9893 | echo "$ac_t""yes" 1>&6 | |
9894 | else | |
9895 | echo "$ac_t""no" 1>&6 | |
9896 | fi | |
9897 | fi | |
9898 | ||
9899 | subdirs="doc testsuite $configdirs" | |
9900 | ||
96baa820 | 9901 | |
c906108c | 9902 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
9903 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
9904 | # version. | |
c906108c SS |
9905 | |
9906 | files= | |
9907 | links= | |
5a2402b8 | 9908 | |
c906108c | 9909 | rm -f xm.h |
5a2402b8 | 9910 | xm_h="" |
c906108c | 9911 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
9912 | xm_h=xm.h |
9913 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
9914 | files="${files} ${GDB_XM_FILE}" | |
9915 | links="${links} xm.h" | |
9916 | cat >> confdefs.h <<EOF | |
9917 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
9918 | EOF | |
9919 | ||
c906108c | 9920 | fi |
5a2402b8 AC |
9921 | |
9922 | ||
c906108c | 9923 | rm -f tm.h |
5a2402b8 | 9924 | tm_h="" |
c906108c | 9925 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
9926 | tm_h=tm.h |
9927 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
9928 | files="${files} ${GDB_TM_FILE}" | |
9929 | links="${links} tm.h" | |
9930 | cat >> confdefs.h <<EOF | |
9931 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
9932 | EOF | |
9933 | ||
c906108c | 9934 | fi |
5a2402b8 AC |
9935 | |
9936 | ||
c906108c | 9937 | rm -f nm.h |
5a2402b8 | 9938 | nm_h="" |
c906108c | 9939 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
9940 | nm_h=nm.h |
9941 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
9942 | files="${files} ${GDB_NM_FILE}" | |
9943 | links="${links} nm.h" | |
9944 | cat >> confdefs.h <<EOF | |
9945 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
9946 | EOF | |
9947 | ||
c906108c | 9948 | fi |
5a2402b8 AC |
9949 | |
9950 | ||
c906108c SS |
9951 | |
9952 | ||
9953 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
030292b7 | 9954 | echo "configure:9955: checking for Cygwin environment" >&5 |
c906108c SS |
9955 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
9956 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9957 | else | |
9958 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 9959 | #line 9960 "configure" |
c906108c SS |
9960 | #include "confdefs.h" |
9961 | ||
9962 | int main() { | |
9963 | ||
9964 | #ifndef __CYGWIN__ | |
9965 | #define __CYGWIN__ __CYGWIN32__ | |
9966 | #endif | |
9967 | return __CYGWIN__; | |
9968 | ; return 0; } | |
9969 | EOF | |
030292b7 | 9970 | if { (eval echo configure:9971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9971 | rm -rf conftest* |
9972 | ac_cv_cygwin=yes | |
9973 | else | |
9974 | echo "configure: failed program was:" >&5 | |
9975 | cat conftest.$ac_ext >&5 | |
9976 | rm -rf conftest* | |
9977 | ac_cv_cygwin=no | |
9978 | fi | |
9979 | rm -f conftest* | |
9980 | rm -f conftest* | |
9981 | fi | |
9982 | ||
9983 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
9984 | CYGWIN= | |
9985 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
9986 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
030292b7 | 9987 | echo "configure:9988: checking for mingw32 environment" >&5 |
c906108c SS |
9988 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
9989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9990 | else | |
9991 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 9992 | #line 9993 "configure" |
c906108c SS |
9993 | #include "confdefs.h" |
9994 | ||
9995 | int main() { | |
9996 | return __MINGW32__; | |
9997 | ; return 0; } | |
9998 | EOF | |
030292b7 | 9999 | if { (eval echo configure:10000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10000 | rm -rf conftest* |
10001 | ac_cv_mingw32=yes | |
10002 | else | |
10003 | echo "configure: failed program was:" >&5 | |
10004 | cat conftest.$ac_ext >&5 | |
10005 | rm -rf conftest* | |
10006 | ac_cv_mingw32=no | |
10007 | fi | |
10008 | rm -f conftest* | |
10009 | rm -f conftest* | |
10010 | fi | |
10011 | ||
10012 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10013 | MINGW32= | |
10014 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10015 | ||
10016 | ||
10017 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
030292b7 | 10018 | echo "configure:10019: checking for executable suffix" >&5 |
c906108c SS |
10019 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10020 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10021 | else | |
10022 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10023 | ac_cv_exeext=.exe | |
10024 | else | |
10025 | rm -f conftest* | |
10026 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10027 | ac_cv_exeext= | |
030292b7 | 10028 | if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10029 | for file in conftest.*; do |
10030 | case $file in | |
b00a8037 | 10031 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10032 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10033 | esac | |
10034 | done | |
10035 | else | |
10036 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10037 | fi | |
10038 | rm -f conftest* | |
10039 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10040 | fi | |
10041 | fi | |
10042 | ||
10043 | EXEEXT="" | |
10044 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10045 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10046 | ac_exeext=$EXEEXT | |
10047 | ||
10048 | ||
234b45d4 KB |
10049 | |
10050 | cat >> confdefs.h <<\EOF | |
10051 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10052 | EOF | |
10053 | ||
10054 | ||
10055 | ||
10056 | ||
10057 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10058 | if test "${with_libiconv_prefix+set}" = set; then | |
10059 | withval="$with_libiconv_prefix" | |
10060 | ||
10061 | for dir in `echo "$withval" | tr : ' '`; do | |
10062 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10063 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10064 | done | |
10065 | ||
10066 | fi | |
10067 | ||
10068 | ||
10069 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
030292b7 | 10070 | echo "configure:10071: checking for iconv" >&5 |
234b45d4 KB |
10071 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10073 | else | |
10074 | ||
10075 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10076 | am_cv_lib_iconv=no | |
10077 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 10078 | #line 10079 "configure" |
234b45d4 KB |
10079 | #include "confdefs.h" |
10080 | #include <stdlib.h> | |
10081 | #include <iconv.h> | |
10082 | int main() { | |
10083 | iconv_t cd = iconv_open("",""); | |
10084 | iconv(cd,NULL,NULL,NULL,NULL); | |
10085 | iconv_close(cd); | |
10086 | ; return 0; } | |
10087 | EOF | |
030292b7 | 10088 | if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10089 | rm -rf conftest* |
10090 | am_cv_func_iconv=yes | |
10091 | else | |
10092 | echo "configure: failed program was:" >&5 | |
10093 | cat conftest.$ac_ext >&5 | |
10094 | fi | |
10095 | rm -f conftest* | |
10096 | if test "$am_cv_func_iconv" != yes; then | |
10097 | am_save_LIBS="$LIBS" | |
10098 | LIBS="$LIBS -liconv" | |
10099 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 10100 | #line 10101 "configure" |
234b45d4 KB |
10101 | #include "confdefs.h" |
10102 | #include <stdlib.h> | |
10103 | #include <iconv.h> | |
10104 | int main() { | |
10105 | iconv_t cd = iconv_open("",""); | |
10106 | iconv(cd,NULL,NULL,NULL,NULL); | |
10107 | iconv_close(cd); | |
10108 | ; return 0; } | |
10109 | EOF | |
030292b7 | 10110 | if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10111 | rm -rf conftest* |
10112 | am_cv_lib_iconv=yes | |
10113 | am_cv_func_iconv=yes | |
10114 | else | |
10115 | echo "configure: failed program was:" >&5 | |
10116 | cat conftest.$ac_ext >&5 | |
10117 | fi | |
10118 | rm -f conftest* | |
10119 | LIBS="$am_save_LIBS" | |
10120 | fi | |
10121 | ||
10122 | fi | |
10123 | ||
10124 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10125 | if test "$am_cv_func_iconv" = yes; then | |
10126 | cat >> confdefs.h <<\EOF | |
10127 | #define HAVE_ICONV 1 | |
10128 | EOF | |
10129 | ||
10130 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
030292b7 | 10131 | echo "configure:10132: checking for iconv declaration" >&5 |
234b45d4 KB |
10132 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10134 | else | |
10135 | ||
10136 | cat > conftest.$ac_ext <<EOF | |
030292b7 | 10137 | #line 10138 "configure" |
234b45d4 KB |
10138 | #include "confdefs.h" |
10139 | ||
10140 | #include <stdlib.h> | |
10141 | #include <iconv.h> | |
10142 | extern | |
10143 | #ifdef __cplusplus | |
10144 | "C" | |
10145 | #endif | |
10146 | #if defined(__STDC__) || defined(__cplusplus) | |
10147 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10148 | #else | |
10149 | size_t iconv(); | |
10150 | #endif | |
10151 | ||
10152 | int main() { | |
10153 | ||
10154 | ; return 0; } | |
10155 | EOF | |
030292b7 | 10156 | if { (eval echo configure:10157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10157 | rm -rf conftest* |
10158 | am_cv_proto_iconv_arg1="" | |
10159 | else | |
10160 | echo "configure: failed program was:" >&5 | |
10161 | cat conftest.$ac_ext >&5 | |
10162 | rm -rf conftest* | |
10163 | am_cv_proto_iconv_arg1="const" | |
10164 | fi | |
10165 | rm -f conftest* | |
10166 | 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);" | |
10167 | fi | |
10168 | ||
10169 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10170 | echo "$ac_t""${ac_t:- | |
10171 | }$am_cv_proto_iconv" 1>&6 | |
10172 | cat >> confdefs.h <<EOF | |
10173 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10174 | EOF | |
10175 | ||
10176 | fi | |
10177 | LIBICONV= | |
10178 | if test "$am_cv_lib_iconv" = yes; then | |
10179 | LIBICONV="-liconv" | |
10180 | fi | |
10181 | ||
10182 | ||
10183 | ||
c906108c SS |
10184 | trap '' 1 2 15 |
10185 | cat > confcache <<\EOF | |
10186 | # This file is a shell script that caches the results of configure | |
10187 | # tests run on this system so they can be shared between configure | |
10188 | # scripts and configure runs. It is not useful on other systems. | |
10189 | # If it contains results you don't want to keep, you may remove or edit it. | |
10190 | # | |
10191 | # By default, configure uses ./config.cache as the cache file, | |
10192 | # creating it if it does not exist already. You can give configure | |
10193 | # the --cache-file=FILE option to use a different cache file; that is | |
10194 | # what configure does when it calls configure scripts in | |
10195 | # subdirectories, so they share the cache. | |
10196 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10197 | # config.status only pays attention to the cache file if you give it the | |
10198 | # --recheck option to rerun configure. | |
10199 | # | |
10200 | EOF | |
10201 | # The following way of writing the cache mishandles newlines in values, | |
10202 | # but we know of no workaround that is simple, portable, and efficient. | |
10203 | # So, don't put newlines in cache variables' values. | |
10204 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10205 | # and sets the high bit in the cache file unless we assign to the vars. | |
10206 | (set) 2>&1 | | |
10207 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10208 | *ac_space=\ *) | |
10209 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10210 | # turns \\\\ into \\, and sed turns \\ into \). | |
10211 | sed -n \ | |
10212 | -e "s/'/'\\\\''/g" \ | |
10213 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10214 | ;; | |
10215 | *) | |
10216 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10217 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10218 | ;; | |
10219 | esac >> confcache | |
10220 | if cmp -s $cache_file confcache; then | |
10221 | : | |
10222 | else | |
10223 | if test -w $cache_file; then | |
10224 | echo "updating cache $cache_file" | |
10225 | cat confcache > $cache_file | |
10226 | else | |
10227 | echo "not updating unwritable cache $cache_file" | |
10228 | fi | |
10229 | fi | |
10230 | rm -f confcache | |
10231 | ||
10232 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10233 | ||
10234 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10235 | # Let make expand exec_prefix. | |
10236 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10237 | ||
10238 | # Any assignment to VPATH causes Sun make to only execute | |
10239 | # the first set of double-colon rules, so remove it if not needed. | |
10240 | # If there is a colon in the path, we need to keep it. | |
10241 | if test "x$srcdir" = x.; then | |
10242 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10243 | fi | |
10244 | ||
10245 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10246 | ||
10247 | DEFS=-DHAVE_CONFIG_H | |
10248 | ||
10249 | # Without the "./", some shells look in PATH for config.status. | |
10250 | : ${CONFIG_STATUS=./config.status} | |
10251 | ||
10252 | echo creating $CONFIG_STATUS | |
10253 | rm -f $CONFIG_STATUS | |
10254 | cat > $CONFIG_STATUS <<EOF | |
10255 | #! /bin/sh | |
10256 | # Generated automatically by configure. | |
10257 | # Run this file to recreate the current configuration. | |
10258 | # This directory was configured as follows, | |
10259 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10260 | # | |
10261 | # $0 $ac_configure_args | |
10262 | # | |
10263 | # Compiler output produced by configure, useful for debugging | |
10264 | # configure, is in ./config.log if it exists. | |
10265 | ||
10266 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10267 | for ac_option | |
10268 | do | |
10269 | case "\$ac_option" in | |
10270 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10271 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10272 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10273 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10274 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10275 | exit 0 ;; | |
10276 | -help | --help | --hel | --he | --h) | |
10277 | echo "\$ac_cs_usage"; exit 0 ;; | |
10278 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10279 | esac | |
10280 | done | |
10281 | ||
10282 | ac_given_srcdir=$srcdir | |
10283 | ac_given_INSTALL="$INSTALL" | |
10284 | ||
ed952ac5 | 10285 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10286 | EOF |
10287 | cat >> $CONFIG_STATUS <<EOF | |
10288 | ||
10289 | # Protect against being on the right side of a sed subst in config.status. | |
10290 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10291 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10292 | $ac_vpsub | |
10293 | $extrasub | |
10294 | s%@SHELL@%$SHELL%g | |
10295 | s%@CFLAGS@%$CFLAGS%g | |
10296 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10297 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10298 | s%@FFLAGS@%$FFLAGS%g | |
10299 | s%@DEFS@%$DEFS%g | |
10300 | s%@LDFLAGS@%$LDFLAGS%g | |
10301 | s%@LIBS@%$LIBS%g | |
10302 | s%@exec_prefix@%$exec_prefix%g | |
10303 | s%@prefix@%$prefix%g | |
10304 | s%@program_transform_name@%$program_transform_name%g | |
10305 | s%@bindir@%$bindir%g | |
10306 | s%@sbindir@%$sbindir%g | |
10307 | s%@libexecdir@%$libexecdir%g | |
10308 | s%@datadir@%$datadir%g | |
10309 | s%@sysconfdir@%$sysconfdir%g | |
10310 | s%@sharedstatedir@%$sharedstatedir%g | |
10311 | s%@localstatedir@%$localstatedir%g | |
10312 | s%@libdir@%$libdir%g | |
10313 | s%@includedir@%$includedir%g | |
10314 | s%@oldincludedir@%$oldincludedir%g | |
10315 | s%@infodir@%$infodir%g | |
10316 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10317 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10318 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10319 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10320 | s%@CC@%$CC%g |
10321 | s%@CPP@%$CPP%g | |
10322 | s%@host@%$host%g | |
10323 | s%@host_alias@%$host_alias%g | |
10324 | s%@host_cpu@%$host_cpu%g | |
10325 | s%@host_vendor@%$host_vendor%g | |
10326 | s%@host_os@%$host_os%g | |
10327 | s%@target@%$target%g | |
10328 | s%@target_alias@%$target_alias%g | |
10329 | s%@target_cpu@%$target_cpu%g | |
10330 | s%@target_vendor@%$target_vendor%g | |
10331 | s%@target_os@%$target_os%g | |
10332 | s%@build@%$build%g | |
10333 | s%@build_alias@%$build_alias%g | |
10334 | s%@build_cpu@%$build_cpu%g | |
10335 | s%@build_vendor@%$build_vendor%g | |
10336 | s%@build_os@%$build_os%g | |
c906108c | 10337 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10338 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10339 | s%@ALLOCA@%$ALLOCA%g |
10340 | s%@USE_NLS@%$USE_NLS%g | |
10341 | s%@MSGFMT@%$MSGFMT%g | |
10342 | s%@GMSGFMT@%$GMSGFMT%g | |
10343 | s%@XGETTEXT@%$XGETTEXT%g | |
10344 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10345 | s%@CATALOGS@%$CATALOGS%g | |
10346 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10347 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10348 | s%@GMOFILES@%$GMOFILES%g | |
10349 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10350 | s%@INTLDEPS@%$INTLDEPS%g | |
10351 | s%@INTLLIBS@%$INTLLIBS%g | |
10352 | s%@INTLOBJS@%$INTLOBJS%g | |
10353 | s%@POFILES@%$POFILES%g | |
10354 | s%@POSUB@%$POSUB%g | |
10355 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10356 | s%@GT_NO@%$GT_NO%g | |
10357 | s%@GT_YES@%$GT_YES%g | |
10358 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10359 | s%@l@%$l%g | |
8dcde887 | 10360 | s%@subdirs@%$subdirs%g |
7a292a7a | 10361 | s%@AWK@%$AWK%g |
c906108c SS |
10362 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10363 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10364 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10365 | s%@LN_S@%$LN_S%g |
10366 | s%@YACC@%$YACC%g | |
c906108c | 10367 | s%@AR@%$AR%g |
95ca63c4 CF |
10368 | s%@DLLTOOL@%$DLLTOOL%g |
10369 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10370 | s%@MIG@%$MIG%g |
c906108c | 10371 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
10372 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
10373 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 10374 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10375 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10376 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10377 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10378 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10379 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10380 | s%@LIBGUI@%$LIBGUI%g |
10381 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10382 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10383 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10384 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10385 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10386 | s%@TCL_CC@%$TCL_CC%g | |
10387 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10388 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10389 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10390 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10391 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10392 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10393 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10394 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10395 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10396 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10397 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10398 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10399 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10400 | s%@TK_VERSION@%$TK_VERSION%g | |
10401 | s%@TK_DEFS@%$TK_DEFS%g | |
10402 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10403 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10404 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10405 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10406 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10407 | s%@TCLHDIR@%$TCLHDIR%g | |
10408 | s%@TKHDIR@%$TKHDIR%g | |
10409 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10410 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10411 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10412 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10413 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10414 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10415 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10416 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10417 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10418 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10419 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10420 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10421 | s%@X_CFLAGS@%$X_CFLAGS%g |
10422 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10423 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10424 | s%@TCL_DEPS@%$TCL_DEPS%g |
10425 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10426 | s%@ITCLLIB@%$ITCLLIB%g |
10427 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10428 | s%@ITKLIB@%$ITKLIB%g | |
10429 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10430 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10431 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10432 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10433 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10434 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
10435 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
10436 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 10437 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10438 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10439 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10440 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10441 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10442 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10443 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10444 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10445 | s%@target_subdir@%$target_subdir%g |
10446 | /@host_makefile_frag@/r $host_makefile_frag | |
10447 | s%@host_makefile_frag@%%g | |
10448 | /@target_makefile_frag@/r $target_makefile_frag | |
10449 | s%@target_makefile_frag@%%g | |
10450 | s%@frags@%$frags%g | |
5a2402b8 AC |
10451 | s%@xm_h@%$xm_h%g |
10452 | s%@tm_h@%$tm_h%g | |
10453 | s%@nm_h@%$nm_h%g | |
c906108c | 10454 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10455 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10456 | |
10457 | CEOF | |
10458 | EOF | |
10459 | ||
10460 | cat >> $CONFIG_STATUS <<\EOF | |
10461 | ||
10462 | # Split the substitutions into bite-sized pieces for seds with | |
10463 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10464 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10465 | ac_file=1 # Number of current file. |
10466 | ac_beg=1 # First line for current file. | |
10467 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10468 | ac_more_lines=: | |
10469 | ac_sed_cmds="" | |
10470 | while $ac_more_lines; do | |
10471 | if test $ac_beg -gt 1; then | |
10472 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10473 | else | |
10474 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10475 | fi | |
10476 | if test ! -s conftest.s$ac_file; then | |
10477 | ac_more_lines=false | |
10478 | rm -f conftest.s$ac_file | |
10479 | else | |
10480 | if test -z "$ac_sed_cmds"; then | |
10481 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10482 | else | |
10483 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10484 | fi | |
10485 | ac_file=`expr $ac_file + 1` | |
10486 | ac_beg=$ac_end | |
10487 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10488 | fi | |
10489 | done | |
10490 | if test -z "$ac_sed_cmds"; then | |
10491 | ac_sed_cmds=cat | |
10492 | fi | |
10493 | EOF | |
10494 | ||
10495 | cat >> $CONFIG_STATUS <<EOF | |
10496 | ||
ed952ac5 | 10497 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10498 | EOF |
10499 | cat >> $CONFIG_STATUS <<\EOF | |
10500 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10501 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10502 | case "$ac_file" in | |
10503 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10504 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10505 | *) ac_file_in="${ac_file}.in" ;; | |
10506 | esac | |
10507 | ||
10508 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10509 | ||
10510 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10511 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10512 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10513 | # The file is in a subdirectory. | |
10514 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10515 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10516 | # A "../" for each directory in $ac_dir_suffix. | |
10517 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10518 | else | |
10519 | ac_dir_suffix= ac_dots= | |
10520 | fi | |
10521 | ||
10522 | case "$ac_given_srcdir" in | |
10523 | .) srcdir=. | |
10524 | if test -z "$ac_dots"; then top_srcdir=. | |
10525 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10526 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10527 | *) # Relative path. | |
10528 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10529 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10530 | esac | |
10531 | ||
10532 | case "$ac_given_INSTALL" in | |
10533 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10534 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10535 | esac | |
10536 | ||
10537 | echo creating "$ac_file" | |
10538 | rm -f "$ac_file" | |
10539 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10540 | case "$ac_file" in | |
10541 | *Makefile*) ac_comsub="1i\\ | |
10542 | # $configure_input" ;; | |
10543 | *) ac_comsub= ;; | |
10544 | esac | |
10545 | ||
10546 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10547 | sed -e "$ac_comsub | |
10548 | s%@configure_input@%$configure_input%g | |
10549 | s%@srcdir@%$srcdir%g | |
10550 | s%@top_srcdir@%$top_srcdir%g | |
10551 | s%@INSTALL@%$INSTALL%g | |
10552 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10553 | fi; done | |
10554 | rm -f conftest.s* | |
10555 | ||
10556 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10557 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10558 | # | |
10559 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10560 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10561 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10562 | ac_dC='\3' | |
10563 | ac_dD='%g' | |
10564 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10565 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10566 | ac_uB='\([ ]\)%\1#\2define\3' | |
10567 | ac_uC=' ' | |
10568 | ac_uD='\4%g' | |
10569 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10570 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10571 | ac_eB='$%\1#\2define\3' | |
10572 | ac_eC=' ' | |
10573 | ac_eD='%g' | |
10574 | ||
10575 | if test "${CONFIG_HEADERS+set}" != set; then | |
10576 | EOF | |
10577 | cat >> $CONFIG_STATUS <<EOF | |
10578 | CONFIG_HEADERS="config.h:config.in" | |
10579 | EOF | |
10580 | cat >> $CONFIG_STATUS <<\EOF | |
10581 | fi | |
10582 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10583 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10584 | case "$ac_file" in | |
10585 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10586 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10587 | *) ac_file_in="${ac_file}.in" ;; | |
10588 | esac | |
10589 | ||
10590 | echo creating $ac_file | |
10591 | ||
10592 | rm -f conftest.frag conftest.in conftest.out | |
10593 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10594 | cat $ac_file_inputs > conftest.in | |
10595 | ||
10596 | EOF | |
10597 | ||
10598 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10599 | # the proper values into config.h.in to produce config.h. And first: | |
10600 | # Protect against being on the right side of a sed subst in config.status. | |
10601 | # Protect against being in an unquoted here document in config.status. | |
10602 | rm -f conftest.vals | |
10603 | cat > conftest.hdr <<\EOF | |
10604 | s/[\\&%]/\\&/g | |
10605 | s%[\\$`]%\\&%g | |
10606 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10607 | s%ac_d%ac_u%gp | |
10608 | s%ac_u%ac_e%gp | |
10609 | EOF | |
10610 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10611 | rm -f conftest.hdr | |
10612 | ||
10613 | # This sed command replaces #undef with comments. This is necessary, for | |
10614 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10615 | # on some systems where configure will not decide to define it. | |
10616 | cat >> conftest.vals <<\EOF | |
10617 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10618 | EOF | |
10619 | ||
10620 | # Break up conftest.vals because some shells have a limit on | |
10621 | # the size of here documents, and old seds have small limits too. | |
10622 | ||
10623 | rm -f conftest.tail | |
10624 | while : | |
10625 | do | |
10626 | ac_lines=`grep -c . conftest.vals` | |
10627 | # grep -c gives empty output for an empty file on some AIX systems. | |
10628 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10629 | # Write a limited-size here document to conftest.frag. | |
10630 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10631 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10632 | echo 'CEOF | |
10633 | sed -f conftest.frag conftest.in > conftest.out | |
10634 | rm -f conftest.in | |
10635 | mv conftest.out conftest.in | |
10636 | ' >> $CONFIG_STATUS | |
10637 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10638 | rm -f conftest.vals | |
10639 | mv conftest.tail conftest.vals | |
10640 | done | |
10641 | rm -f conftest.vals | |
10642 | ||
10643 | cat >> $CONFIG_STATUS <<\EOF | |
10644 | rm -f conftest.frag conftest.h | |
10645 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10646 | cat conftest.in >> conftest.h | |
10647 | rm -f conftest.in | |
10648 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10649 | echo "$ac_file is unchanged" | |
10650 | rm -f conftest.h | |
10651 | else | |
10652 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10653 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10654 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10655 | # The file is in a subdirectory. | |
10656 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10657 | fi | |
10658 | rm -f $ac_file | |
10659 | mv conftest.h $ac_file | |
10660 | fi | |
10661 | fi; done | |
10662 | ||
10663 | EOF | |
10664 | ||
10665 | cat >> $CONFIG_STATUS <<EOF | |
10666 | ac_sources="$files" | |
10667 | ac_dests="$links" | |
10668 | EOF | |
10669 | ||
10670 | cat >> $CONFIG_STATUS <<\EOF | |
10671 | srcdir=$ac_given_srcdir | |
10672 | while test -n "$ac_sources"; do | |
10673 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10674 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10675 | ||
10676 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10677 | ||
10678 | if test ! -r $srcdir/$ac_source; then | |
10679 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10680 | fi | |
10681 | rm -f $ac_dest | |
10682 | ||
10683 | # Make relative symlinks. | |
10684 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10685 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10686 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10687 | # The dest file is in a subdirectory. | |
10688 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10689 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10690 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10691 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10692 | else | |
10693 | ac_dest_dir_suffix= ac_dots= | |
10694 | fi | |
10695 | ||
10696 | case "$srcdir" in | |
10697 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10698 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10699 | esac | |
10700 | ||
10701 | # Make a symlink if possible; otherwise try a hard link. | |
10702 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10703 | ln $srcdir/$ac_source $ac_dest; then : | |
10704 | else | |
10705 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10706 | fi | |
10707 | done | |
10708 | EOF | |
10709 | cat >> $CONFIG_STATUS <<EOF | |
10710 | ||
10711 | gdb_host_cpu=$gdb_host_cpu | |
10712 | gdb_target_cpu=$gdb_target_cpu | |
10713 | nativefile=$nativefile | |
10714 | ||
10715 | EOF | |
10716 | cat >> $CONFIG_STATUS <<\EOF | |
10717 | ||
10718 | if test "${nativefile}" = ""; then | |
c4620205 | 10719 | < Makefile \ |
e27da16d JT |
10720 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10721 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10722 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10723 | > Makefile.tem | |
c906108c SS |
10724 | mv -f Makefile.tem Makefile |
10725 | fi | |
10726 | ||
10727 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10728 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10729 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10730 | mv -f Makefile.tmp Makefile | |
10731 | ||
2acceee2 | 10732 | |
c906108c SS |
10733 | case x$CONFIG_HEADERS in |
10734 | xconfig.h:config.in) | |
10735 | echo > stamp-h ;; | |
10736 | esac | |
10737 | ||
10738 | exit 0 | |
10739 | EOF | |
10740 | chmod +x $CONFIG_STATUS | |
10741 | rm -fr confdefs* $ac_clean_files | |
10742 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10743 | ||
10744 | if test "$no_recursion" != yes; then | |
10745 | ||
10746 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10747 | ac_sub_configure_args= | |
10748 | ac_prev= | |
10749 | for ac_arg in $ac_configure_args; do | |
10750 | if test -n "$ac_prev"; then | |
10751 | ac_prev= | |
10752 | continue | |
10753 | fi | |
10754 | case "$ac_arg" in | |
10755 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10756 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10757 | ac_prev=cache_file ;; | |
10758 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10759 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10760 | ;; | |
10761 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10762 | ac_prev=srcdir ;; | |
10763 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10764 | ;; | |
10765 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10766 | esac | |
10767 | done | |
10768 | ||
8dcde887 | 10769 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
10770 | |
10771 | # Do not complain, so a configure script can configure whichever | |
10772 | # parts of a large source tree are present. | |
10773 | if test ! -d $srcdir/$ac_config_dir; then | |
10774 | continue | |
10775 | fi | |
10776 | ||
10777 | echo configuring in $ac_config_dir | |
10778 | ||
10779 | case "$srcdir" in | |
10780 | .) ;; | |
10781 | *) | |
10782 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10783 | else | |
10784 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10785 | fi | |
10786 | ;; | |
10787 | esac | |
10788 | ||
10789 | ac_popdir=`pwd` | |
10790 | cd $ac_config_dir | |
10791 | ||
10792 | # A "../" for each directory in /$ac_config_dir. | |
10793 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10794 | ||
10795 | case "$srcdir" in | |
10796 | .) # No --srcdir option. We are building in place. | |
10797 | ac_sub_srcdir=$srcdir ;; | |
10798 | /*) # Absolute path. | |
10799 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10800 | *) # Relative path. | |
10801 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10802 | esac | |
10803 | ||
10804 | # Check for guested configure; otherwise get Cygnus style configure. | |
10805 | if test -f $ac_sub_srcdir/configure; then | |
10806 | ac_sub_configure=$ac_sub_srcdir/configure | |
10807 | elif test -f $ac_sub_srcdir/configure.in; then | |
10808 | ac_sub_configure=$ac_configure | |
10809 | else | |
10810 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10811 | ac_sub_configure= | |
10812 | fi | |
10813 | ||
10814 | # The recursion is here. | |
10815 | if test -n "$ac_sub_configure"; then | |
10816 | ||
10817 | # Make the cache file name correct relative to the subdirectory. | |
10818 | case "$cache_file" in | |
10819 | /*) ac_sub_cache_file=$cache_file ;; | |
10820 | *) # Relative path. | |
10821 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10822 | esac | |
10823 | case "$ac_given_INSTALL" in | |
10824 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10825 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10826 | esac | |
10827 | ||
10828 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10829 | # The eval makes quoting arguments work. | |
10830 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10831 | then : | |
10832 | else | |
10833 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10834 | fi | |
10835 | fi | |
10836 | ||
10837 | cd $ac_popdir | |
10838 | done | |
10839 | fi | |
10840 | ||
10841 | ||
10842 | exit 0 |