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" | |
5b5d99cf JB |
21 | ac_help="$ac_help |
22 | --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]" | |
627af7ea MK |
23 | ac_help="$ac_help |
24 | --disable-gdbcli disable command-line interface (CLI)" | |
25 | ac_help="$ac_help | |
26 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
27 | ac_help="$ac_help |
28 | --enable-tui enable full-screen terminal user interface (TUI)" | |
8ee53726 | 29 | ac_help="$ac_help |
d28f9cdf DJ |
30 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
31 | ac_help="$ac_help | |
32 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
33 | ac_help="$ac_help |
34 | --without-included-regex don't use included regex; this is the default | |
35 | on systems with version 2 of the GNU C library | |
36 | (use with caution on other system)" | |
030292b7 DJ |
37 | ac_help="$ac_help |
38 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
39 | ac_help="$ac_help |
40 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
41 | ac_help="$ac_help |
42 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
43 | ac_help="$ac_help |
44 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
45 | ac_help="$ac_help |
46 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
49 | ac_help="$ac_help | |
50 | --with-tclinclude=DIR Directory where tcl private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-tkinclude=DIR Directory where tk private headers are" | |
53 | ac_help="$ac_help | |
54 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
55 | ac_help="$ac_help | |
56 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --with-x use the X Window System" | |
7a292a7a SS |
59 | ac_help="$ac_help |
60 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
61 | ac_help="$ac_help |
62 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
63 | ac_help="$ac_help |
64 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
65 | |
66 | # Initialize some variables set by options. | |
67 | # The variables have the same names as the options, with | |
68 | # dashes changed to underlines. | |
69 | build=NONE | |
70 | cache_file=./config.cache | |
71 | exec_prefix=NONE | |
72 | host=NONE | |
73 | no_create= | |
74 | nonopt=NONE | |
75 | no_recursion= | |
76 | prefix=NONE | |
77 | program_prefix=NONE | |
78 | program_suffix=NONE | |
79 | program_transform_name=s,x,x, | |
80 | silent= | |
81 | site= | |
d3e0a5bf | 82 | sitefile= |
c906108c SS |
83 | srcdir= |
84 | target=NONE | |
85 | verbose= | |
86 | x_includes=NONE | |
87 | x_libraries=NONE | |
88 | bindir='${exec_prefix}/bin' | |
89 | sbindir='${exec_prefix}/sbin' | |
90 | libexecdir='${exec_prefix}/libexec' | |
91 | datadir='${prefix}/share' | |
92 | sysconfdir='${prefix}/etc' | |
93 | sharedstatedir='${prefix}/com' | |
94 | localstatedir='${prefix}/var' | |
95 | libdir='${exec_prefix}/lib' | |
96 | includedir='${prefix}/include' | |
97 | oldincludedir='/usr/include' | |
98 | infodir='${prefix}/info' | |
99 | mandir='${prefix}/man' | |
100 | ||
101 | # Initialize some other variables. | |
102 | subdirs= | |
103 | MFLAGS= MAKEFLAGS= | |
104 | SHELL=${CONFIG_SHELL-/bin/sh} | |
105 | # Maximum number of lines to put in a shell here document. | |
106 | ac_max_here_lines=12 | |
107 | ||
108 | ac_prev= | |
109 | for ac_option | |
110 | do | |
111 | ||
112 | # If the previous option needs an argument, assign it. | |
113 | if test -n "$ac_prev"; then | |
114 | eval "$ac_prev=\$ac_option" | |
115 | ac_prev= | |
116 | continue | |
117 | fi | |
118 | ||
119 | case "$ac_option" in | |
120 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
121 | *) ac_optarg= ;; | |
122 | esac | |
123 | ||
124 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
125 | ||
126 | case "$ac_option" in | |
127 | ||
128 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
129 | ac_prev=bindir ;; | |
130 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
131 | bindir="$ac_optarg" ;; | |
132 | ||
133 | -build | --build | --buil | --bui | --bu) | |
134 | ac_prev=build ;; | |
135 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
136 | build="$ac_optarg" ;; | |
137 | ||
138 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
139 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
140 | ac_prev=cache_file ;; | |
141 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
142 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
143 | cache_file="$ac_optarg" ;; | |
144 | ||
145 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
146 | ac_prev=datadir ;; | |
147 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
148 | | --da=*) | |
149 | datadir="$ac_optarg" ;; | |
150 | ||
151 | -disable-* | --disable-*) | |
152 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
153 | # Reject names that are not valid shell variable names. | |
154 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
155 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
156 | fi | |
157 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
158 | eval "enable_${ac_feature}=no" ;; | |
159 | ||
160 | -enable-* | --enable-*) | |
161 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
162 | # Reject names that are not valid shell variable names. | |
163 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
164 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
165 | fi | |
166 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
167 | case "$ac_option" in | |
168 | *=*) ;; | |
169 | *) ac_optarg=yes ;; | |
170 | esac | |
171 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
172 | ||
173 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
174 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
175 | | --exec | --exe | --ex) | |
176 | ac_prev=exec_prefix ;; | |
177 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
178 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
179 | | --exec=* | --exe=* | --ex=*) | |
180 | exec_prefix="$ac_optarg" ;; | |
181 | ||
182 | -gas | --gas | --ga | --g) | |
183 | # Obsolete; use --with-gas. | |
184 | with_gas=yes ;; | |
185 | ||
186 | -help | --help | --hel | --he) | |
187 | # Omit some internal or obsolete options to make the list less imposing. | |
188 | # This message is too long to be a string in the A/UX 3.1 sh. | |
189 | cat << EOF | |
190 | Usage: configure [options] [host] | |
191 | Options: [defaults in brackets after descriptions] | |
192 | Configuration: | |
193 | --cache-file=FILE cache test results in FILE | |
194 | --help print this message | |
195 | --no-create do not create output files | |
196 | --quiet, --silent do not print \`checking...' messages | |
d3e0a5bf | 197 | --site-file=FILE use FILE as the site file |
c906108c SS |
198 | --version print the version of autoconf that created configure |
199 | Directory and file names: | |
200 | --prefix=PREFIX install architecture-independent files in PREFIX | |
201 | [$ac_default_prefix] | |
202 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
203 | [same as prefix] | |
204 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
205 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
206 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
207 | --datadir=DIR read-only architecture-independent data in DIR | |
208 | [PREFIX/share] | |
209 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
210 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
211 | [PREFIX/com] | |
212 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
213 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
214 | --includedir=DIR C header files in DIR [PREFIX/include] | |
215 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
216 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
217 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
218 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
219 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
220 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
221 | --program-transform-name=PROGRAM | |
222 | run sed PROGRAM on installed program names | |
223 | EOF | |
224 | cat << EOF | |
225 | Host type: | |
226 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
227 | --host=HOST configure for HOST [guessed] | |
228 | --target=TARGET configure for TARGET [TARGET=HOST] | |
229 | Features and packages: | |
230 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
231 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
232 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
233 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
234 | --x-includes=DIR X include files are in DIR | |
235 | --x-libraries=DIR X library files are in DIR | |
236 | EOF | |
237 | if test -n "$ac_help"; then | |
238 | echo "--enable and --with options recognized:$ac_help" | |
239 | fi | |
240 | exit 0 ;; | |
241 | ||
242 | -host | --host | --hos | --ho) | |
243 | ac_prev=host ;; | |
244 | -host=* | --host=* | --hos=* | --ho=*) | |
245 | host="$ac_optarg" ;; | |
246 | ||
247 | -includedir | --includedir | --includedi | --included | --include \ | |
248 | | --includ | --inclu | --incl | --inc) | |
249 | ac_prev=includedir ;; | |
250 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
251 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
252 | includedir="$ac_optarg" ;; | |
253 | ||
254 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
255 | ac_prev=infodir ;; | |
256 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
257 | infodir="$ac_optarg" ;; | |
258 | ||
259 | -libdir | --libdir | --libdi | --libd) | |
260 | ac_prev=libdir ;; | |
261 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
262 | libdir="$ac_optarg" ;; | |
263 | ||
264 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
265 | | --libexe | --libex | --libe) | |
266 | ac_prev=libexecdir ;; | |
267 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
268 | | --libexe=* | --libex=* | --libe=*) | |
269 | libexecdir="$ac_optarg" ;; | |
270 | ||
271 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
272 | | --localstate | --localstat | --localsta | --localst \ | |
273 | | --locals | --local | --loca | --loc | --lo) | |
274 | ac_prev=localstatedir ;; | |
275 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
276 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
277 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
278 | localstatedir="$ac_optarg" ;; | |
279 | ||
280 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
281 | ac_prev=mandir ;; | |
282 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
283 | mandir="$ac_optarg" ;; | |
284 | ||
285 | -nfp | --nfp | --nf) | |
286 | # Obsolete; use --without-fp. | |
287 | with_fp=no ;; | |
288 | ||
289 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
290 | | --no-cr | --no-c) | |
291 | no_create=yes ;; | |
292 | ||
293 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
294 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
295 | no_recursion=yes ;; | |
296 | ||
297 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
298 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
299 | | --oldin | --oldi | --old | --ol | --o) | |
300 | ac_prev=oldincludedir ;; | |
301 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
302 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
303 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
304 | oldincludedir="$ac_optarg" ;; | |
305 | ||
306 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
307 | ac_prev=prefix ;; | |
308 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
309 | prefix="$ac_optarg" ;; | |
310 | ||
311 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
312 | | --program-pre | --program-pr | --program-p) | |
313 | ac_prev=program_prefix ;; | |
314 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
315 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
316 | program_prefix="$ac_optarg" ;; | |
317 | ||
318 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
319 | | --program-suf | --program-su | --program-s) | |
320 | ac_prev=program_suffix ;; | |
321 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
322 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
323 | program_suffix="$ac_optarg" ;; | |
324 | ||
325 | -program-transform-name | --program-transform-name \ | |
326 | | --program-transform-nam | --program-transform-na \ | |
327 | | --program-transform-n | --program-transform- \ | |
328 | | --program-transform | --program-transfor \ | |
329 | | --program-transfo | --program-transf \ | |
330 | | --program-trans | --program-tran \ | |
331 | | --progr-tra | --program-tr | --program-t) | |
332 | ac_prev=program_transform_name ;; | |
333 | -program-transform-name=* | --program-transform-name=* \ | |
334 | | --program-transform-nam=* | --program-transform-na=* \ | |
335 | | --program-transform-n=* | --program-transform-=* \ | |
336 | | --program-transform=* | --program-transfor=* \ | |
337 | | --program-transfo=* | --program-transf=* \ | |
338 | | --program-trans=* | --program-tran=* \ | |
339 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
340 | program_transform_name="$ac_optarg" ;; | |
341 | ||
342 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
343 | | -silent | --silent | --silen | --sile | --sil) | |
344 | silent=yes ;; | |
345 | ||
346 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
347 | ac_prev=sbindir ;; | |
348 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
349 | | --sbi=* | --sb=*) | |
350 | sbindir="$ac_optarg" ;; | |
351 | ||
352 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
353 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
354 | | --sharedst | --shareds | --shared | --share | --shar \ | |
355 | | --sha | --sh) | |
356 | ac_prev=sharedstatedir ;; | |
357 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
358 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
359 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
360 | | --sha=* | --sh=*) | |
361 | sharedstatedir="$ac_optarg" ;; | |
362 | ||
363 | -site | --site | --sit) | |
364 | ac_prev=site ;; | |
365 | -site=* | --site=* | --sit=*) | |
366 | site="$ac_optarg" ;; | |
367 | ||
d3e0a5bf MC |
368 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
369 | ac_prev=sitefile ;; | |
370 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
371 | sitefile="$ac_optarg" ;; | |
372 | ||
c906108c SS |
373 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
374 | ac_prev=srcdir ;; | |
375 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
376 | srcdir="$ac_optarg" ;; | |
377 | ||
378 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
379 | | --syscon | --sysco | --sysc | --sys | --sy) | |
380 | ac_prev=sysconfdir ;; | |
381 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
382 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
383 | sysconfdir="$ac_optarg" ;; | |
384 | ||
385 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
386 | ac_prev=target ;; | |
387 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
388 | target="$ac_optarg" ;; | |
389 | ||
390 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
391 | verbose=yes ;; | |
392 | ||
393 | -version | --version | --versio | --versi | --vers) | |
394 | echo "configure generated by autoconf version 2.13" | |
395 | exit 0 ;; | |
396 | ||
397 | -with-* | --with-*) | |
398 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
399 | # Reject names that are not valid shell variable names. | |
400 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
401 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
402 | fi | |
403 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
404 | case "$ac_option" in | |
405 | *=*) ;; | |
406 | *) ac_optarg=yes ;; | |
407 | esac | |
408 | eval "with_${ac_package}='$ac_optarg'" ;; | |
409 | ||
410 | -without-* | --without-*) | |
411 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
412 | # Reject names that are not valid shell variable names. | |
413 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
414 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
415 | fi | |
416 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
417 | eval "with_${ac_package}=no" ;; | |
418 | ||
419 | --x) | |
420 | # Obsolete; use --with-x. | |
421 | with_x=yes ;; | |
422 | ||
423 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
424 | | --x-incl | --x-inc | --x-in | --x-i) | |
425 | ac_prev=x_includes ;; | |
426 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
427 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
428 | x_includes="$ac_optarg" ;; | |
429 | ||
430 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
431 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
432 | ac_prev=x_libraries ;; | |
433 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
434 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
435 | x_libraries="$ac_optarg" ;; | |
436 | ||
437 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
438 | ;; | |
439 | ||
440 | *) | |
441 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
442 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
443 | fi | |
444 | if test "x$nonopt" != xNONE; then | |
445 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
446 | fi | |
447 | nonopt="$ac_option" | |
448 | ;; | |
449 | ||
450 | esac | |
451 | done | |
452 | ||
453 | if test -n "$ac_prev"; then | |
454 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
455 | fi | |
456 | ||
457 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
458 | ||
459 | # File descriptor usage: | |
460 | # 0 standard input | |
461 | # 1 file creation | |
462 | # 2 errors and warnings | |
463 | # 3 some systems may open it to /dev/tty | |
464 | # 4 used on the Kubota Titan | |
465 | # 6 checking for... messages and results | |
466 | # 5 compiler messages saved in config.log | |
467 | if test "$silent" = yes; then | |
468 | exec 6>/dev/null | |
469 | else | |
470 | exec 6>&1 | |
471 | fi | |
472 | exec 5>./config.log | |
473 | ||
474 | echo "\ | |
475 | This file contains any messages produced by compilers while | |
476 | running configure, to aid debugging if configure makes a mistake. | |
477 | " 1>&5 | |
478 | ||
479 | # Strip out --no-create and --no-recursion so they do not pile up. | |
480 | # Also quote any args containing shell metacharacters. | |
481 | ac_configure_args= | |
482 | for ac_arg | |
483 | do | |
484 | case "$ac_arg" in | |
485 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
486 | | --no-cr | --no-c) ;; | |
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
489 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
490 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
491 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
492 | esac | |
493 | done | |
494 | ||
495 | # NLS nuisances. | |
496 | # Only set these to C if already set. These must not be set unconditionally | |
497 | # because not all systems understand e.g. LANG=C (notably SCO). | |
498 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
499 | # Non-C LC_CTYPE values break the ctype check. | |
500 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
501 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
502 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
503 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
504 | ||
505 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
506 | rm -rf conftest* confdefs.h | |
507 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
508 | echo > confdefs.h | |
509 | ||
510 | # A filename unique to this package, relative to the directory that | |
511 | # configure is in, which we can look for to find out if srcdir is correct. | |
512 | ac_unique_file=main.c | |
513 | ||
514 | # Find the source files, if location was not specified. | |
515 | if test -z "$srcdir"; then | |
516 | ac_srcdir_defaulted=yes | |
517 | # Try the directory containing this script, then its parent. | |
518 | ac_prog=$0 | |
519 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
520 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
521 | srcdir=$ac_confdir | |
522 | if test ! -r $srcdir/$ac_unique_file; then | |
523 | srcdir=.. | |
524 | fi | |
525 | else | |
526 | ac_srcdir_defaulted=no | |
527 | fi | |
528 | if test ! -r $srcdir/$ac_unique_file; then | |
529 | if test "$ac_srcdir_defaulted" = yes; then | |
530 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
531 | else | |
532 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
533 | fi | |
534 | fi | |
535 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
536 | ||
537 | # Prefer explicitly selected file to automatically selected ones. | |
d3e0a5bf MC |
538 | if test -z "$sitefile"; then |
539 | if test -z "$CONFIG_SITE"; then | |
540 | if test "x$prefix" != xNONE; then | |
541 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
542 | else | |
543 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
544 | fi | |
c906108c | 545 | fi |
d3e0a5bf MC |
546 | else |
547 | CONFIG_SITE="$sitefile" | |
c906108c SS |
548 | fi |
549 | for ac_site_file in $CONFIG_SITE; do | |
550 | if test -r "$ac_site_file"; then | |
551 | echo "loading site script $ac_site_file" | |
552 | . "$ac_site_file" | |
553 | fi | |
554 | done | |
555 | ||
556 | if test -r "$cache_file"; then | |
557 | echo "loading cache $cache_file" | |
558 | . $cache_file | |
559 | else | |
560 | echo "creating cache $cache_file" | |
561 | > $cache_file | |
562 | fi | |
563 | ||
564 | ac_ext=c | |
565 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
566 | ac_cpp='$CPP $CPPFLAGS' | |
567 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
568 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
569 | cross_compiling=$ac_cv_prog_cc_cross | |
570 | ||
571 | ac_exeext= | |
572 | ac_objext=o | |
573 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
574 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
575 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
576 | ac_n= ac_c=' | |
577 | ' ac_t=' ' | |
578 | else | |
579 | ac_n=-n ac_c= ac_t= | |
580 | fi | |
581 | else | |
582 | ac_n= ac_c='\c' ac_t= | |
583 | fi | |
584 | ||
585 | ||
586 | ||
413ccac7 | 587 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
d3e0a5bf | 588 | echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
590 | if test "${enable_maintainer_mode+set}" = set; then | |
591 | enableval="$enable_maintainer_mode" | |
592 | USE_MAINTAINER_MODE=$enableval | |
593 | else | |
594 | USE_MAINTAINER_MODE=no | |
595 | fi | |
596 | ||
597 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
598 | ||
599 | ||
600 | if test $USE_MAINTAINER_MODE = yes; then | |
601 | MAINTAINER_MODE_TRUE= | |
602 | MAINTAINER_MODE_FALSE='#' | |
603 | else | |
604 | MAINTAINER_MODE_TRUE='#' | |
605 | MAINTAINER_MODE_FALSE= | |
606 | fi | |
607 | MAINT=$MAINTAINER_MODE_TRUE | |
608 | ||
609 | ||
c906108c SS |
610 | |
611 | # Extract the first word of "gcc", so it can be a program name with args. | |
612 | set dummy gcc; ac_word=$2 | |
613 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 614 | echo "configure:615: checking for $ac_word" >&5 |
c906108c SS |
615 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
617 | else | |
618 | if test -n "$CC"; then | |
619 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
620 | else | |
621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
622 | ac_dummy="$PATH" | |
623 | for ac_dir in $ac_dummy; do | |
624 | test -z "$ac_dir" && ac_dir=. | |
625 | if test -f $ac_dir/$ac_word; then | |
626 | ac_cv_prog_CC="gcc" | |
627 | break | |
628 | fi | |
629 | done | |
630 | IFS="$ac_save_ifs" | |
631 | fi | |
632 | fi | |
633 | CC="$ac_cv_prog_CC" | |
634 | if test -n "$CC"; then | |
635 | echo "$ac_t""$CC" 1>&6 | |
636 | else | |
637 | echo "$ac_t""no" 1>&6 | |
638 | fi | |
639 | ||
640 | if test -z "$CC"; then | |
641 | # Extract the first word of "cc", so it can be a program name with args. | |
642 | set dummy cc; ac_word=$2 | |
643 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 644 | echo "configure:645: checking for $ac_word" >&5 |
c906108c SS |
645 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
647 | else | |
648 | if test -n "$CC"; then | |
649 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
650 | else | |
651 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
652 | ac_prog_rejected=no | |
653 | ac_dummy="$PATH" | |
654 | for ac_dir in $ac_dummy; do | |
655 | test -z "$ac_dir" && ac_dir=. | |
656 | if test -f $ac_dir/$ac_word; then | |
657 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
658 | ac_prog_rejected=yes | |
659 | continue | |
660 | fi | |
661 | ac_cv_prog_CC="cc" | |
662 | break | |
663 | fi | |
664 | done | |
665 | IFS="$ac_save_ifs" | |
666 | if test $ac_prog_rejected = yes; then | |
667 | # We found a bogon in the path, so make sure we never use it. | |
668 | set dummy $ac_cv_prog_CC | |
669 | shift | |
670 | if test $# -gt 0; then | |
671 | # We chose a different compiler from the bogus one. | |
672 | # However, it has the same basename, so the bogon will be chosen | |
673 | # first if we set CC to just the basename; use the full file name. | |
674 | shift | |
675 | set dummy "$ac_dir/$ac_word" "$@" | |
676 | shift | |
677 | ac_cv_prog_CC="$@" | |
678 | fi | |
679 | fi | |
680 | fi | |
681 | fi | |
682 | CC="$ac_cv_prog_CC" | |
683 | if test -n "$CC"; then | |
684 | echo "$ac_t""$CC" 1>&6 | |
685 | else | |
686 | echo "$ac_t""no" 1>&6 | |
687 | fi | |
688 | ||
689 | if test -z "$CC"; then | |
690 | case "`uname -s`" in | |
691 | *win32* | *WIN32*) | |
692 | # Extract the first word of "cl", so it can be a program name with args. | |
693 | set dummy cl; ac_word=$2 | |
694 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 695 | echo "configure:696: checking for $ac_word" >&5 |
c906108c SS |
696 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
698 | else | |
699 | if test -n "$CC"; then | |
700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
701 | else | |
702 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
703 | ac_dummy="$PATH" | |
704 | for ac_dir in $ac_dummy; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="cl" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | fi | |
713 | fi | |
714 | CC="$ac_cv_prog_CC" | |
715 | if test -n "$CC"; then | |
716 | echo "$ac_t""$CC" 1>&6 | |
717 | else | |
718 | echo "$ac_t""no" 1>&6 | |
719 | fi | |
720 | ;; | |
721 | esac | |
722 | fi | |
723 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
724 | fi | |
725 | ||
726 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
d3e0a5bf | 727 | echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
728 | |
729 | ac_ext=c | |
730 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
731 | ac_cpp='$CPP $CPPFLAGS' | |
732 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
733 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
734 | cross_compiling=$ac_cv_prog_cc_cross | |
735 | ||
736 | cat > conftest.$ac_ext << EOF | |
737 | ||
d3e0a5bf | 738 | #line 739 "configure" |
c906108c SS |
739 | #include "confdefs.h" |
740 | ||
741 | main(){return(0);} | |
742 | EOF | |
d3e0a5bf | 743 | if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
744 | ac_cv_prog_cc_works=yes |
745 | # If we can't run a trivial program, we are probably using a cross compiler. | |
746 | if (./conftest; exit) 2>/dev/null; then | |
747 | ac_cv_prog_cc_cross=no | |
748 | else | |
749 | ac_cv_prog_cc_cross=yes | |
750 | fi | |
751 | else | |
752 | echo "configure: failed program was:" >&5 | |
753 | cat conftest.$ac_ext >&5 | |
754 | ac_cv_prog_cc_works=no | |
755 | fi | |
756 | rm -fr conftest* | |
757 | ac_ext=c | |
758 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
759 | ac_cpp='$CPP $CPPFLAGS' | |
760 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
761 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
762 | cross_compiling=$ac_cv_prog_cc_cross | |
763 | ||
764 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
765 | if test $ac_cv_prog_cc_works = no; then | |
766 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
767 | fi | |
768 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
d3e0a5bf | 769 | echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
770 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
771 | cross_compiling=$ac_cv_prog_cc_cross | |
772 | ||
773 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
d3e0a5bf | 774 | echo "configure:775: checking whether we are using GNU C" >&5 |
c906108c SS |
775 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
777 | else | |
778 | cat > conftest.c <<EOF | |
779 | #ifdef __GNUC__ | |
780 | yes; | |
781 | #endif | |
782 | EOF | |
d3e0a5bf | 783 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
784 | ac_cv_prog_gcc=yes |
785 | else | |
786 | ac_cv_prog_gcc=no | |
787 | fi | |
788 | fi | |
789 | ||
790 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
791 | ||
792 | if test $ac_cv_prog_gcc = yes; then | |
793 | GCC=yes | |
794 | else | |
795 | GCC= | |
796 | fi | |
797 | ||
798 | ac_test_CFLAGS="${CFLAGS+set}" | |
799 | ac_save_CFLAGS="$CFLAGS" | |
800 | CFLAGS= | |
801 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
d3e0a5bf | 802 | echo "configure:803: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
803 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | echo 'void f(){}' > conftest.c | |
807 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
808 | ac_cv_prog_cc_g=yes | |
809 | else | |
810 | ac_cv_prog_cc_g=no | |
811 | fi | |
812 | rm -f conftest* | |
813 | ||
814 | fi | |
815 | ||
816 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
817 | if test "$ac_test_CFLAGS" = set; then | |
818 | CFLAGS="$ac_save_CFLAGS" | |
819 | elif test $ac_cv_prog_cc_g = yes; then | |
820 | if test "$GCC" = yes; then | |
821 | CFLAGS="-g -O2" | |
822 | else | |
823 | CFLAGS="-g" | |
824 | fi | |
825 | else | |
826 | if test "$GCC" = yes; then | |
827 | CFLAGS="-O2" | |
828 | else | |
829 | CFLAGS= | |
830 | fi | |
831 | fi | |
832 | ||
14abd0fb MK |
833 | cat >> confdefs.h <<\EOF |
834 | #define _GNU_SOURCE 1 | |
835 | EOF | |
836 | ||
837 | ||
c906108c | 838 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
d3e0a5bf | 839 | echo "configure:840: checking how to run the C preprocessor" >&5 |
c906108c SS |
840 | # On Suns, sometimes $CPP names a directory. |
841 | if test -n "$CPP" && test -d "$CPP"; then | |
842 | CPP= | |
843 | fi | |
844 | if test -z "$CPP"; then | |
845 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
847 | else | |
848 | # This must be in double quotes, not single quotes, because CPP may get | |
849 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
850 | CPP="${CC-cc} -E" | |
851 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
852 | # not just through cpp. | |
853 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 854 | #line 855 "configure" |
c906108c SS |
855 | #include "confdefs.h" |
856 | #include <assert.h> | |
857 | Syntax Error | |
858 | EOF | |
859 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 860 | { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
861 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
862 | if test -z "$ac_err"; then | |
863 | : | |
864 | else | |
865 | echo "$ac_err" >&5 | |
866 | echo "configure: failed program was:" >&5 | |
867 | cat conftest.$ac_ext >&5 | |
868 | rm -rf conftest* | |
869 | CPP="${CC-cc} -E -traditional-cpp" | |
870 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 871 | #line 872 "configure" |
c906108c SS |
872 | #include "confdefs.h" |
873 | #include <assert.h> | |
874 | Syntax Error | |
875 | EOF | |
876 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 877 | { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
878 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
879 | if test -z "$ac_err"; then | |
880 | : | |
881 | else | |
882 | echo "$ac_err" >&5 | |
883 | echo "configure: failed program was:" >&5 | |
884 | cat conftest.$ac_ext >&5 | |
885 | rm -rf conftest* | |
886 | CPP="${CC-cc} -nologo -E" | |
887 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 888 | #line 889 "configure" |
c906108c SS |
889 | #include "confdefs.h" |
890 | #include <assert.h> | |
891 | Syntax Error | |
892 | EOF | |
893 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 894 | { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
895 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
896 | if test -z "$ac_err"; then | |
897 | : | |
898 | else | |
899 | echo "$ac_err" >&5 | |
900 | echo "configure: failed program was:" >&5 | |
901 | cat conftest.$ac_ext >&5 | |
902 | rm -rf conftest* | |
903 | CPP=/lib/cpp | |
904 | fi | |
905 | rm -f conftest* | |
906 | fi | |
907 | rm -f conftest* | |
908 | fi | |
909 | rm -f conftest* | |
910 | ac_cv_prog_CPP="$CPP" | |
911 | fi | |
912 | CPP="$ac_cv_prog_CPP" | |
913 | else | |
914 | ac_cv_prog_CPP="$CPP" | |
915 | fi | |
916 | echo "$ac_t""$CPP" 1>&6 | |
917 | ||
918 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
d3e0a5bf | 919 | echo "configure:920: checking for AIX" >&5 |
c906108c | 920 | cat > conftest.$ac_ext <<EOF |
d3e0a5bf | 921 | #line 922 "configure" |
c906108c SS |
922 | #include "confdefs.h" |
923 | #ifdef _AIX | |
924 | yes | |
925 | #endif | |
926 | ||
927 | EOF | |
928 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
929 | egrep "yes" >/dev/null 2>&1; then | |
930 | rm -rf conftest* | |
931 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
932 | #define _ALL_SOURCE 1 | |
933 | EOF | |
934 | ||
935 | else | |
936 | rm -rf conftest* | |
937 | echo "$ac_t""no" 1>&6 | |
938 | fi | |
939 | rm -f conftest* | |
940 | ||
941 | ||
56157b4a | 942 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
d3e0a5bf | 943 | echo "configure:944: checking for POSIXized ISC" >&5 |
56157b4a AC |
944 | if test -d /etc/conf/kconfig.d && |
945 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
946 | then | |
947 | echo "$ac_t""yes" 1>&6 | |
948 | ISC=yes # If later tests want to check for ISC. | |
949 | cat >> confdefs.h <<\EOF | |
950 | #define _POSIX_SOURCE 1 | |
c906108c SS |
951 | EOF |
952 | ||
56157b4a AC |
953 | if test "$GCC" = yes; then |
954 | CC="$CC -posix" | |
955 | else | |
956 | CC="$CC -Xp" | |
957 | fi | |
c906108c SS |
958 | else |
959 | echo "$ac_t""no" 1>&6 | |
56157b4a | 960 | ISC= |
c906108c SS |
961 | fi |
962 | ||
963 | ||
964 | ||
965 | ||
966 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
d3e0a5bf | 967 | echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
968 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
969 | echo $ac_n "(cached) $ac_c" 1>&6 | |
970 | else | |
971 | am_cv_prog_cc_stdc=no | |
972 | ac_save_CC="$CC" | |
973 | # Don't try gcc -ansi; that turns off useful extensions and | |
974 | # breaks some systems' header files. | |
975 | # AIX -qlanglvl=ansi | |
976 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
977 | # HP-UX 10.20 and later -Ae |
978 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 979 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 980 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
981 | do |
982 | CC="$ac_save_CC $ac_arg" | |
983 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 984 | #line 985 "configure" |
c906108c SS |
985 | #include "confdefs.h" |
986 | #include <stdarg.h> | |
987 | #include <stdio.h> | |
988 | #include <sys/types.h> | |
989 | #include <sys/stat.h> | |
990 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
991 | struct buf { int x; }; | |
992 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
993 | static char *e (p, i) | |
994 | char **p; | |
995 | int i; | |
996 | { | |
997 | return p[i]; | |
998 | } | |
999 | static char *f (char * (*g) (char **, int), char **p, ...) | |
1000 | { | |
1001 | char *s; | |
1002 | va_list v; | |
1003 | va_start (v,p); | |
1004 | s = g (p, va_arg (v,int)); | |
1005 | va_end (v); | |
1006 | return s; | |
1007 | } | |
1008 | int test (int i, double x); | |
1009 | struct s1 {int (*f) (int a);}; | |
1010 | struct s2 {int (*f) (double a);}; | |
1011 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1012 | int argc; | |
1013 | char **argv; | |
1014 | ||
1015 | int main() { | |
1016 | ||
1017 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1018 | ||
1019 | ; return 0; } | |
1020 | EOF | |
d3e0a5bf | 1021 | if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1022 | rm -rf conftest* |
1023 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1024 | else | |
1025 | echo "configure: failed program was:" >&5 | |
1026 | cat conftest.$ac_ext >&5 | |
1027 | fi | |
1028 | rm -f conftest* | |
1029 | done | |
1030 | CC="$ac_save_CC" | |
1031 | ||
1032 | fi | |
1033 | ||
1034 | if test -z "$am_cv_prog_cc_stdc"; then | |
1035 | echo "$ac_t""none needed" 1>&6 | |
1036 | else | |
1037 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1038 | fi | |
1039 | case "x$am_cv_prog_cc_stdc" in | |
1040 | x|xno) ;; | |
1041 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1042 | esac | |
1043 | ||
1044 | ||
1045 | ac_aux_dir= | |
1046 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1047 | if 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 | elif test -f $ac_dir/install.sh; then | |
1052 | ac_aux_dir=$ac_dir | |
1053 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1054 | break | |
1055 | fi | |
1056 | done | |
1057 | if test -z "$ac_aux_dir"; then | |
1058 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1059 | fi | |
1060 | ac_config_guess=$ac_aux_dir/config.guess | |
1061 | ac_config_sub=$ac_aux_dir/config.sub | |
1062 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1063 | ||
1064 | ||
1065 | # Do some error checking and defaulting for the host and target type. | |
1066 | # The inputs are: | |
1067 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1068 | # | |
1069 | # The rules are: | |
1070 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1071 | # same time. | |
1072 | # 2. Host defaults to nonopt. | |
1073 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1074 | # as determined by config.guess. | |
1075 | # 4. Target and build default to nonopt. | |
1076 | # 5. If nonopt is not specified, then target and build default to host. | |
1077 | ||
1078 | # The aliases save the names the user supplied, while $host etc. | |
1079 | # will get canonicalized. | |
1080 | case $host---$target---$nonopt in | |
1081 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1082 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1083 | esac | |
1084 | ||
1085 | ||
1086 | # Make sure we can run config.sub. | |
1087 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1088 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1089 | fi | |
1090 | ||
1091 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
d3e0a5bf | 1092 | echo "configure:1093: checking host system type" >&5 |
c906108c SS |
1093 | |
1094 | host_alias=$host | |
1095 | case "$host_alias" in | |
1096 | NONE) | |
1097 | case $nonopt in | |
1098 | NONE) | |
1099 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1100 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1101 | fi ;; | |
1102 | *) host_alias=$nonopt ;; | |
1103 | esac ;; | |
1104 | esac | |
1105 | ||
1106 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1107 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1108 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1109 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1110 | echo "$ac_t""$host" 1>&6 | |
1111 | ||
1112 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
d3e0a5bf | 1113 | echo "configure:1114: checking target system type" >&5 |
c906108c SS |
1114 | |
1115 | target_alias=$target | |
1116 | case "$target_alias" in | |
1117 | NONE) | |
1118 | case $nonopt in | |
1119 | NONE) target_alias=$host_alias ;; | |
1120 | *) target_alias=$nonopt ;; | |
1121 | esac ;; | |
1122 | esac | |
1123 | ||
1124 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1125 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1126 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1127 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1128 | echo "$ac_t""$target" 1>&6 | |
1129 | ||
1130 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
d3e0a5bf | 1131 | echo "configure:1132: checking build system type" >&5 |
c906108c SS |
1132 | |
1133 | build_alias=$build | |
1134 | case "$build_alias" in | |
1135 | NONE) | |
1136 | case $nonopt in | |
1137 | NONE) build_alias=$host_alias ;; | |
1138 | *) build_alias=$nonopt ;; | |
1139 | esac ;; | |
1140 | esac | |
1141 | ||
1142 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1143 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1144 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1145 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1146 | echo "$ac_t""$build" 1>&6 | |
1147 | ||
1148 | test "$host_alias" != "$target_alias" && | |
1149 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1150 | NONENONEs,x,x, && | |
1151 | program_prefix=${target_alias}- | |
1152 | ||
1153 | ||
8bb2c122 MK |
1154 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1155 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1156 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1157 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
f6e85fc8 | 1158 | # AC_PROG_RANLIB. This can be removed when we switch to Autoconf |
8bb2c122 MK |
1159 | # 2.5x. |
1160 | if test $host != $build; then | |
1161 | ac_tool_prefix=${host_alias}- | |
1162 | else | |
1163 | ac_tool_prefix= | |
1164 | fi | |
1165 | ||
1166 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1167 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1168 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 1169 | echo "configure:1170: checking for $ac_word" >&5 |
8bb2c122 MK |
1170 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | if test -n "$RANLIB"; then | |
1174 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1175 | else | |
1176 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1177 | ac_dummy="$PATH" | |
1178 | for ac_dir in $ac_dummy; do | |
1179 | test -z "$ac_dir" && ac_dir=. | |
1180 | if test -f $ac_dir/$ac_word; then | |
1181 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1182 | break | |
1183 | fi | |
1184 | done | |
1185 | IFS="$ac_save_ifs" | |
1186 | fi | |
1187 | fi | |
1188 | RANLIB="$ac_cv_prog_RANLIB" | |
1189 | if test -n "$RANLIB"; then | |
1190 | echo "$ac_t""$RANLIB" 1>&6 | |
1191 | else | |
1192 | echo "$ac_t""no" 1>&6 | |
1193 | fi | |
1194 | ||
1195 | ||
1196 | if test -z "$ac_cv_prog_RANLIB"; then | |
1197 | if test -n "$ac_tool_prefix"; then | |
1198 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1199 | set dummy ranlib; ac_word=$2 | |
1200 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 1201 | echo "configure:1202: checking for $ac_word" >&5 |
8bb2c122 MK |
1202 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1204 | else | |
1205 | if test -n "$RANLIB"; then | |
1206 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1207 | else | |
1208 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1209 | ac_dummy="$PATH" | |
1210 | for ac_dir in $ac_dummy; do | |
1211 | test -z "$ac_dir" && ac_dir=. | |
1212 | if test -f $ac_dir/$ac_word; then | |
1213 | ac_cv_prog_RANLIB="ranlib" | |
1214 | break | |
1215 | fi | |
1216 | done | |
1217 | IFS="$ac_save_ifs" | |
1218 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1219 | fi | |
1220 | fi | |
1221 | RANLIB="$ac_cv_prog_RANLIB" | |
1222 | if test -n "$RANLIB"; then | |
1223 | echo "$ac_t""$RANLIB" 1>&6 | |
1224 | else | |
1225 | echo "$ac_t""no" 1>&6 | |
1226 | fi | |
1227 | ||
1228 | else | |
1229 | RANLIB=":" | |
1230 | fi | |
1231 | fi | |
1232 | ||
1233 | ||
c906108c SS |
1234 | ALL_LINGUAS= |
1235 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
d3e0a5bf | 1236 | echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1237 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1238 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1240 | else | |
1241 | cat > conftestmake <<\EOF | |
1242 | all: | |
1243 | @echo 'ac_maketemp="${MAKE}"' | |
1244 | EOF | |
1245 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1246 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1247 | if test -n "$ac_maketemp"; then | |
1248 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1249 | else | |
1250 | eval ac_cv_prog_make_${ac_make}_set=no | |
1251 | fi | |
1252 | rm -f conftestmake | |
1253 | fi | |
1254 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1255 | echo "$ac_t""yes" 1>&6 | |
1256 | SET_MAKE= | |
1257 | else | |
1258 | echo "$ac_t""no" 1>&6 | |
1259 | SET_MAKE="MAKE=${MAKE-make}" | |
1260 | fi | |
1261 | ||
1262 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1263 | set dummy ranlib; ac_word=$2 | |
1264 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 1265 | echo "configure:1266: checking for $ac_word" >&5 |
c906108c SS |
1266 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | if test -n "$RANLIB"; then | |
1270 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1271 | else | |
1272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1273 | ac_dummy="$PATH" | |
1274 | for ac_dir in $ac_dummy; do | |
1275 | test -z "$ac_dir" && ac_dir=. | |
1276 | if test -f $ac_dir/$ac_word; then | |
1277 | ac_cv_prog_RANLIB="ranlib" | |
1278 | break | |
1279 | fi | |
1280 | done | |
1281 | IFS="$ac_save_ifs" | |
1282 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1283 | fi | |
1284 | fi | |
1285 | RANLIB="$ac_cv_prog_RANLIB" | |
1286 | if test -n "$RANLIB"; then | |
1287 | echo "$ac_t""$RANLIB" 1>&6 | |
1288 | else | |
1289 | echo "$ac_t""no" 1>&6 | |
1290 | fi | |
1291 | ||
1292 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
d3e0a5bf | 1293 | echo "configure:1294: checking for ANSI C header files" >&5 |
c906108c SS |
1294 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1296 | else | |
1297 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1298 | #line 1299 "configure" |
c906108c SS |
1299 | #include "confdefs.h" |
1300 | #include <stdlib.h> | |
1301 | #include <stdarg.h> | |
1302 | #include <string.h> | |
1303 | #include <float.h> | |
1304 | EOF | |
1305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 1306 | { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1307 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1308 | if test -z "$ac_err"; then | |
1309 | rm -rf conftest* | |
1310 | ac_cv_header_stdc=yes | |
1311 | else | |
1312 | echo "$ac_err" >&5 | |
1313 | echo "configure: failed program was:" >&5 | |
1314 | cat conftest.$ac_ext >&5 | |
1315 | rm -rf conftest* | |
1316 | ac_cv_header_stdc=no | |
1317 | fi | |
1318 | rm -f conftest* | |
1319 | ||
1320 | if test $ac_cv_header_stdc = yes; then | |
1321 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1322 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1323 | #line 1324 "configure" |
c906108c SS |
1324 | #include "confdefs.h" |
1325 | #include <string.h> | |
1326 | EOF | |
1327 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1328 | egrep "memchr" >/dev/null 2>&1; then | |
1329 | : | |
1330 | else | |
1331 | rm -rf conftest* | |
1332 | ac_cv_header_stdc=no | |
1333 | fi | |
1334 | rm -f conftest* | |
1335 | ||
1336 | fi | |
1337 | ||
1338 | if test $ac_cv_header_stdc = yes; then | |
1339 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1340 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1341 | #line 1342 "configure" |
c906108c SS |
1342 | #include "confdefs.h" |
1343 | #include <stdlib.h> | |
1344 | EOF | |
1345 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1346 | egrep "free" >/dev/null 2>&1; then | |
1347 | : | |
1348 | else | |
1349 | rm -rf conftest* | |
1350 | ac_cv_header_stdc=no | |
1351 | fi | |
1352 | rm -f conftest* | |
1353 | ||
1354 | fi | |
1355 | ||
1356 | if test $ac_cv_header_stdc = yes; then | |
1357 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1358 | if test "$cross_compiling" = yes; then | |
1359 | : | |
1360 | else | |
1361 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1362 | #line 1363 "configure" |
c906108c SS |
1363 | #include "confdefs.h" |
1364 | #include <ctype.h> | |
1365 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1366 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1367 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1368 | int main () { int i; for (i = 0; i < 256; i++) | |
1369 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1370 | exit (0); } | |
1371 | ||
1372 | EOF | |
d3e0a5bf | 1373 | if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1374 | then |
1375 | : | |
1376 | else | |
1377 | echo "configure: failed program was:" >&5 | |
1378 | cat conftest.$ac_ext >&5 | |
1379 | rm -fr conftest* | |
1380 | ac_cv_header_stdc=no | |
1381 | fi | |
1382 | rm -fr conftest* | |
1383 | fi | |
1384 | ||
1385 | fi | |
1386 | fi | |
1387 | ||
1388 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1389 | if test $ac_cv_header_stdc = yes; then | |
1390 | cat >> confdefs.h <<\EOF | |
1391 | #define STDC_HEADERS 1 | |
1392 | EOF | |
1393 | ||
1394 | fi | |
1395 | ||
1396 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
d3e0a5bf | 1397 | echo "configure:1398: checking for working const" >&5 |
c906108c SS |
1398 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1399 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1400 | else | |
1401 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1402 | #line 1403 "configure" |
c906108c SS |
1403 | #include "confdefs.h" |
1404 | ||
1405 | int main() { | |
1406 | ||
1407 | /* Ultrix mips cc rejects this. */ | |
1408 | typedef int charset[2]; const charset x; | |
1409 | /* SunOS 4.1.1 cc rejects this. */ | |
1410 | char const *const *ccp; | |
1411 | char **p; | |
1412 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1413 | struct point {int x, y;}; | |
1414 | static struct point const zero = {0,0}; | |
1415 | /* AIX XL C 1.02.0.0 rejects this. | |
1416 | It does not let you subtract one const X* pointer from another in an arm | |
1417 | of an if-expression whose if-part is not a constant expression */ | |
1418 | const char *g = "string"; | |
1419 | ccp = &g + (g ? g-g : 0); | |
1420 | /* HPUX 7.0 cc rejects these. */ | |
1421 | ++ccp; | |
1422 | p = (char**) ccp; | |
1423 | ccp = (char const *const *) p; | |
1424 | { /* SCO 3.2v4 cc rejects this. */ | |
1425 | char *t; | |
1426 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1427 | ||
1428 | *t++ = 0; | |
1429 | } | |
1430 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1431 | int x[] = {25, 17}; | |
1432 | const int *foo = &x[0]; | |
1433 | ++foo; | |
1434 | } | |
1435 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1436 | typedef const int *iptr; | |
1437 | iptr p = 0; | |
1438 | ++p; | |
1439 | } | |
1440 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1441 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1442 | struct s { int j; const int *ap[3]; }; | |
1443 | struct s *b; b->j = 5; | |
1444 | } | |
1445 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1446 | const int foo = 10; | |
1447 | } | |
1448 | ||
1449 | ; return 0; } | |
1450 | EOF | |
d3e0a5bf | 1451 | if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1452 | rm -rf conftest* |
1453 | ac_cv_c_const=yes | |
1454 | else | |
1455 | echo "configure: failed program was:" >&5 | |
1456 | cat conftest.$ac_ext >&5 | |
1457 | rm -rf conftest* | |
1458 | ac_cv_c_const=no | |
1459 | fi | |
1460 | rm -f conftest* | |
1461 | fi | |
1462 | ||
1463 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1464 | if test $ac_cv_c_const = no; then | |
1465 | cat >> confdefs.h <<\EOF | |
1466 | #define const | |
1467 | EOF | |
1468 | ||
1469 | fi | |
1470 | ||
1471 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
d3e0a5bf | 1472 | echo "configure:1473: checking for inline" >&5 |
c906108c SS |
1473 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | ac_cv_c_inline=no | |
1477 | for ac_kw in inline __inline__ __inline; do | |
1478 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1479 | #line 1480 "configure" |
c906108c SS |
1480 | #include "confdefs.h" |
1481 | ||
1482 | int main() { | |
1483 | } $ac_kw foo() { | |
1484 | ; return 0; } | |
1485 | EOF | |
d3e0a5bf | 1486 | if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1487 | rm -rf conftest* |
1488 | ac_cv_c_inline=$ac_kw; break | |
1489 | else | |
1490 | echo "configure: failed program was:" >&5 | |
1491 | cat conftest.$ac_ext >&5 | |
1492 | fi | |
1493 | rm -f conftest* | |
1494 | done | |
1495 | ||
1496 | fi | |
1497 | ||
1498 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1499 | case "$ac_cv_c_inline" in | |
1500 | inline | yes) ;; | |
1501 | no) cat >> confdefs.h <<\EOF | |
1502 | #define inline | |
1503 | EOF | |
1504 | ;; | |
1505 | *) cat >> confdefs.h <<EOF | |
1506 | #define inline $ac_cv_c_inline | |
1507 | EOF | |
1508 | ;; | |
1509 | esac | |
1510 | ||
1511 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
d3e0a5bf | 1512 | echo "configure:1513: checking for off_t" >&5 |
c906108c SS |
1513 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1515 | else | |
1516 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1517 | #line 1518 "configure" |
c906108c SS |
1518 | #include "confdefs.h" |
1519 | #include <sys/types.h> | |
1520 | #if STDC_HEADERS | |
1521 | #include <stdlib.h> | |
1522 | #include <stddef.h> | |
1523 | #endif | |
1524 | EOF | |
1525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1526 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1527 | rm -rf conftest* | |
1528 | ac_cv_type_off_t=yes | |
1529 | else | |
1530 | rm -rf conftest* | |
1531 | ac_cv_type_off_t=no | |
1532 | fi | |
1533 | rm -f conftest* | |
1534 | ||
1535 | fi | |
1536 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1537 | if test $ac_cv_type_off_t = no; then | |
1538 | cat >> confdefs.h <<\EOF | |
1539 | #define off_t long | |
1540 | EOF | |
1541 | ||
1542 | fi | |
1543 | ||
1544 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
d3e0a5bf | 1545 | echo "configure:1546: checking for size_t" >&5 |
c906108c SS |
1546 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1548 | else | |
1549 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1550 | #line 1551 "configure" |
c906108c SS |
1551 | #include "confdefs.h" |
1552 | #include <sys/types.h> | |
1553 | #if STDC_HEADERS | |
1554 | #include <stdlib.h> | |
1555 | #include <stddef.h> | |
1556 | #endif | |
1557 | EOF | |
1558 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1559 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1560 | rm -rf conftest* | |
1561 | ac_cv_type_size_t=yes | |
1562 | else | |
1563 | rm -rf conftest* | |
1564 | ac_cv_type_size_t=no | |
1565 | fi | |
1566 | rm -f conftest* | |
1567 | ||
1568 | fi | |
1569 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1570 | if test $ac_cv_type_size_t = no; then | |
1571 | cat >> confdefs.h <<\EOF | |
1572 | #define size_t unsigned | |
1573 | EOF | |
1574 | ||
1575 | fi | |
1576 | ||
1577 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1578 | # for constant arguments. Useless! | |
1579 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
d3e0a5bf | 1580 | echo "configure:1581: checking for working alloca.h" >&5 |
c906108c SS |
1581 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1583 | else | |
1584 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1585 | #line 1586 "configure" |
c906108c SS |
1586 | #include "confdefs.h" |
1587 | #include <alloca.h> | |
1588 | int main() { | |
1589 | char *p = alloca(2 * sizeof(int)); | |
1590 | ; return 0; } | |
1591 | EOF | |
d3e0a5bf | 1592 | if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1593 | rm -rf conftest* |
1594 | ac_cv_header_alloca_h=yes | |
1595 | else | |
1596 | echo "configure: failed program was:" >&5 | |
1597 | cat conftest.$ac_ext >&5 | |
1598 | rm -rf conftest* | |
1599 | ac_cv_header_alloca_h=no | |
1600 | fi | |
1601 | rm -f conftest* | |
1602 | fi | |
1603 | ||
1604 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1605 | if test $ac_cv_header_alloca_h = yes; then | |
1606 | cat >> confdefs.h <<\EOF | |
1607 | #define HAVE_ALLOCA_H 1 | |
1608 | EOF | |
1609 | ||
1610 | fi | |
1611 | ||
1612 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
d3e0a5bf | 1613 | echo "configure:1614: checking for alloca" >&5 |
c906108c SS |
1614 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1616 | else | |
1617 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1618 | #line 1619 "configure" |
c906108c SS |
1619 | #include "confdefs.h" |
1620 | ||
1621 | #ifdef __GNUC__ | |
1622 | # define alloca __builtin_alloca | |
1623 | #else | |
1624 | # ifdef _MSC_VER | |
1625 | # include <malloc.h> | |
1626 | # define alloca _alloca | |
1627 | # else | |
1628 | # if HAVE_ALLOCA_H | |
1629 | # include <alloca.h> | |
1630 | # else | |
1631 | # ifdef _AIX | |
1632 | #pragma alloca | |
1633 | # else | |
1634 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1635 | char *alloca (); | |
1636 | # endif | |
1637 | # endif | |
1638 | # endif | |
1639 | # endif | |
1640 | #endif | |
1641 | ||
1642 | int main() { | |
1643 | char *p = (char *) alloca(1); | |
1644 | ; return 0; } | |
1645 | EOF | |
d3e0a5bf | 1646 | if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1647 | rm -rf conftest* |
1648 | ac_cv_func_alloca_works=yes | |
1649 | else | |
1650 | echo "configure: failed program was:" >&5 | |
1651 | cat conftest.$ac_ext >&5 | |
1652 | rm -rf conftest* | |
1653 | ac_cv_func_alloca_works=no | |
1654 | fi | |
1655 | rm -f conftest* | |
1656 | fi | |
1657 | ||
1658 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1659 | if test $ac_cv_func_alloca_works = yes; then | |
1660 | cat >> confdefs.h <<\EOF | |
1661 | #define HAVE_ALLOCA 1 | |
1662 | EOF | |
1663 | ||
1664 | fi | |
1665 | ||
1666 | if test $ac_cv_func_alloca_works = no; then | |
1667 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1668 | # that cause trouble. Some versions do not even contain alloca or | |
1669 | # contain a buggy version. If you still want to use their alloca, | |
1670 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1671 | ALLOCA=alloca.${ac_objext} | |
1672 | cat >> confdefs.h <<\EOF | |
1673 | #define C_ALLOCA 1 | |
1674 | EOF | |
1675 | ||
1676 | ||
1677 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
d3e0a5bf | 1678 | echo "configure:1679: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1679 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1681 | else | |
1682 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1683 | #line 1684 "configure" |
c906108c SS |
1684 | #include "confdefs.h" |
1685 | #if defined(CRAY) && ! defined(CRAY2) | |
1686 | webecray | |
1687 | #else | |
1688 | wenotbecray | |
1689 | #endif | |
1690 | ||
1691 | EOF | |
1692 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1693 | egrep "webecray" >/dev/null 2>&1; then | |
1694 | rm -rf conftest* | |
1695 | ac_cv_os_cray=yes | |
1696 | else | |
1697 | rm -rf conftest* | |
1698 | ac_cv_os_cray=no | |
1699 | fi | |
1700 | rm -f conftest* | |
1701 | ||
1702 | fi | |
1703 | ||
1704 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1705 | if test $ac_cv_os_cray = yes; then | |
1706 | for ac_func in _getb67 GETB67 getb67; do | |
1707 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 1708 | echo "configure:1709: checking for $ac_func" >&5 |
c906108c SS |
1709 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1711 | else | |
1712 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1713 | #line 1714 "configure" |
c906108c SS |
1714 | #include "confdefs.h" |
1715 | /* System header to define __stub macros and hopefully few prototypes, | |
1716 | which can conflict with char $ac_func(); below. */ | |
1717 | #include <assert.h> | |
1718 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1719 | /* We use char because int might match the return type of a gcc2 | |
1720 | builtin and then its argument prototype would still apply. */ | |
1721 | char $ac_func(); | |
1722 | ||
1723 | int main() { | |
1724 | ||
1725 | /* The GNU C library defines this for functions which it implements | |
1726 | to always fail with ENOSYS. Some functions are actually named | |
1727 | something starting with __ and the normal name is an alias. */ | |
1728 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1729 | choke me | |
1730 | #else | |
1731 | $ac_func(); | |
1732 | #endif | |
1733 | ||
1734 | ; return 0; } | |
1735 | EOF | |
d3e0a5bf | 1736 | if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1737 | rm -rf conftest* |
1738 | eval "ac_cv_func_$ac_func=yes" | |
1739 | else | |
1740 | echo "configure: failed program was:" >&5 | |
1741 | cat conftest.$ac_ext >&5 | |
1742 | rm -rf conftest* | |
1743 | eval "ac_cv_func_$ac_func=no" | |
1744 | fi | |
1745 | rm -f conftest* | |
1746 | fi | |
1747 | ||
1748 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1749 | echo "$ac_t""yes" 1>&6 | |
1750 | cat >> confdefs.h <<EOF | |
1751 | #define CRAY_STACKSEG_END $ac_func | |
1752 | EOF | |
1753 | ||
1754 | break | |
1755 | else | |
1756 | echo "$ac_t""no" 1>&6 | |
1757 | fi | |
1758 | ||
1759 | done | |
1760 | fi | |
1761 | ||
1762 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
d3e0a5bf | 1763 | echo "configure:1764: checking stack direction for C alloca" >&5 |
c906108c SS |
1764 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1766 | else | |
1767 | if test "$cross_compiling" = yes; then | |
1768 | ac_cv_c_stack_direction=0 | |
1769 | else | |
1770 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1771 | #line 1772 "configure" |
c906108c SS |
1772 | #include "confdefs.h" |
1773 | find_stack_direction () | |
1774 | { | |
1775 | static char *addr = 0; | |
1776 | auto char dummy; | |
1777 | if (addr == 0) | |
1778 | { | |
1779 | addr = &dummy; | |
1780 | return find_stack_direction (); | |
1781 | } | |
1782 | else | |
1783 | return (&dummy > addr) ? 1 : -1; | |
1784 | } | |
1785 | main () | |
1786 | { | |
1787 | exit (find_stack_direction() < 0); | |
1788 | } | |
1789 | EOF | |
d3e0a5bf | 1790 | if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1791 | then |
1792 | ac_cv_c_stack_direction=1 | |
1793 | else | |
1794 | echo "configure: failed program was:" >&5 | |
1795 | cat conftest.$ac_ext >&5 | |
1796 | rm -fr conftest* | |
1797 | ac_cv_c_stack_direction=-1 | |
1798 | fi | |
1799 | rm -fr conftest* | |
1800 | fi | |
1801 | ||
1802 | fi | |
1803 | ||
1804 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1805 | cat >> confdefs.h <<EOF | |
1806 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1807 | EOF | |
1808 | ||
1809 | fi | |
1810 | ||
27ca5dad | 1811 | for ac_hdr in unistd.h |
c906108c SS |
1812 | do |
1813 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1814 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 1815 | echo "configure:1816: checking for $ac_hdr" >&5 |
c906108c SS |
1816 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1818 | else | |
1819 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1820 | #line 1821 "configure" |
c906108c SS |
1821 | #include "confdefs.h" |
1822 | #include <$ac_hdr> | |
1823 | EOF | |
1824 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 1825 | { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1826 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1827 | if test -z "$ac_err"; then | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=yes" | |
1830 | else | |
1831 | echo "$ac_err" >&5 | |
1832 | echo "configure: failed program was:" >&5 | |
1833 | cat conftest.$ac_ext >&5 | |
1834 | rm -rf conftest* | |
1835 | eval "ac_cv_header_$ac_safe=no" | |
1836 | fi | |
1837 | rm -f conftest* | |
1838 | fi | |
1839 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1840 | echo "$ac_t""yes" 1>&6 | |
1841 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1842 | cat >> confdefs.h <<EOF | |
1843 | #define $ac_tr_hdr 1 | |
1844 | EOF | |
1845 | ||
1846 | else | |
1847 | echo "$ac_t""no" 1>&6 | |
1848 | fi | |
1849 | done | |
1850 | ||
1851 | for ac_func in getpagesize | |
1852 | do | |
1853 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 1854 | echo "configure:1855: checking for $ac_func" >&5 |
c906108c SS |
1855 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1857 | else | |
1858 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1859 | #line 1860 "configure" |
c906108c SS |
1860 | #include "confdefs.h" |
1861 | /* System header to define __stub macros and hopefully few prototypes, | |
1862 | which can conflict with char $ac_func(); below. */ | |
1863 | #include <assert.h> | |
1864 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1865 | /* We use char because int might match the return type of a gcc2 | |
1866 | builtin and then its argument prototype would still apply. */ | |
1867 | char $ac_func(); | |
1868 | ||
1869 | int main() { | |
1870 | ||
1871 | /* The GNU C library defines this for functions which it implements | |
1872 | to always fail with ENOSYS. Some functions are actually named | |
1873 | something starting with __ and the normal name is an alias. */ | |
1874 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1875 | choke me | |
1876 | #else | |
1877 | $ac_func(); | |
1878 | #endif | |
1879 | ||
1880 | ; return 0; } | |
1881 | EOF | |
d3e0a5bf | 1882 | if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1883 | rm -rf conftest* |
1884 | eval "ac_cv_func_$ac_func=yes" | |
1885 | else | |
1886 | echo "configure: failed program was:" >&5 | |
1887 | cat conftest.$ac_ext >&5 | |
1888 | rm -rf conftest* | |
1889 | eval "ac_cv_func_$ac_func=no" | |
1890 | fi | |
1891 | rm -f conftest* | |
1892 | fi | |
1893 | ||
1894 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1895 | echo "$ac_t""yes" 1>&6 | |
1896 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1897 | cat >> confdefs.h <<EOF | |
1898 | #define $ac_tr_func 1 | |
1899 | EOF | |
1900 | ||
1901 | else | |
1902 | echo "$ac_t""no" 1>&6 | |
1903 | fi | |
1904 | done | |
1905 | ||
1906 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
d3e0a5bf | 1907 | echo "configure:1908: checking for working mmap" >&5 |
c906108c SS |
1908 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1910 | else | |
1911 | if test "$cross_compiling" = yes; then | |
1912 | ac_cv_func_mmap_fixed_mapped=no | |
1913 | else | |
1914 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 1915 | #line 1916 "configure" |
c906108c SS |
1916 | #include "confdefs.h" |
1917 | ||
1918 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1919 | Here is a matrix of mmap possibilities: | |
1920 | mmap private not fixed | |
1921 | mmap private fixed at somewhere currently unmapped | |
1922 | mmap private fixed at somewhere already mapped | |
1923 | mmap shared not fixed | |
1924 | mmap shared fixed at somewhere currently unmapped | |
1925 | mmap shared fixed at somewhere already mapped | |
1926 | For private mappings, we should verify that changes cannot be read() | |
1927 | back from the file, nor mmap's back from the file at a different | |
1928 | address. (There have been systems where private was not correctly | |
1929 | implemented like the infamous i386 svr4.0, and systems where the | |
1930 | VM page cache was not coherent with the filesystem buffer cache | |
1931 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1932 | For shared mappings, we should conversely verify that changes get | |
1933 | propogated back to all the places they're supposed to be. | |
1934 | ||
1935 | Grep wants private fixed already mapped. | |
1936 | The main things grep needs to know about mmap are: | |
1937 | * does it exist and is it safe to write into the mmap'd area | |
1938 | * how to use it (BSD variants) */ | |
1939 | #include <sys/types.h> | |
1940 | #include <fcntl.h> | |
1941 | #include <sys/mman.h> | |
1942 | ||
1943 | /* This mess was copied from the GNU getpagesize.h. */ | |
1944 | #ifndef HAVE_GETPAGESIZE | |
27ca5dad MC |
1945 | # ifdef HAVE_UNISTD_H |
1946 | # include <unistd.h> | |
1947 | # endif | |
c906108c SS |
1948 | |
1949 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1950 | # ifndef HAVE_SYS_PARAM_H | |
1951 | # define HAVE_SYS_PARAM_H 1 | |
1952 | # endif | |
1953 | ||
1954 | # ifdef _SC_PAGESIZE | |
1955 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1956 | # else /* no _SC_PAGESIZE */ | |
1957 | # ifdef HAVE_SYS_PARAM_H | |
1958 | # include <sys/param.h> | |
1959 | # ifdef EXEC_PAGESIZE | |
1960 | # define getpagesize() EXEC_PAGESIZE | |
1961 | # else /* no EXEC_PAGESIZE */ | |
1962 | # ifdef NBPG | |
1963 | # define getpagesize() NBPG * CLSIZE | |
1964 | # ifndef CLSIZE | |
1965 | # define CLSIZE 1 | |
1966 | # endif /* no CLSIZE */ | |
1967 | # else /* no NBPG */ | |
1968 | # ifdef NBPC | |
1969 | # define getpagesize() NBPC | |
1970 | # else /* no NBPC */ | |
1971 | # ifdef PAGESIZE | |
1972 | # define getpagesize() PAGESIZE | |
1973 | # endif /* PAGESIZE */ | |
1974 | # endif /* no NBPC */ | |
1975 | # endif /* no NBPG */ | |
1976 | # endif /* no EXEC_PAGESIZE */ | |
1977 | # else /* no HAVE_SYS_PARAM_H */ | |
1978 | # define getpagesize() 8192 /* punt totally */ | |
1979 | # endif /* no HAVE_SYS_PARAM_H */ | |
1980 | # endif /* no _SC_PAGESIZE */ | |
1981 | ||
1982 | #endif /* no HAVE_GETPAGESIZE */ | |
1983 | ||
1984 | #ifdef __cplusplus | |
1985 | extern "C" { void *malloc(unsigned); } | |
1986 | #else | |
1987 | char *malloc(); | |
1988 | #endif | |
1989 | ||
1990 | int | |
1991 | main() | |
1992 | { | |
1993 | char *data, *data2, *data3; | |
1994 | int i, pagesize; | |
1995 | int fd; | |
1996 | ||
1997 | pagesize = getpagesize(); | |
1998 | ||
1999 | /* | |
2000 | * First, make a file with some known garbage in it. | |
2001 | */ | |
2002 | data = malloc(pagesize); | |
2003 | if (!data) | |
2004 | exit(1); | |
2005 | for (i = 0; i < pagesize; ++i) | |
2006 | *(data + i) = rand(); | |
2007 | umask(0); | |
2008 | fd = creat("conftestmmap", 0600); | |
2009 | if (fd < 0) | |
2010 | exit(1); | |
2011 | if (write(fd, data, pagesize) != pagesize) | |
2012 | exit(1); | |
2013 | close(fd); | |
2014 | ||
2015 | /* | |
2016 | * Next, try to mmap the file at a fixed address which | |
2017 | * already has something else allocated at it. If we can, | |
2018 | * also make sure that we see the same garbage. | |
2019 | */ | |
2020 | fd = open("conftestmmap", O_RDWR); | |
2021 | if (fd < 0) | |
2022 | exit(1); | |
2023 | data2 = malloc(2 * pagesize); | |
2024 | if (!data2) | |
2025 | exit(1); | |
2026 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2027 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2028 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2029 | exit(1); | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | if (*(data + i) != *(data2 + i)) | |
2032 | exit(1); | |
2033 | ||
2034 | /* | |
2035 | * Finally, make sure that changes to the mapped area | |
2036 | * do not percolate back to the file as seen by read(). | |
2037 | * (This is a bug on some variants of i386 svr4.0.) | |
2038 | */ | |
2039 | for (i = 0; i < pagesize; ++i) | |
2040 | *(data2 + i) = *(data2 + i) + 1; | |
2041 | data3 = malloc(pagesize); | |
2042 | if (!data3) | |
2043 | exit(1); | |
2044 | if (read(fd, data3, pagesize) != pagesize) | |
2045 | exit(1); | |
2046 | for (i = 0; i < pagesize; ++i) | |
2047 | if (*(data + i) != *(data3 + i)) | |
2048 | exit(1); | |
2049 | close(fd); | |
2050 | unlink("conftestmmap"); | |
2051 | exit(0); | |
2052 | } | |
2053 | ||
2054 | EOF | |
d3e0a5bf | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2056 | then |
2057 | ac_cv_func_mmap_fixed_mapped=yes | |
2058 | else | |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -fr conftest* | |
2062 | ac_cv_func_mmap_fixed_mapped=no | |
2063 | fi | |
2064 | rm -fr conftest* | |
2065 | fi | |
2066 | ||
2067 | fi | |
2068 | ||
2069 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2070 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2071 | cat >> confdefs.h <<\EOF | |
2072 | #define HAVE_MMAP 1 | |
2073 | EOF | |
2074 | ||
2075 | fi | |
2076 | ||
2077 | ||
2078 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2079 | unistd.h values.h sys/param.h | |
2080 | do | |
2081 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2082 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 2083 | echo "configure:2084: checking for $ac_hdr" >&5 |
c906108c SS |
2084 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2085 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2086 | else | |
2087 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2088 | #line 2089 "configure" |
c906108c SS |
2089 | #include "confdefs.h" |
2090 | #include <$ac_hdr> | |
2091 | EOF | |
2092 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 2093 | { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2094 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2095 | if test -z "$ac_err"; then | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=yes" | |
2098 | else | |
2099 | echo "$ac_err" >&5 | |
2100 | echo "configure: failed program was:" >&5 | |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -rf conftest* | |
2103 | eval "ac_cv_header_$ac_safe=no" | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2108 | echo "$ac_t""yes" 1>&6 | |
2109 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2110 | cat >> confdefs.h <<EOF | |
2111 | #define $ac_tr_hdr 1 | |
2112 | EOF | |
2113 | ||
2114 | else | |
2115 | echo "$ac_t""no" 1>&6 | |
2116 | fi | |
2117 | done | |
2118 | ||
2119 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2120 | __argz_count __argz_stringify __argz_next | |
2121 | do | |
2122 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 2123 | echo "configure:2124: checking for $ac_func" >&5 |
c906108c SS |
2124 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2126 | else | |
2127 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2128 | #line 2129 "configure" |
c906108c SS |
2129 | #include "confdefs.h" |
2130 | /* System header to define __stub macros and hopefully few prototypes, | |
2131 | which can conflict with char $ac_func(); below. */ | |
2132 | #include <assert.h> | |
2133 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2134 | /* We use char because int might match the return type of a gcc2 | |
2135 | builtin and then its argument prototype would still apply. */ | |
2136 | char $ac_func(); | |
2137 | ||
2138 | int main() { | |
2139 | ||
2140 | /* The GNU C library defines this for functions which it implements | |
2141 | to always fail with ENOSYS. Some functions are actually named | |
2142 | something starting with __ and the normal name is an alias. */ | |
2143 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2144 | choke me | |
2145 | #else | |
2146 | $ac_func(); | |
2147 | #endif | |
2148 | ||
2149 | ; return 0; } | |
2150 | EOF | |
d3e0a5bf | 2151 | if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2152 | rm -rf conftest* |
2153 | eval "ac_cv_func_$ac_func=yes" | |
2154 | else | |
2155 | echo "configure: failed program was:" >&5 | |
2156 | cat conftest.$ac_ext >&5 | |
2157 | rm -rf conftest* | |
2158 | eval "ac_cv_func_$ac_func=no" | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | fi | |
2162 | ||
2163 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2164 | echo "$ac_t""yes" 1>&6 | |
2165 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2166 | cat >> confdefs.h <<EOF | |
2167 | #define $ac_tr_func 1 | |
2168 | EOF | |
2169 | ||
2170 | else | |
2171 | echo "$ac_t""no" 1>&6 | |
2172 | fi | |
2173 | done | |
2174 | ||
2175 | ||
2176 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2177 | for ac_func in stpcpy | |
2178 | do | |
2179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 2180 | echo "configure:2181: checking for $ac_func" >&5 |
c906108c SS |
2181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2183 | else | |
2184 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2185 | #line 2186 "configure" |
c906108c SS |
2186 | #include "confdefs.h" |
2187 | /* System header to define __stub macros and hopefully few prototypes, | |
2188 | which can conflict with char $ac_func(); below. */ | |
2189 | #include <assert.h> | |
2190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2191 | /* We use char because int might match the return type of a gcc2 | |
2192 | builtin and then its argument prototype would still apply. */ | |
2193 | char $ac_func(); | |
2194 | ||
2195 | int main() { | |
2196 | ||
2197 | /* The GNU C library defines this for functions which it implements | |
2198 | to always fail with ENOSYS. Some functions are actually named | |
2199 | something starting with __ and the normal name is an alias. */ | |
2200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2201 | choke me | |
2202 | #else | |
2203 | $ac_func(); | |
2204 | #endif | |
2205 | ||
2206 | ; return 0; } | |
2207 | EOF | |
d3e0a5bf | 2208 | if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2209 | rm -rf conftest* |
2210 | eval "ac_cv_func_$ac_func=yes" | |
2211 | else | |
2212 | echo "configure: failed program was:" >&5 | |
2213 | cat conftest.$ac_ext >&5 | |
2214 | rm -rf conftest* | |
2215 | eval "ac_cv_func_$ac_func=no" | |
2216 | fi | |
2217 | rm -f conftest* | |
2218 | fi | |
2219 | ||
2220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2221 | echo "$ac_t""yes" 1>&6 | |
2222 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2223 | cat >> confdefs.h <<EOF | |
2224 | #define $ac_tr_func 1 | |
2225 | EOF | |
2226 | ||
2227 | else | |
2228 | echo "$ac_t""no" 1>&6 | |
2229 | fi | |
2230 | done | |
2231 | ||
2232 | fi | |
2233 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2234 | cat >> confdefs.h <<\EOF | |
2235 | #define HAVE_STPCPY 1 | |
2236 | EOF | |
2237 | ||
2238 | fi | |
2239 | ||
2240 | if test $ac_cv_header_locale_h = yes; then | |
2241 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
d3e0a5bf | 2242 | echo "configure:2243: checking for LC_MESSAGES" >&5 |
c906108c SS |
2243 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2244 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2245 | else | |
2246 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2247 | #line 2248 "configure" |
c906108c SS |
2248 | #include "confdefs.h" |
2249 | #include <locale.h> | |
2250 | int main() { | |
2251 | return LC_MESSAGES | |
2252 | ; return 0; } | |
2253 | EOF | |
d3e0a5bf | 2254 | if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2255 | rm -rf conftest* |
2256 | am_cv_val_LC_MESSAGES=yes | |
2257 | else | |
2258 | echo "configure: failed program was:" >&5 | |
2259 | cat conftest.$ac_ext >&5 | |
2260 | rm -rf conftest* | |
2261 | am_cv_val_LC_MESSAGES=no | |
2262 | fi | |
2263 | rm -f conftest* | |
2264 | fi | |
2265 | ||
2266 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2267 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2268 | cat >> confdefs.h <<\EOF | |
2269 | #define HAVE_LC_MESSAGES 1 | |
2270 | EOF | |
2271 | ||
2272 | fi | |
2273 | fi | |
2274 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
d3e0a5bf | 2275 | echo "configure:2276: checking whether NLS is requested" >&5 |
c906108c SS |
2276 | # Check whether --enable-nls or --disable-nls was given. |
2277 | if test "${enable_nls+set}" = set; then | |
2278 | enableval="$enable_nls" | |
2279 | USE_NLS=$enableval | |
2280 | else | |
2281 | USE_NLS=yes | |
2282 | fi | |
2283 | ||
2284 | echo "$ac_t""$USE_NLS" 1>&6 | |
2285 | ||
2286 | ||
2287 | USE_INCLUDED_LIBINTL=no | |
2288 | ||
2289 | if test "$USE_NLS" = "yes"; then | |
2290 | cat >> confdefs.h <<\EOF | |
2291 | #define ENABLE_NLS 1 | |
2292 | EOF | |
2293 | ||
2294 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
d3e0a5bf | 2295 | echo "configure:2296: checking whether included gettext is requested" >&5 |
c906108c SS |
2296 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2297 | if test "${with_included_gettext+set}" = set; then | |
2298 | withval="$with_included_gettext" | |
2299 | nls_cv_force_use_gnu_gettext=$withval | |
2300 | else | |
2301 | nls_cv_force_use_gnu_gettext=no | |
2302 | fi | |
2303 | ||
2304 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2305 | ||
2306 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2307 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2308 | nls_cv_header_intl= | |
2309 | nls_cv_header_libgt= | |
2310 | CATOBJEXT=NONE | |
2311 | ||
2312 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2313 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
d3e0a5bf | 2314 | echo "configure:2315: checking for libintl.h" >&5 |
c906108c SS |
2315 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2316 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2317 | else | |
2318 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2319 | #line 2320 "configure" |
c906108c SS |
2320 | #include "confdefs.h" |
2321 | #include <libintl.h> | |
2322 | EOF | |
2323 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 2324 | { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2325 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2326 | if test -z "$ac_err"; then | |
2327 | rm -rf conftest* | |
2328 | eval "ac_cv_header_$ac_safe=yes" | |
2329 | else | |
2330 | echo "$ac_err" >&5 | |
2331 | echo "configure: failed program was:" >&5 | |
2332 | cat conftest.$ac_ext >&5 | |
2333 | rm -rf conftest* | |
2334 | eval "ac_cv_header_$ac_safe=no" | |
2335 | fi | |
2336 | rm -f conftest* | |
2337 | fi | |
2338 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2339 | echo "$ac_t""yes" 1>&6 | |
2340 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
d3e0a5bf | 2341 | echo "configure:2342: checking for gettext in libc" >&5 |
c906108c SS |
2342 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2344 | else | |
2345 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2346 | #line 2347 "configure" |
c906108c SS |
2347 | #include "confdefs.h" |
2348 | #include <libintl.h> | |
2349 | int main() { | |
2350 | return (int) gettext ("") | |
2351 | ; return 0; } | |
2352 | EOF | |
d3e0a5bf | 2353 | if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2354 | rm -rf conftest* |
2355 | gt_cv_func_gettext_libc=yes | |
2356 | else | |
2357 | echo "configure: failed program was:" >&5 | |
2358 | cat conftest.$ac_ext >&5 | |
2359 | rm -rf conftest* | |
2360 | gt_cv_func_gettext_libc=no | |
2361 | fi | |
2362 | rm -f conftest* | |
2363 | fi | |
2364 | ||
2365 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2366 | ||
2367 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2368 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
d3e0a5bf | 2369 | echo "configure:2370: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2370 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2371 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2373 | else | |
2374 | ac_save_LIBS="$LIBS" | |
2375 | LIBS="-lintl $LIBS" | |
2376 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2377 | #line 2378 "configure" |
c906108c SS |
2378 | #include "confdefs.h" |
2379 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2380 | /* We use char because int might match the return type of a gcc2 | |
2381 | builtin and then its argument prototype would still apply. */ | |
2382 | char bindtextdomain(); | |
2383 | ||
2384 | int main() { | |
2385 | bindtextdomain() | |
2386 | ; return 0; } | |
2387 | EOF | |
d3e0a5bf | 2388 | if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2389 | rm -rf conftest* |
2390 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2391 | else | |
2392 | echo "configure: failed program was:" >&5 | |
2393 | cat conftest.$ac_ext >&5 | |
2394 | rm -rf conftest* | |
2395 | eval "ac_cv_lib_$ac_lib_var=no" | |
2396 | fi | |
2397 | rm -f conftest* | |
2398 | LIBS="$ac_save_LIBS" | |
2399 | ||
2400 | fi | |
2401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2402 | echo "$ac_t""yes" 1>&6 | |
2403 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
d3e0a5bf | 2404 | echo "configure:2405: checking for gettext in libintl" >&5 |
c906108c SS |
2405 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2407 | else | |
2408 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2409 | #line 2410 "configure" |
c906108c SS |
2410 | #include "confdefs.h" |
2411 | ||
2412 | int main() { | |
2413 | return (int) gettext ("") | |
2414 | ; return 0; } | |
2415 | EOF | |
d3e0a5bf | 2416 | if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2417 | rm -rf conftest* |
2418 | gt_cv_func_gettext_libintl=yes | |
2419 | else | |
2420 | echo "configure: failed program was:" >&5 | |
2421 | cat conftest.$ac_ext >&5 | |
2422 | rm -rf conftest* | |
2423 | gt_cv_func_gettext_libintl=no | |
2424 | fi | |
2425 | rm -f conftest* | |
2426 | fi | |
2427 | ||
2428 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2429 | else | |
2430 | echo "$ac_t""no" 1>&6 | |
2431 | fi | |
2432 | ||
2433 | fi | |
2434 | ||
2435 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2436 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2437 | cat >> confdefs.h <<\EOF | |
2438 | #define HAVE_GETTEXT 1 | |
2439 | EOF | |
2440 | ||
2441 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2442 | set dummy msgfmt; ac_word=$2 | |
2443 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2444 | echo "configure:2445: checking for $ac_word" >&5 |
c906108c SS |
2445 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2447 | else | |
2448 | case "$MSGFMT" in | |
2449 | /*) | |
2450 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2451 | ;; | |
2452 | *) | |
2453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2454 | for ac_dir in $PATH; do | |
2455 | test -z "$ac_dir" && ac_dir=. | |
2456 | if test -f $ac_dir/$ac_word; then | |
2457 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2458 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2459 | break | |
2460 | fi | |
2461 | fi | |
2462 | done | |
2463 | IFS="$ac_save_ifs" | |
2464 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2465 | ;; | |
2466 | esac | |
2467 | fi | |
2468 | MSGFMT="$ac_cv_path_MSGFMT" | |
2469 | if test -n "$MSGFMT"; then | |
2470 | echo "$ac_t""$MSGFMT" 1>&6 | |
2471 | else | |
2472 | echo "$ac_t""no" 1>&6 | |
2473 | fi | |
2474 | if test "$MSGFMT" != "no"; then | |
2475 | for ac_func in dcgettext | |
2476 | do | |
2477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 2478 | echo "configure:2479: checking for $ac_func" >&5 |
c906108c SS |
2479 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2481 | else | |
2482 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2483 | #line 2484 "configure" |
c906108c SS |
2484 | #include "confdefs.h" |
2485 | /* System header to define __stub macros and hopefully few prototypes, | |
2486 | which can conflict with char $ac_func(); below. */ | |
2487 | #include <assert.h> | |
2488 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2489 | /* We use char because int might match the return type of a gcc2 | |
2490 | builtin and then its argument prototype would still apply. */ | |
2491 | char $ac_func(); | |
2492 | ||
2493 | int main() { | |
2494 | ||
2495 | /* The GNU C library defines this for functions which it implements | |
2496 | to always fail with ENOSYS. Some functions are actually named | |
2497 | something starting with __ and the normal name is an alias. */ | |
2498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2499 | choke me | |
2500 | #else | |
2501 | $ac_func(); | |
2502 | #endif | |
2503 | ||
2504 | ; return 0; } | |
2505 | EOF | |
d3e0a5bf | 2506 | if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2507 | rm -rf conftest* |
2508 | eval "ac_cv_func_$ac_func=yes" | |
2509 | else | |
2510 | echo "configure: failed program was:" >&5 | |
2511 | cat conftest.$ac_ext >&5 | |
2512 | rm -rf conftest* | |
2513 | eval "ac_cv_func_$ac_func=no" | |
2514 | fi | |
2515 | rm -f conftest* | |
2516 | fi | |
2517 | ||
2518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2519 | echo "$ac_t""yes" 1>&6 | |
2520 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2521 | cat >> confdefs.h <<EOF | |
2522 | #define $ac_tr_func 1 | |
2523 | EOF | |
2524 | ||
2525 | else | |
2526 | echo "$ac_t""no" 1>&6 | |
2527 | fi | |
2528 | done | |
2529 | ||
2530 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2531 | set dummy gmsgfmt; ac_word=$2 | |
2532 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2533 | echo "configure:2534: checking for $ac_word" >&5 |
c906108c SS |
2534 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2536 | else | |
2537 | case "$GMSGFMT" in | |
2538 | /*) | |
2539 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2540 | ;; | |
2541 | ?:/*) | |
2542 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2543 | ;; | |
2544 | *) | |
2545 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2546 | ac_dummy="$PATH" | |
2547 | for ac_dir in $ac_dummy; do | |
2548 | test -z "$ac_dir" && ac_dir=. | |
2549 | if test -f $ac_dir/$ac_word; then | |
2550 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2551 | break | |
2552 | fi | |
2553 | done | |
2554 | IFS="$ac_save_ifs" | |
2555 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2556 | ;; | |
2557 | esac | |
2558 | fi | |
2559 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2560 | if test -n "$GMSGFMT"; then | |
2561 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2562 | else | |
2563 | echo "$ac_t""no" 1>&6 | |
2564 | fi | |
2565 | ||
2566 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2567 | set dummy xgettext; ac_word=$2 | |
2568 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2569 | echo "configure:2570: checking for $ac_word" >&5 |
c906108c SS |
2570 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2572 | else | |
2573 | case "$XGETTEXT" in | |
2574 | /*) | |
2575 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2576 | ;; | |
2577 | *) | |
2578 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2579 | for ac_dir in $PATH; do | |
2580 | test -z "$ac_dir" && ac_dir=. | |
2581 | if test -f $ac_dir/$ac_word; then | |
2582 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2583 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2584 | break | |
2585 | fi | |
2586 | fi | |
2587 | done | |
2588 | IFS="$ac_save_ifs" | |
2589 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2590 | ;; | |
2591 | esac | |
2592 | fi | |
2593 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2594 | if test -n "$XGETTEXT"; then | |
2595 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2596 | else | |
2597 | echo "$ac_t""no" 1>&6 | |
2598 | fi | |
2599 | ||
2600 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2601 | #line 2602 "configure" |
c906108c SS |
2602 | #include "confdefs.h" |
2603 | ||
2604 | int main() { | |
2605 | extern int _nl_msg_cat_cntr; | |
2606 | return _nl_msg_cat_cntr | |
2607 | ; return 0; } | |
2608 | EOF | |
d3e0a5bf | 2609 | if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2610 | rm -rf conftest* |
2611 | CATOBJEXT=.gmo | |
2612 | DATADIRNAME=share | |
2613 | else | |
2614 | echo "configure: failed program was:" >&5 | |
2615 | cat conftest.$ac_ext >&5 | |
2616 | rm -rf conftest* | |
2617 | CATOBJEXT=.mo | |
2618 | DATADIRNAME=lib | |
2619 | fi | |
2620 | rm -f conftest* | |
2621 | INSTOBJEXT=.mo | |
2622 | fi | |
2623 | fi | |
2624 | ||
2625 | else | |
2626 | echo "$ac_t""no" 1>&6 | |
2627 | fi | |
2628 | ||
2629 | ||
2630 | ||
2631 | if test "$CATOBJEXT" = "NONE"; then | |
2632 | nls_cv_use_gnu_gettext=yes | |
2633 | fi | |
2634 | fi | |
2635 | ||
2636 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2637 | INTLOBJS="\$(GETTOBJS)" | |
2638 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2639 | set dummy msgfmt; ac_word=$2 | |
2640 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2641 | echo "configure:2642: checking for $ac_word" >&5 |
c906108c SS |
2642 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2644 | else | |
2645 | case "$MSGFMT" in | |
2646 | /*) | |
2647 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2648 | ;; | |
2649 | *) | |
2650 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2651 | for ac_dir in $PATH; do | |
2652 | test -z "$ac_dir" && ac_dir=. | |
2653 | if test -f $ac_dir/$ac_word; then | |
2654 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2655 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2656 | break | |
2657 | fi | |
2658 | fi | |
2659 | done | |
2660 | IFS="$ac_save_ifs" | |
2661 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2662 | ;; | |
2663 | esac | |
2664 | fi | |
2665 | MSGFMT="$ac_cv_path_MSGFMT" | |
2666 | if test -n "$MSGFMT"; then | |
2667 | echo "$ac_t""$MSGFMT" 1>&6 | |
2668 | else | |
2669 | echo "$ac_t""no" 1>&6 | |
2670 | fi | |
2671 | ||
2672 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2673 | set dummy gmsgfmt; ac_word=$2 | |
2674 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2675 | echo "configure:2676: checking for $ac_word" >&5 |
c906108c SS |
2676 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2678 | else | |
2679 | case "$GMSGFMT" in | |
2680 | /*) | |
2681 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2682 | ;; | |
2683 | ?:/*) | |
2684 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2685 | ;; | |
2686 | *) | |
2687 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2688 | ac_dummy="$PATH" | |
2689 | for ac_dir in $ac_dummy; do | |
2690 | test -z "$ac_dir" && ac_dir=. | |
2691 | if test -f $ac_dir/$ac_word; then | |
2692 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2693 | break | |
2694 | fi | |
2695 | done | |
2696 | IFS="$ac_save_ifs" | |
2697 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2698 | ;; | |
2699 | esac | |
2700 | fi | |
2701 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2702 | if test -n "$GMSGFMT"; then | |
2703 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2704 | else | |
2705 | echo "$ac_t""no" 1>&6 | |
2706 | fi | |
2707 | ||
2708 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2709 | set dummy xgettext; ac_word=$2 | |
2710 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 2711 | echo "configure:2712: checking for $ac_word" >&5 |
c906108c SS |
2712 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2714 | else | |
2715 | case "$XGETTEXT" in | |
2716 | /*) | |
2717 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2718 | ;; | |
2719 | *) | |
2720 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2721 | for ac_dir in $PATH; do | |
2722 | test -z "$ac_dir" && ac_dir=. | |
2723 | if test -f $ac_dir/$ac_word; then | |
2724 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2725 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2726 | break | |
2727 | fi | |
2728 | fi | |
2729 | done | |
2730 | IFS="$ac_save_ifs" | |
2731 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2732 | ;; | |
2733 | esac | |
2734 | fi | |
2735 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2736 | if test -n "$XGETTEXT"; then | |
2737 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2738 | else | |
2739 | echo "$ac_t""no" 1>&6 | |
2740 | fi | |
2741 | ||
2742 | ||
2743 | USE_INCLUDED_LIBINTL=yes | |
2744 | CATOBJEXT=.gmo | |
2745 | INSTOBJEXT=.mo | |
2746 | DATADIRNAME=share | |
2747 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2748 | INTLLIBS=$INTLDEPS | |
2749 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2750 | nls_cv_header_intl=libintl.h | |
2751 | nls_cv_header_libgt=libgettext.h | |
2752 | fi | |
2753 | ||
2754 | if test "$XGETTEXT" != ":"; then | |
2755 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2756 | : ; | |
2757 | else | |
2758 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2759 | XGETTEXT=":" | |
2760 | fi | |
2761 | fi | |
2762 | ||
2763 | # We need to process the po/ directory. | |
2764 | POSUB=po | |
2765 | else | |
2766 | DATADIRNAME=share | |
2767 | nls_cv_header_intl=libintl.h | |
2768 | nls_cv_header_libgt=libgettext.h | |
2769 | fi | |
2770 | ||
2771 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2772 | # because some of the sources are only built for this goal. | |
2773 | if test "$PACKAGE" = gettext; then | |
2774 | USE_NLS=yes | |
2775 | USE_INCLUDED_LIBINTL=yes | |
2776 | fi | |
2777 | ||
2778 | for lang in $ALL_LINGUAS; do | |
2779 | GMOFILES="$GMOFILES $lang.gmo" | |
2780 | POFILES="$POFILES $lang.po" | |
2781 | done | |
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | if test "x$CATOBJEXT" != "x"; then | |
2797 | if test "x$ALL_LINGUAS" = "x"; then | |
2798 | LINGUAS= | |
2799 | else | |
2800 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
d3e0a5bf | 2801 | echo "configure:2802: checking for catalogs to be installed" >&5 |
c906108c SS |
2802 | NEW_LINGUAS= |
2803 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2804 | case "$ALL_LINGUAS" in | |
2805 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2806 | esac | |
2807 | done | |
2808 | LINGUAS=$NEW_LINGUAS | |
2809 | echo "$ac_t""$LINGUAS" 1>&6 | |
2810 | fi | |
2811 | ||
2812 | if test -n "$LINGUAS"; then | |
2813 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2814 | fi | |
2815 | fi | |
2816 | ||
2817 | if test $ac_cv_header_locale_h = yes; then | |
2818 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2819 | else | |
2820 | INCLUDE_LOCALE_H="\ | |
2821 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2822 | fi | |
2823 | ||
2824 | ||
2825 | if test -f $srcdir/po2tbl.sed.in; then | |
2826 | if test "$CATOBJEXT" = ".cat"; then | |
2827 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2828 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
d3e0a5bf | 2829 | echo "configure:2830: checking for linux/version.h" >&5 |
c906108c SS |
2830 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2832 | else | |
2833 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 2834 | #line 2835 "configure" |
c906108c SS |
2835 | #include "confdefs.h" |
2836 | #include <linux/version.h> | |
2837 | EOF | |
2838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 2839 | { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2841 | if test -z "$ac_err"; then | |
2842 | rm -rf conftest* | |
2843 | eval "ac_cv_header_$ac_safe=yes" | |
2844 | else | |
2845 | echo "$ac_err" >&5 | |
2846 | echo "configure: failed program was:" >&5 | |
2847 | cat conftest.$ac_ext >&5 | |
2848 | rm -rf conftest* | |
2849 | eval "ac_cv_header_$ac_safe=no" | |
2850 | fi | |
2851 | rm -f conftest* | |
2852 | fi | |
2853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2854 | echo "$ac_t""yes" 1>&6 | |
2855 | msgformat=linux | |
2856 | else | |
2857 | echo "$ac_t""no" 1>&6 | |
2858 | msgformat=xopen | |
2859 | fi | |
2860 | ||
2861 | ||
2862 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2863 | fi | |
2864 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2865 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2866 | fi | |
2867 | ||
2868 | if test "$PACKAGE" = "gettext"; then | |
2869 | GT_NO="#NO#" | |
2870 | GT_YES= | |
2871 | else | |
2872 | GT_NO= | |
2873 | GT_YES="#YES#" | |
2874 | fi | |
2875 | ||
2876 | ||
2877 | ||
2878 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2879 | ||
2880 | ||
2881 | l= | |
2882 | ||
2883 | ||
4536bbc6 | 2884 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2885 | test -d po || mkdir po |
2886 | if test "x$srcdir" != "x."; then | |
2887 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2888 | posrcprefix="$srcdir/" | |
2889 | else | |
2890 | posrcprefix="../$srcdir/" | |
2891 | fi | |
2892 | else | |
2893 | posrcprefix="../" | |
2894 | fi | |
2895 | rm -f po/POTFILES | |
2896 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2897 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2898 | fi | |
2899 | ||
0fbb3da7 TT |
2900 | cat >> confdefs.h <<\EOF |
2901 | #define PACKAGE "gdb" | |
2902 | EOF | |
2903 | ||
2904 | ||
5b5d99cf JB |
2905 | debugdir=${libdir}/debug |
2906 | ||
2907 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. | |
2908 | if test "${with_separate_debug_dir+set}" = set; then | |
2909 | withval="$with_separate_debug_dir" | |
2910 | debugdir="${withval}" | |
2911 | fi | |
2912 | ||
2913 | ||
2914 | ||
2915 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
2916 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2917 | ac_define_dir=`eval echo $debugdir` | |
2918 | ac_define_dir=`eval echo $ac_define_dir` | |
2919 | cat >> confdefs.h <<EOF | |
2920 | #define DEBUGDIR "$ac_define_dir" | |
2921 | EOF | |
2922 | ||
2923 | ||
2924 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), | |
c906108c SS |
2925 | |
2926 | ||
2927 | CONFIG_OBS= | |
66b965bb | 2928 | CONFIG_LIB_OBS= |
c906108c SS |
2929 | CONFIG_DEPS= |
2930 | CONFIG_SRCS= | |
fb40c209 AC |
2931 | CONFIG_INITS= |
2932 | ENABLE_CFLAGS= | |
b3a90332 AC |
2933 | CONFIG_ALL= |
2934 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2935 | CONFIG_INSTALL= |
2936 | CONFIG_UNINSTALL= | |
c906108c | 2937 | |
8dcde887 | 2938 | subdirs="doc testsuite" |
96baa820 | 2939 | |
8dcde887 | 2940 | configdirs= |
96baa820 | 2941 | |
27e9bf90 | 2942 | . $srcdir/configure.host |
c906108c | 2943 | |
27e9bf90 | 2944 | . $srcdir/configure.tgt |
c906108c | 2945 | |
27e9bf90 MK |
2946 | # Fetch the default architecture and default target vector from BFD. |
2947 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2948 | |
27e9bf90 MK |
2949 | # We only want the first architecture, so strip off the others if |
2950 | # there is more than one. | |
2951 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2952 | |
27e9bf90 MK |
2953 | if test "x$targ_archs" != x; then |
2954 | cat >> confdefs.h <<EOF | |
2955 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2956 | EOF |
2957 | ||
2958 | fi | |
27e9bf90 MK |
2959 | if test "x$targ_defvec" != x; then |
2960 | cat >> confdefs.h <<EOF | |
2961 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2962 | EOF |
2963 | ||
2964 | fi | |
c906108c | 2965 | |
8bb2c122 MK |
2966 | if test "$program_transform_name" = s,x,x,; then |
2967 | program_transform_name= | |
2968 | else | |
2969 | # Double any \ or $. echo might interpret backslashes. | |
2970 | cat <<\EOF_SED > conftestsed | |
2971 | s,\\,\\\\,g; s,\$,$$,g | |
2972 | EOF_SED | |
2973 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2974 | rm -f conftestsed | |
2975 | fi | |
2976 | test "$program_prefix" != NONE && | |
2977 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2978 | # Use a double $ so make ignores it. | |
2979 | test "$program_suffix" != NONE && | |
2980 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2981 | ||
2982 | # sed with no file args requires a program. | |
2983 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2984 | ||
2985 | ||
627af7ea MK |
2986 | # The CLI cannot be disabled yet, but may be in the future. |
2987 | ||
2988 | # Enable CLI. | |
2989 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2990 | if test "${enable_gdbcli+set}" = set; then | |
2991 | enableval="$enable_gdbcli" | |
2992 | case $enableval in | |
2993 | yes) | |
2994 | ;; | |
2995 | no) | |
2996 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2997 | *) | |
2998 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2999 | esac | |
3000 | else | |
3001 | enable_gdbcli=yes | |
3002 | fi | |
3003 | ||
3004 | if test x"$enable_gdbcli" = xyes; then | |
3005 | if test -d $srcdir/cli; then | |
3006 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
3007 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
3008 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
3009 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
3010 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
3011 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
3012 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
3013 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
3014 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
3015 | fi | |
3016 | fi | |
3017 | ||
3018 | # Enable MI. | |
3019 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3020 | if test "${enable_gdbmi+set}" = set; then | |
3021 | enableval="$enable_gdbmi" | |
3022 | case $enableval in | |
3023 | yes | no) | |
3024 | ;; | |
3025 | *) | |
3026 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3027 | esac | |
3028 | else | |
3029 | enable_gdbmi=yes | |
3030 | fi | |
3031 | ||
3032 | if test x"$enable_gdbmi" = xyes; then | |
3033 | if test -d $srcdir/mi; then | |
3034 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3035 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3036 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3037 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3038 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3039 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3040 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3041 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3042 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3043 | fi | |
3044 | fi | |
3045 | ||
06825bd1 MK |
3046 | # Enable TUI. |
3047 | # Check whether --enable-tui or --disable-tui was given. | |
3048 | if test "${enable_tui+set}" = set; then | |
3049 | enableval="$enable_tui" | |
3050 | case $enableval in | |
3051 | yes | no) | |
3052 | ;; | |
3053 | *) | |
3054 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3055 | esac | |
3056 | fi | |
3057 | ||
3058 | if test x"$enable_tui" = xyes; then | |
3059 | if test -d $srcdir/tui; then | |
3060 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3061 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3062 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3063 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3064 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3065 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3066 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3067 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3068 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3069 | need_curses=yes | |
3070 | fi | |
3071 | fi | |
3072 | ||
8ee53726 MK |
3073 | # Enable gdbtk. |
3074 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3075 | if test "${enable_gdbtk+set}" = set; then | |
3076 | enableval="$enable_gdbtk" | |
3077 | case $enableval in | |
3078 | yes | no) | |
3079 | ;; | |
3080 | *) | |
3081 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3082 | esac | |
3083 | else | |
3084 | if test -d $srcdir/gdbtk; then | |
3085 | enable_gdbtk=yes | |
3086 | else | |
3087 | enable_gdbtk=no | |
3088 | fi | |
3089 | fi | |
3090 | ||
3091 | # We unconditionally disable gdbtk tests on selected platforms. | |
3092 | case $host_os in | |
3093 | go32* | windows*) | |
3094 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3095 | enable_gdbtk=no ;; | |
3096 | esac | |
3097 | ||
d28f9cdf DJ |
3098 | # Profiling support. |
3099 | # Check whether --enable-profiling or --disable-profiling was given. | |
3100 | if test "${enable_profiling+set}" = set; then | |
3101 | enableval="$enable_profiling" | |
3102 | case $enableval in | |
3103 | yes | no) | |
3104 | ;; | |
3105 | *) | |
3106 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3107 | esac | |
3108 | else | |
3109 | enable_profiling=no | |
3110 | fi | |
3111 | ||
3112 | ||
d9feb4e7 DJ |
3113 | for ac_func in monstartup _mcleanup |
3114 | do | |
3115 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d3e0a5bf | 3116 | echo "configure:3117: checking for $ac_func" >&5 |
d9feb4e7 | 3117 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
d28f9cdf DJ |
3118 | echo $ac_n "(cached) $ac_c" 1>&6 |
3119 | else | |
3120 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3121 | #line 3122 "configure" |
d28f9cdf DJ |
3122 | #include "confdefs.h" |
3123 | /* System header to define __stub macros and hopefully few prototypes, | |
d9feb4e7 | 3124 | which can conflict with char $ac_func(); below. */ |
d28f9cdf DJ |
3125 | #include <assert.h> |
3126 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3127 | /* We use char because int might match the return type of a gcc2 | |
3128 | builtin and then its argument prototype would still apply. */ | |
d9feb4e7 | 3129 | char $ac_func(); |
d28f9cdf DJ |
3130 | |
3131 | int main() { | |
3132 | ||
3133 | /* The GNU C library defines this for functions which it implements | |
3134 | to always fail with ENOSYS. Some functions are actually named | |
3135 | something starting with __ and the normal name is an alias. */ | |
d9feb4e7 | 3136 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
d28f9cdf DJ |
3137 | choke me |
3138 | #else | |
d9feb4e7 | 3139 | $ac_func(); |
d28f9cdf DJ |
3140 | #endif |
3141 | ||
3142 | ; return 0; } | |
3143 | EOF | |
d3e0a5bf | 3144 | if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
d28f9cdf | 3145 | rm -rf conftest* |
d9feb4e7 | 3146 | eval "ac_cv_func_$ac_func=yes" |
d28f9cdf DJ |
3147 | else |
3148 | echo "configure: failed program was:" >&5 | |
3149 | cat conftest.$ac_ext >&5 | |
3150 | rm -rf conftest* | |
d9feb4e7 | 3151 | eval "ac_cv_func_$ac_func=no" |
d28f9cdf DJ |
3152 | fi |
3153 | rm -f conftest* | |
3154 | fi | |
3155 | ||
d9feb4e7 | 3156 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
d28f9cdf | 3157 | echo "$ac_t""yes" 1>&6 |
d9feb4e7 DJ |
3158 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
3159 | cat >> confdefs.h <<EOF | |
3160 | #define $ac_tr_func 1 | |
3161 | EOF | |
3162 | ||
d28f9cdf DJ |
3163 | else |
3164 | echo "$ac_t""no" 1>&6 | |
d28f9cdf | 3165 | fi |
d9feb4e7 | 3166 | done |
d28f9cdf | 3167 | |
b0b1c2c0 | 3168 | echo $ac_n "checking for _etext""... $ac_c" 1>&6 |
d3e0a5bf | 3169 | echo "configure:3170: checking for _etext" >&5 |
b0b1c2c0 MK |
3170 | if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then |
3171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3172 | else | |
3173 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3174 | #line 3175 "configure" |
b0b1c2c0 MK |
3175 | #include "confdefs.h" |
3176 | #include <stdlib.h> | |
3177 | extern char _etext; | |
3178 | ||
3179 | int main() { | |
3180 | free (&_etext); | |
3181 | ; return 0; } | |
3182 | EOF | |
d3e0a5bf | 3183 | if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b0b1c2c0 MK |
3184 | rm -rf conftest* |
3185 | ac_cv_var__etext=yes | |
3186 | else | |
3187 | echo "configure: failed program was:" >&5 | |
3188 | cat conftest.$ac_ext >&5 | |
3189 | rm -rf conftest* | |
3190 | ac_cv_var__etext=no | |
3191 | fi | |
3192 | rm -f conftest* | |
3193 | fi | |
3194 | ||
3195 | echo "$ac_t""$ac_cv_var__etext" 1>&6 | |
3196 | if test $ac_cv_var__etext = yes; then | |
3197 | cat >> confdefs.h <<\EOF | |
3198 | #define HAVE__ETEXT 1 | |
3199 | EOF | |
3200 | ||
3201 | fi | |
d9feb4e7 DJ |
3202 | if test "$enable_profiling" = yes ; then |
3203 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
3204 | { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; } | |
3205 | fi | |
3206 | PROFILE_CFLAGS=-pg | |
3207 | OLD_CFLAGS="$CFLAGS" | |
3208 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
d28f9cdf | 3209 | |
d9feb4e7 | 3210 | echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6 |
d3e0a5bf | 3211 | echo "configure:3212: checking whether $CC supports -pg" >&5 |
d9feb4e7 | 3212 | if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then |
d28f9cdf DJ |
3213 | echo $ac_n "(cached) $ac_c" 1>&6 |
3214 | else | |
3215 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3216 | #line 3217 "configure" |
d28f9cdf | 3217 | #include "confdefs.h" |
d28f9cdf DJ |
3218 | |
3219 | int main() { | |
d9feb4e7 | 3220 | int x; |
d28f9cdf DJ |
3221 | ; return 0; } |
3222 | EOF | |
d3e0a5bf | 3223 | if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d28f9cdf | 3224 | rm -rf conftest* |
d9feb4e7 | 3225 | ac_cv_cc_supports_pg=yes |
d28f9cdf DJ |
3226 | else |
3227 | echo "configure: failed program was:" >&5 | |
3228 | cat conftest.$ac_ext >&5 | |
3229 | rm -rf conftest* | |
d9feb4e7 | 3230 | ac_cv_cc_supports_pg=no |
d28f9cdf DJ |
3231 | fi |
3232 | rm -f conftest* | |
3233 | fi | |
3234 | ||
d9feb4e7 | 3235 | echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6 |
d28f9cdf | 3236 | |
d9feb4e7 DJ |
3237 | if test $ac_cv_cc_supports_pg = no; then |
3238 | { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; } | |
3239 | fi | |
d28f9cdf DJ |
3240 | |
3241 | CFLAGS="$OLD_CFLAGS" | |
3242 | fi | |
3243 | ||
8bb2c122 MK |
3244 | # --------------------- # |
3245 | # Checks for programs. # | |
3246 | # --------------------- # | |
3247 | ||
27ca5dad | 3248 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3249 | do |
3250 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3251 | set dummy $ac_prog; ac_word=$2 | |
3252 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 3253 | echo "configure:3254: checking for $ac_word" >&5 |
7a292a7a SS |
3254 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3255 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3256 | else | |
3257 | if test -n "$AWK"; then | |
3258 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3259 | else | |
3260 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3261 | ac_dummy="$PATH" | |
3262 | for ac_dir in $ac_dummy; do | |
3263 | test -z "$ac_dir" && ac_dir=. | |
3264 | if test -f $ac_dir/$ac_word; then | |
3265 | ac_cv_prog_AWK="$ac_prog" | |
3266 | break | |
3267 | fi | |
3268 | done | |
3269 | IFS="$ac_save_ifs" | |
3270 | fi | |
3271 | fi | |
3272 | AWK="$ac_cv_prog_AWK" | |
3273 | if test -n "$AWK"; then | |
3274 | echo "$ac_t""$AWK" 1>&6 | |
3275 | else | |
3276 | echo "$ac_t""no" 1>&6 | |
3277 | fi | |
3278 | ||
3279 | test -n "$AWK" && break | |
3280 | done | |
3281 | ||
c906108c SS |
3282 | # Find a good install program. We prefer a C program (faster), |
3283 | # so one script is as good as another. But avoid the broken or | |
3284 | # incompatible versions: | |
3285 | # SysV /etc/install, /usr/sbin/install | |
3286 | # SunOS /usr/etc/install | |
3287 | # IRIX /sbin/install | |
3288 | # AIX /bin/install | |
3289 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3290 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3291 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3292 | # ./install, which can be erroneously created by make from ./install.sh. | |
3293 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
d3e0a5bf | 3294 | echo "configure:3295: checking for a BSD compatible install" >&5 |
c906108c SS |
3295 | if test -z "$INSTALL"; then |
3296 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3298 | else | |
3299 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3300 | for ac_dir in $PATH; do | |
3301 | # Account for people who put trailing slashes in PATH elements. | |
3302 | case "$ac_dir/" in | |
3303 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3304 | *) | |
3305 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3306 | # Don't use installbsd from OSF since it installs stuff as root | |
3307 | # by default. | |
3308 | for ac_prog in ginstall scoinst install; do | |
3309 | if test -f $ac_dir/$ac_prog; then | |
3310 | if test $ac_prog = install && | |
3311 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3312 | # AIX install. It has an incompatible calling convention. | |
3313 | : | |
3314 | else | |
3315 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3316 | break 2 | |
3317 | fi | |
3318 | fi | |
3319 | done | |
3320 | ;; | |
3321 | esac | |
3322 | done | |
3323 | IFS="$ac_save_IFS" | |
3324 | ||
3325 | fi | |
3326 | if test "${ac_cv_path_install+set}" = set; then | |
3327 | INSTALL="$ac_cv_path_install" | |
3328 | else | |
3329 | # As a last resort, use the slow shell script. We don't cache a | |
3330 | # path for INSTALL within a source directory, because that will | |
3331 | # break other packages using the cache if that directory is | |
3332 | # removed, or if the path is relative. | |
3333 | INSTALL="$ac_install_sh" | |
3334 | fi | |
3335 | fi | |
3336 | echo "$ac_t""$INSTALL" 1>&6 | |
3337 | ||
3338 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3339 | # It thinks the first close brace ends the variable substitution. | |
3340 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3341 | ||
3342 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3343 | ||
3344 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3345 | ||
8bb2c122 | 3346 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
d3e0a5bf | 3347 | echo "configure:3348: checking whether ln -s works" >&5 |
8bb2c122 MK |
3348 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3349 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3350 | else |
8bb2c122 MK |
3351 | rm -f conftestdata |
3352 | if ln -s X conftestdata 2>/dev/null | |
3353 | then | |
3354 | rm -f conftestdata | |
3355 | ac_cv_prog_LN_S="ln -s" | |
3356 | else | |
3357 | ac_cv_prog_LN_S=ln | |
3358 | fi | |
3359 | fi | |
3360 | LN_S="$ac_cv_prog_LN_S" | |
3361 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3362 | echo "$ac_t""yes" 1>&6 | |
3363 | else | |
3364 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3365 | fi |
3366 | ||
8bb2c122 MK |
3367 | # Extract the first word of "ranlib", so it can be a program name with args. |
3368 | set dummy ranlib; ac_word=$2 | |
c906108c | 3369 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d3e0a5bf | 3370 | echo "configure:3371: checking for $ac_word" >&5 |
8bb2c122 | 3371 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3372 | echo $ac_n "(cached) $ac_c" 1>&6 |
3373 | else | |
8bb2c122 MK |
3374 | if test -n "$RANLIB"; then |
3375 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3376 | else |
3377 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3378 | ac_dummy="$PATH" | |
3379 | for ac_dir in $ac_dummy; do | |
3380 | test -z "$ac_dir" && ac_dir=. | |
3381 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3382 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3383 | break |
3384 | fi | |
3385 | done | |
3386 | IFS="$ac_save_ifs" | |
8bb2c122 | 3387 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3388 | fi |
3389 | fi | |
8bb2c122 MK |
3390 | RANLIB="$ac_cv_prog_RANLIB" |
3391 | if test -n "$RANLIB"; then | |
3392 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3393 | else |
3394 | echo "$ac_t""no" 1>&6 | |
3395 | fi | |
3396 | ||
8bb2c122 MK |
3397 | for ac_prog in 'bison -y' byacc |
3398 | do | |
3399 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3400 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3401 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d3e0a5bf | 3402 | echo "configure:3403: checking for $ac_word" >&5 |
8bb2c122 | 3403 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3404 | echo $ac_n "(cached) $ac_c" 1>&6 |
3405 | else | |
8bb2c122 MK |
3406 | if test -n "$YACC"; then |
3407 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3408 | else |
3409 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3410 | ac_dummy="$PATH" | |
3411 | for ac_dir in $ac_dummy; do | |
3412 | test -z "$ac_dir" && ac_dir=. | |
3413 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3414 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3415 | break |
3416 | fi | |
3417 | done | |
3418 | IFS="$ac_save_ifs" | |
3419 | fi | |
3420 | fi | |
8bb2c122 MK |
3421 | YACC="$ac_cv_prog_YACC" |
3422 | if test -n "$YACC"; then | |
3423 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3424 | else |
3425 | echo "$ac_t""no" 1>&6 | |
3426 | fi | |
3427 | ||
8bb2c122 MK |
3428 | test -n "$YACC" && break |
3429 | done | |
3430 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3431 | |
8bb2c122 MK |
3432 | |
3433 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3434 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3435 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d3e0a5bf | 3436 | echo "configure:3437: checking for $ac_word" >&5 |
8bb2c122 | 3437 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3438 | echo $ac_n "(cached) $ac_c" 1>&6 |
3439 | else | |
8bb2c122 MK |
3440 | if test -n "$AR"; then |
3441 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3442 | else |
3443 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3444 | ac_dummy="$PATH" | |
3445 | for ac_dir in $ac_dummy; do | |
3446 | test -z "$ac_dir" && ac_dir=. | |
3447 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3448 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3449 | break |
3450 | fi | |
3451 | done | |
3452 | IFS="$ac_save_ifs" | |
8bb2c122 | 3453 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3454 | fi |
3455 | fi | |
8bb2c122 MK |
3456 | AR="$ac_cv_prog_AR" |
3457 | if test -n "$AR"; then | |
3458 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3459 | else |
3460 | echo "$ac_t""no" 1>&6 | |
3461 | fi | |
3462 | ||
8bb2c122 | 3463 | |
c906108c | 3464 | |
95ca63c4 CF |
3465 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3466 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3467 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 3468 | echo "configure:3469: checking for $ac_word" >&5 |
95ca63c4 CF |
3469 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3470 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3471 | else | |
3472 | if test -n "$DLLTOOL"; then | |
3473 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3474 | else | |
3475 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3476 | ac_dummy="$PATH" | |
3477 | for ac_dir in $ac_dummy; do | |
3478 | test -z "$ac_dir" && ac_dir=. | |
3479 | if test -f $ac_dir/$ac_word; then | |
3480 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3481 | break | |
3482 | fi | |
3483 | done | |
3484 | IFS="$ac_save_ifs" | |
3485 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3486 | fi | |
3487 | fi | |
3488 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3489 | if test -n "$DLLTOOL"; then | |
3490 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3491 | else | |
3492 | echo "$ac_t""no" 1>&6 | |
3493 | fi | |
3494 | ||
3495 | ||
3496 | ||
3497 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3498 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3499 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 3500 | echo "configure:3501: checking for $ac_word" >&5 |
95ca63c4 CF |
3501 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3502 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3503 | else | |
3504 | if test -n "$WINDRES"; then | |
3505 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3506 | else | |
3507 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3508 | ac_dummy="$PATH" | |
3509 | for ac_dir in $ac_dummy; do | |
3510 | test -z "$ac_dir" && ac_dir=. | |
3511 | if test -f $ac_dir/$ac_word; then | |
3512 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3513 | break | |
3514 | fi | |
3515 | done | |
3516 | IFS="$ac_save_ifs" | |
3517 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3518 | fi | |
3519 | fi | |
3520 | WINDRES="$ac_cv_prog_WINDRES" | |
3521 | if test -n "$WINDRES"; then | |
3522 | echo "$ac_t""$WINDRES" 1>&6 | |
3523 | else | |
3524 | echo "$ac_t""no" 1>&6 | |
3525 | fi | |
3526 | ||
3527 | ||
3528 | ||
c906108c | 3529 | |
8bb2c122 | 3530 | # Needed for GNU/Hurd. |
75c6e08a MK |
3531 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3532 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3533 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d3e0a5bf | 3534 | echo "configure:3535: checking for $ac_word" >&5 |
75c6e08a MK |
3535 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3537 | else | |
3538 | if test -n "$MIG"; then | |
3539 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3540 | else | |
3541 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3542 | ac_dummy="$PATH" | |
3543 | for ac_dir in $ac_dummy; do | |
3544 | test -z "$ac_dir" && ac_dir=. | |
3545 | if test -f $ac_dir/$ac_word; then | |
3546 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3547 | break | |
3548 | fi | |
3549 | done | |
3550 | IFS="$ac_save_ifs" | |
3551 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3552 | fi | |
3553 | fi | |
3554 | MIG="$ac_cv_prog_MIG" | |
3555 | if test -n "$MIG"; then | |
3556 | echo "$ac_t""$MIG" 1>&6 | |
3557 | else | |
3558 | echo "$ac_t""no" 1>&6 | |
3559 | fi | |
3560 | ||
3561 | ||
3562 | ||
3563 | ||
9a156167 MK |
3564 | # ---------------------- # |
3565 | # Checks for libraries. # | |
3566 | # ---------------------- # | |
3567 | ||
3568 | # We might need to link with -lm; most simulators need it. | |
3569 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
d3e0a5bf | 3570 | echo "configure:3571: checking for main in -lm" >&5 |
9a156167 MK |
3571 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3572 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3574 | else | |
3575 | ac_save_LIBS="$LIBS" | |
3576 | LIBS="-lm $LIBS" | |
3577 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3578 | #line 3579 "configure" |
9a156167 MK |
3579 | #include "confdefs.h" |
3580 | ||
3581 | int main() { | |
3582 | main() | |
3583 | ; return 0; } | |
3584 | EOF | |
d3e0a5bf | 3585 | if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3586 | rm -rf conftest* |
3587 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3588 | else | |
3589 | echo "configure: failed program was:" >&5 | |
3590 | cat conftest.$ac_ext >&5 | |
3591 | rm -rf conftest* | |
3592 | eval "ac_cv_lib_$ac_lib_var=no" | |
3593 | fi | |
3594 | rm -f conftest* | |
3595 | LIBS="$ac_save_LIBS" | |
3596 | ||
3597 | fi | |
3598 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3599 | echo "$ac_t""yes" 1>&6 | |
3600 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3601 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3602 | cat >> confdefs.h <<EOF | |
3603 | #define $ac_tr_lib 1 | |
3604 | EOF | |
3605 | ||
3606 | LIBS="-lm $LIBS" | |
3607 | ||
3608 | else | |
3609 | echo "$ac_t""no" 1>&6 | |
3610 | fi | |
3611 | ||
3612 | ||
3613 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3614 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3615 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3616 | # is known to have this problem). Therefore we avoid libw if we can. | |
3617 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
d3e0a5bf | 3618 | echo "configure:3619: checking for wctype" >&5 |
9a156167 MK |
3619 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3621 | else | |
3622 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3623 | #line 3624 "configure" |
9a156167 MK |
3624 | #include "confdefs.h" |
3625 | /* System header to define __stub macros and hopefully few prototypes, | |
3626 | which can conflict with char wctype(); below. */ | |
3627 | #include <assert.h> | |
3628 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3629 | /* We use char because int might match the return type of a gcc2 | |
3630 | builtin and then its argument prototype would still apply. */ | |
3631 | char wctype(); | |
3632 | ||
3633 | int main() { | |
3634 | ||
3635 | /* The GNU C library defines this for functions which it implements | |
3636 | to always fail with ENOSYS. Some functions are actually named | |
3637 | something starting with __ and the normal name is an alias. */ | |
3638 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3639 | choke me | |
3640 | #else | |
3641 | wctype(); | |
3642 | #endif | |
3643 | ||
3644 | ; return 0; } | |
3645 | EOF | |
d3e0a5bf | 3646 | if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3647 | rm -rf conftest* |
3648 | eval "ac_cv_func_wctype=yes" | |
3649 | else | |
3650 | echo "configure: failed program was:" >&5 | |
3651 | cat conftest.$ac_ext >&5 | |
3652 | rm -rf conftest* | |
3653 | eval "ac_cv_func_wctype=no" | |
3654 | fi | |
3655 | rm -f conftest* | |
3656 | fi | |
3657 | ||
3658 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3659 | echo "$ac_t""yes" 1>&6 | |
3660 | : | |
3661 | else | |
3662 | echo "$ac_t""no" 1>&6 | |
3663 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
d3e0a5bf | 3664 | echo "configure:3665: checking for wctype in -lw" >&5 |
9a156167 MK |
3665 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3666 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3667 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3668 | else | |
3669 | ac_save_LIBS="$LIBS" | |
3670 | LIBS="-lw $LIBS" | |
3671 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3672 | #line 3673 "configure" |
9a156167 MK |
3673 | #include "confdefs.h" |
3674 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3675 | /* We use char because int might match the return type of a gcc2 | |
3676 | builtin and then its argument prototype would still apply. */ | |
3677 | char wctype(); | |
3678 | ||
3679 | int main() { | |
3680 | wctype() | |
3681 | ; return 0; } | |
3682 | EOF | |
d3e0a5bf | 3683 | if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3684 | rm -rf conftest* |
3685 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3686 | else | |
3687 | echo "configure: failed program was:" >&5 | |
3688 | cat conftest.$ac_ext >&5 | |
3689 | rm -rf conftest* | |
3690 | eval "ac_cv_lib_$ac_lib_var=no" | |
3691 | fi | |
3692 | rm -f conftest* | |
3693 | LIBS="$ac_save_LIBS" | |
3694 | ||
3695 | fi | |
3696 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3697 | echo "$ac_t""yes" 1>&6 | |
3698 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3699 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3700 | cat >> confdefs.h <<EOF | |
3701 | #define $ac_tr_lib 1 | |
3702 | EOF | |
3703 | ||
3704 | LIBS="-lw $LIBS" | |
3705 | ||
3706 | else | |
3707 | echo "$ac_t""no" 1>&6 | |
3708 | fi | |
3709 | ||
3710 | fi | |
3711 | ||
3712 | ||
3713 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3714 | ||
3715 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
d3e0a5bf | 3716 | echo "configure:3717: checking for library containing socketpair" >&5 |
9a156167 MK |
3717 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3718 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3719 | else | |
3720 | ac_func_search_save_LIBS="$LIBS" | |
3721 | ac_cv_search_socketpair="no" | |
3722 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3723 | #line 3724 "configure" |
9a156167 MK |
3724 | #include "confdefs.h" |
3725 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3726 | /* We use char because int might match the return type of a gcc2 | |
3727 | builtin and then its argument prototype would still apply. */ | |
3728 | char socketpair(); | |
3729 | ||
3730 | int main() { | |
3731 | socketpair() | |
3732 | ; return 0; } | |
3733 | EOF | |
d3e0a5bf | 3734 | if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3735 | rm -rf conftest* |
3736 | ac_cv_search_socketpair="none required" | |
3737 | else | |
3738 | echo "configure: failed program was:" >&5 | |
3739 | cat conftest.$ac_ext >&5 | |
3740 | fi | |
3741 | rm -f conftest* | |
3742 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3743 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3744 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3745 | #line 3746 "configure" |
9a156167 MK |
3746 | #include "confdefs.h" |
3747 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3748 | /* We use char because int might match the return type of a gcc2 | |
3749 | builtin and then its argument prototype would still apply. */ | |
3750 | char socketpair(); | |
3751 | ||
3752 | int main() { | |
3753 | socketpair() | |
3754 | ; return 0; } | |
3755 | EOF | |
d3e0a5bf | 3756 | if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3757 | rm -rf conftest* |
3758 | ac_cv_search_socketpair="-l$i" | |
3759 | break | |
3760 | else | |
3761 | echo "configure: failed program was:" >&5 | |
3762 | cat conftest.$ac_ext >&5 | |
3763 | fi | |
3764 | rm -f conftest* | |
3765 | done | |
3766 | LIBS="$ac_func_search_save_LIBS" | |
3767 | fi | |
3768 | ||
3769 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3770 | if test "$ac_cv_search_socketpair" != "no"; then | |
3771 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3772 | ||
3773 | else : | |
3774 | ||
3775 | fi | |
3776 | ||
06825bd1 MK |
3777 | # Since GDB uses Readline, we need termcap functionality, so we need |
3778 | # to find a library that provides that. When GDB is configured with | |
3779 | # --enable-tui, we need full curses functionality. | |
3780 | # | |
3781 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3782 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3783 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3784 | # `curses'. I don't see why we should use HP curses if a more | |
3785 | # standard curses is available, except that according to HP's | |
3786 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3787 | # HP-UX 10.10 and 10.20. | |
3788 | ||
3789 | if test "$need_curses" = yes; then | |
3790 | ||
3791 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
d3e0a5bf | 3792 | echo "configure:3793: checking for library containing initscr" >&5 |
06825bd1 MK |
3793 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3794 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3795 | else | |
3796 | ac_func_search_save_LIBS="$LIBS" | |
3797 | ac_cv_search_initscr="no" | |
3798 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3799 | #line 3800 "configure" |
06825bd1 MK |
3800 | #include "confdefs.h" |
3801 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3802 | /* We use char because int might match the return type of a gcc2 | |
3803 | builtin and then its argument prototype would still apply. */ | |
3804 | char initscr(); | |
3805 | ||
3806 | int main() { | |
3807 | initscr() | |
3808 | ; return 0; } | |
3809 | EOF | |
d3e0a5bf | 3810 | if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3811 | rm -rf conftest* |
3812 | ac_cv_search_initscr="none required" | |
3813 | else | |
3814 | echo "configure: failed program was:" >&5 | |
3815 | cat conftest.$ac_ext >&5 | |
3816 | fi | |
3817 | rm -f conftest* | |
3818 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3819 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3820 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3821 | #line 3822 "configure" |
06825bd1 MK |
3822 | #include "confdefs.h" |
3823 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3824 | /* We use char because int might match the return type of a gcc2 | |
3825 | builtin and then its argument prototype would still apply. */ | |
3826 | char initscr(); | |
3827 | ||
3828 | int main() { | |
3829 | initscr() | |
3830 | ; return 0; } | |
3831 | EOF | |
d3e0a5bf | 3832 | if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3833 | rm -rf conftest* |
3834 | ac_cv_search_initscr="-l$i" | |
3835 | break | |
3836 | else | |
3837 | echo "configure: failed program was:" >&5 | |
3838 | cat conftest.$ac_ext >&5 | |
3839 | fi | |
3840 | rm -f conftest* | |
3841 | done | |
3842 | LIBS="$ac_func_search_save_LIBS" | |
3843 | fi | |
3844 | ||
3845 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3846 | if test "$ac_cv_search_initscr" != "no"; then | |
3847 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3848 | ||
3849 | else : | |
3850 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3851 | fi | |
3852 | fi | |
3853 | ||
3854 | case $host_os in | |
3855 | cygwin*) | |
3856 | if test -d $srcdir/libtermcap; then | |
3857 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3858 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3859 | fi ;; | |
3860 | go32*) | |
3861 | # ??? Is this really true? | |
3862 | ac_cv_search_tgetent="none required" | |
3863 | ;; | |
3864 | aix*) | |
3865 | # Readline prefers curses over termcap on AIX. | |
3866 | # ??? Why? | |
3867 | ||
3868 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
d3e0a5bf | 3869 | echo "configure:3870: checking for library containing tgetent" >&5 |
06825bd1 MK |
3870 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3872 | else | |
3873 | ac_func_search_save_LIBS="$LIBS" | |
3874 | ac_cv_search_tgetent="no" | |
3875 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3876 | #line 3877 "configure" |
06825bd1 MK |
3877 | #include "confdefs.h" |
3878 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3879 | /* We use char because int might match the return type of a gcc2 | |
3880 | builtin and then its argument prototype would still apply. */ | |
3881 | char tgetent(); | |
3882 | ||
3883 | int main() { | |
3884 | tgetent() | |
3885 | ; return 0; } | |
3886 | EOF | |
d3e0a5bf | 3887 | if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3888 | rm -rf conftest* |
3889 | ac_cv_search_tgetent="none required" | |
3890 | else | |
3891 | echo "configure: failed program was:" >&5 | |
3892 | cat conftest.$ac_ext >&5 | |
3893 | fi | |
3894 | rm -f conftest* | |
3895 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3896 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3897 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3898 | #line 3899 "configure" |
06825bd1 MK |
3899 | #include "confdefs.h" |
3900 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3901 | /* We use char because int might match the return type of a gcc2 | |
3902 | builtin and then its argument prototype would still apply. */ | |
3903 | char tgetent(); | |
3904 | ||
3905 | int main() { | |
3906 | tgetent() | |
3907 | ; return 0; } | |
3908 | EOF | |
d3e0a5bf | 3909 | if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3910 | rm -rf conftest* |
3911 | ac_cv_search_tgetent="-l$i" | |
3912 | break | |
3913 | else | |
3914 | echo "configure: failed program was:" >&5 | |
3915 | cat conftest.$ac_ext >&5 | |
3916 | fi | |
3917 | rm -f conftest* | |
3918 | done | |
3919 | LIBS="$ac_func_search_save_LIBS" | |
3920 | fi | |
3921 | ||
3922 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3923 | if test "$ac_cv_search_tgetent" != "no"; then | |
3924 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3925 | ||
3926 | else : | |
3927 | ||
3928 | fi | |
3929 | ;; | |
3930 | esac | |
3931 | ||
3932 | # Note: We used to check for libtermlib and libterminfo too, but | |
3933 | # Readline doesn't, so I think we're safe with leaving them out. | |
3934 | ||
3935 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
d3e0a5bf | 3936 | echo "configure:3937: checking for library containing tgetent" >&5 |
06825bd1 MK |
3937 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3938 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3939 | else | |
3940 | ac_func_search_save_LIBS="$LIBS" | |
3941 | ac_cv_search_tgetent="no" | |
3942 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3943 | #line 3944 "configure" |
06825bd1 MK |
3944 | #include "confdefs.h" |
3945 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3946 | /* We use char because int might match the return type of a gcc2 | |
3947 | builtin and then its argument prototype would still apply. */ | |
3948 | char tgetent(); | |
3949 | ||
3950 | int main() { | |
3951 | tgetent() | |
3952 | ; return 0; } | |
3953 | EOF | |
d3e0a5bf | 3954 | if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3955 | rm -rf conftest* |
3956 | ac_cv_search_tgetent="none required" | |
3957 | else | |
3958 | echo "configure: failed program was:" >&5 | |
3959 | cat conftest.$ac_ext >&5 | |
3960 | fi | |
3961 | rm -f conftest* | |
3962 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3963 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3964 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 3965 | #line 3966 "configure" |
06825bd1 MK |
3966 | #include "confdefs.h" |
3967 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3968 | /* We use char because int might match the return type of a gcc2 | |
3969 | builtin and then its argument prototype would still apply. */ | |
3970 | char tgetent(); | |
3971 | ||
3972 | int main() { | |
3973 | tgetent() | |
3974 | ; return 0; } | |
3975 | EOF | |
d3e0a5bf | 3976 | if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3977 | rm -rf conftest* |
3978 | ac_cv_search_tgetent="-l$i" | |
3979 | break | |
3980 | else | |
3981 | echo "configure: failed program was:" >&5 | |
3982 | cat conftest.$ac_ext >&5 | |
3983 | fi | |
3984 | rm -f conftest* | |
3985 | done | |
3986 | LIBS="$ac_func_search_save_LIBS" | |
3987 | fi | |
3988 | ||
3989 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3990 | if test "$ac_cv_search_tgetent" != "no"; then | |
3991 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3992 | ||
3993 | else : | |
3994 | ||
3995 | fi | |
3996 | ||
3997 | if test "$ac_cv_search_tgetent" = no; then | |
3998 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3999 | fi | |
4000 | ||
5ee754fc MK |
4001 | # ------------------------- # |
4002 | # Checks for header files. # | |
4003 | # ------------------------- # | |
4004 | ||
4005 | ac_header_dirent=no | |
4006 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4007 | do | |
4008 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4009 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
d3e0a5bf | 4010 | echo "configure:4011: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 4011 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
4012 | echo $ac_n "(cached) $ac_c" 1>&6 |
4013 | else | |
4014 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4015 | #line 4016 "configure" |
c906108c SS |
4016 | #include "confdefs.h" |
4017 | #include <sys/types.h> | |
5ee754fc MK |
4018 | #include <$ac_hdr> |
4019 | int main() { | |
4020 | DIR *dirp = 0; | |
4021 | ; return 0; } | |
4022 | EOF | |
d3e0a5bf | 4023 | if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
4024 | rm -rf conftest* |
4025 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4026 | else | |
4027 | echo "configure: failed program was:" >&5 | |
4028 | cat conftest.$ac_ext >&5 | |
4029 | rm -rf conftest* | |
4030 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4031 | fi | |
4032 | rm -f conftest* | |
4033 | fi | |
4034 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4035 | echo "$ac_t""yes" 1>&6 | |
4036 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4037 | cat >> confdefs.h <<EOF | |
4038 | #define $ac_tr_hdr 1 | |
4039 | EOF | |
4040 | ac_header_dirent=$ac_hdr; break | |
4041 | else | |
4042 | echo "$ac_t""no" 1>&6 | |
4043 | fi | |
4044 | done | |
4045 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4046 | if test $ac_header_dirent = dirent.h; then | |
4047 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
d3e0a5bf | 4048 | echo "configure:4049: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4049 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4050 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4052 | else | |
4053 | ac_save_LIBS="$LIBS" | |
4054 | LIBS="-ldir $LIBS" | |
4055 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4056 | #line 4057 "configure" |
5ee754fc MK |
4057 | #include "confdefs.h" |
4058 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4059 | /* We use char because int might match the return type of a gcc2 | |
4060 | builtin and then its argument prototype would still apply. */ | |
4061 | char opendir(); | |
c906108c SS |
4062 | |
4063 | int main() { | |
5ee754fc | 4064 | opendir() |
c906108c SS |
4065 | ; return 0; } |
4066 | EOF | |
d3e0a5bf | 4067 | if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4068 | rm -rf conftest* |
5ee754fc | 4069 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4070 | else |
4071 | echo "configure: failed program was:" >&5 | |
4072 | cat conftest.$ac_ext >&5 | |
4073 | rm -rf conftest* | |
5ee754fc | 4074 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4075 | fi |
4076 | rm -f conftest* | |
5ee754fc MK |
4077 | LIBS="$ac_save_LIBS" |
4078 | ||
4079 | fi | |
4080 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4081 | echo "$ac_t""yes" 1>&6 | |
4082 | LIBS="$LIBS -ldir" | |
4083 | else | |
4084 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4085 | fi |
4086 | ||
5ee754fc MK |
4087 | else |
4088 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
d3e0a5bf | 4089 | echo "configure:4090: checking for opendir in -lx" >&5 |
5ee754fc MK |
4090 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4091 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4092 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4093 | else | |
4094 | ac_save_LIBS="$LIBS" | |
4095 | LIBS="-lx $LIBS" | |
4096 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4097 | #line 4098 "configure" |
5ee754fc MK |
4098 | #include "confdefs.h" |
4099 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4100 | /* We use char because int might match the return type of a gcc2 | |
4101 | builtin and then its argument prototype would still apply. */ | |
4102 | char opendir(); | |
4103 | ||
4104 | int main() { | |
4105 | opendir() | |
4106 | ; return 0; } | |
c906108c | 4107 | EOF |
d3e0a5bf | 4108 | if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4109 | rm -rf conftest* |
4110 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4111 | else | |
4112 | echo "configure: failed program was:" >&5 | |
4113 | cat conftest.$ac_ext >&5 | |
4114 | rm -rf conftest* | |
4115 | eval "ac_cv_lib_$ac_lib_var=no" | |
4116 | fi | |
4117 | rm -f conftest* | |
4118 | LIBS="$ac_save_LIBS" | |
c906108c | 4119 | |
5ee754fc MK |
4120 | fi |
4121 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4122 | echo "$ac_t""yes" 1>&6 | |
4123 | LIBS="$LIBS -lx" | |
4124 | else | |
4125 | echo "$ac_t""no" 1>&6 | |
4126 | fi | |
c906108c | 4127 | |
5ee754fc | 4128 | fi |
c906108c | 4129 | |
5ee754fc | 4130 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
d3e0a5bf | 4131 | echo "configure:4132: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4132 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4133 | echo $ac_n "(cached) $ac_c" 1>&6 |
4134 | else | |
4135 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4136 | #line 4137 "configure" |
9608ab8b MK |
4137 | #include "confdefs.h" |
4138 | #include <sys/types.h> | |
5ee754fc MK |
4139 | #include <sys/stat.h> |
4140 | ||
4141 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4142 | # if S_ISBLK (S_IFDIR) | |
4143 | You lose. | |
4144 | # endif | |
4145 | #endif | |
4146 | ||
4147 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4148 | # if S_ISBLK (S_IFCHR) | |
4149 | You lose. | |
4150 | # endif | |
4151 | #endif | |
4152 | ||
4153 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4154 | # if S_ISLNK (S_IFREG) | |
4155 | You lose. | |
4156 | # endif | |
4157 | #endif | |
4158 | ||
4159 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4160 | # if S_ISSOCK (S_IFREG) | |
4161 | You lose. | |
4162 | # endif | |
4163 | #endif | |
4164 | ||
9608ab8b | 4165 | EOF |
5ee754fc MK |
4166 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4167 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4168 | rm -rf conftest* |
5ee754fc MK |
4169 | ac_cv_header_stat_broken=yes |
4170 | else | |
4171 | rm -rf conftest* | |
4172 | ac_cv_header_stat_broken=no | |
4173 | fi | |
4174 | rm -f conftest* | |
4175 | ||
4176 | fi | |
4177 | ||
4178 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4179 | if test $ac_cv_header_stat_broken = yes; then | |
4180 | cat >> confdefs.h <<\EOF | |
4181 | #define STAT_MACROS_BROKEN 1 | |
4182 | EOF | |
4183 | ||
4184 | fi | |
4185 | ||
4186 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
d3e0a5bf | 4187 | echo "configure:4188: checking for ANSI C header files" >&5 |
5ee754fc MK |
4188 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4190 | else | |
4191 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4192 | #line 4193 "configure" |
5ee754fc MK |
4193 | #include "confdefs.h" |
4194 | #include <stdlib.h> | |
4195 | #include <stdarg.h> | |
4196 | #include <string.h> | |
4197 | #include <float.h> | |
4198 | EOF | |
4199 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4200 | { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4201 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4202 | if test -z "$ac_err"; then | |
4203 | rm -rf conftest* | |
4204 | ac_cv_header_stdc=yes | |
4205 | else | |
4206 | echo "$ac_err" >&5 | |
4207 | echo "configure: failed program was:" >&5 | |
4208 | cat conftest.$ac_ext >&5 | |
4209 | rm -rf conftest* | |
4210 | ac_cv_header_stdc=no | |
4211 | fi | |
4212 | rm -f conftest* | |
4213 | ||
4214 | if test $ac_cv_header_stdc = yes; then | |
4215 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4216 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4217 | #line 4218 "configure" |
5ee754fc MK |
4218 | #include "confdefs.h" |
4219 | #include <string.h> | |
4220 | EOF | |
4221 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4222 | egrep "memchr" >/dev/null 2>&1; then | |
4223 | : | |
4224 | else | |
4225 | rm -rf conftest* | |
4226 | ac_cv_header_stdc=no | |
4227 | fi | |
4228 | rm -f conftest* | |
4229 | ||
4230 | fi | |
4231 | ||
4232 | if test $ac_cv_header_stdc = yes; then | |
4233 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4234 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4235 | #line 4236 "configure" |
5ee754fc MK |
4236 | #include "confdefs.h" |
4237 | #include <stdlib.h> | |
4238 | EOF | |
4239 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4240 | egrep "free" >/dev/null 2>&1; then | |
4241 | : | |
4242 | else | |
4243 | rm -rf conftest* | |
4244 | ac_cv_header_stdc=no | |
4245 | fi | |
4246 | rm -f conftest* | |
4247 | ||
4248 | fi | |
4249 | ||
4250 | if test $ac_cv_header_stdc = yes; then | |
4251 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4252 | if test "$cross_compiling" = yes; then | |
4253 | : | |
4254 | else | |
4255 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4256 | #line 4257 "configure" |
5ee754fc MK |
4257 | #include "confdefs.h" |
4258 | #include <ctype.h> | |
4259 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4260 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4261 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4262 | int main () { int i; for (i = 0; i < 256; i++) | |
4263 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4264 | exit (0); } | |
4265 | ||
4266 | EOF | |
d3e0a5bf | 4267 | if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4268 | then |
4269 | : | |
9608ab8b | 4270 | else |
5ee754fc MK |
4271 | echo "configure: failed program was:" >&5 |
4272 | cat conftest.$ac_ext >&5 | |
4273 | rm -fr conftest* | |
4274 | ac_cv_header_stdc=no | |
4275 | fi | |
4276 | rm -fr conftest* | |
4277 | fi | |
4278 | ||
4279 | fi | |
4280 | fi | |
4281 | ||
4282 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4283 | if test $ac_cv_header_stdc = yes; then | |
4284 | cat >> confdefs.h <<\EOF | |
4285 | #define STDC_HEADERS 1 | |
4286 | EOF | |
4287 | ||
4288 | fi | |
4289 | ||
4290 | for ac_hdr in link.h | |
4291 | do | |
4292 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4293 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4294 | echo "configure:4295: checking for $ac_hdr" >&5 |
5ee754fc MK |
4295 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4297 | else | |
4298 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4299 | #line 4300 "configure" |
5ee754fc MK |
4300 | #include "confdefs.h" |
4301 | #include <$ac_hdr> | |
4302 | EOF | |
4303 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4304 | { (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4305 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4306 | if test -z "$ac_err"; then | |
4307 | rm -rf conftest* | |
4308 | eval "ac_cv_header_$ac_safe=yes" | |
4309 | else | |
4310 | echo "$ac_err" >&5 | |
4311 | echo "configure: failed program was:" >&5 | |
4312 | cat conftest.$ac_ext >&5 | |
4313 | rm -rf conftest* | |
4314 | eval "ac_cv_header_$ac_safe=no" | |
4315 | fi | |
4316 | rm -f conftest* | |
4317 | fi | |
4318 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4319 | echo "$ac_t""yes" 1>&6 | |
4320 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4321 | cat >> confdefs.h <<EOF | |
4322 | #define $ac_tr_hdr 1 | |
4323 | EOF | |
4324 | ||
4325 | else | |
4326 | echo "$ac_t""no" 1>&6 | |
4327 | fi | |
4328 | done | |
4329 | ||
4330 | for ac_hdr in nlist.h | |
4331 | do | |
4332 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4333 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4334 | echo "configure:4335: checking for $ac_hdr" >&5 |
5ee754fc MK |
4335 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4336 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4337 | else | |
4338 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4339 | #line 4340 "configure" |
5ee754fc MK |
4340 | #include "confdefs.h" |
4341 | #include <$ac_hdr> | |
4342 | EOF | |
4343 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4344 | { (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4345 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4346 | if test -z "$ac_err"; then | |
4347 | rm -rf conftest* | |
4348 | eval "ac_cv_header_$ac_safe=yes" | |
4349 | else | |
4350 | echo "$ac_err" >&5 | |
4351 | echo "configure: failed program was:" >&5 | |
4352 | cat conftest.$ac_ext >&5 | |
4353 | rm -rf conftest* | |
4354 | eval "ac_cv_header_$ac_safe=no" | |
4355 | fi | |
4356 | rm -f conftest* | |
4357 | fi | |
4358 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4359 | echo "$ac_t""yes" 1>&6 | |
4360 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4361 | cat >> confdefs.h <<EOF | |
4362 | #define $ac_tr_hdr 1 | |
4363 | EOF | |
4364 | ||
4365 | else | |
4366 | echo "$ac_t""no" 1>&6 | |
4367 | fi | |
4368 | done | |
4369 | ||
4370 | for ac_hdr in poll.h sys/poll.h | |
4371 | do | |
4372 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4373 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4374 | echo "configure:4375: checking for $ac_hdr" >&5 |
5ee754fc MK |
4375 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4376 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4377 | else | |
4378 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4379 | #line 4380 "configure" |
5ee754fc MK |
4380 | #include "confdefs.h" |
4381 | #include <$ac_hdr> | |
4382 | EOF | |
4383 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4384 | { (eval echo configure:4385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4385 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4386 | if test -z "$ac_err"; then | |
4387 | rm -rf conftest* | |
4388 | eval "ac_cv_header_$ac_safe=yes" | |
4389 | else | |
4390 | echo "$ac_err" >&5 | |
4391 | echo "configure: failed program was:" >&5 | |
4392 | cat conftest.$ac_ext >&5 | |
4393 | rm -rf conftest* | |
4394 | eval "ac_cv_header_$ac_safe=no" | |
4395 | fi | |
4396 | rm -f conftest* | |
4397 | fi | |
4398 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4399 | echo "$ac_t""yes" 1>&6 | |
4400 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4401 | cat >> confdefs.h <<EOF | |
4402 | #define $ac_tr_hdr 1 | |
4403 | EOF | |
4404 | ||
4405 | else | |
4406 | echo "$ac_t""no" 1>&6 | |
4407 | fi | |
4408 | done | |
4409 | ||
4410 | for ac_hdr in proc_service.h thread_db.h | |
4411 | do | |
4412 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4413 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4414 | echo "configure:4415: checking for $ac_hdr" >&5 |
5ee754fc MK |
4415 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4416 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4417 | else | |
4418 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4419 | #line 4420 "configure" |
5ee754fc MK |
4420 | #include "confdefs.h" |
4421 | #include <$ac_hdr> | |
4422 | EOF | |
4423 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4424 | { (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4425 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4426 | if test -z "$ac_err"; then | |
4427 | rm -rf conftest* | |
4428 | eval "ac_cv_header_$ac_safe=yes" | |
4429 | else | |
4430 | echo "$ac_err" >&5 | |
4431 | echo "configure: failed program was:" >&5 | |
4432 | cat conftest.$ac_ext >&5 | |
4433 | rm -rf conftest* | |
4434 | eval "ac_cv_header_$ac_safe=no" | |
4435 | fi | |
4436 | rm -f conftest* | |
4437 | fi | |
4438 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4439 | echo "$ac_t""yes" 1>&6 | |
4440 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4441 | cat >> confdefs.h <<EOF | |
4442 | #define $ac_tr_hdr 1 | |
4443 | EOF | |
4444 | ||
4445 | else | |
4446 | echo "$ac_t""no" 1>&6 | |
4447 | fi | |
4448 | done | |
4449 | ||
4450 | for ac_hdr in stddef.h | |
4451 | do | |
4452 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4453 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4454 | echo "configure:4455: checking for $ac_hdr" >&5 |
5ee754fc MK |
4455 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4457 | else | |
4458 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4459 | #line 4460 "configure" |
5ee754fc MK |
4460 | #include "confdefs.h" |
4461 | #include <$ac_hdr> | |
4462 | EOF | |
4463 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4464 | { (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4465 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4466 | if test -z "$ac_err"; then | |
4467 | rm -rf conftest* | |
4468 | eval "ac_cv_header_$ac_safe=yes" | |
4469 | else | |
4470 | echo "$ac_err" >&5 | |
4471 | echo "configure: failed program was:" >&5 | |
4472 | cat conftest.$ac_ext >&5 | |
4473 | rm -rf conftest* | |
4474 | eval "ac_cv_header_$ac_safe=no" | |
4475 | fi | |
4476 | rm -f conftest* | |
4477 | fi | |
4478 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4479 | echo "$ac_t""yes" 1>&6 | |
4480 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4481 | cat >> confdefs.h <<EOF | |
4482 | #define $ac_tr_hdr 1 | |
4483 | EOF | |
4484 | ||
4485 | else | |
4486 | echo "$ac_t""no" 1>&6 | |
4487 | fi | |
4488 | done | |
4489 | ||
4490 | for ac_hdr in stdlib.h | |
4491 | do | |
4492 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4493 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4494 | echo "configure:4495: checking for $ac_hdr" >&5 |
5ee754fc MK |
4495 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4497 | else | |
4498 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4499 | #line 4500 "configure" |
5ee754fc MK |
4500 | #include "confdefs.h" |
4501 | #include <$ac_hdr> | |
4502 | EOF | |
4503 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4504 | { (eval echo configure:4505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4505 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4506 | if test -z "$ac_err"; then | |
4507 | rm -rf conftest* | |
4508 | eval "ac_cv_header_$ac_safe=yes" | |
4509 | else | |
4510 | echo "$ac_err" >&5 | |
4511 | echo "configure: failed program was:" >&5 | |
4512 | cat conftest.$ac_ext >&5 | |
4513 | rm -rf conftest* | |
4514 | eval "ac_cv_header_$ac_safe=no" | |
4515 | fi | |
4516 | rm -f conftest* | |
4517 | fi | |
4518 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4519 | echo "$ac_t""yes" 1>&6 | |
4520 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4521 | cat >> confdefs.h <<EOF | |
4522 | #define $ac_tr_hdr 1 | |
4523 | EOF | |
4524 | ||
4525 | else | |
4526 | echo "$ac_t""no" 1>&6 | |
4527 | fi | |
4528 | done | |
4529 | ||
4530 | for ac_hdr in stdint.h | |
4531 | do | |
4532 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4533 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4534 | echo "configure:4535: checking for $ac_hdr" >&5 |
5ee754fc MK |
4535 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4536 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4537 | else | |
4538 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4539 | #line 4540 "configure" |
5ee754fc MK |
4540 | #include "confdefs.h" |
4541 | #include <$ac_hdr> | |
4542 | EOF | |
4543 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4544 | { (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4545 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4546 | if test -z "$ac_err"; then | |
4547 | rm -rf conftest* | |
4548 | eval "ac_cv_header_$ac_safe=yes" | |
4549 | else | |
4550 | echo "$ac_err" >&5 | |
4551 | echo "configure: failed program was:" >&5 | |
4552 | cat conftest.$ac_ext >&5 | |
4553 | rm -rf conftest* | |
4554 | eval "ac_cv_header_$ac_safe=no" | |
4555 | fi | |
4556 | rm -f conftest* | |
4557 | fi | |
4558 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4559 | echo "$ac_t""yes" 1>&6 | |
4560 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4561 | cat >> confdefs.h <<EOF | |
4562 | #define $ac_tr_hdr 1 | |
4563 | EOF | |
4564 | ||
4565 | else | |
4566 | echo "$ac_t""no" 1>&6 | |
4567 | fi | |
4568 | done | |
4569 | ||
4570 | for ac_hdr in string.h memory.h strings.h | |
4571 | do | |
4572 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4573 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4574 | echo "configure:4575: checking for $ac_hdr" >&5 |
5ee754fc MK |
4575 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4576 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4577 | else | |
4578 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4579 | #line 4580 "configure" |
5ee754fc MK |
4580 | #include "confdefs.h" |
4581 | #include <$ac_hdr> | |
4582 | EOF | |
4583 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4584 | { (eval echo configure:4585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4585 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4586 | if test -z "$ac_err"; then | |
4587 | rm -rf conftest* | |
4588 | eval "ac_cv_header_$ac_safe=yes" | |
4589 | else | |
4590 | echo "$ac_err" >&5 | |
4591 | echo "configure: failed program was:" >&5 | |
4592 | cat conftest.$ac_ext >&5 | |
4593 | rm -rf conftest* | |
4594 | eval "ac_cv_header_$ac_safe=no" | |
4595 | fi | |
4596 | rm -f conftest* | |
4597 | fi | |
4598 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4599 | echo "$ac_t""yes" 1>&6 | |
4600 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4601 | cat >> confdefs.h <<EOF | |
4602 | #define $ac_tr_hdr 1 | |
4603 | EOF | |
4604 | ||
4605 | else | |
4606 | echo "$ac_t""no" 1>&6 | |
4607 | fi | |
4608 | done | |
4609 | ||
4610 | for ac_hdr in sys/fault.h | |
4611 | do | |
4612 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4613 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4614 | echo "configure:4615: checking for $ac_hdr" >&5 |
5ee754fc MK |
4615 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4616 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4617 | else | |
4618 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4619 | #line 4620 "configure" |
5ee754fc MK |
4620 | #include "confdefs.h" |
4621 | #include <$ac_hdr> | |
4622 | EOF | |
4623 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4624 | { (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4625 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4626 | if test -z "$ac_err"; then | |
4627 | rm -rf conftest* | |
4628 | eval "ac_cv_header_$ac_safe=yes" | |
4629 | else | |
4630 | echo "$ac_err" >&5 | |
4631 | echo "configure: failed program was:" >&5 | |
4632 | cat conftest.$ac_ext >&5 | |
4633 | rm -rf conftest* | |
4634 | eval "ac_cv_header_$ac_safe=no" | |
4635 | fi | |
4636 | rm -f conftest* | |
4637 | fi | |
4638 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4639 | echo "$ac_t""yes" 1>&6 | |
4640 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4641 | cat >> confdefs.h <<EOF | |
4642 | #define $ac_tr_hdr 1 | |
4643 | EOF | |
4644 | ||
4645 | else | |
4646 | echo "$ac_t""no" 1>&6 | |
4647 | fi | |
4648 | done | |
4649 | ||
4650 | for ac_hdr in sys/file.h | |
4651 | do | |
4652 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4653 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4654 | echo "configure:4655: checking for $ac_hdr" >&5 |
5ee754fc MK |
4655 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4657 | else | |
4658 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4659 | #line 4660 "configure" |
5ee754fc MK |
4660 | #include "confdefs.h" |
4661 | #include <$ac_hdr> | |
4662 | EOF | |
4663 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4664 | { (eval echo configure:4665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4665 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4666 | if test -z "$ac_err"; then | |
4667 | rm -rf conftest* | |
4668 | eval "ac_cv_header_$ac_safe=yes" | |
4669 | else | |
4670 | echo "$ac_err" >&5 | |
4671 | echo "configure: failed program was:" >&5 | |
4672 | cat conftest.$ac_ext >&5 | |
4673 | rm -rf conftest* | |
4674 | eval "ac_cv_header_$ac_safe=no" | |
4675 | fi | |
4676 | rm -f conftest* | |
4677 | fi | |
4678 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4679 | echo "$ac_t""yes" 1>&6 | |
4680 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4681 | cat >> confdefs.h <<EOF | |
4682 | #define $ac_tr_hdr 1 | |
4683 | EOF | |
4684 | ||
4685 | else | |
4686 | echo "$ac_t""no" 1>&6 | |
4687 | fi | |
4688 | done | |
4689 | ||
4690 | for ac_hdr in sys/filio.h | |
4691 | do | |
4692 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4693 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4694 | echo "configure:4695: checking for $ac_hdr" >&5 |
5ee754fc MK |
4695 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4697 | else | |
4698 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4699 | #line 4700 "configure" |
5ee754fc MK |
4700 | #include "confdefs.h" |
4701 | #include <$ac_hdr> | |
4702 | EOF | |
4703 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4704 | { (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4705 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4706 | if test -z "$ac_err"; then | |
4707 | rm -rf conftest* | |
4708 | eval "ac_cv_header_$ac_safe=yes" | |
4709 | else | |
4710 | echo "$ac_err" >&5 | |
4711 | echo "configure: failed program was:" >&5 | |
4712 | cat conftest.$ac_ext >&5 | |
4713 | rm -rf conftest* | |
4714 | eval "ac_cv_header_$ac_safe=no" | |
4715 | fi | |
4716 | rm -f conftest* | |
4717 | fi | |
4718 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4719 | echo "$ac_t""yes" 1>&6 | |
4720 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4721 | cat >> confdefs.h <<EOF | |
4722 | #define $ac_tr_hdr 1 | |
4723 | EOF | |
4724 | ||
4725 | else | |
4726 | echo "$ac_t""no" 1>&6 | |
4727 | fi | |
4728 | done | |
4729 | ||
4730 | for ac_hdr in sys/ioctl.h | |
4731 | do | |
4732 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4733 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4734 | echo "configure:4735: checking for $ac_hdr" >&5 |
5ee754fc MK |
4735 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4737 | else | |
4738 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4739 | #line 4740 "configure" |
5ee754fc MK |
4740 | #include "confdefs.h" |
4741 | #include <$ac_hdr> | |
4742 | EOF | |
4743 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4744 | { (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4745 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4746 | if test -z "$ac_err"; then | |
4747 | rm -rf conftest* | |
4748 | eval "ac_cv_header_$ac_safe=yes" | |
4749 | else | |
4750 | echo "$ac_err" >&5 | |
4751 | echo "configure: failed program was:" >&5 | |
4752 | cat conftest.$ac_ext >&5 | |
4753 | rm -rf conftest* | |
4754 | eval "ac_cv_header_$ac_safe=no" | |
4755 | fi | |
4756 | rm -f conftest* | |
4757 | fi | |
4758 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4759 | echo "$ac_t""yes" 1>&6 | |
4760 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4761 | cat >> confdefs.h <<EOF | |
4762 | #define $ac_tr_hdr 1 | |
4763 | EOF | |
4764 | ||
4765 | else | |
4766 | echo "$ac_t""no" 1>&6 | |
4767 | fi | |
4768 | done | |
4769 | ||
4770 | for ac_hdr in sys/param.h | |
4771 | do | |
4772 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4773 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4774 | echo "configure:4775: checking for $ac_hdr" >&5 |
5ee754fc MK |
4775 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4777 | else | |
4778 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4779 | #line 4780 "configure" |
5ee754fc MK |
4780 | #include "confdefs.h" |
4781 | #include <$ac_hdr> | |
4782 | EOF | |
4783 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4784 | { (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4785 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4786 | if test -z "$ac_err"; then | |
4787 | rm -rf conftest* | |
4788 | eval "ac_cv_header_$ac_safe=yes" | |
4789 | else | |
4790 | echo "$ac_err" >&5 | |
4791 | echo "configure: failed program was:" >&5 | |
4792 | cat conftest.$ac_ext >&5 | |
4793 | rm -rf conftest* | |
4794 | eval "ac_cv_header_$ac_safe=no" | |
4795 | fi | |
4796 | rm -f conftest* | |
4797 | fi | |
4798 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4799 | echo "$ac_t""yes" 1>&6 | |
4800 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4801 | cat >> confdefs.h <<EOF | |
4802 | #define $ac_tr_hdr 1 | |
4803 | EOF | |
4804 | ||
4805 | else | |
4806 | echo "$ac_t""no" 1>&6 | |
4807 | fi | |
4808 | done | |
4809 | ||
4810 | for ac_hdr in sys/proc.h | |
4811 | do | |
4812 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4813 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4814 | echo "configure:4815: checking for $ac_hdr" >&5 |
5ee754fc MK |
4815 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4816 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4817 | else | |
4818 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4819 | #line 4820 "configure" |
5ee754fc MK |
4820 | #include "confdefs.h" |
4821 | #include <$ac_hdr> | |
4822 | EOF | |
4823 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4824 | { (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4825 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4826 | if test -z "$ac_err"; then | |
4827 | rm -rf conftest* | |
4828 | eval "ac_cv_header_$ac_safe=yes" | |
4829 | else | |
4830 | echo "$ac_err" >&5 | |
4831 | echo "configure: failed program was:" >&5 | |
4832 | cat conftest.$ac_ext >&5 | |
4833 | rm -rf conftest* | |
4834 | eval "ac_cv_header_$ac_safe=no" | |
4835 | fi | |
4836 | rm -f conftest* | |
4837 | fi | |
4838 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4839 | echo "$ac_t""yes" 1>&6 | |
4840 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4841 | cat >> confdefs.h <<EOF | |
4842 | #define $ac_tr_hdr 1 | |
4843 | EOF | |
4844 | ||
4845 | else | |
4846 | echo "$ac_t""no" 1>&6 | |
4847 | fi | |
4848 | done | |
4849 | ||
4850 | for ac_hdr in sys/procfs.h | |
4851 | do | |
4852 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4853 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4854 | echo "configure:4855: checking for $ac_hdr" >&5 |
5ee754fc MK |
4855 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4857 | else | |
4858 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4859 | #line 4860 "configure" |
5ee754fc MK |
4860 | #include "confdefs.h" |
4861 | #include <$ac_hdr> | |
4862 | EOF | |
4863 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4864 | { (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4865 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4866 | if test -z "$ac_err"; then | |
4867 | rm -rf conftest* | |
4868 | eval "ac_cv_header_$ac_safe=yes" | |
4869 | else | |
4870 | echo "$ac_err" >&5 | |
4871 | echo "configure: failed program was:" >&5 | |
4872 | cat conftest.$ac_ext >&5 | |
4873 | rm -rf conftest* | |
4874 | eval "ac_cv_header_$ac_safe=no" | |
4875 | fi | |
4876 | rm -f conftest* | |
4877 | fi | |
4878 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4879 | echo "$ac_t""yes" 1>&6 | |
4880 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4881 | cat >> confdefs.h <<EOF | |
4882 | #define $ac_tr_hdr 1 | |
4883 | EOF | |
4884 | ||
4885 | else | |
4886 | echo "$ac_t""no" 1>&6 | |
4887 | fi | |
4888 | done | |
4889 | ||
4890 | for ac_hdr in sys/ptrace.h ptrace.h | |
4891 | do | |
4892 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4893 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4894 | echo "configure:4895: checking for $ac_hdr" >&5 |
5ee754fc MK |
4895 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4896 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4897 | else | |
4898 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4899 | #line 4900 "configure" |
5ee754fc MK |
4900 | #include "confdefs.h" |
4901 | #include <$ac_hdr> | |
4902 | EOF | |
4903 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4904 | { (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4905 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4906 | if test -z "$ac_err"; then | |
4907 | rm -rf conftest* | |
4908 | eval "ac_cv_header_$ac_safe=yes" | |
4909 | else | |
4910 | echo "$ac_err" >&5 | |
4911 | echo "configure: failed program was:" >&5 | |
4912 | cat conftest.$ac_ext >&5 | |
4913 | rm -rf conftest* | |
4914 | eval "ac_cv_header_$ac_safe=no" | |
4915 | fi | |
4916 | rm -f conftest* | |
4917 | fi | |
4918 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4919 | echo "$ac_t""yes" 1>&6 | |
4920 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4921 | cat >> confdefs.h <<EOF | |
4922 | #define $ac_tr_hdr 1 | |
4923 | EOF | |
4924 | ||
4925 | else | |
4926 | echo "$ac_t""no" 1>&6 | |
4927 | fi | |
4928 | done | |
4929 | ||
4930 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4931 | do | |
4932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4933 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4934 | echo "configure:4935: checking for $ac_hdr" >&5 |
5ee754fc MK |
4935 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4936 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4937 | else | |
4938 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4939 | #line 4940 "configure" |
5ee754fc MK |
4940 | #include "confdefs.h" |
4941 | #include <$ac_hdr> | |
4942 | EOF | |
4943 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4944 | { (eval echo configure:4945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4945 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4946 | if test -z "$ac_err"; then | |
4947 | rm -rf conftest* | |
4948 | eval "ac_cv_header_$ac_safe=yes" | |
4949 | else | |
4950 | echo "$ac_err" >&5 | |
4951 | echo "configure: failed program was:" >&5 | |
4952 | cat conftest.$ac_ext >&5 | |
4953 | rm -rf conftest* | |
4954 | eval "ac_cv_header_$ac_safe=no" | |
4955 | fi | |
4956 | rm -f conftest* | |
4957 | fi | |
4958 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4959 | echo "$ac_t""yes" 1>&6 | |
4960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4961 | cat >> confdefs.h <<EOF | |
4962 | #define $ac_tr_hdr 1 | |
4963 | EOF | |
4964 | ||
4965 | else | |
4966 | echo "$ac_t""no" 1>&6 | |
4967 | fi | |
4968 | done | |
4969 | ||
4970 | for ac_hdr in sys/select.h | |
4971 | do | |
4972 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4973 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 4974 | echo "configure:4975: checking for $ac_hdr" >&5 |
5ee754fc MK |
4975 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977 | else | |
4978 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 4979 | #line 4980 "configure" |
5ee754fc MK |
4980 | #include "confdefs.h" |
4981 | #include <$ac_hdr> | |
4982 | EOF | |
4983 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 4984 | { (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4985 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4986 | if test -z "$ac_err"; then | |
4987 | rm -rf conftest* | |
4988 | eval "ac_cv_header_$ac_safe=yes" | |
4989 | else | |
4990 | echo "$ac_err" >&5 | |
4991 | echo "configure: failed program was:" >&5 | |
4992 | cat conftest.$ac_ext >&5 | |
4993 | rm -rf conftest* | |
4994 | eval "ac_cv_header_$ac_safe=no" | |
4995 | fi | |
4996 | rm -f conftest* | |
4997 | fi | |
4998 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4999 | echo "$ac_t""yes" 1>&6 | |
5000 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5001 | cat >> confdefs.h <<EOF | |
5002 | #define $ac_tr_hdr 1 | |
5003 | EOF | |
5004 | ||
5005 | else | |
5006 | echo "$ac_t""no" 1>&6 | |
5007 | fi | |
5008 | done | |
5009 | ||
5010 | for ac_hdr in sys/syscall.h | |
5011 | do | |
5012 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5013 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5014 | echo "configure:5015: checking for $ac_hdr" >&5 |
5ee754fc MK |
5015 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5017 | else | |
5018 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 5019 | #line 5020 "configure" |
5ee754fc MK |
5020 | #include "confdefs.h" |
5021 | #include <$ac_hdr> | |
5022 | EOF | |
5023 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 5024 | { (eval echo configure:5025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5025 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5026 | if test -z "$ac_err"; then | |
5027 | rm -rf conftest* | |
5028 | eval "ac_cv_header_$ac_safe=yes" | |
5029 | else | |
5030 | echo "$ac_err" >&5 | |
5031 | echo "configure: failed program was:" >&5 | |
5032 | cat conftest.$ac_ext >&5 | |
5033 | rm -rf conftest* | |
5034 | eval "ac_cv_header_$ac_safe=no" | |
5035 | fi | |
5036 | rm -f conftest* | |
5037 | fi | |
5038 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5039 | echo "$ac_t""yes" 1>&6 | |
5040 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5041 | cat >> confdefs.h <<EOF | |
5042 | #define $ac_tr_hdr 1 | |
5043 | EOF | |
5044 | ||
5045 | else | |
5046 | echo "$ac_t""no" 1>&6 | |
5047 | fi | |
5048 | done | |
5049 | ||
5050 | for ac_hdr in sys/user.h | |
5051 | do | |
5052 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5053 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5054 | echo "configure:5055: checking for $ac_hdr" >&5 |
5ee754fc MK |
5055 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5056 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5057 | else | |
5058 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 5059 | #line 5060 "configure" |
5ee754fc MK |
5060 | #include "confdefs.h" |
5061 | #include <$ac_hdr> | |
5062 | EOF | |
5063 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 5064 | { (eval echo configure:5065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5065 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5066 | if test -z "$ac_err"; then | |
5067 | rm -rf conftest* | |
5068 | eval "ac_cv_header_$ac_safe=yes" | |
5069 | else | |
5070 | echo "$ac_err" >&5 | |
5071 | echo "configure: failed program was:" >&5 | |
5072 | cat conftest.$ac_ext >&5 | |
5073 | rm -rf conftest* | |
5074 | eval "ac_cv_header_$ac_safe=no" | |
5075 | fi | |
5076 | rm -f conftest* | |
5077 | fi | |
5078 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5079 | echo "$ac_t""yes" 1>&6 | |
5080 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5081 | cat >> confdefs.h <<EOF | |
5082 | #define $ac_tr_hdr 1 | |
5083 | EOF | |
5084 | ||
5085 | else | |
5086 | echo "$ac_t""no" 1>&6 | |
5087 | fi | |
5088 | done | |
5089 | ||
5090 | for ac_hdr in sys/wait.h wait.h | |
5091 | do | |
5092 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5093 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5094 | echo "configure:5095: checking for $ac_hdr" >&5 |
5ee754fc MK |
5095 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5096 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5097 | else | |
5098 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 5099 | #line 5100 "configure" |
5ee754fc MK |
5100 | #include "confdefs.h" |
5101 | #include <$ac_hdr> | |
5102 | EOF | |
5103 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 5104 | { (eval echo configure:5105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5105 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5106 | if test -z "$ac_err"; then | |
5107 | rm -rf conftest* | |
5108 | eval "ac_cv_header_$ac_safe=yes" | |
5109 | else | |
5110 | echo "$ac_err" >&5 | |
9608ab8b MK |
5111 | echo "configure: failed program was:" >&5 |
5112 | cat conftest.$ac_ext >&5 | |
5113 | rm -rf conftest* | |
5ee754fc | 5114 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5115 | fi |
5116 | rm -f conftest* | |
5117 | fi | |
5ee754fc | 5118 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5119 | echo "$ac_t""yes" 1>&6 |
5120 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5121 | cat >> confdefs.h <<EOF | |
5122 | #define $ac_tr_hdr 1 | |
5123 | EOF | |
5ee754fc | 5124 | |
9608ab8b MK |
5125 | else |
5126 | echo "$ac_t""no" 1>&6 | |
5127 | fi | |
5128 | done | |
5ee754fc MK |
5129 | |
5130 | for ac_hdr in termios.h termio.h sgtty.h | |
5131 | do | |
5132 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5133 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5134 | echo "configure:5135: checking for $ac_hdr" >&5 |
5ee754fc | 5135 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5136 | echo $ac_n "(cached) $ac_c" 1>&6 |
5137 | else | |
5ee754fc | 5138 | cat > conftest.$ac_ext <<EOF |
d3e0a5bf | 5139 | #line 5140 "configure" |
9608ab8b | 5140 | #include "confdefs.h" |
5ee754fc | 5141 | #include <$ac_hdr> |
9608ab8b | 5142 | EOF |
5ee754fc | 5143 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
d3e0a5bf | 5144 | { (eval echo configure:5145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5145 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5146 | if test -z "$ac_err"; then | |
9608ab8b | 5147 | rm -rf conftest* |
5ee754fc | 5148 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5149 | else |
5ee754fc | 5150 | echo "$ac_err" >&5 |
9608ab8b MK |
5151 | echo "configure: failed program was:" >&5 |
5152 | cat conftest.$ac_ext >&5 | |
5153 | rm -rf conftest* | |
5ee754fc | 5154 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5155 | fi |
5156 | rm -f conftest* | |
9608ab8b | 5157 | fi |
5ee754fc | 5158 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5159 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5160 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5161 | cat >> confdefs.h <<EOF | |
5162 | #define $ac_tr_hdr 1 | |
5163 | EOF | |
5164 | ||
9608ab8b MK |
5165 | else |
5166 | echo "$ac_t""no" 1>&6 | |
5167 | fi | |
5ee754fc | 5168 | done |
9608ab8b | 5169 | |
5ee754fc MK |
5170 | for ac_hdr in unistd.h |
5171 | do | |
5172 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5173 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5174 | echo "configure:5175: checking for $ac_hdr" >&5 |
5ee754fc | 5175 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5176 | echo $ac_n "(cached) $ac_c" 1>&6 |
5177 | else | |
5ee754fc | 5178 | cat > conftest.$ac_ext <<EOF |
d3e0a5bf | 5179 | #line 5180 "configure" |
9608ab8b | 5180 | #include "confdefs.h" |
5ee754fc | 5181 | #include <$ac_hdr> |
9608ab8b | 5182 | EOF |
5ee754fc | 5183 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
d3e0a5bf | 5184 | { (eval echo configure:5185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5185 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5186 | if test -z "$ac_err"; then | |
9608ab8b | 5187 | rm -rf conftest* |
5ee754fc | 5188 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5189 | else |
5ee754fc | 5190 | echo "$ac_err" >&5 |
9608ab8b MK |
5191 | echo "configure: failed program was:" >&5 |
5192 | cat conftest.$ac_ext >&5 | |
5193 | rm -rf conftest* | |
5ee754fc | 5194 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5195 | fi |
5196 | rm -f conftest* | |
9608ab8b | 5197 | fi |
5ee754fc | 5198 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5199 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5200 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5201 | cat >> confdefs.h <<EOF | |
5202 | #define $ac_tr_hdr 1 | |
5203 | EOF | |
5204 | ||
9608ab8b MK |
5205 | else |
5206 | echo "$ac_t""no" 1>&6 | |
5207 | fi | |
5ee754fc | 5208 | done |
9608ab8b | 5209 | |
9608ab8b | 5210 | |
5ee754fc MK |
5211 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5212 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5213 | # think that we don't have <curses.h> if we're using GCC. | |
5214 | case $host_os in | |
5215 | solaris2.[78]) | |
5216 | if test "$GCC" = yes; then | |
5217 | cat >> confdefs.h <<\EOF | |
5218 | #define _MSE_INT_H 1 | |
5219 | EOF | |
5220 | ||
5221 | fi ;; | |
5222 | esac | |
5223 | for ac_hdr in curses.h ncurses.h term.h | |
5224 | do | |
5225 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5226 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5227 | echo "configure:5228: checking for $ac_hdr" >&5 |
5ee754fc | 5228 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5229 | echo $ac_n "(cached) $ac_c" 1>&6 |
5230 | else | |
5231 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 5232 | #line 5233 "configure" |
c906108c | 5233 | #include "confdefs.h" |
5ee754fc | 5234 | #include <$ac_hdr> |
c906108c SS |
5235 | EOF |
5236 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 5237 | { (eval echo configure:5238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5238 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5239 | if test -z "$ac_err"; then | |
5240 | rm -rf conftest* | |
5ee754fc | 5241 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5242 | else |
5243 | echo "$ac_err" >&5 | |
5244 | echo "configure: failed program was:" >&5 | |
5245 | cat conftest.$ac_ext >&5 | |
5246 | rm -rf conftest* | |
5ee754fc | 5247 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5248 | fi |
5249 | rm -f conftest* | |
c906108c | 5250 | fi |
5ee754fc MK |
5251 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5252 | echo "$ac_t""yes" 1>&6 | |
5253 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5254 | cat >> confdefs.h <<EOF | |
5255 | #define $ac_tr_hdr 1 | |
c906108c | 5256 | EOF |
5ee754fc | 5257 | |
c906108c | 5258 | else |
5ee754fc | 5259 | echo "$ac_t""no" 1>&6 |
c906108c | 5260 | fi |
5ee754fc | 5261 | done |
c906108c SS |
5262 | |
5263 | ||
5ee754fc MK |
5264 | # FIXME: kettenis/20030102: In most cases we include these |
5265 | # unconditionally, so what's the point in checking these? | |
5266 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5267 | do |
5268 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5269 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d3e0a5bf | 5270 | echo "configure:5271: checking for $ac_hdr" >&5 |
c906108c SS |
5271 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5272 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5273 | else | |
5274 | cat > conftest.$ac_ext <<EOF | |
d3e0a5bf | 5275 | #line 5276 "configure" |
c906108c SS |
5276 | #include "confdefs.h" |
5277 | #include <$ac_hdr> | |
5278 | EOF | |
5279 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d3e0a5bf | 5280 | { (eval echo configure:5281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5281 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5282 | if test -z "$ac_err"; then | |
5283 | rm -rf conftest* | |
5284 | eval "ac_cv_header_$ac_safe=yes" | |
5285 | else | |
5286 | echo "$ac_err" >&5 | |
5287 | echo "configure: failed program was:" >&5 | |
5288 | cat conftest.$ac_ext >&5 | |
5289 | rm -rf conftest* | |
5290 | eval "ac_cv_header_$ac_safe=no" | |
5291 | fi | |
5292 | rm -f conftest* | |
5293 | fi | |
5294 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5295 | echo "$ac_t""yes" 1>&6 | |
5296 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5297 | cat >> confdefs.h <<EOF | |
5298 | #define $ac_tr_hdr 1 | |
5299 | EOF | |
5300 | ||
5301 | else | |
5302 | echo "$ac_t""no" 1>&6 | |
5303 | fi | |
5304 | done | |
5305 | ||
5ee754fc | 5306 | |
b9362cc7 AC |
5307 | # ------------------------- # |
5308 | # Checks for declarations. # | |
5309 | # ------------------------- # | |
5310 | ||
5311 | for ac_func in getopt | |
5312 | do | |
5313 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5314 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 | |
5315 | echo "configure:5316: checking whether $ac_func is declared" >&5 | |
5316 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then | |
5317 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5318 | else | |
5319 | cat > conftest.$ac_ext <<EOF | |
5320 | #line 5321 "configure" | |
5321 | #include "confdefs.h" | |
5322 | #undef $ac_tr_decl | |
5323 | #define $ac_tr_decl 1 | |
5324 | ||
5325 | ||
5326 | int main() { | |
5327 | #ifndef $ac_func | |
5328 | char *(*pfn) = (char *(*)) $ac_func ; | |
5329 | #endif | |
5330 | ; return 0; } | |
5331 | EOF | |
5332 | if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
5333 | rm -rf conftest* | |
5334 | eval "gcc_cv_have_decl_$ac_func=yes" | |
5335 | else | |
5336 | echo "configure: failed program was:" >&5 | |
5337 | cat conftest.$ac_ext >&5 | |
5338 | rm -rf conftest* | |
5339 | eval "gcc_cv_have_decl_$ac_func=no" | |
5340 | fi | |
5341 | rm -f conftest* | |
5342 | fi | |
5343 | ||
5344 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
5345 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF | |
5346 | #define $ac_tr_decl 1 | |
5347 | EOF | |
5348 | ||
5349 | else | |
5350 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF | |
5351 | #define $ac_tr_decl 0 | |
5352 | EOF | |
5353 | ||
5354 | fi | |
5355 | ||
5356 | done | |
5357 | if test x = y ; then | |
5358 | cat >> confdefs.h <<\EOF | |
5359 | #define HAVE_DECL_GETOPT 1 | |
5360 | EOF | |
5361 | fi | |
5362 | ||
5363 | ||
5ee754fc MK |
5364 | # ------------------ # |
5365 | # Checks for types. # | |
5366 | # ------------------ # | |
5367 | ||
5368 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
b9362cc7 | 5369 | echo "configure:5370: checking return type of signal handlers" >&5 |
5ee754fc | 5370 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5371 | echo $ac_n "(cached) $ac_c" 1>&6 |
5372 | else | |
5373 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5374 | #line 5375 "configure" |
c906108c SS |
5375 | #include "confdefs.h" |
5376 | #include <sys/types.h> | |
5ee754fc MK |
5377 | #include <signal.h> |
5378 | #ifdef signal | |
5379 | #undef signal | |
c906108c | 5380 | #endif |
5ee754fc MK |
5381 | #ifdef __cplusplus |
5382 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5383 | #else | |
5384 | void (*signal ()) (); | |
c906108c SS |
5385 | #endif |
5386 | ||
5ee754fc MK |
5387 | int main() { |
5388 | int i; | |
5389 | ; return 0; } | |
c906108c | 5390 | EOF |
b9362cc7 | 5391 | if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5392 | rm -rf conftest* |
5ee754fc | 5393 | ac_cv_type_signal=void |
c906108c | 5394 | else |
5ee754fc MK |
5395 | echo "configure: failed program was:" >&5 |
5396 | cat conftest.$ac_ext >&5 | |
c906108c | 5397 | rm -rf conftest* |
5ee754fc | 5398 | ac_cv_type_signal=int |
c906108c SS |
5399 | fi |
5400 | rm -f conftest* | |
c906108c SS |
5401 | fi |
5402 | ||
5ee754fc MK |
5403 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5404 | cat >> confdefs.h <<EOF | |
5405 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5406 | EOF |
5407 | ||
c906108c SS |
5408 | |
5409 | ||
5ee754fc MK |
5410 | # ------------------------------------- # |
5411 | # Checks for compiler characteristics. # | |
5412 | # ------------------------------------- # | |
5413 | ||
c906108c | 5414 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
b9362cc7 | 5415 | echo "configure:5416: checking for working const" >&5 |
c906108c SS |
5416 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5418 | else | |
5419 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5420 | #line 5421 "configure" |
c906108c SS |
5421 | #include "confdefs.h" |
5422 | ||
5423 | int main() { | |
5424 | ||
5425 | /* Ultrix mips cc rejects this. */ | |
5426 | typedef int charset[2]; const charset x; | |
5427 | /* SunOS 4.1.1 cc rejects this. */ | |
5428 | char const *const *ccp; | |
5429 | char **p; | |
5430 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5431 | struct point {int x, y;}; | |
5432 | static struct point const zero = {0,0}; | |
5433 | /* AIX XL C 1.02.0.0 rejects this. | |
5434 | It does not let you subtract one const X* pointer from another in an arm | |
5435 | of an if-expression whose if-part is not a constant expression */ | |
5436 | const char *g = "string"; | |
5437 | ccp = &g + (g ? g-g : 0); | |
5438 | /* HPUX 7.0 cc rejects these. */ | |
5439 | ++ccp; | |
5440 | p = (char**) ccp; | |
5441 | ccp = (char const *const *) p; | |
5442 | { /* SCO 3.2v4 cc rejects this. */ | |
5443 | char *t; | |
5444 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5445 | ||
5446 | *t++ = 0; | |
5447 | } | |
5448 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5449 | int x[] = {25, 17}; | |
5450 | const int *foo = &x[0]; | |
5451 | ++foo; | |
5452 | } | |
5453 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5454 | typedef const int *iptr; | |
5455 | iptr p = 0; | |
5456 | ++p; | |
5457 | } | |
5458 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5459 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5460 | struct s { int j; const int *ap[3]; }; | |
5461 | struct s *b; b->j = 5; | |
5462 | } | |
5463 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5464 | const int foo = 10; | |
5465 | } | |
5466 | ||
5467 | ; return 0; } | |
5468 | EOF | |
b9362cc7 | 5469 | if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5470 | rm -rf conftest* |
5471 | ac_cv_c_const=yes | |
5472 | else | |
5473 | echo "configure: failed program was:" >&5 | |
5474 | cat conftest.$ac_ext >&5 | |
5475 | rm -rf conftest* | |
5476 | ac_cv_c_const=no | |
5477 | fi | |
5478 | rm -f conftest* | |
5479 | fi | |
5480 | ||
5481 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5482 | if test $ac_cv_c_const = no; then | |
5483 | cat >> confdefs.h <<\EOF | |
5484 | #define const | |
5485 | EOF | |
5486 | ||
5487 | fi | |
5488 | ||
bce58c09 | 5489 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
b9362cc7 | 5490 | echo "configure:5491: checking for inline" >&5 |
bce58c09 JB |
5491 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5492 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5493 | else | |
5494 | ac_cv_c_inline=no | |
5495 | for ac_kw in inline __inline__ __inline; do | |
5496 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5497 | #line 5498 "configure" |
bce58c09 JB |
5498 | #include "confdefs.h" |
5499 | ||
5500 | int main() { | |
5501 | } $ac_kw foo() { | |
5502 | ; return 0; } | |
5503 | EOF | |
b9362cc7 | 5504 | if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5505 | rm -rf conftest* |
5506 | ac_cv_c_inline=$ac_kw; break | |
5507 | else | |
5508 | echo "configure: failed program was:" >&5 | |
5509 | cat conftest.$ac_ext >&5 | |
5510 | fi | |
5511 | rm -f conftest* | |
5512 | done | |
5513 | ||
5514 | fi | |
5515 | ||
5516 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5517 | case "$ac_cv_c_inline" in | |
5518 | inline | yes) ;; | |
5519 | no) cat >> confdefs.h <<\EOF | |
5520 | #define inline | |
5521 | EOF | |
5522 | ;; | |
5523 | *) cat >> confdefs.h <<EOF | |
5524 | #define inline $ac_cv_c_inline | |
5525 | EOF | |
5526 | ;; | |
5527 | esac | |
5528 | ||
c906108c | 5529 | |
5ee754fc MK |
5530 | # ------------------------------ # |
5531 | # Checks for library functions. # | |
5532 | # ------------------------------ # | |
5533 | ||
46711df8 MK |
5534 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5535 | # for constant arguments. Useless! | |
5536 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b9362cc7 | 5537 | echo "configure:5538: checking for working alloca.h" >&5 |
46711df8 MK |
5538 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5539 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5540 | else | |
5541 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5542 | #line 5543 "configure" |
46711df8 MK |
5543 | #include "confdefs.h" |
5544 | #include <alloca.h> | |
5545 | int main() { | |
5546 | char *p = alloca(2 * sizeof(int)); | |
5547 | ; return 0; } | |
5548 | EOF | |
b9362cc7 | 5549 | if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5550 | rm -rf conftest* |
5551 | ac_cv_header_alloca_h=yes | |
5552 | else | |
5553 | echo "configure: failed program was:" >&5 | |
5554 | cat conftest.$ac_ext >&5 | |
5555 | rm -rf conftest* | |
5556 | ac_cv_header_alloca_h=no | |
5557 | fi | |
5558 | rm -f conftest* | |
5559 | fi | |
5560 | ||
5561 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5562 | if test $ac_cv_header_alloca_h = yes; then | |
5563 | cat >> confdefs.h <<\EOF | |
5564 | #define HAVE_ALLOCA_H 1 | |
5565 | EOF | |
5566 | ||
5567 | fi | |
5568 | ||
5569 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b9362cc7 | 5570 | echo "configure:5571: checking for alloca" >&5 |
46711df8 MK |
5571 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5572 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5573 | else | |
5574 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5575 | #line 5576 "configure" |
46711df8 MK |
5576 | #include "confdefs.h" |
5577 | ||
5578 | #ifdef __GNUC__ | |
5579 | # define alloca __builtin_alloca | |
5580 | #else | |
5581 | # ifdef _MSC_VER | |
5582 | # include <malloc.h> | |
5583 | # define alloca _alloca | |
5584 | # else | |
5585 | # if HAVE_ALLOCA_H | |
5586 | # include <alloca.h> | |
5587 | # else | |
5588 | # ifdef _AIX | |
5589 | #pragma alloca | |
5590 | # else | |
5591 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5592 | char *alloca (); | |
5593 | # endif | |
5594 | # endif | |
5595 | # endif | |
5596 | # endif | |
5597 | #endif | |
5598 | ||
5599 | int main() { | |
5600 | char *p = (char *) alloca(1); | |
5601 | ; return 0; } | |
5602 | EOF | |
b9362cc7 | 5603 | if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5604 | rm -rf conftest* |
5605 | ac_cv_func_alloca_works=yes | |
5606 | else | |
5607 | echo "configure: failed program was:" >&5 | |
5608 | cat conftest.$ac_ext >&5 | |
5609 | rm -rf conftest* | |
5610 | ac_cv_func_alloca_works=no | |
5611 | fi | |
5612 | rm -f conftest* | |
5613 | fi | |
5614 | ||
5615 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5616 | if test $ac_cv_func_alloca_works = yes; then | |
5617 | cat >> confdefs.h <<\EOF | |
5618 | #define HAVE_ALLOCA 1 | |
5619 | EOF | |
5620 | ||
5621 | fi | |
5622 | ||
5623 | if test $ac_cv_func_alloca_works = no; then | |
5624 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5625 | # that cause trouble. Some versions do not even contain alloca or | |
5626 | # contain a buggy version. If you still want to use their alloca, | |
5627 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5628 | ALLOCA=alloca.${ac_objext} | |
5629 | cat >> confdefs.h <<\EOF | |
5630 | #define C_ALLOCA 1 | |
5631 | EOF | |
5632 | ||
5633 | ||
5634 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b9362cc7 | 5635 | echo "configure:5636: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5636 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5637 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5638 | else | |
5639 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5640 | #line 5641 "configure" |
46711df8 MK |
5641 | #include "confdefs.h" |
5642 | #if defined(CRAY) && ! defined(CRAY2) | |
5643 | webecray | |
5644 | #else | |
5645 | wenotbecray | |
5646 | #endif | |
5647 | ||
5648 | EOF | |
5649 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5650 | egrep "webecray" >/dev/null 2>&1; then | |
5651 | rm -rf conftest* | |
5652 | ac_cv_os_cray=yes | |
5653 | else | |
5654 | rm -rf conftest* | |
5655 | ac_cv_os_cray=no | |
5656 | fi | |
5657 | rm -f conftest* | |
5658 | ||
5659 | fi | |
5660 | ||
5661 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5662 | if test $ac_cv_os_cray = yes; then | |
5663 | for ac_func in _getb67 GETB67 getb67; do | |
5664 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 5665 | echo "configure:5666: checking for $ac_func" >&5 |
46711df8 MK |
5666 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5667 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5668 | else | |
5669 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5670 | #line 5671 "configure" |
46711df8 MK |
5671 | #include "confdefs.h" |
5672 | /* System header to define __stub macros and hopefully few prototypes, | |
5673 | which can conflict with char $ac_func(); below. */ | |
5674 | #include <assert.h> | |
5675 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5676 | /* We use char because int might match the return type of a gcc2 | |
5677 | builtin and then its argument prototype would still apply. */ | |
5678 | char $ac_func(); | |
5679 | ||
5680 | int main() { | |
5681 | ||
5682 | /* The GNU C library defines this for functions which it implements | |
5683 | to always fail with ENOSYS. Some functions are actually named | |
5684 | something starting with __ and the normal name is an alias. */ | |
5685 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5686 | choke me | |
5687 | #else | |
5688 | $ac_func(); | |
5689 | #endif | |
5690 | ||
5691 | ; return 0; } | |
5692 | EOF | |
b9362cc7 | 5693 | if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5694 | rm -rf conftest* |
5695 | eval "ac_cv_func_$ac_func=yes" | |
5696 | else | |
5697 | echo "configure: failed program was:" >&5 | |
5698 | cat conftest.$ac_ext >&5 | |
5699 | rm -rf conftest* | |
5700 | eval "ac_cv_func_$ac_func=no" | |
5701 | fi | |
5702 | rm -f conftest* | |
5703 | fi | |
5704 | ||
5705 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5706 | echo "$ac_t""yes" 1>&6 | |
5707 | cat >> confdefs.h <<EOF | |
5708 | #define CRAY_STACKSEG_END $ac_func | |
5709 | EOF | |
5710 | ||
5711 | break | |
5712 | else | |
5713 | echo "$ac_t""no" 1>&6 | |
5714 | fi | |
5715 | ||
5716 | done | |
5717 | fi | |
5718 | ||
5719 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b9362cc7 | 5720 | echo "configure:5721: checking stack direction for C alloca" >&5 |
46711df8 MK |
5721 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5722 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5723 | else | |
5724 | if test "$cross_compiling" = yes; then | |
5725 | ac_cv_c_stack_direction=0 | |
5726 | else | |
5727 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5728 | #line 5729 "configure" |
46711df8 MK |
5729 | #include "confdefs.h" |
5730 | find_stack_direction () | |
5731 | { | |
5732 | static char *addr = 0; | |
5733 | auto char dummy; | |
5734 | if (addr == 0) | |
5735 | { | |
5736 | addr = &dummy; | |
5737 | return find_stack_direction (); | |
5738 | } | |
5739 | else | |
5740 | return (&dummy > addr) ? 1 : -1; | |
5741 | } | |
5742 | main () | |
5743 | { | |
5744 | exit (find_stack_direction() < 0); | |
5745 | } | |
5746 | EOF | |
b9362cc7 | 5747 | if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5748 | then |
5749 | ac_cv_c_stack_direction=1 | |
5750 | else | |
5751 | echo "configure: failed program was:" >&5 | |
5752 | cat conftest.$ac_ext >&5 | |
5753 | rm -fr conftest* | |
5754 | ac_cv_c_stack_direction=-1 | |
5755 | fi | |
5756 | rm -fr conftest* | |
5757 | fi | |
5758 | ||
5759 | fi | |
5760 | ||
5761 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5762 | cat >> confdefs.h <<EOF | |
5763 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5764 | EOF | |
5765 | ||
5766 | fi | |
5767 | ||
27ca5dad | 5768 | for ac_hdr in unistd.h |
97bf5e38 MK |
5769 | do |
5770 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5771 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b9362cc7 | 5772 | echo "configure:5773: checking for $ac_hdr" >&5 |
74c1b268 AC |
5773 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5774 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5775 | else | |
5776 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5777 | #line 5778 "configure" |
74c1b268 | 5778 | #include "confdefs.h" |
97bf5e38 | 5779 | #include <$ac_hdr> |
74c1b268 AC |
5780 | EOF |
5781 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b9362cc7 | 5782 | { (eval echo configure:5783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5783 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5784 | if test -z "$ac_err"; then | |
5785 | rm -rf conftest* | |
5786 | eval "ac_cv_header_$ac_safe=yes" | |
5787 | else | |
5788 | echo "$ac_err" >&5 | |
5789 | echo "configure: failed program was:" >&5 | |
5790 | cat conftest.$ac_ext >&5 | |
5791 | rm -rf conftest* | |
5792 | eval "ac_cv_header_$ac_safe=no" | |
5793 | fi | |
5794 | rm -f conftest* | |
5795 | fi | |
5796 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5797 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5798 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5799 | cat >> confdefs.h <<EOF | |
5800 | #define $ac_tr_hdr 1 | |
74c1b268 | 5801 | EOF |
97bf5e38 | 5802 | |
74c1b268 AC |
5803 | else |
5804 | echo "$ac_t""no" 1>&6 | |
5805 | fi | |
97bf5e38 | 5806 | done |
74c1b268 | 5807 | |
97bf5e38 MK |
5808 | for ac_func in getpagesize |
5809 | do | |
5810 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 5811 | echo "configure:5812: checking for $ac_func" >&5 |
97bf5e38 | 5812 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5813 | echo $ac_n "(cached) $ac_c" 1>&6 |
5814 | else | |
5815 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5816 | #line 5817 "configure" |
74c1b268 AC |
5817 | #include "confdefs.h" |
5818 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5819 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5820 | #include <assert.h> |
5821 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5822 | /* We use char because int might match the return type of a gcc2 | |
5823 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5824 | char $ac_func(); |
74c1b268 AC |
5825 | |
5826 | int main() { | |
5827 | ||
5828 | /* The GNU C library defines this for functions which it implements | |
5829 | to always fail with ENOSYS. Some functions are actually named | |
5830 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5831 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5832 | choke me |
5833 | #else | |
97bf5e38 | 5834 | $ac_func(); |
74c1b268 AC |
5835 | #endif |
5836 | ||
5837 | ; return 0; } | |
5838 | EOF | |
b9362cc7 | 5839 | if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5840 | rm -rf conftest* |
97bf5e38 | 5841 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5842 | else |
5843 | echo "configure: failed program was:" >&5 | |
5844 | cat conftest.$ac_ext >&5 | |
5845 | rm -rf conftest* | |
97bf5e38 | 5846 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5847 | fi |
5848 | rm -f conftest* | |
5849 | fi | |
5850 | ||
97bf5e38 | 5851 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5852 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5853 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5854 | cat >> confdefs.h <<EOF | |
5855 | #define $ac_tr_func 1 | |
5856 | EOF | |
5857 | ||
74c1b268 AC |
5858 | else |
5859 | echo "$ac_t""no" 1>&6 | |
5860 | fi | |
97bf5e38 | 5861 | done |
74c1b268 | 5862 | |
97bf5e38 | 5863 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
b9362cc7 | 5864 | echo "configure:5865: checking for working mmap" >&5 |
97bf5e38 MK |
5865 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5866 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5867 | else | |
5868 | if test "$cross_compiling" = yes; then | |
5869 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5870 | else |
5871 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 5872 | #line 5873 "configure" |
74c1b268 | 5873 | #include "confdefs.h" |
97bf5e38 MK |
5874 | |
5875 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5876 | Here is a matrix of mmap possibilities: | |
5877 | mmap private not fixed | |
5878 | mmap private fixed at somewhere currently unmapped | |
5879 | mmap private fixed at somewhere already mapped | |
5880 | mmap shared not fixed | |
5881 | mmap shared fixed at somewhere currently unmapped | |
5882 | mmap shared fixed at somewhere already mapped | |
5883 | For private mappings, we should verify that changes cannot be read() | |
5884 | back from the file, nor mmap's back from the file at a different | |
5885 | address. (There have been systems where private was not correctly | |
5886 | implemented like the infamous i386 svr4.0, and systems where the | |
5887 | VM page cache was not coherent with the filesystem buffer cache | |
5888 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5889 | For shared mappings, we should conversely verify that changes get | |
5890 | propogated back to all the places they're supposed to be. | |
5891 | ||
5892 | Grep wants private fixed already mapped. | |
5893 | The main things grep needs to know about mmap are: | |
5894 | * does it exist and is it safe to write into the mmap'd area | |
5895 | * how to use it (BSD variants) */ | |
74c1b268 | 5896 | #include <sys/types.h> |
97bf5e38 MK |
5897 | #include <fcntl.h> |
5898 | #include <sys/mman.h> | |
5899 | ||
5900 | /* This mess was copied from the GNU getpagesize.h. */ | |
5901 | #ifndef HAVE_GETPAGESIZE | |
27ca5dad MC |
5902 | # ifdef HAVE_UNISTD_H |
5903 | # include <unistd.h> | |
5904 | # endif | |
97bf5e38 MK |
5905 | |
5906 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5907 | # ifndef HAVE_SYS_PARAM_H | |
5908 | # define HAVE_SYS_PARAM_H 1 | |
5909 | # endif | |
5910 | ||
5911 | # ifdef _SC_PAGESIZE | |
5912 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5913 | # else /* no _SC_PAGESIZE */ | |
5914 | # ifdef HAVE_SYS_PARAM_H | |
5915 | # include <sys/param.h> | |
5916 | # ifdef EXEC_PAGESIZE | |
5917 | # define getpagesize() EXEC_PAGESIZE | |
5918 | # else /* no EXEC_PAGESIZE */ | |
5919 | # ifdef NBPG | |
5920 | # define getpagesize() NBPG * CLSIZE | |
5921 | # ifndef CLSIZE | |
5922 | # define CLSIZE 1 | |
5923 | # endif /* no CLSIZE */ | |
5924 | # else /* no NBPG */ | |
5925 | # ifdef NBPC | |
5926 | # define getpagesize() NBPC | |
5927 | # else /* no NBPC */ | |
5928 | # ifdef PAGESIZE | |
5929 | # define getpagesize() PAGESIZE | |
5930 | # endif /* PAGESIZE */ | |
5931 | # endif /* no NBPC */ | |
5932 | # endif /* no NBPG */ | |
5933 | # endif /* no EXEC_PAGESIZE */ | |
5934 | # else /* no HAVE_SYS_PARAM_H */ | |
5935 | # define getpagesize() 8192 /* punt totally */ | |
5936 | # endif /* no HAVE_SYS_PARAM_H */ | |
5937 | # endif /* no _SC_PAGESIZE */ | |
5938 | ||
5939 | #endif /* no HAVE_GETPAGESIZE */ | |
5940 | ||
74c1b268 | 5941 | #ifdef __cplusplus |
97bf5e38 | 5942 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5943 | #else |
97bf5e38 | 5944 | char *malloc(); |
74c1b268 | 5945 | #endif |
74c1b268 | 5946 | |
97bf5e38 MK |
5947 | int |
5948 | main() | |
5949 | { | |
5950 | char *data, *data2, *data3; | |
5951 | int i, pagesize; | |
5952 | int fd; | |
74c1b268 | 5953 | |
97bf5e38 | 5954 | pagesize = getpagesize(); |
74c1b268 | 5955 | |
97bf5e38 MK |
5956 | /* |
5957 | * First, make a file with some known garbage in it. | |
5958 | */ | |
5959 | data = malloc(pagesize); | |
5960 | if (!data) | |
5961 | exit(1); | |
5962 | for (i = 0; i < pagesize; ++i) | |
5963 | *(data + i) = rand(); | |
5964 | umask(0); | |
5965 | fd = creat("conftestmmap", 0600); | |
5966 | if (fd < 0) | |
5967 | exit(1); | |
5968 | if (write(fd, data, pagesize) != pagesize) | |
5969 | exit(1); | |
5970 | close(fd); | |
74c1b268 | 5971 | |
97bf5e38 MK |
5972 | /* |
5973 | * Next, try to mmap the file at a fixed address which | |
5974 | * already has something else allocated at it. If we can, | |
5975 | * also make sure that we see the same garbage. | |
5976 | */ | |
5977 | fd = open("conftestmmap", O_RDWR); | |
5978 | if (fd < 0) | |
5979 | exit(1); | |
5980 | data2 = malloc(2 * pagesize); | |
5981 | if (!data2) | |
5982 | exit(1); | |
5983 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5984 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5985 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5986 | exit(1); | |
5987 | for (i = 0; i < pagesize; ++i) | |
5988 | if (*(data + i) != *(data2 + i)) | |
5989 | exit(1); | |
74c1b268 | 5990 | |
97bf5e38 MK |
5991 | /* |
5992 | * Finally, make sure that changes to the mapped area | |
5993 | * do not percolate back to the file as seen by read(). | |
5994 | * (This is a bug on some variants of i386 svr4.0.) | |
5995 | */ | |
5996 | for (i = 0; i < pagesize; ++i) | |
5997 | *(data2 + i) = *(data2 + i) + 1; | |
5998 | data3 = malloc(pagesize); | |
5999 | if (!data3) | |
6000 | exit(1); | |
6001 | if (read(fd, data3, pagesize) != pagesize) | |
6002 | exit(1); | |
6003 | for (i = 0; i < pagesize; ++i) | |
6004 | if (*(data + i) != *(data3 + i)) | |
6005 | exit(1); | |
6006 | close(fd); | |
6007 | unlink("conftestmmap"); | |
6008 | exit(0); | |
74c1b268 | 6009 | } |
97bf5e38 | 6010 | |
74c1b268 | 6011 | EOF |
b9362cc7 | 6012 | if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 6013 | then |
97bf5e38 | 6014 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
6015 | else |
6016 | echo "configure: failed program was:" >&5 | |
6017 | cat conftest.$ac_ext >&5 | |
6018 | rm -fr conftest* | |
97bf5e38 | 6019 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
6020 | fi |
6021 | rm -fr conftest* | |
6022 | fi | |
6023 | ||
6024 | fi | |
6025 | ||
97bf5e38 MK |
6026 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6027 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 6028 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6029 | #define HAVE_MMAP 1 |
74c1b268 AC |
6030 | EOF |
6031 | ||
6032 | fi | |
6033 | ||
97bf5e38 | 6034 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
b9362cc7 | 6035 | echo "configure:6036: checking for pid_t" >&5 |
97bf5e38 | 6036 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 6037 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
6038 | else |
6039 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6040 | #line 6041 "configure" |
0200359f | 6041 | #include "confdefs.h" |
97bf5e38 MK |
6042 | #include <sys/types.h> |
6043 | #if STDC_HEADERS | |
6044 | #include <stdlib.h> | |
6045 | #include <stddef.h> | |
0200359f | 6046 | #endif |
0200359f | 6047 | EOF |
97bf5e38 MK |
6048 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6049 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
6050 | rm -rf conftest* | |
6051 | ac_cv_type_pid_t=yes | |
0200359f | 6052 | else |
97bf5e38 MK |
6053 | rm -rf conftest* |
6054 | ac_cv_type_pid_t=no | |
0200359f | 6055 | fi |
97bf5e38 | 6056 | rm -f conftest* |
0200359f MK |
6057 | |
6058 | fi | |
97bf5e38 MK |
6059 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
6060 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 6061 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6062 | #define pid_t int |
0200359f MK |
6063 | EOF |
6064 | ||
6065 | fi | |
6066 | ||
97bf5e38 MK |
6067 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
6068 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
b9362cc7 | 6069 | echo "configure:6070: checking for vfork.h" >&5 |
97bf5e38 | 6070 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
6071 | echo $ac_n "(cached) $ac_c" 1>&6 |
6072 | else | |
6073 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6074 | #line 6075 "configure" |
72473524 | 6075 | #include "confdefs.h" |
97bf5e38 | 6076 | #include <vfork.h> |
72473524 | 6077 | EOF |
97bf5e38 | 6078 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b9362cc7 | 6079 | { (eval echo configure:6080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
6080 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6081 | if test -z "$ac_err"; then | |
72473524 | 6082 | rm -rf conftest* |
97bf5e38 | 6083 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 6084 | else |
97bf5e38 | 6085 | echo "$ac_err" >&5 |
72473524 DJ |
6086 | echo "configure: failed program was:" >&5 |
6087 | cat conftest.$ac_ext >&5 | |
6088 | rm -rf conftest* | |
97bf5e38 | 6089 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
6090 | fi |
6091 | rm -f conftest* | |
6092 | fi | |
97bf5e38 MK |
6093 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6094 | echo "$ac_t""yes" 1>&6 | |
72473524 | 6095 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6096 | #define HAVE_VFORK_H 1 |
72473524 DJ |
6097 | EOF |
6098 | ||
97bf5e38 MK |
6099 | else |
6100 | echo "$ac_t""no" 1>&6 | |
72473524 | 6101 | fi |
c906108c | 6102 | |
97bf5e38 | 6103 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
b9362cc7 | 6104 | echo "configure:6105: checking for working vfork" >&5 |
97bf5e38 MK |
6105 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6106 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6107 | else | |
6108 | if test "$cross_compiling" = yes; then | |
6109 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
b9362cc7 | 6110 | echo "configure:6111: checking for vfork" >&5 |
97bf5e38 | 6111 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6112 | echo $ac_n "(cached) $ac_c" 1>&6 |
6113 | else | |
6114 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6115 | #line 6116 "configure" |
2b2d558c | 6116 | #include "confdefs.h" |
97bf5e38 MK |
6117 | /* System header to define __stub macros and hopefully few prototypes, |
6118 | which can conflict with char vfork(); below. */ | |
6119 | #include <assert.h> | |
6120 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6121 | /* We use char because int might match the return type of a gcc2 | |
6122 | builtin and then its argument prototype would still apply. */ | |
6123 | char vfork(); | |
2b2d558c MK |
6124 | |
6125 | int main() { | |
97bf5e38 MK |
6126 | |
6127 | /* The GNU C library defines this for functions which it implements | |
6128 | to always fail with ENOSYS. Some functions are actually named | |
6129 | something starting with __ and the normal name is an alias. */ | |
6130 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6131 | choke me | |
6132 | #else | |
6133 | vfork(); | |
6134 | #endif | |
6135 | ||
2b2d558c MK |
6136 | ; return 0; } |
6137 | EOF | |
b9362cc7 | 6138 | if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6139 | rm -rf conftest* |
97bf5e38 | 6140 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6141 | else |
6142 | echo "configure: failed program was:" >&5 | |
6143 | cat conftest.$ac_ext >&5 | |
6144 | rm -rf conftest* | |
97bf5e38 | 6145 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6146 | fi |
6147 | rm -f conftest* | |
6148 | fi | |
6149 | ||
97bf5e38 MK |
6150 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6151 | echo "$ac_t""yes" 1>&6 | |
6152 | : | |
6153 | else | |
6154 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6155 | fi |
6156 | ||
97bf5e38 | 6157 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6158 | else |
6159 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6160 | #line 6161 "configure" |
7dfa765c | 6161 | #include "confdefs.h" |
97bf5e38 MK |
6162 | /* Thanks to Paul Eggert for this test. */ |
6163 | #include <stdio.h> | |
6164 | #include <sys/types.h> | |
6165 | #include <sys/stat.h> | |
6166 | #ifdef HAVE_UNISTD_H | |
6167 | #include <unistd.h> | |
6168 | #endif | |
6169 | #ifdef HAVE_VFORK_H | |
6170 | #include <vfork.h> | |
6171 | #endif | |
6172 | /* On some sparc systems, changes by the child to local and incoming | |
6173 | argument registers are propagated back to the parent. | |
6174 | The compiler is told about this with #include <vfork.h>, | |
6175 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6176 | Test for this by using a static variable whose address | |
6177 | is put into a register that is clobbered by the vfork. */ | |
6178 | static | |
6179 | #ifdef __cplusplus | |
6180 | sparc_address_test (int arg) | |
6181 | #else | |
6182 | sparc_address_test (arg) int arg; | |
6183 | #endif | |
6184 | { | |
6185 | static pid_t child; | |
6186 | if (!child) { | |
6187 | child = vfork (); | |
6188 | if (child < 0) { | |
6189 | perror ("vfork"); | |
6190 | _exit(2); | |
6191 | } | |
6192 | if (!child) { | |
6193 | arg = getpid(); | |
6194 | write(-1, "", 0); | |
6195 | _exit (arg); | |
6196 | } | |
6197 | } | |
6198 | } | |
6199 | main() { | |
6200 | pid_t parent = getpid (); | |
6201 | pid_t child; | |
7dfa765c | 6202 | |
97bf5e38 | 6203 | sparc_address_test (); |
7dfa765c | 6204 | |
97bf5e38 | 6205 | child = vfork (); |
7dfa765c | 6206 | |
97bf5e38 MK |
6207 | if (child == 0) { |
6208 | /* Here is another test for sparc vfork register problems. | |
6209 | This test uses lots of local variables, at least | |
6210 | as many local variables as main has allocated so far | |
6211 | including compiler temporaries. 4 locals are enough for | |
6212 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6213 | A buggy compiler should reuse the register of parent | |
6214 | for one of the local variables, since it will think that | |
6215 | parent can't possibly be used any more in this routine. | |
6216 | Assigning to the local variable will thus munge parent | |
6217 | in the parent process. */ | |
6218 | pid_t | |
6219 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6220 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6221 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6222 | use the same hardware register for all 8 local variables. */ | |
6223 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6224 | || p != p5 || p != p6 || p != p7) | |
6225 | _exit(1); | |
7dfa765c | 6226 | |
97bf5e38 MK |
6227 | /* On some systems (e.g. IRIX 3.3), |
6228 | vfork doesn't separate parent from child file descriptors. | |
6229 | If the child closes a descriptor before it execs or exits, | |
6230 | this munges the parent's descriptor as well. | |
6231 | Test for this by closing stdout in the child. */ | |
6232 | _exit(close(fileno(stdout)) != 0); | |
6233 | } else { | |
6234 | int status; | |
6235 | struct stat st; | |
64bb1671 | 6236 | |
97bf5e38 MK |
6237 | while (wait(&status) != child) |
6238 | ; | |
6239 | exit( | |
6240 | /* Was there some problem with vforking? */ | |
6241 | child < 0 | |
64bb1671 | 6242 | |
97bf5e38 MK |
6243 | /* Did the child fail? (This shouldn't happen.) */ |
6244 | || status | |
64bb1671 | 6245 | |
97bf5e38 MK |
6246 | /* Did the vfork/compiler bug occur? */ |
6247 | || parent != getpid() | |
6248 | ||
6249 | /* Did the file descriptor bug occur? */ | |
6250 | || fstat(fileno(stdout), &st) != 0 | |
6251 | ); | |
6252 | } | |
6253 | } | |
5c44784c | 6254 | EOF |
b9362cc7 | 6255 | if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6256 | then |
6257 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6258 | else |
6259 | echo "configure: failed program was:" >&5 | |
6260 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6261 | rm -fr conftest* |
6262 | ac_cv_func_vfork_works=no | |
5c44784c | 6263 | fi |
97bf5e38 | 6264 | rm -fr conftest* |
5c44784c JM |
6265 | fi |
6266 | ||
0afdd437 MK |
6267 | fi |
6268 | ||
97bf5e38 MK |
6269 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6270 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6271 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6272 | #define vfork fork |
0afdd437 MK |
6273 | EOF |
6274 | ||
6275 | fi | |
6276 | ||
97bf5e38 MK |
6277 | for ac_func in canonicalize_file_name realpath |
6278 | do | |
6279 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6280 | echo "configure:6281: checking for $ac_func" >&5 |
97bf5e38 | 6281 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6282 | echo $ac_n "(cached) $ac_c" 1>&6 |
6283 | else | |
6284 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6285 | #line 6286 "configure" |
7e89e357 | 6286 | #include "confdefs.h" |
97bf5e38 MK |
6287 | /* System header to define __stub macros and hopefully few prototypes, |
6288 | which can conflict with char $ac_func(); below. */ | |
6289 | #include <assert.h> | |
6290 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6291 | /* We use char because int might match the return type of a gcc2 | |
6292 | builtin and then its argument prototype would still apply. */ | |
6293 | char $ac_func(); | |
6294 | ||
7e89e357 | 6295 | int main() { |
97bf5e38 MK |
6296 | |
6297 | /* The GNU C library defines this for functions which it implements | |
6298 | to always fail with ENOSYS. Some functions are actually named | |
6299 | something starting with __ and the normal name is an alias. */ | |
6300 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6301 | choke me | |
6302 | #else | |
6303 | $ac_func(); | |
6304 | #endif | |
6305 | ||
7e89e357 JT |
6306 | ; return 0; } |
6307 | EOF | |
b9362cc7 | 6308 | if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6309 | rm -rf conftest* |
97bf5e38 | 6310 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6311 | else |
6312 | echo "configure: failed program was:" >&5 | |
6313 | cat conftest.$ac_ext >&5 | |
6314 | rm -rf conftest* | |
97bf5e38 | 6315 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6316 | fi |
6317 | rm -f conftest* | |
6318 | fi | |
6319 | ||
97bf5e38 MK |
6320 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6321 | echo "$ac_t""yes" 1>&6 | |
6322 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6323 | cat >> confdefs.h <<EOF | |
6324 | #define $ac_tr_func 1 | |
7e89e357 | 6325 | EOF |
97bf5e38 MK |
6326 | |
6327 | else | |
6328 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6329 | fi |
97bf5e38 | 6330 | done |
7e89e357 | 6331 | |
97bf5e38 | 6332 | for ac_func in poll |
7be570e7 JM |
6333 | do |
6334 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6335 | echo "configure:6336: checking for $ac_func" >&5 |
7be570e7 JM |
6336 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6338 | else | |
6339 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6340 | #line 6341 "configure" |
7be570e7 JM |
6341 | #include "confdefs.h" |
6342 | /* System header to define __stub macros and hopefully few prototypes, | |
6343 | which can conflict with char $ac_func(); below. */ | |
6344 | #include <assert.h> | |
6345 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6346 | /* We use char because int might match the return type of a gcc2 | |
6347 | builtin and then its argument prototype would still apply. */ | |
6348 | char $ac_func(); | |
6349 | ||
6350 | int main() { | |
6351 | ||
6352 | /* The GNU C library defines this for functions which it implements | |
6353 | to always fail with ENOSYS. Some functions are actually named | |
6354 | something starting with __ and the normal name is an alias. */ | |
6355 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6356 | choke me | |
6357 | #else | |
6358 | $ac_func(); | |
6359 | #endif | |
6360 | ||
6361 | ; return 0; } | |
6362 | EOF | |
b9362cc7 | 6363 | if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6364 | rm -rf conftest* |
6365 | eval "ac_cv_func_$ac_func=yes" | |
6366 | else | |
6367 | echo "configure: failed program was:" >&5 | |
6368 | cat conftest.$ac_ext >&5 | |
6369 | rm -rf conftest* | |
6370 | eval "ac_cv_func_$ac_func=no" | |
6371 | fi | |
6372 | rm -f conftest* | |
6373 | fi | |
6374 | ||
6375 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6376 | echo "$ac_t""yes" 1>&6 | |
6377 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6378 | cat >> confdefs.h <<EOF | |
6379 | #define $ac_tr_func 1 | |
6380 | EOF | |
6381 | ||
6382 | else | |
6383 | echo "$ac_t""no" 1>&6 | |
6384 | fi | |
6385 | done | |
6386 | ||
6387 | for ac_func in pread64 | |
6388 | do | |
6389 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6390 | echo "configure:6391: checking for $ac_func" >&5 |
14abd0fb MK |
6391 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6392 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6393 | else | |
6394 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6395 | #line 6396 "configure" |
14abd0fb MK |
6396 | #include "confdefs.h" |
6397 | /* System header to define __stub macros and hopefully few prototypes, | |
6398 | which can conflict with char $ac_func(); below. */ | |
6399 | #include <assert.h> | |
6400 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6401 | /* We use char because int might match the return type of a gcc2 | |
6402 | builtin and then its argument prototype would still apply. */ | |
6403 | char $ac_func(); | |
6404 | ||
6405 | int main() { | |
6406 | ||
6407 | /* The GNU C library defines this for functions which it implements | |
6408 | to always fail with ENOSYS. Some functions are actually named | |
6409 | something starting with __ and the normal name is an alias. */ | |
6410 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6411 | choke me | |
6412 | #else | |
6413 | $ac_func(); | |
6414 | #endif | |
6415 | ||
6416 | ; return 0; } | |
6417 | EOF | |
b9362cc7 | 6418 | if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6419 | rm -rf conftest* |
6420 | eval "ac_cv_func_$ac_func=yes" | |
6421 | else | |
6422 | echo "configure: failed program was:" >&5 | |
6423 | cat conftest.$ac_ext >&5 | |
6424 | rm -rf conftest* | |
6425 | eval "ac_cv_func_$ac_func=no" | |
6426 | fi | |
6427 | rm -f conftest* | |
6428 | fi | |
6429 | ||
6430 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6431 | echo "$ac_t""yes" 1>&6 | |
6432 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6433 | cat >> confdefs.h <<EOF | |
6434 | #define $ac_tr_func 1 | |
6435 | EOF | |
6436 | ||
6437 | else | |
6438 | echo "$ac_t""no" 1>&6 | |
6439 | fi | |
6440 | done | |
6441 | ||
97bf5e38 MK |
6442 | for ac_func in sbrk |
6443 | do | |
6444 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6445 | echo "configure:6446: checking for $ac_func" >&5 |
97bf5e38 | 6446 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6447 | echo $ac_n "(cached) $ac_c" 1>&6 |
6448 | else | |
6449 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6450 | #line 6451 "configure" |
c906108c | 6451 | #include "confdefs.h" |
97bf5e38 MK |
6452 | /* System header to define __stub macros and hopefully few prototypes, |
6453 | which can conflict with char $ac_func(); below. */ | |
6454 | #include <assert.h> | |
6455 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6456 | /* We use char because int might match the return type of a gcc2 | |
6457 | builtin and then its argument prototype would still apply. */ | |
6458 | char $ac_func(); | |
c906108c | 6459 | |
97bf5e38 MK |
6460 | int main() { |
6461 | ||
6462 | /* The GNU C library defines this for functions which it implements | |
6463 | to always fail with ENOSYS. Some functions are actually named | |
6464 | something starting with __ and the normal name is an alias. */ | |
6465 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6466 | choke me | |
c906108c | 6467 | #else |
97bf5e38 | 6468 | $ac_func(); |
c906108c | 6469 | #endif |
97bf5e38 | 6470 | |
c906108c SS |
6471 | ; return 0; } |
6472 | EOF | |
b9362cc7 | 6473 | if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6474 | rm -rf conftest* |
97bf5e38 | 6475 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6476 | else |
6477 | echo "configure: failed program was:" >&5 | |
6478 | cat conftest.$ac_ext >&5 | |
6479 | rm -rf conftest* | |
97bf5e38 | 6480 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6481 | fi |
6482 | rm -f conftest* | |
6483 | fi | |
6484 | ||
97bf5e38 MK |
6485 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6486 | echo "$ac_t""yes" 1>&6 | |
6487 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6488 | cat >> confdefs.h <<EOF | |
6489 | #define $ac_tr_func 1 | |
c906108c | 6490 | EOF |
97bf5e38 MK |
6491 | |
6492 | else | |
6493 | echo "$ac_t""no" 1>&6 | |
c906108c | 6494 | fi |
97bf5e38 | 6495 | done |
c906108c | 6496 | |
97bf5e38 MK |
6497 | for ac_func in setpgid setpgrp |
6498 | do | |
6499 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6500 | echo "configure:6501: checking for $ac_func" >&5 |
97bf5e38 | 6501 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6502 | echo $ac_n "(cached) $ac_c" 1>&6 |
6503 | else | |
6504 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6505 | #line 6506 "configure" |
c906108c | 6506 | #include "confdefs.h" |
97bf5e38 MK |
6507 | /* System header to define __stub macros and hopefully few prototypes, |
6508 | which can conflict with char $ac_func(); below. */ | |
6509 | #include <assert.h> | |
6510 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6511 | /* We use char because int might match the return type of a gcc2 | |
6512 | builtin and then its argument prototype would still apply. */ | |
6513 | char $ac_func(); | |
c906108c | 6514 | |
97bf5e38 MK |
6515 | int main() { |
6516 | ||
6517 | /* The GNU C library defines this for functions which it implements | |
6518 | to always fail with ENOSYS. Some functions are actually named | |
6519 | something starting with __ and the normal name is an alias. */ | |
6520 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6521 | choke me | |
c906108c | 6522 | #else |
97bf5e38 | 6523 | $ac_func(); |
c906108c | 6524 | #endif |
97bf5e38 | 6525 | |
c906108c SS |
6526 | ; return 0; } |
6527 | EOF | |
b9362cc7 | 6528 | if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6529 | rm -rf conftest* |
97bf5e38 | 6530 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6531 | else |
6532 | echo "configure: failed program was:" >&5 | |
6533 | cat conftest.$ac_ext >&5 | |
6534 | rm -rf conftest* | |
97bf5e38 | 6535 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6536 | fi |
6537 | rm -f conftest* | |
6538 | fi | |
6539 | ||
97bf5e38 MK |
6540 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6541 | echo "$ac_t""yes" 1>&6 | |
6542 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6543 | cat >> confdefs.h <<EOF | |
6544 | #define $ac_tr_func 1 | |
c906108c | 6545 | EOF |
97bf5e38 MK |
6546 | |
6547 | else | |
6548 | echo "$ac_t""no" 1>&6 | |
c906108c | 6549 | fi |
97bf5e38 | 6550 | done |
c906108c | 6551 | |
e1ea1d75 | 6552 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6553 | do |
6554 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6555 | echo "configure:6556: checking for $ac_func" >&5 |
97bf5e38 | 6556 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6557 | echo $ac_n "(cached) $ac_c" 1>&6 |
6558 | else | |
6559 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6560 | #line 6561 "configure" |
c906108c | 6561 | #include "confdefs.h" |
97bf5e38 MK |
6562 | /* System header to define __stub macros and hopefully few prototypes, |
6563 | which can conflict with char $ac_func(); below. */ | |
6564 | #include <assert.h> | |
6565 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6566 | /* We use char because int might match the return type of a gcc2 | |
6567 | builtin and then its argument prototype would still apply. */ | |
6568 | char $ac_func(); | |
c906108c | 6569 | |
97bf5e38 MK |
6570 | int main() { |
6571 | ||
6572 | /* The GNU C library defines this for functions which it implements | |
6573 | to always fail with ENOSYS. Some functions are actually named | |
6574 | something starting with __ and the normal name is an alias. */ | |
6575 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6576 | choke me | |
c906108c | 6577 | #else |
97bf5e38 | 6578 | $ac_func(); |
c906108c | 6579 | #endif |
97bf5e38 | 6580 | |
c906108c SS |
6581 | ; return 0; } |
6582 | EOF | |
b9362cc7 | 6583 | if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6584 | rm -rf conftest* |
97bf5e38 | 6585 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6586 | else |
6587 | echo "configure: failed program was:" >&5 | |
6588 | cat conftest.$ac_ext >&5 | |
6589 | rm -rf conftest* | |
97bf5e38 | 6590 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6591 | fi |
6592 | rm -f conftest* | |
6593 | fi | |
6594 | ||
97bf5e38 MK |
6595 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6596 | echo "$ac_t""yes" 1>&6 | |
6597 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6598 | cat >> confdefs.h <<EOF | |
6599 | #define $ac_tr_func 1 | |
c906108c | 6600 | EOF |
e1ea1d75 | 6601 | |
97bf5e38 MK |
6602 | else |
6603 | echo "$ac_t""no" 1>&6 | |
c906108c | 6604 | fi |
97bf5e38 | 6605 | done |
c906108c | 6606 | |
97bf5e38 MK |
6607 | for ac_func in socketpair |
6608 | do | |
6609 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6610 | echo "configure:6611: checking for $ac_func" >&5 |
97bf5e38 | 6611 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6612 | echo $ac_n "(cached) $ac_c" 1>&6 |
6613 | else | |
6614 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6615 | #line 6616 "configure" |
c906108c | 6616 | #include "confdefs.h" |
97bf5e38 MK |
6617 | /* System header to define __stub macros and hopefully few prototypes, |
6618 | which can conflict with char $ac_func(); below. */ | |
6619 | #include <assert.h> | |
6620 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6621 | /* We use char because int might match the return type of a gcc2 | |
6622 | builtin and then its argument prototype would still apply. */ | |
6623 | char $ac_func(); | |
c906108c | 6624 | |
97bf5e38 MK |
6625 | int main() { |
6626 | ||
6627 | /* The GNU C library defines this for functions which it implements | |
6628 | to always fail with ENOSYS. Some functions are actually named | |
6629 | something starting with __ and the normal name is an alias. */ | |
6630 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6631 | choke me | |
c906108c | 6632 | #else |
97bf5e38 | 6633 | $ac_func(); |
c906108c | 6634 | #endif |
97bf5e38 | 6635 | |
c906108c SS |
6636 | ; return 0; } |
6637 | EOF | |
b9362cc7 | 6638 | if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6639 | rm -rf conftest* |
97bf5e38 | 6640 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6641 | else |
6642 | echo "configure: failed program was:" >&5 | |
6643 | cat conftest.$ac_ext >&5 | |
6644 | rm -rf conftest* | |
97bf5e38 | 6645 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6646 | fi |
6647 | rm -f conftest* | |
6648 | fi | |
6649 | ||
97bf5e38 MK |
6650 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6651 | echo "$ac_t""yes" 1>&6 | |
6652 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6653 | cat >> confdefs.h <<EOF | |
6654 | #define $ac_tr_func 1 | |
c906108c | 6655 | EOF |
97bf5e38 MK |
6656 | |
6657 | else | |
6658 | echo "$ac_t""no" 1>&6 | |
c906108c | 6659 | fi |
97bf5e38 | 6660 | done |
c906108c | 6661 | |
b757528f JJ |
6662 | for ac_func in syscall |
6663 | do | |
6664 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b9362cc7 | 6665 | echo "configure:6666: checking for $ac_func" >&5 |
b757528f JJ |
6666 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6667 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6668 | else | |
6669 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6670 | #line 6671 "configure" |
b757528f JJ |
6671 | #include "confdefs.h" |
6672 | /* System header to define __stub macros and hopefully few prototypes, | |
6673 | which can conflict with char $ac_func(); below. */ | |
6674 | #include <assert.h> | |
6675 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6676 | /* We use char because int might match the return type of a gcc2 | |
6677 | builtin and then its argument prototype would still apply. */ | |
6678 | char $ac_func(); | |
6679 | ||
6680 | int main() { | |
6681 | ||
6682 | /* The GNU C library defines this for functions which it implements | |
6683 | to always fail with ENOSYS. Some functions are actually named | |
6684 | something starting with __ and the normal name is an alias. */ | |
6685 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6686 | choke me | |
6687 | #else | |
6688 | $ac_func(); | |
6689 | #endif | |
6690 | ||
6691 | ; return 0; } | |
6692 | EOF | |
b9362cc7 | 6693 | if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b757528f JJ |
6694 | rm -rf conftest* |
6695 | eval "ac_cv_func_$ac_func=yes" | |
6696 | else | |
6697 | echo "configure: failed program was:" >&5 | |
6698 | cat conftest.$ac_ext >&5 | |
6699 | rm -rf conftest* | |
6700 | eval "ac_cv_func_$ac_func=no" | |
6701 | fi | |
6702 | rm -f conftest* | |
6703 | fi | |
6704 | ||
6705 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6706 | echo "$ac_t""yes" 1>&6 | |
6707 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6708 | cat >> confdefs.h <<EOF | |
6709 | #define $ac_tr_func 1 | |
6710 | EOF | |
6711 | ||
6712 | else | |
6713 | echo "$ac_t""no" 1>&6 | |
6714 | fi | |
6715 | done | |
6716 | ||
97bf5e38 MK |
6717 | |
6718 | if test "$cross_compiling" = no; then | |
6719 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
b9362cc7 | 6720 | echo "configure:6721: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6721 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6722 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6723 | else |
6724 | if test "$cross_compiling" = yes; then | |
6725 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6726 | else |
6727 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6728 | #line 6729 "configure" |
c906108c SS |
6729 | #include "confdefs.h" |
6730 | ||
c906108c SS |
6731 | #ifdef HAVE_UNISTD_H |
6732 | #include <unistd.h> | |
6733 | #endif | |
97bf5e38 MK |
6734 | |
6735 | /* | |
6736 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6737 | * successfully. | |
6738 | */ | |
6739 | main() | |
6740 | { | |
6741 | if (setpgrp(1,1) == -1) | |
6742 | exit(0); | |
6743 | else | |
6744 | exit(1); | |
6745 | } | |
6746 | ||
c906108c | 6747 | EOF |
b9362cc7 | 6748 | if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6749 | then |
6750 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6751 | else |
6752 | echo "configure: failed program was:" >&5 | |
6753 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6754 | rm -fr conftest* |
6755 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6756 | fi |
97bf5e38 | 6757 | rm -fr conftest* |
c906108c SS |
6758 | fi |
6759 | ||
97bf5e38 MK |
6760 | |
6761 | fi | |
6762 | ||
6763 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6764 | if test $ac_cv_func_setpgrp_void = yes; then | |
6765 | cat >> confdefs.h <<\EOF | |
6766 | #define SETPGRP_VOID 1 | |
c906108c SS |
6767 | EOF |
6768 | ||
6769 | fi | |
6770 | ||
97bf5e38 MK |
6771 | else |
6772 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
b9362cc7 | 6773 | echo "configure:6774: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6774 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6775 | echo $ac_n "(cached) $ac_c" 1>&6 |
6776 | else | |
6777 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6778 | #line 6779 "configure" |
b83266a0 SS |
6779 | #include "confdefs.h" |
6780 | ||
b83266a0 | 6781 | #include <unistd.h> |
97bf5e38 | 6782 | |
b83266a0 | 6783 | int main() { |
97bf5e38 MK |
6784 | |
6785 | if (setpgrp(1,1) == -1) | |
6786 | exit (0); | |
6787 | else | |
6788 | exit (1); | |
6789 | ||
b83266a0 SS |
6790 | ; return 0; } |
6791 | EOF | |
b9362cc7 | 6792 | if { (eval echo configure:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6793 | rm -rf conftest* |
97bf5e38 | 6794 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6795 | else |
6796 | echo "configure: failed program was:" >&5 | |
6797 | cat conftest.$ac_ext >&5 | |
6798 | rm -rf conftest* | |
97bf5e38 | 6799 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6800 | fi |
6801 | rm -f conftest* | |
6802 | fi | |
6803 | ||
97bf5e38 MK |
6804 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6805 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6806 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6807 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6808 | EOF |
6809 | ||
97bf5e38 | 6810 | fi |
b83266a0 SS |
6811 | fi |
6812 | ||
97bf5e38 MK |
6813 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6814 | # since sigsetjmp might only be defined as a macro. | |
6815 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
b9362cc7 | 6816 | echo "configure:6817: checking for sigsetjmp" >&5 |
97bf5e38 | 6817 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6818 | echo $ac_n "(cached) $ac_c" 1>&6 |
6819 | else | |
6820 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6821 | #line 6822 "configure" |
a4db0f07 RH |
6822 | #include "confdefs.h" |
6823 | ||
97bf5e38 MK |
6824 | #include <setjmp.h> |
6825 | ||
a4db0f07 | 6826 | int main() { |
97bf5e38 | 6827 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6828 | ; return 0; } |
6829 | EOF | |
b9362cc7 | 6830 | if { (eval echo configure:6831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6831 | rm -rf conftest* |
97bf5e38 | 6832 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6833 | else |
6834 | echo "configure: failed program was:" >&5 | |
6835 | cat conftest.$ac_ext >&5 | |
6836 | rm -rf conftest* | |
97bf5e38 | 6837 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6838 | fi |
6839 | rm -f conftest* | |
6840 | fi | |
6841 | ||
97bf5e38 MK |
6842 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6843 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6844 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6845 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6846 | EOF |
6847 | ||
6848 | fi | |
c906108c | 6849 | |
06825bd1 MK |
6850 | # Assume we'll default to using the included libiberty regex. |
6851 | gdb_use_included_regex=yes | |
6852 | ||
6853 | # However, if the system regex is GNU regex, then default to *not* | |
6854 | # using the included regex. | |
6855 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
b9362cc7 | 6856 | echo "configure:6857: checking for GNU regex" >&5 |
06825bd1 MK |
6857 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6858 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6859 | else | |
6860 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6861 | #line 6862 "configure" |
06825bd1 MK |
6862 | #include "confdefs.h" |
6863 | #include <gnu-versions.h> | |
6864 | int main() { | |
6865 | #define REGEX_INTERFACE_VERSION 1 | |
6866 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6867 | # error "Version mismatch" | |
6868 | #endif | |
6869 | ; return 0; } | |
6870 | EOF | |
b9362cc7 | 6871 | if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6872 | rm -rf conftest* |
6873 | gdb_cv_have_gnu_regex=yes | |
6874 | else | |
6875 | echo "configure: failed program was:" >&5 | |
6876 | cat conftest.$ac_ext >&5 | |
6877 | rm -rf conftest* | |
6878 | gdb_cv_have_gnu_regex=no | |
6879 | fi | |
6880 | rm -f conftest* | |
6881 | fi | |
6882 | ||
6883 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6884 | if test $gdb_cv_have_gnu_regex = yes; then | |
6885 | gdb_use_included_regex=no | |
6886 | fi | |
6887 | ||
6888 | # Check whether --with-included-regex or --without-included-regex was given. | |
6889 | if test "${with_included_regex+set}" = set; then | |
6890 | withval="$with_included_regex" | |
6891 | gdb_with_regex=$withval | |
6892 | else | |
6893 | gdb_with_regex=$gdb_use_included_regex | |
6894 | fi | |
6895 | ||
6896 | if test "$gdb_with_regex" = yes; then | |
6897 | cat >> confdefs.h <<\EOF | |
6898 | #define USE_INCLUDED_REGEX 1 | |
6899 | EOF | |
6900 | ||
6901 | fi | |
6902 | ||
97bf5e38 MK |
6903 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6904 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6905 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
b9362cc7 | 6906 | echo "configure:6907: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6907 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6908 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6909 | else | |
6910 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6911 | #line 6912 "configure" |
c906108c | 6912 | #include "confdefs.h" |
97bf5e38 MK |
6913 | #include <machine/reg.h> |
6914 | int main() { | |
6915 | struct reg r; r.r_fs; | |
6916 | ; return 0; } | |
c906108c | 6917 | EOF |
b9362cc7 | 6918 | if { (eval echo configure:6919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6919 | rm -rf conftest* |
97bf5e38 | 6920 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6921 | else |
97bf5e38 MK |
6922 | echo "configure: failed program was:" >&5 |
6923 | cat conftest.$ac_ext >&5 | |
c906108c | 6924 | rm -rf conftest* |
97bf5e38 | 6925 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6926 | fi |
6927 | rm -f conftest* | |
97bf5e38 | 6928 | fi |
c906108c | 6929 | |
97bf5e38 MK |
6930 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6931 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6932 | cat >> confdefs.h <<\EOF | |
6933 | #define HAVE_STRUCT_REG_R_FS 1 | |
6934 | EOF | |
6935 | ||
6936 | fi | |
6937 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
b9362cc7 | 6938 | echo "configure:6939: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6939 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6940 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6941 | else | |
6942 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6943 | #line 6944 "configure" |
c906108c | 6944 | #include "confdefs.h" |
97bf5e38 MK |
6945 | #include <machine/reg.h> |
6946 | int main() { | |
6947 | struct reg r; r.r_gs; | |
6948 | ; return 0; } | |
c906108c | 6949 | EOF |
b9362cc7 | 6950 | if { (eval echo configure:6951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6951 | rm -rf conftest* |
97bf5e38 | 6952 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6953 | else |
97bf5e38 MK |
6954 | echo "configure: failed program was:" >&5 |
6955 | cat conftest.$ac_ext >&5 | |
c906108c | 6956 | rm -rf conftest* |
97bf5e38 | 6957 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6958 | fi |
6959 | rm -f conftest* | |
c906108c | 6960 | fi |
c906108c | 6961 | |
97bf5e38 MK |
6962 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6963 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6964 | cat >> confdefs.h <<\EOF | |
6965 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6966 | EOF |
6967 | ||
c906108c SS |
6968 | fi |
6969 | ||
97bf5e38 MK |
6970 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6971 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
b9362cc7 | 6972 | echo "configure:6973: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6973 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6974 | echo $ac_n "(cached) $ac_c" 1>&6 |
6975 | else | |
6976 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 6977 | #line 6978 "configure" |
c906108c | 6978 | #include "confdefs.h" |
97bf5e38 | 6979 | #include <sys/ptrace.h> |
c906108c | 6980 | int main() { |
97bf5e38 | 6981 | PTRACE_GETREGS; |
c906108c SS |
6982 | ; return 0; } |
6983 | EOF | |
b9362cc7 | 6984 | if { (eval echo configure:6985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6985 | rm -rf conftest* |
97bf5e38 | 6986 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6987 | else |
6988 | echo "configure: failed program was:" >&5 | |
6989 | cat conftest.$ac_ext >&5 | |
6990 | rm -rf conftest* | |
97bf5e38 | 6991 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6992 | fi |
6993 | rm -f conftest* | |
6994 | fi | |
6995 | ||
97bf5e38 MK |
6996 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6997 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6998 | cat >> confdefs.h <<\EOF | |
6999 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
7000 | EOF |
7001 | ||
97bf5e38 | 7002 | fi |
c906108c | 7003 | |
97bf5e38 MK |
7004 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
7005 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
b9362cc7 | 7006 | echo "configure:7007: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 7007 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
7008 | echo $ac_n "(cached) $ac_c" 1>&6 |
7009 | else | |
7010 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7011 | #line 7012 "configure" |
c906108c | 7012 | #include "confdefs.h" |
97bf5e38 | 7013 | #include <sys/ptrace.h> |
c906108c | 7014 | int main() { |
97bf5e38 | 7015 | PTRACE_GETFPXREGS; |
c906108c SS |
7016 | ; return 0; } |
7017 | EOF | |
b9362cc7 | 7018 | if { (eval echo configure:7019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7019 | rm -rf conftest* |
97bf5e38 | 7020 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
7021 | else |
7022 | echo "configure: failed program was:" >&5 | |
7023 | cat conftest.$ac_ext >&5 | |
7024 | rm -rf conftest* | |
97bf5e38 | 7025 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
7026 | fi |
7027 | rm -f conftest* | |
7028 | fi | |
7029 | ||
97bf5e38 MK |
7030 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
7031 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
7032 | cat >> confdefs.h <<\EOF | |
7033 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
7034 | EOF |
7035 | ||
97bf5e38 | 7036 | fi |
c906108c | 7037 | |
97bf5e38 MK |
7038 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
7039 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
b9362cc7 | 7040 | echo "configure:7041: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 7041 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
7042 | echo $ac_n "(cached) $ac_c" 1>&6 |
7043 | else | |
7044 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7045 | #line 7046 "configure" |
c906108c | 7046 | #include "confdefs.h" |
97bf5e38 MK |
7047 | #include <sys/types.h> |
7048 | #include <sys/ptrace.h> | |
c906108c | 7049 | int main() { |
97bf5e38 | 7050 | PT_GETDBREGS; |
c906108c SS |
7051 | ; return 0; } |
7052 | EOF | |
b9362cc7 | 7053 | if { (eval echo configure:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7054 | rm -rf conftest* |
97bf5e38 | 7055 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
7056 | else |
7057 | echo "configure: failed program was:" >&5 | |
7058 | cat conftest.$ac_ext >&5 | |
7059 | rm -rf conftest* | |
97bf5e38 | 7060 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
7061 | fi |
7062 | rm -f conftest* | |
7063 | fi | |
7064 | ||
97bf5e38 MK |
7065 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
7066 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
7067 | cat >> confdefs.h <<\EOF | |
7068 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
7069 | EOF |
7070 | ||
97bf5e38 | 7071 | fi |
c906108c | 7072 | |
97bf5e38 MK |
7073 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
7074 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
b9362cc7 | 7075 | echo "configure:7076: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 7076 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
7077 | echo $ac_n "(cached) $ac_c" 1>&6 |
7078 | else | |
7079 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7080 | #line 7081 "configure" |
c906108c | 7081 | #include "confdefs.h" |
97bf5e38 MK |
7082 | #include <sys/types.h> |
7083 | #include <sys/ptrace.h> | |
c906108c | 7084 | int main() { |
97bf5e38 | 7085 | PT_GETXMMREGS; |
c906108c SS |
7086 | ; return 0; } |
7087 | EOF | |
b9362cc7 | 7088 | if { (eval echo configure:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7089 | rm -rf conftest* |
97bf5e38 | 7090 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
7091 | else |
7092 | echo "configure: failed program was:" >&5 | |
7093 | cat conftest.$ac_ext >&5 | |
7094 | rm -rf conftest* | |
97bf5e38 | 7095 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
7096 | fi |
7097 | rm -f conftest* | |
7098 | fi | |
7099 | ||
97bf5e38 MK |
7100 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
7101 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
7102 | cat >> confdefs.h <<\EOF | |
7103 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
7104 | EOF |
7105 | ||
97bf5e38 | 7106 | fi |
c906108c | 7107 | |
27ca5dad | 7108 | # See if stdint.h provides the uintptr_t type. |
d3e0a5bf | 7109 | # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. |
27ca5dad | 7110 | echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6 |
b9362cc7 | 7111 | echo "configure:7112: checking for uintptr_t in stdint.h" >&5 |
27ca5dad MC |
7112 | if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then |
7113 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7114 | else | |
7115 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7116 | #line 7117 "configure" |
27ca5dad MC |
7117 | #include "confdefs.h" |
7118 | #include <stdint.h> | |
7119 | int main() { | |
7120 | uintptr_t foo = 0; | |
7121 | ; return 0; } | |
7122 | EOF | |
b9362cc7 | 7123 | if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
27ca5dad MC |
7124 | rm -rf conftest* |
7125 | gdb_cv_have_uintptr_t=yes | |
7126 | else | |
7127 | echo "configure: failed program was:" >&5 | |
7128 | cat conftest.$ac_ext >&5 | |
7129 | rm -rf conftest* | |
7130 | gdb_cv_have_uintptr_t=no | |
7131 | fi | |
7132 | rm -f conftest* | |
7133 | fi | |
7134 | ||
d3e0a5bf | 7135 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 |
27ca5dad MC |
7136 | echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6 |
7137 | if test $gdb_cv_have_uintptr_t = yes; then | |
7138 | cat >> confdefs.h <<\EOF | |
7139 | #define HAVE_UINTPTR_T 1 | |
7140 | EOF | |
7141 | ||
7142 | fi | |
97bf5e38 MK |
7143 | |
7144 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
b9362cc7 | 7145 | echo "configure:7146: checking whether malloc must be declared" >&5 |
97bf5e38 | 7146 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
7147 | echo $ac_n "(cached) $ac_c" 1>&6 |
7148 | else | |
7149 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7150 | #line 7151 "configure" |
3862412b | 7151 | #include "confdefs.h" |
e17bf198 | 7152 | |
97bf5e38 MK |
7153 | #include <stdio.h> |
7154 | #ifdef HAVE_STRING_H | |
7155 | #include <string.h> | |
7156 | #else | |
7157 | #ifdef HAVE_STRINGS_H | |
7158 | #include <strings.h> | |
7159 | #endif | |
7160 | #endif | |
7161 | #ifdef HAVE_STDLIB_H | |
7162 | #include <stdlib.h> | |
7163 | #endif | |
7164 | #ifdef HAVE_UNISTD_H | |
7165 | #include <unistd.h> | |
7166 | #endif | |
3862412b | 7167 | int main() { |
97bf5e38 | 7168 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
7169 | ; return 0; } |
7170 | EOF | |
b9362cc7 | 7171 | if { (eval echo configure:7172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7172 | rm -rf conftest* |
97bf5e38 | 7173 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
7174 | else |
7175 | echo "configure: failed program was:" >&5 | |
7176 | cat conftest.$ac_ext >&5 | |
7177 | rm -rf conftest* | |
97bf5e38 | 7178 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
7179 | fi |
7180 | rm -f conftest* | |
7181 | fi | |
7182 | ||
97bf5e38 MK |
7183 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
7184 | if test $bfd_cv_decl_needed_malloc = yes; then | |
7185 | cat >> confdefs.h <<\EOF | |
7186 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
7187 | EOF |
7188 | ||
97bf5e38 | 7189 | fi |
3862412b | 7190 | |
97bf5e38 | 7191 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7192 | echo "configure:7193: checking whether realloc must be declared" >&5 |
97bf5e38 | 7193 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7194 | echo $ac_n "(cached) $ac_c" 1>&6 |
7195 | else | |
7196 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7197 | #line 7198 "configure" |
3862412b | 7198 | #include "confdefs.h" |
e17bf198 | 7199 | |
97bf5e38 MK |
7200 | #include <stdio.h> |
7201 | #ifdef HAVE_STRING_H | |
7202 | #include <string.h> | |
7203 | #else | |
7204 | #ifdef HAVE_STRINGS_H | |
7205 | #include <strings.h> | |
7206 | #endif | |
7207 | #endif | |
7208 | #ifdef HAVE_STDLIB_H | |
7209 | #include <stdlib.h> | |
7210 | #endif | |
7211 | #ifdef HAVE_UNISTD_H | |
7212 | #include <unistd.h> | |
7213 | #endif | |
3862412b | 7214 | int main() { |
97bf5e38 | 7215 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7216 | ; return 0; } |
7217 | EOF | |
b9362cc7 | 7218 | if { (eval echo configure:7219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7219 | rm -rf conftest* |
97bf5e38 | 7220 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7221 | else |
7222 | echo "configure: failed program was:" >&5 | |
7223 | cat conftest.$ac_ext >&5 | |
7224 | rm -rf conftest* | |
97bf5e38 | 7225 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7226 | fi |
7227 | rm -f conftest* | |
7228 | fi | |
7229 | ||
97bf5e38 MK |
7230 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7231 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7232 | cat >> confdefs.h <<\EOF | |
7233 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7234 | EOF |
7235 | ||
97bf5e38 | 7236 | fi |
3862412b | 7237 | |
97bf5e38 | 7238 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7239 | echo "configure:7240: checking whether free must be declared" >&5 |
97bf5e38 | 7240 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7241 | echo $ac_n "(cached) $ac_c" 1>&6 |
7242 | else | |
7243 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7244 | #line 7245 "configure" |
451928c5 | 7245 | #include "confdefs.h" |
e17bf198 | 7246 | |
97bf5e38 MK |
7247 | #include <stdio.h> |
7248 | #ifdef HAVE_STRING_H | |
7249 | #include <string.h> | |
7250 | #else | |
7251 | #ifdef HAVE_STRINGS_H | |
7252 | #include <strings.h> | |
7253 | #endif | |
7254 | #endif | |
7255 | #ifdef HAVE_STDLIB_H | |
7256 | #include <stdlib.h> | |
7257 | #endif | |
7258 | #ifdef HAVE_UNISTD_H | |
7259 | #include <unistd.h> | |
7260 | #endif | |
451928c5 | 7261 | int main() { |
97bf5e38 | 7262 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7263 | ; return 0; } |
7264 | EOF | |
b9362cc7 | 7265 | if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7266 | rm -rf conftest* |
97bf5e38 | 7267 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7268 | else |
7269 | echo "configure: failed program was:" >&5 | |
7270 | cat conftest.$ac_ext >&5 | |
7271 | rm -rf conftest* | |
97bf5e38 | 7272 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7273 | fi |
7274 | rm -f conftest* | |
7275 | fi | |
7276 | ||
97bf5e38 MK |
7277 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7278 | if test $bfd_cv_decl_needed_free = yes; then | |
7279 | cat >> confdefs.h <<\EOF | |
7280 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7281 | EOF |
7282 | ||
97bf5e38 | 7283 | fi |
451928c5 | 7284 | |
97bf5e38 | 7285 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7286 | echo "configure:7287: checking whether strerror must be declared" >&5 |
97bf5e38 | 7287 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7288 | echo $ac_n "(cached) $ac_c" 1>&6 |
7289 | else | |
7290 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7291 | #line 7292 "configure" |
451928c5 | 7292 | #include "confdefs.h" |
e17bf198 | 7293 | |
97bf5e38 MK |
7294 | #include <stdio.h> |
7295 | #ifdef HAVE_STRING_H | |
7296 | #include <string.h> | |
7297 | #else | |
7298 | #ifdef HAVE_STRINGS_H | |
7299 | #include <strings.h> | |
7300 | #endif | |
7301 | #endif | |
7302 | #ifdef HAVE_STDLIB_H | |
7303 | #include <stdlib.h> | |
7304 | #endif | |
7305 | #ifdef HAVE_UNISTD_H | |
7306 | #include <unistd.h> | |
7307 | #endif | |
451928c5 | 7308 | int main() { |
97bf5e38 | 7309 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7310 | ; return 0; } |
7311 | EOF | |
b9362cc7 | 7312 | if { (eval echo configure:7313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7313 | rm -rf conftest* |
97bf5e38 | 7314 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7315 | else |
7316 | echo "configure: failed program was:" >&5 | |
7317 | cat conftest.$ac_ext >&5 | |
7318 | rm -rf conftest* | |
97bf5e38 | 7319 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7320 | fi |
7321 | rm -f conftest* | |
7322 | fi | |
7323 | ||
97bf5e38 MK |
7324 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7325 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7326 | cat >> confdefs.h <<\EOF | |
7327 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7328 | EOF |
7329 | ||
97bf5e38 | 7330 | fi |
451928c5 | 7331 | |
97bf5e38 | 7332 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7333 | echo "configure:7334: checking whether strdup must be declared" >&5 |
97bf5e38 | 7334 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7335 | echo $ac_n "(cached) $ac_c" 1>&6 |
7336 | else | |
7337 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7338 | #line 7339 "configure" |
3862412b | 7339 | #include "confdefs.h" |
e17bf198 | 7340 | |
97bf5e38 MK |
7341 | #include <stdio.h> |
7342 | #ifdef HAVE_STRING_H | |
7343 | #include <string.h> | |
7344 | #else | |
7345 | #ifdef HAVE_STRINGS_H | |
7346 | #include <strings.h> | |
7347 | #endif | |
7348 | #endif | |
7349 | #ifdef HAVE_STDLIB_H | |
7350 | #include <stdlib.h> | |
7351 | #endif | |
7352 | #ifdef HAVE_UNISTD_H | |
7353 | #include <unistd.h> | |
7354 | #endif | |
3862412b | 7355 | int main() { |
97bf5e38 | 7356 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7357 | ; return 0; } |
7358 | EOF | |
b9362cc7 | 7359 | if { (eval echo configure:7360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7360 | rm -rf conftest* |
97bf5e38 | 7361 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7362 | else |
7363 | echo "configure: failed program was:" >&5 | |
7364 | cat conftest.$ac_ext >&5 | |
7365 | rm -rf conftest* | |
97bf5e38 | 7366 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7367 | fi |
7368 | rm -f conftest* | |
7369 | fi | |
7370 | ||
97bf5e38 MK |
7371 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7372 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7373 | cat >> confdefs.h <<\EOF | |
7374 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7375 | EOF |
7376 | ||
97bf5e38 | 7377 | fi |
3862412b | 7378 | |
97bf5e38 | 7379 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7380 | echo "configure:7381: checking whether strstr must be declared" >&5 |
97bf5e38 | 7381 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7382 | echo $ac_n "(cached) $ac_c" 1>&6 |
7383 | else | |
7384 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7385 | #line 7386 "configure" |
3862412b | 7386 | #include "confdefs.h" |
e17bf198 | 7387 | |
97bf5e38 MK |
7388 | #include <stdio.h> |
7389 | #ifdef HAVE_STRING_H | |
7390 | #include <string.h> | |
7391 | #else | |
7392 | #ifdef HAVE_STRINGS_H | |
7393 | #include <strings.h> | |
7394 | #endif | |
7395 | #endif | |
7396 | #ifdef HAVE_STDLIB_H | |
7397 | #include <stdlib.h> | |
7398 | #endif | |
7399 | #ifdef HAVE_UNISTD_H | |
7400 | #include <unistd.h> | |
7401 | #endif | |
3862412b | 7402 | int main() { |
97bf5e38 | 7403 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7404 | ; return 0; } |
7405 | EOF | |
b9362cc7 | 7406 | if { (eval echo configure:7407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7407 | rm -rf conftest* |
97bf5e38 | 7408 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7409 | else |
7410 | echo "configure: failed program was:" >&5 | |
7411 | cat conftest.$ac_ext >&5 | |
7412 | rm -rf conftest* | |
97bf5e38 | 7413 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7414 | fi |
7415 | rm -f conftest* | |
7416 | fi | |
7417 | ||
97bf5e38 MK |
7418 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7419 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7420 | cat >> confdefs.h <<\EOF | |
7421 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7422 | EOF |
7423 | ||
97bf5e38 | 7424 | fi |
3862412b | 7425 | |
97bf5e38 | 7426 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
b9362cc7 | 7427 | echo "configure:7428: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7428 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7429 | echo $ac_n "(cached) $ac_c" 1>&6 |
7430 | else | |
7431 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7432 | #line 7433 "configure" |
596c9d4b KB |
7433 | #include "confdefs.h" |
7434 | ||
97bf5e38 MK |
7435 | #include <stdio.h> |
7436 | #ifdef HAVE_STRING_H | |
7437 | #include <string.h> | |
7438 | #else | |
7439 | #ifdef HAVE_STRINGS_H | |
7440 | #include <strings.h> | |
7441 | #endif | |
7442 | #endif | |
7443 | #ifdef HAVE_STDLIB_H | |
7444 | #include <stdlib.h> | |
7445 | #endif | |
7446 | #ifdef HAVE_UNISTD_H | |
7447 | #include <unistd.h> | |
7448 | #endif | |
596c9d4b | 7449 | int main() { |
97bf5e38 | 7450 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7451 | ; return 0; } |
7452 | EOF | |
b9362cc7 | 7453 | if { (eval echo configure:7454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7454 | rm -rf conftest* |
97bf5e38 | 7455 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7456 | else |
7457 | echo "configure: failed program was:" >&5 | |
7458 | cat conftest.$ac_ext >&5 | |
7459 | rm -rf conftest* | |
97bf5e38 | 7460 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7461 | fi |
7462 | rm -f conftest* | |
7463 | fi | |
7464 | ||
97bf5e38 MK |
7465 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7466 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7467 | cat >> confdefs.h <<\EOF | |
7468 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7469 | EOF |
7470 | ||
97bf5e38 | 7471 | fi |
596c9d4b | 7472 | |
97bf5e38 MK |
7473 | |
7474 | # The following save_state_t checkery is only necessary for HPUX | |
7475 | # versions earlier than 10.20. When those fade from memory, this | |
7476 | # could be expunged. --jsm 1999-03-22 | |
7477 | ||
7478 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
b9362cc7 | 7479 | echo "configure:7480: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7480 | cat > conftest.$ac_ext <<EOF |
b9362cc7 | 7481 | #line 7482 "configure" |
97bf5e38 MK |
7482 | #include "confdefs.h" |
7483 | #include <machine/save_state.h> | |
7484 | EOF | |
7485 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7486 | egrep "save_state_t" >/dev/null 2>&1; then | |
7487 | rm -rf conftest* | |
7488 | gdb_cv_hpux_savestate=yes | |
7489 | else | |
7490 | rm -rf conftest* | |
7491 | gdb_cv_hpux_savestate=no | |
7492 | fi | |
7493 | rm -f conftest* | |
7494 | ||
7495 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7496 | #line 7497 "configure" |
97bf5e38 MK |
7497 | #include "confdefs.h" |
7498 | #include <machine/save_state.h> | |
7499 | EOF | |
7500 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7501 | egrep "ss_wide" >/dev/null 2>&1; then | |
7502 | rm -rf conftest* | |
7503 | gdb_cv_hpux_sswide=yes | |
7504 | else | |
7505 | rm -rf conftest* | |
7506 | gdb_cv_hpux_sswide=no | |
7507 | fi | |
7508 | rm -f conftest* | |
7509 | ||
7510 | if test $gdb_cv_hpux_savestate = yes | |
7511 | then | |
7512 | cat >> confdefs.h <<\EOF | |
7513 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7514 | EOF | |
7515 | ||
7516 | fi | |
7517 | if test $gdb_cv_hpux_sswide = yes | |
7518 | then | |
7519 | cat >> confdefs.h <<\EOF | |
7520 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7521 | EOF | |
7522 | ||
7523 | fi | |
7524 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7525 | ||
7526 | ||
7527 | # If we are configured native on GNU/Linux, work around problems with | |
7528 | # sys/procfs.h | |
7529 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7530 | ||
7531 | if test "${target}" = "${host}"; then | |
7532 | case "${host}" in | |
7533 | i[3456]86-*-linux*) | |
7534 | cat >> confdefs.h <<\EOF | |
7535 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7536 | EOF | |
7537 | ||
7538 | cat >> confdefs.h <<\EOF | |
7539 | #define sys_quotactl 1 | |
7540 | EOF | |
7541 | ||
7542 | ;; | |
7543 | ia64-*-aix*) | |
7544 | cat >> confdefs.h <<\EOF | |
7545 | #define NEW_PROC_API 1 | |
7546 | EOF | |
7547 | ||
7548 | ;; | |
7549 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7550 | cat >> confdefs.h <<\EOF | |
7551 | #define NEW_PROC_API 1 | |
7552 | EOF | |
7553 | ||
7554 | ;; | |
7555 | *-*-solaris2.[678]) | |
7556 | cat >> confdefs.h <<\EOF | |
7557 | #define NEW_PROC_API 1 | |
7558 | EOF | |
7559 | ||
7560 | ;; | |
7561 | esac | |
7562 | fi | |
7563 | ||
7564 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7565 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
b9362cc7 | 7566 | echo "configure:7567: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7567 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7568 | echo $ac_n "(cached) $ac_c" 1>&6 |
7569 | else | |
7570 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7571 | #line 7572 "configure" |
596c9d4b KB |
7572 | #include "confdefs.h" |
7573 | ||
7574 | #define _SYSCALL32 | |
7575 | #include <sys/procfs.h> | |
7576 | int main() { | |
97bf5e38 | 7577 | pstatus_t avar |
596c9d4b KB |
7578 | ; return 0; } |
7579 | EOF | |
b9362cc7 | 7580 | if { (eval echo configure:7581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7581 | rm -rf conftest* |
97bf5e38 | 7582 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7583 | else |
7584 | echo "configure: failed program was:" >&5 | |
7585 | cat conftest.$ac_ext >&5 | |
7586 | rm -rf conftest* | |
97bf5e38 | 7587 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7588 | |
7589 | fi | |
7590 | rm -f conftest* | |
7591 | fi | |
7592 | ||
97bf5e38 | 7593 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7594 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7595 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7596 | EOF |
7597 | ||
7598 | fi | |
97bf5e38 | 7599 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7600 | |
97bf5e38 | 7601 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7602 | echo "configure:7603: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7603 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7604 | echo $ac_n "(cached) $ac_c" 1>&6 |
7605 | else | |
7606 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7607 | #line 7608 "configure" |
596c9d4b KB |
7608 | #include "confdefs.h" |
7609 | ||
7610 | #define _SYSCALL32 | |
7611 | #include <sys/procfs.h> | |
7612 | int main() { | |
97bf5e38 | 7613 | prrun_t avar |
596c9d4b KB |
7614 | ; return 0; } |
7615 | EOF | |
b9362cc7 | 7616 | if { (eval echo configure:7617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7617 | rm -rf conftest* |
97bf5e38 | 7618 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7619 | else |
7620 | echo "configure: failed program was:" >&5 | |
7621 | cat conftest.$ac_ext >&5 | |
7622 | rm -rf conftest* | |
97bf5e38 | 7623 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7624 | |
7625 | fi | |
7626 | rm -f conftest* | |
7627 | fi | |
7628 | ||
97bf5e38 | 7629 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7630 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7631 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7632 | EOF |
7633 | ||
7634 | fi | |
97bf5e38 | 7635 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7636 | |
97bf5e38 | 7637 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7638 | echo "configure:7639: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7639 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7640 | echo $ac_n "(cached) $ac_c" 1>&6 |
7641 | else | |
7642 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7643 | #line 7644 "configure" |
596c9d4b KB |
7644 | #include "confdefs.h" |
7645 | ||
7646 | #define _SYSCALL32 | |
7647 | #include <sys/procfs.h> | |
7648 | int main() { | |
97bf5e38 | 7649 | gregset_t avar |
596c9d4b KB |
7650 | ; return 0; } |
7651 | EOF | |
b9362cc7 | 7652 | if { (eval echo configure:7653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7653 | rm -rf conftest* |
97bf5e38 | 7654 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7655 | else |
7656 | echo "configure: failed program was:" >&5 | |
7657 | cat conftest.$ac_ext >&5 | |
7658 | rm -rf conftest* | |
97bf5e38 | 7659 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7660 | |
7661 | fi | |
7662 | rm -f conftest* | |
7663 | fi | |
7664 | ||
97bf5e38 | 7665 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7666 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7667 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7668 | EOF |
7669 | ||
7670 | fi | |
97bf5e38 | 7671 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7672 | |
97bf5e38 | 7673 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7674 | echo "configure:7675: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7675 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7676 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7677 | else |
7678 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7679 | #line 7680 "configure" |
d84dd0c5 | 7680 | #include "confdefs.h" |
97bf5e38 MK |
7681 | |
7682 | #define _SYSCALL32 | |
d84dd0c5 | 7683 | #include <sys/procfs.h> |
97bf5e38 MK |
7684 | int main() { |
7685 | fpregset_t avar | |
7686 | ; return 0; } | |
d84dd0c5 | 7687 | EOF |
b9362cc7 | 7688 | if { (eval echo configure:7689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7689 | rm -rf conftest* |
7690 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7691 | else |
7692 | echo "configure: failed program was:" >&5 | |
7693 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7694 | rm -rf conftest* |
7695 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7696 | ||
d84dd0c5 | 7697 | fi |
97bf5e38 | 7698 | rm -f conftest* |
d84dd0c5 MK |
7699 | fi |
7700 | ||
97bf5e38 MK |
7701 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7702 | cat >> confdefs.h <<\EOF | |
7703 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7704 | EOF |
7705 | ||
97bf5e38 MK |
7706 | fi |
7707 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7708 | |
97bf5e38 | 7709 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7710 | echo "configure:7711: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7711 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7712 | echo $ac_n "(cached) $ac_c" 1>&6 |
7713 | else | |
7714 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7715 | #line 7716 "configure" |
c906108c | 7716 | #include "confdefs.h" |
c906108c | 7717 | |
97bf5e38 MK |
7718 | #define _SYSCALL32 |
7719 | #include <sys/procfs.h> | |
c906108c | 7720 | int main() { |
97bf5e38 | 7721 | prgregset_t avar |
c906108c SS |
7722 | ; return 0; } |
7723 | EOF | |
b9362cc7 | 7724 | if { (eval echo configure:7725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7725 | rm -rf conftest* |
97bf5e38 | 7726 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7727 | else |
7728 | echo "configure: failed program was:" >&5 | |
7729 | cat conftest.$ac_ext >&5 | |
7730 | rm -rf conftest* | |
97bf5e38 MK |
7731 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7732 | ||
c906108c SS |
7733 | fi |
7734 | rm -f conftest* | |
7735 | fi | |
7736 | ||
97bf5e38 MK |
7737 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7738 | cat >> confdefs.h <<\EOF | |
7739 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7740 | EOF |
7741 | ||
97bf5e38 MK |
7742 | fi |
7743 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7744 | |
97bf5e38 | 7745 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7746 | echo "configure:7747: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7747 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7748 | echo $ac_n "(cached) $ac_c" 1>&6 |
7749 | else | |
7750 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7751 | #line 7752 "configure" |
d45fe813 | 7752 | #include "confdefs.h" |
97bf5e38 MK |
7753 | |
7754 | #define _SYSCALL32 | |
7755 | #include <sys/procfs.h> | |
d45fe813 | 7756 | int main() { |
97bf5e38 | 7757 | prfpregset_t avar |
d45fe813 KB |
7758 | ; return 0; } |
7759 | EOF | |
b9362cc7 | 7760 | if { (eval echo configure:7761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7761 | rm -rf conftest* |
97bf5e38 | 7762 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7763 | else |
7764 | echo "configure: failed program was:" >&5 | |
7765 | cat conftest.$ac_ext >&5 | |
7766 | rm -rf conftest* | |
97bf5e38 MK |
7767 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7768 | ||
d45fe813 KB |
7769 | fi |
7770 | rm -f conftest* | |
7771 | fi | |
7772 | ||
97bf5e38 MK |
7773 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7774 | cat >> confdefs.h <<\EOF | |
7775 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7776 | EOF |
7777 | ||
97bf5e38 MK |
7778 | fi |
7779 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7780 | |
97bf5e38 | 7781 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7782 | echo "configure:7783: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7783 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7784 | echo $ac_n "(cached) $ac_c" 1>&6 |
7785 | else | |
7786 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7787 | #line 7788 "configure" |
d45fe813 | 7788 | #include "confdefs.h" |
97bf5e38 MK |
7789 | |
7790 | #define _SYSCALL32 | |
7791 | #include <sys/procfs.h> | |
d45fe813 | 7792 | int main() { |
97bf5e38 | 7793 | prgregset32_t avar |
d45fe813 KB |
7794 | ; return 0; } |
7795 | EOF | |
b9362cc7 | 7796 | if { (eval echo configure:7797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7797 | rm -rf conftest* |
97bf5e38 | 7798 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7799 | else |
7800 | echo "configure: failed program was:" >&5 | |
7801 | cat conftest.$ac_ext >&5 | |
7802 | rm -rf conftest* | |
97bf5e38 MK |
7803 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7804 | ||
d45fe813 KB |
7805 | fi |
7806 | rm -f conftest* | |
7807 | fi | |
7808 | ||
97bf5e38 MK |
7809 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7810 | cat >> confdefs.h <<\EOF | |
7811 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7812 | EOF |
7813 | ||
97bf5e38 MK |
7814 | fi |
7815 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7816 | |
97bf5e38 | 7817 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7818 | echo "configure:7819: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7819 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7820 | echo $ac_n "(cached) $ac_c" 1>&6 |
7821 | else | |
7822 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7823 | #line 7824 "configure" |
d45fe813 | 7824 | #include "confdefs.h" |
97bf5e38 MK |
7825 | |
7826 | #define _SYSCALL32 | |
7827 | #include <sys/procfs.h> | |
d45fe813 | 7828 | int main() { |
97bf5e38 | 7829 | prfpregset32_t avar |
d45fe813 KB |
7830 | ; return 0; } |
7831 | EOF | |
b9362cc7 | 7832 | if { (eval echo configure:7833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7833 | rm -rf conftest* |
97bf5e38 | 7834 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7835 | else |
7836 | echo "configure: failed program was:" >&5 | |
7837 | cat conftest.$ac_ext >&5 | |
7838 | rm -rf conftest* | |
97bf5e38 MK |
7839 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7840 | ||
d45fe813 KB |
7841 | fi |
7842 | rm -f conftest* | |
7843 | fi | |
7844 | ||
97bf5e38 MK |
7845 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7846 | cat >> confdefs.h <<\EOF | |
7847 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7848 | EOF |
7849 | ||
97bf5e38 MK |
7850 | fi |
7851 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7852 | |
97bf5e38 | 7853 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7854 | echo "configure:7855: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7855 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7856 | echo $ac_n "(cached) $ac_c" 1>&6 |
7857 | else | |
7858 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7859 | #line 7860 "configure" |
d45fe813 | 7860 | #include "confdefs.h" |
97bf5e38 | 7861 | |
d45fe813 | 7862 | #define _SYSCALL32 |
97bf5e38 | 7863 | #include <sys/procfs.h> |
d45fe813 | 7864 | int main() { |
97bf5e38 | 7865 | lwpid_t avar |
d45fe813 KB |
7866 | ; return 0; } |
7867 | EOF | |
b9362cc7 | 7868 | if { (eval echo configure:7869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7869 | rm -rf conftest* |
97bf5e38 | 7870 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7871 | else |
7872 | echo "configure: failed program was:" >&5 | |
7873 | cat conftest.$ac_ext >&5 | |
7874 | rm -rf conftest* | |
97bf5e38 MK |
7875 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7876 | ||
d45fe813 KB |
7877 | fi |
7878 | rm -f conftest* | |
7879 | fi | |
7880 | ||
97bf5e38 MK |
7881 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7882 | cat >> confdefs.h <<\EOF | |
7883 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7884 | EOF |
7885 | ||
97bf5e38 MK |
7886 | fi |
7887 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7888 | |
97bf5e38 | 7889 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7890 | echo "configure:7891: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7891 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7892 | echo $ac_n "(cached) $ac_c" 1>&6 |
7893 | else | |
7894 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7895 | #line 7896 "configure" |
c906108c SS |
7896 | #include "confdefs.h" |
7897 | ||
97bf5e38 MK |
7898 | #define _SYSCALL32 |
7899 | #include <sys/procfs.h> | |
c906108c | 7900 | int main() { |
97bf5e38 | 7901 | psaddr_t avar |
c906108c SS |
7902 | ; return 0; } |
7903 | EOF | |
b9362cc7 | 7904 | if { (eval echo configure:7905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7905 | rm -rf conftest* |
97bf5e38 | 7906 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7907 | else |
7908 | echo "configure: failed program was:" >&5 | |
7909 | cat conftest.$ac_ext >&5 | |
7910 | rm -rf conftest* | |
97bf5e38 MK |
7911 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7912 | ||
c906108c SS |
7913 | fi |
7914 | rm -f conftest* | |
7915 | fi | |
7916 | ||
97bf5e38 MK |
7917 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7918 | cat >> confdefs.h <<\EOF | |
7919 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7920 | EOF |
7921 | ||
97bf5e38 MK |
7922 | fi |
7923 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7924 | |
97bf5e38 | 7925 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7926 | echo "configure:7927: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7927 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7928 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7929 | else |
7930 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7931 | #line 7932 "configure" |
c906108c SS |
7932 | #include "confdefs.h" |
7933 | ||
97bf5e38 MK |
7934 | #define _SYSCALL32 |
7935 | #include <sys/procfs.h> | |
7936 | int main() { | |
7937 | prsysent_t avar | |
7938 | ; return 0; } | |
c906108c | 7939 | EOF |
b9362cc7 | 7940 | if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7941 | rm -rf conftest* |
7942 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7943 | else |
7944 | echo "configure: failed program was:" >&5 | |
7945 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7946 | rm -rf conftest* |
7947 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7948 | ||
c906108c | 7949 | fi |
97bf5e38 | 7950 | rm -f conftest* |
c906108c SS |
7951 | fi |
7952 | ||
97bf5e38 MK |
7953 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7954 | cat >> confdefs.h <<\EOF | |
7955 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7956 | EOF |
7957 | ||
97bf5e38 MK |
7958 | fi |
7959 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7960 | |
97bf5e38 | 7961 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7962 | echo "configure:7963: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7963 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7964 | echo $ac_n "(cached) $ac_c" 1>&6 |
7965 | else | |
7966 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 7967 | #line 7968 "configure" |
c906108c SS |
7968 | #include "confdefs.h" |
7969 | ||
97bf5e38 MK |
7970 | #define _SYSCALL32 |
7971 | #include <sys/procfs.h> | |
c906108c | 7972 | int main() { |
97bf5e38 | 7973 | pr_sigset_t avar |
c906108c SS |
7974 | ; return 0; } |
7975 | EOF | |
b9362cc7 | 7976 | if { (eval echo configure:7977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7977 | rm -rf conftest* |
97bf5e38 | 7978 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7979 | else |
7980 | echo "configure: failed program was:" >&5 | |
7981 | cat conftest.$ac_ext >&5 | |
7982 | rm -rf conftest* | |
97bf5e38 MK |
7983 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7984 | ||
c906108c SS |
7985 | fi |
7986 | rm -f conftest* | |
7987 | fi | |
7988 | ||
97bf5e38 MK |
7989 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7990 | cat >> confdefs.h <<\EOF | |
7991 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7992 | EOF |
7993 | ||
97bf5e38 MK |
7994 | fi |
7995 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7996 | |
97bf5e38 | 7997 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
b9362cc7 | 7998 | echo "configure:7999: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7999 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 8000 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8001 | else |
8002 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8003 | #line 8004 "configure" |
c906108c SS |
8004 | #include "confdefs.h" |
8005 | ||
97bf5e38 MK |
8006 | #define _SYSCALL32 |
8007 | #include <sys/procfs.h> | |
8008 | int main() { | |
8009 | pr_sigaction64_t avar | |
8010 | ; return 0; } | |
c906108c | 8011 | EOF |
b9362cc7 | 8012 | if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8013 | rm -rf conftest* |
8014 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
8015 | else |
8016 | echo "configure: failed program was:" >&5 | |
8017 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
8018 | rm -rf conftest* |
8019 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
8020 | ||
c906108c | 8021 | fi |
97bf5e38 | 8022 | rm -f conftest* |
c906108c SS |
8023 | fi |
8024 | ||
97bf5e38 MK |
8025 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
8026 | cat >> confdefs.h <<\EOF | |
8027 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
8028 | EOF |
8029 | ||
97bf5e38 MK |
8030 | fi |
8031 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
8032 | ||
8033 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
b9362cc7 | 8034 | echo "configure:8035: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
8035 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
8036 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8037 | else | |
8038 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8039 | #line 8040 "configure" |
97bf5e38 MK |
8040 | #include "confdefs.h" |
8041 | ||
8042 | #define _SYSCALL32 | |
8043 | #include <sys/procfs.h> | |
8044 | int main() { | |
8045 | pr_siginfo64_t avar | |
8046 | ; return 0; } | |
8047 | EOF | |
b9362cc7 | 8048 | if { (eval echo configure:8049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8049 | rm -rf conftest* |
8050 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
8051 | else | |
8052 | echo "configure: failed program was:" >&5 | |
8053 | cat conftest.$ac_ext >&5 | |
8054 | rm -rf conftest* | |
8055 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
8056 | ||
8057 | fi | |
8058 | rm -f conftest* | |
c906108c | 8059 | fi |
c906108c | 8060 | |
97bf5e38 MK |
8061 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
8062 | cat >> confdefs.h <<\EOF | |
8063 | #define HAVE_PR_SIGINFO64_T 1 | |
8064 | EOF | |
c906108c | 8065 | |
97bf5e38 MK |
8066 | fi |
8067 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
8068 | ||
8069 | ||
8070 | ||
8071 | ||
8072 | ||
8073 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8074 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
b9362cc7 | 8075 | echo "configure:8076: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 8076 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
8077 | echo $ac_n "(cached) $ac_c" 1>&6 |
8078 | else | |
8079 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 8080 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8081 | else |
8082 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8083 | #line 8084 "configure" |
c906108c | 8084 | #include "confdefs.h" |
97bf5e38 MK |
8085 | #include <sys/procfs.h> |
8086 | int main () | |
8087 | { | |
8088 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
8089 | return 1; | |
8090 | return 0; | |
8091 | } | |
c906108c | 8092 | EOF |
b9362cc7 | 8093 | if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8094 | then |
97bf5e38 | 8095 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
8096 | else |
8097 | echo "configure: failed program was:" >&5 | |
8098 | cat conftest.$ac_ext >&5 | |
8099 | rm -fr conftest* | |
97bf5e38 | 8100 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
8101 | fi |
8102 | rm -fr conftest* | |
8103 | fi | |
8104 | ||
8105 | fi | |
8106 | ||
97bf5e38 MK |
8107 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
8108 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
8109 | cat >> confdefs.h <<\EOF | |
8110 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
8111 | EOF |
8112 | ||
97bf5e38 MK |
8113 | fi |
8114 | fi | |
c906108c | 8115 | |
97bf5e38 MK |
8116 | |
8117 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
b9362cc7 | 8118 | echo "configure:8119: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 8119 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
8120 | echo $ac_n "(cached) $ac_c" 1>&6 |
8121 | else | |
8122 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8123 | #line 8124 "configure" |
c906108c | 8124 | #include "confdefs.h" |
97bf5e38 MK |
8125 | #include <unistd.h> |
8126 | #include <sys/types.h> | |
8127 | #include <sys/procfs.h> | |
8128 | ||
8129 | int main() { | |
8130 | ||
8131 | int dummy;; | |
8132 | dummy = ioctl(0, PIOCSET, &dummy); | |
8133 | ||
8134 | ; return 0; } | |
c906108c | 8135 | EOF |
b9362cc7 | 8136 | if { (eval echo configure:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8137 | rm -rf conftest* |
97bf5e38 | 8138 | gdb_cv_have_procfs_piocset=yes |
c906108c | 8139 | else |
c906108c SS |
8140 | echo "configure: failed program was:" >&5 |
8141 | cat conftest.$ac_ext >&5 | |
8142 | rm -rf conftest* | |
97bf5e38 | 8143 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
8144 | fi |
8145 | rm -f conftest* | |
8146 | fi | |
97bf5e38 MK |
8147 | |
8148 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
8149 | if test $gdb_cv_have_procfs_piocset = yes; then | |
8150 | cat >> confdefs.h <<\EOF | |
8151 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 8152 | EOF |
97bf5e38 MK |
8153 | |
8154 | fi | |
c906108c | 8155 | fi |
c906108c | 8156 | |
97bf5e38 MK |
8157 | if test ${host} = ${target} ; then |
8158 | ||
8159 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
b9362cc7 | 8160 | echo "configure:8161: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 8161 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
8162 | echo $ac_n "(cached) $ac_c" 1>&6 |
8163 | else | |
8164 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8165 | #line 8166 "configure" |
c906108c | 8166 | #include "confdefs.h" |
97bf5e38 | 8167 | #include <link.h> |
c906108c | 8168 | int main() { |
97bf5e38 | 8169 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
8170 | ; return 0; } |
8171 | EOF | |
b9362cc7 | 8172 | if { (eval echo configure:8173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 8173 | rm -rf conftest* |
97bf5e38 | 8174 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
8175 | else |
8176 | echo "configure: failed program was:" >&5 | |
8177 | cat conftest.$ac_ext >&5 | |
8178 | rm -rf conftest* | |
97bf5e38 | 8179 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
8180 | fi |
8181 | rm -f conftest* | |
8182 | fi | |
8183 | ||
97bf5e38 MK |
8184 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
8185 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
8186 | cat >> confdefs.h <<\EOF | |
8187 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 8188 | EOF |
97bf5e38 MK |
8189 | |
8190 | fi | |
8191 | ||
8192 | ||
8193 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
b9362cc7 | 8194 | echo "configure:8195: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8195 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8196 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8197 | else |
97bf5e38 | 8198 | cat > conftest.$ac_ext <<EOF |
b9362cc7 | 8199 | #line 8200 "configure" |
97bf5e38 MK |
8200 | #include "confdefs.h" |
8201 | #include <sys/types.h> | |
8202 | #include <link.h> | |
8203 | int main() { | |
8204 | struct link_map lm; (void) lm.lm_addr; | |
8205 | ; return 0; } | |
8206 | EOF | |
b9362cc7 | 8207 | if { (eval echo configure:8208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8208 | rm -rf conftest* |
8209 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8210 | else | |
8211 | echo "configure: failed program was:" >&5 | |
8212 | cat conftest.$ac_ext >&5 | |
8213 | rm -rf conftest* | |
8214 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8215 | fi | |
8216 | rm -f conftest* | |
c906108c | 8217 | fi |
c906108c | 8218 | |
97bf5e38 MK |
8219 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8220 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8221 | cat >> confdefs.h <<\EOF | |
8222 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8223 | EOF | |
8224 | ||
8225 | fi | |
8226 | ||
8227 | ||
8228 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
b9362cc7 | 8229 | echo "configure:8230: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8230 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8231 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8232 | else |
8233 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8234 | #line 8235 "configure" |
c906108c | 8235 | #include "confdefs.h" |
97bf5e38 MK |
8236 | #include <sys/types.h> |
8237 | #ifdef HAVE_NLIST_H | |
8238 | #include <nlist.h> | |
8239 | #endif | |
8240 | #include <link.h> | |
8241 | int main() { | |
8242 | struct so_map lm; (void) lm.som_addr; | |
8243 | ; return 0; } | |
8244 | EOF | |
b9362cc7 | 8245 | if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8246 | rm -rf conftest* |
8247 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8248 | else | |
8249 | echo "configure: failed program was:" >&5 | |
8250 | cat conftest.$ac_ext >&5 | |
8251 | rm -rf conftest* | |
8252 | gdb_cv_have_struct_so_map_with_som_members=no | |
8253 | fi | |
8254 | rm -f conftest* | |
8255 | fi | |
c906108c | 8256 | |
97bf5e38 MK |
8257 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8258 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8259 | cat >> confdefs.h <<\EOF | |
8260 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8261 | EOF | |
c906108c | 8262 | |
97bf5e38 | 8263 | fi |
c906108c | 8264 | |
97bf5e38 MK |
8265 | |
8266 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
b9362cc7 | 8267 | echo "configure:8268: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8268 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8270 | else | |
8271 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8272 | #line 8273 "configure" |
97bf5e38 MK |
8273 | #include "confdefs.h" |
8274 | #define _SYSCALL32 | |
8275 | #include <sys/link.h> | |
8276 | int main() { | |
8277 | struct link_map32 l; | |
8278 | ; return 0; } | |
8279 | EOF | |
b9362cc7 | 8280 | if { (eval echo configure:8281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8281 | rm -rf conftest* |
8282 | gdb_cv_have_struct_link_map32=yes | |
8283 | else | |
8284 | echo "configure: failed program was:" >&5 | |
8285 | cat conftest.$ac_ext >&5 | |
8286 | rm -rf conftest* | |
8287 | gdb_cv_have_struct_link_map32=no | |
8288 | fi | |
8289 | rm -f conftest* | |
8290 | fi | |
c906108c | 8291 | |
97bf5e38 MK |
8292 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8293 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8294 | cat >> confdefs.h <<\EOF | |
8295 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8296 | EOF | |
c906108c | 8297 | |
97bf5e38 MK |
8298 | cat >> confdefs.h <<\EOF |
8299 | #define _SYSCALL32 1 | |
8300 | EOF | |
c906108c | 8301 | |
97bf5e38 MK |
8302 | fi |
8303 | fi | |
c906108c | 8304 | |
c906108c | 8305 | |
97bf5e38 | 8306 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
b9362cc7 | 8307 | echo "configure:8308: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8308 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8309 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8310 | else | |
8311 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8312 | #line 8313 "configure" |
97bf5e38 | 8313 | #include "confdefs.h" |
c906108c | 8314 | |
97bf5e38 | 8315 | int main() { |
c906108c | 8316 | |
97bf5e38 MK |
8317 | extern long long foo; |
8318 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8319 | |
97bf5e38 MK |
8320 | ; return 0; } |
8321 | EOF | |
b9362cc7 | 8322 | if { (eval echo configure:8323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8323 | rm -rf conftest* |
8324 | gdb_cv_c_long_long=yes | |
8325 | else | |
8326 | echo "configure: failed program was:" >&5 | |
8327 | cat conftest.$ac_ext >&5 | |
8328 | rm -rf conftest* | |
8329 | gdb_cv_c_long_long=no | |
8330 | fi | |
8331 | rm -f conftest* | |
8332 | fi | |
c906108c | 8333 | |
97bf5e38 MK |
8334 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8335 | if test $gdb_cv_c_long_long = yes; then | |
8336 | cat >> confdefs.h <<\EOF | |
8337 | #define CC_HAS_LONG_LONG 1 | |
8338 | EOF | |
8339 | ||
8340 | fi | |
8341 | ||
8342 | ||
8343 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
b9362cc7 | 8344 | echo "configure:8345: checking for long long support in printf" >&5 |
97bf5e38 MK |
8345 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8347 | else | |
8348 | if test "$cross_compiling" = yes; then | |
8349 | gdb_cv_printf_has_long_long=no | |
8350 | else | |
8351 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8352 | #line 8353 "configure" |
97bf5e38 MK |
8353 | #include "confdefs.h" |
8354 | ||
8355 | int main () { | |
8356 | char buf[32]; | |
8357 | long long l = 0; | |
8358 | l = (l << 16) + 0x0123; | |
8359 | l = (l << 16) + 0x4567; | |
8360 | l = (l << 16) + 0x89ab; | |
8361 | l = (l << 16) + 0xcdef; | |
8362 | sprintf (buf, "0x%016llx", l); | |
8363 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8364 | } |
97bf5e38 | 8365 | EOF |
b9362cc7 | 8366 | if { (eval echo configure:8367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8367 | then |
8368 | gdb_cv_printf_has_long_long=yes | |
8369 | else | |
8370 | echo "configure: failed program was:" >&5 | |
8371 | cat conftest.$ac_ext >&5 | |
8372 | rm -fr conftest* | |
8373 | gdb_cv_printf_has_long_long=no | |
8374 | fi | |
8375 | rm -fr conftest* | |
8376 | fi | |
8377 | ||
8378 | fi | |
8379 | ||
8380 | if test $gdb_cv_printf_has_long_long = yes; then | |
8381 | cat >> confdefs.h <<\EOF | |
8382 | #define PRINTF_HAS_LONG_LONG 1 | |
8383 | EOF | |
8384 | ||
8385 | fi | |
8386 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8387 | ||
8388 | ||
8389 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
b9362cc7 | 8390 | echo "configure:8391: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8391 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8392 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8393 | else | |
8394 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8395 | #line 8396 "configure" |
97bf5e38 MK |
8396 | #include "confdefs.h" |
8397 | ||
8398 | int main() { | |
8399 | long double foo; | |
8400 | ; return 0; } | |
8401 | EOF | |
b9362cc7 | 8402 | if { (eval echo configure:8403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8403 | rm -rf conftest* |
8404 | ac_cv_c_long_double=yes | |
8405 | else | |
8406 | echo "configure: failed program was:" >&5 | |
8407 | cat conftest.$ac_ext >&5 | |
8408 | rm -rf conftest* | |
8409 | ac_cv_c_long_double=no | |
8410 | fi | |
8411 | rm -f conftest* | |
8412 | fi | |
c906108c | 8413 | |
97bf5e38 MK |
8414 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8415 | if test $ac_cv_c_long_double = yes; then | |
8416 | cat >> confdefs.h <<\EOF | |
8417 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8418 | EOF |
97bf5e38 MK |
8419 | |
8420 | fi | |
8421 | ||
8422 | ||
8423 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
b9362cc7 | 8424 | echo "configure:8425: checking for long double support in printf" >&5 |
97bf5e38 MK |
8425 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8426 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8427 | else | |
8428 | if test "$cross_compiling" = yes; then | |
8429 | gdb_cv_printf_has_long_double=no | |
8430 | else | |
8431 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8432 | #line 8433 "configure" |
97bf5e38 MK |
8433 | #include "confdefs.h" |
8434 | ||
8435 | int main () { | |
8436 | char buf[16]; | |
8437 | long double f = 3.141592653; | |
8438 | sprintf (buf, "%Lg", f); | |
8439 | return (strncmp ("3.14159", buf, 7)); | |
8440 | } | |
8441 | EOF | |
b9362cc7 | 8442 | if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8443 | then |
97bf5e38 | 8444 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8445 | else |
8446 | echo "configure: failed program was:" >&5 | |
8447 | cat conftest.$ac_ext >&5 | |
8448 | rm -fr conftest* | |
97bf5e38 | 8449 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8450 | fi |
8451 | rm -fr conftest* | |
8452 | fi | |
8453 | ||
8454 | fi | |
8455 | ||
97bf5e38 | 8456 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8457 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8458 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8459 | EOF | |
8460 | ||
8461 | fi | |
8462 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8463 | ||
8464 | ||
8465 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
b9362cc7 | 8466 | echo "configure:8467: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8467 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8469 | else | |
8470 | if test "$cross_compiling" = yes; then | |
8471 | gdb_cv_scanf_has_long_double=no | |
8472 | else | |
8473 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8474 | #line 8475 "configure" |
97bf5e38 MK |
8475 | #include "confdefs.h" |
8476 | ||
8477 | int main () { | |
8478 | char *buf = "3.141592653"; | |
8479 | long double f = 0; | |
8480 | sscanf (buf, "%Lg", &f); | |
8481 | return !(f > 3.14159 && f < 3.14160); | |
8482 | } | |
c906108c | 8483 | EOF |
b9362cc7 | 8484 | if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8485 | then |
8486 | gdb_cv_scanf_has_long_double=yes | |
8487 | else | |
8488 | echo "configure: failed program was:" >&5 | |
8489 | cat conftest.$ac_ext >&5 | |
8490 | rm -fr conftest* | |
8491 | gdb_cv_scanf_has_long_double=no | |
8492 | fi | |
8493 | rm -fr conftest* | |
8494 | fi | |
c906108c SS |
8495 | |
8496 | fi | |
8497 | ||
97bf5e38 MK |
8498 | if test $gdb_cv_scanf_has_long_double = yes; then |
8499 | cat >> confdefs.h <<\EOF | |
8500 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8501 | EOF | |
8502 | ||
8503 | fi | |
8504 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8505 | |
438013df AO |
8506 | case ${host_os} in |
8507 | aix*) | |
8508 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
b9362cc7 | 8509 | echo "configure:8510: checking for -bbigtoc option" >&5 |
438013df AO |
8510 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8512 | else | |
8513 | ||
8514 | SAVE_LDFLAGS=$LDFLAGS | |
8515 | ||
8516 | case $GCC in | |
8517 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8518 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8519 | esac | |
8520 | ||
8521 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8522 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8523 | #line 8524 "configure" |
438013df AO |
8524 | #include "confdefs.h" |
8525 | ||
8526 | int main() { | |
8527 | int i; | |
8528 | ; return 0; } | |
8529 | EOF | |
b9362cc7 | 8530 | if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8531 | : |
8532 | else | |
8533 | echo "configure: failed program was:" >&5 | |
8534 | cat conftest.$ac_ext >&5 | |
8535 | rm -rf conftest* | |
8536 | gdb_cv_bigtoc= | |
8537 | fi | |
8538 | rm -f conftest* | |
8539 | ||
8540 | fi | |
8541 | ||
8542 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8543 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8544 | ;; | |
8545 | esac | |
8546 | ||
c906108c SS |
8547 | |
8548 | ||
8549 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8550 | case ${host_os} in | |
8551 | hpux*) | |
8552 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
b9362cc7 | 8553 | echo "configure:8554: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8554 | if test -f /usr/include/dce/cma_config.h ; then |
8555 | if test "$GCC" = "yes" ; then | |
8556 | echo "$ac_t""yes" 1>&6 | |
8557 | cat >> confdefs.h <<\EOF | |
8558 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8559 | EOF | |
8560 | ||
66b965bb | 8561 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8562 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8563 | else | |
8564 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8565 | fi | |
8566 | else | |
8567 | echo "$ac_t""no" 1>&6 | |
8568 | fi | |
8569 | ;; | |
8570 | solaris*) | |
d92419e5 JB |
8571 | # See if thread_db library is around for Solaris thread debugging. |
8572 | # Note that we must explicitly test for version 1 of the library | |
8573 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8574 | # the same API. | |
c906108c | 8575 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
b9362cc7 | 8576 | echo "configure:8577: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8577 | if test -f /usr/lib/libthread_db.so.1 ; then |
8578 | echo "$ac_t""yes" 1>&6 | |
8579 | cat >> confdefs.h <<\EOF | |
8580 | #define HAVE_THREAD_DB_LIB 1 | |
8581 | EOF | |
8582 | ||
66b965bb | 8583 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8584 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8585 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
b9362cc7 | 8586 | echo "configure:8587: checking for dlopen in -ldl" >&5 |
c906108c SS |
8587 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8588 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8589 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8590 | else | |
8591 | ac_save_LIBS="$LIBS" | |
8592 | LIBS="-ldl $LIBS" | |
8593 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8594 | #line 8595 "configure" |
c906108c SS |
8595 | #include "confdefs.h" |
8596 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8597 | /* We use char because int might match the return type of a gcc2 | |
8598 | builtin and then its argument prototype would still apply. */ | |
8599 | char dlopen(); | |
8600 | ||
8601 | int main() { | |
8602 | dlopen() | |
8603 | ; return 0; } | |
8604 | EOF | |
b9362cc7 | 8605 | if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8606 | rm -rf conftest* |
8607 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8608 | else | |
8609 | echo "configure: failed program was:" >&5 | |
8610 | cat conftest.$ac_ext >&5 | |
8611 | rm -rf conftest* | |
8612 | eval "ac_cv_lib_$ac_lib_var=no" | |
8613 | fi | |
8614 | rm -f conftest* | |
8615 | LIBS="$ac_save_LIBS" | |
8616 | ||
8617 | fi | |
8618 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8619 | echo "$ac_t""yes" 1>&6 | |
8620 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8621 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8622 | cat >> confdefs.h <<EOF | |
8623 | #define $ac_tr_lib 1 | |
8624 | EOF | |
8625 | ||
8626 | LIBS="-ldl $LIBS" | |
8627 | ||
8628 | else | |
8629 | echo "$ac_t""no" 1>&6 | |
8630 | fi | |
8631 | ||
8632 | if test "$GCC" = "yes" ; then | |
8633 | # The GNU linker requires the -export-dynamic option to make | |
8634 | # all symbols visible in the dynamic symbol table. | |
8635 | hold_ldflags=$LDFLAGS | |
8636 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
b9362cc7 | 8637 | echo "configure:8638: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8638 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8639 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8640 | #line 8641 "configure" |
c906108c SS |
8641 | #include "confdefs.h" |
8642 | ||
8643 | int main() { | |
8644 | int i; | |
8645 | ; return 0; } | |
8646 | EOF | |
b9362cc7 | 8647 | if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8648 | rm -rf conftest* |
8649 | found=yes | |
8650 | else | |
8651 | echo "configure: failed program was:" >&5 | |
8652 | cat conftest.$ac_ext >&5 | |
8653 | rm -rf conftest* | |
8654 | found=no | |
8655 | fi | |
8656 | rm -f conftest* | |
8657 | LDFLAGS=$hold_ldflags | |
8658 | echo "$ac_t""$found" 1>&6 | |
8659 | if test $found = yes; then | |
8660 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8661 | fi | |
8662 | fi | |
8663 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8664 | # at one point. | |
8665 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
b9362cc7 | 8666 | echo "configure:8667: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8667 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8669 | else | |
8670 | ||
8671 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8672 | #line 8673 "configure" |
c906108c SS |
8673 | #include "confdefs.h" |
8674 | ||
8675 | #include <proc_service.h> | |
8676 | ps_err_e ps_pdwrite | |
8677 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8678 | ||
8679 | int main() { | |
8680 | ||
8681 | ; return 0; } | |
8682 | EOF | |
b9362cc7 | 8683 | if { (eval echo configure:8684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8684 | rm -rf conftest* |
8685 | gdb_cv_proc_service_is_old=no | |
8686 | else | |
8687 | echo "configure: failed program was:" >&5 | |
8688 | cat conftest.$ac_ext >&5 | |
8689 | rm -rf conftest* | |
8690 | gdb_cv_proc_service_is_old=yes | |
8691 | fi | |
8692 | rm -f conftest* | |
8693 | ||
8694 | fi | |
8695 | ||
8696 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8697 | if test $gdb_cv_proc_service_is_old = yes; then | |
8698 | cat >> confdefs.h <<\EOF | |
8699 | #define PROC_SERVICE_IS_OLD 1 | |
8700 | EOF | |
8701 | ||
8702 | fi | |
8703 | else | |
8704 | echo "$ac_t""no" 1>&6 | |
8705 | fi | |
8706 | ;; | |
d92419e5 JB |
8707 | aix*) |
8708 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
b9362cc7 | 8709 | echo "configure:8710: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8710 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8712 | else | |
8713 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8714 | #line 8715 "configure" |
d92419e5 JB |
8715 | #include "confdefs.h" |
8716 | #include <sys/pthdebug.h> | |
8717 | int main() { | |
8718 | #ifndef PTHDB_VERSION_3 | |
8719 | #error | |
8720 | #endif | |
8721 | ; return 0; } | |
8722 | EOF | |
b9362cc7 | 8723 | if { (eval echo configure:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8724 | rm -rf conftest* |
8725 | gdb_cv_have_aix_thread_debug=yes | |
8726 | else | |
8727 | echo "configure: failed program was:" >&5 | |
8728 | cat conftest.$ac_ext >&5 | |
8729 | rm -rf conftest* | |
8730 | gdb_cv_have_aix_thread_debug=no | |
8731 | fi | |
8732 | rm -f conftest* | |
8733 | fi | |
8734 | ||
8735 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8736 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8737 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8738 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8739 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8740 | fi | |
8741 | ;; | |
c906108c SS |
8742 | esac |
8743 | ||
8744 | fi | |
8745 | ||
3f47be5c EZ |
8746 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8747 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
b9362cc7 | 8748 | echo "configure:8749: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8749 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8751 | else | |
8752 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8753 | #line 8754 "configure" |
3f47be5c EZ |
8754 | #include "confdefs.h" |
8755 | #include <thread_db.h> | |
8756 | int main() { | |
8757 | int i = TD_NOTALLOC; | |
8758 | ; return 0; } | |
8759 | EOF | |
b9362cc7 | 8760 | if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8761 | rm -rf conftest* |
8762 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8763 | else | |
8764 | echo "configure: failed program was:" >&5 | |
8765 | cat conftest.$ac_ext >&5 | |
8766 | rm -rf conftest* | |
8767 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8768 | ||
8769 | fi | |
8770 | rm -f conftest* | |
8771 | ||
8772 | fi | |
8773 | ||
8774 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8775 | fi | |
8776 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8777 | cat >> confdefs.h <<\EOF | |
8778 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8779 | EOF | |
8780 | ||
8781 | fi | |
8782 | ||
b757528f JJ |
8783 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
8784 | echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6 | |
b9362cc7 | 8785 | echo "configure:8786: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
b757528f JJ |
8786 | if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then |
8787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8788 | else | |
8789 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8790 | #line 8791 "configure" |
b757528f JJ |
8791 | #include "confdefs.h" |
8792 | #include <sys/syscall.h> | |
8793 | int main() { | |
8794 | int i = __NR_tkill; | |
8795 | ; return 0; } | |
8796 | EOF | |
b9362cc7 | 8797 | if { (eval echo configure:8798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b757528f JJ |
8798 | rm -rf conftest* |
8799 | gdb_cv_sys_syscall_h_has_tkill=yes | |
8800 | else | |
8801 | echo "configure: failed program was:" >&5 | |
8802 | cat conftest.$ac_ext >&5 | |
8803 | rm -rf conftest* | |
8804 | gdb_cv_sys_syscall_h_has_tkill=no | |
8805 | ||
8806 | fi | |
8807 | rm -f conftest* | |
8808 | ||
8809 | fi | |
8810 | ||
8811 | echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6 | |
8812 | fi | |
8813 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
8814 | cat >> confdefs.h <<\EOF | |
8815 | #define HAVE_TKILL_SYSCALL 1 | |
8816 | EOF | |
8817 | ||
8818 | fi | |
8819 | ||
fb40c209 | 8820 | |
030292b7 DJ |
8821 | # Check whether --with-sysroot or --without-sysroot was given. |
8822 | if test "${with_sysroot+set}" = set; then | |
8823 | withval="$with_sysroot" | |
8824 | ||
8825 | case ${with_sysroot} in | |
715d1656 | 8826 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
8827 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
8828 | esac | |
8829 | ||
8830 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
8831 | ||
8832 | if test "x$exec_prefix" = xNONE; then | |
8833 | if test "x$prefix" = xNONE; then | |
8834 | test_prefix=/usr/local | |
8835 | else | |
8836 | test_prefix=$prefix | |
8837 | fi | |
8838 | else | |
8839 | test_prefix=$exec_prefix | |
8840 | fi | |
8841 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 AO |
8842 | "${test_prefix}"|"${test_prefix}/"*|\ |
8843 | '${exec_prefix}'|'${exec_prefix}/'*) | |
030292b7 DJ |
8844 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
8845 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
8846 | ;; | |
8847 | esac | |
8848 | ||
8849 | else | |
8850 | ||
8851 | TARGET_SYSTEM_ROOT= | |
8852 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
8853 | ||
8854 | fi | |
8855 | ||
8856 | ||
8857 | ||
8858 | ||
3b851bce AC |
8859 | # NOTE: Don't add -Wall or -Wunused, they both include |
8860 | # -Wunused-parameter which reports bogus warnings. | |
8861 | # NOTE: If you add to this list, remember to update | |
8862 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8863 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8864 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8865 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8866 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8867 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8868 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8869 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8870 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8871 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8872 | if test "${enable_build_warnings+set}" = set; then | |
8873 | enableval="$enable_build_warnings" | |
1decb323 | 8874 | case "${enableval}" in |
c906108c SS |
8875 | yes) ;; |
8876 | no) build_warnings="-w";; | |
8877 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8878 | build_warnings="${build_warnings} ${t}";; | |
8879 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8880 | build_warnings="${t} ${build_warnings}";; | |
8881 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8882 | esac | |
d4f3574e | 8883 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8884 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8885 | fi |
1decb323 | 8886 | fi |
3b851bce AC |
8887 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8888 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8889 | enableval="$enable_gdb_build_warnings" | |
8890 | case "${enableval}" in | |
8891 | yes) ;; | |
8892 | no) build_warnings="-w";; | |
8893 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8894 | build_warnings="${build_warnings} ${t}";; | |
8895 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8896 | build_warnings="${t} ${build_warnings}";; | |
8897 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8898 | esac | |
8899 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8900 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8901 | fi | |
8902 | fi | |
104c1213 JM |
8903 | WARN_CFLAGS="" |
8904 | WERROR_CFLAGS="" | |
c906108c SS |
8905 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8906 | then | |
746a987d | 8907 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
b9362cc7 | 8908 | echo "configure:8909: checking compiler warning flags" >&5 |
746a987d AC |
8909 | # Separate out the -Werror flag as some files just cannot be |
8910 | # compiled with it enabled. | |
8911 | for w in ${build_warnings}; do | |
8912 | case $w in | |
8913 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8914 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8915 | saved_CFLAGS="$CFLAGS" |
8916 | CFLAGS="$CFLAGS $w" | |
8917 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8918 | #line 8919 "configure" |
4536bbc6 AC |
8919 | #include "confdefs.h" |
8920 | ||
8921 | int main() { | |
8922 | ||
8923 | ; return 0; } | |
8924 | EOF | |
b9362cc7 | 8925 | if { (eval echo configure:8926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8926 | rm -rf conftest* |
8927 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8928 | else | |
8929 | echo "configure: failed program was:" >&5 | |
8930 | cat conftest.$ac_ext >&5 | |
8931 | fi | |
8932 | rm -f conftest* | |
8933 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8934 | esac |
8935 | done | |
8936 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8937 | fi |
8938 | ||
8939 | ||
104c1213 | 8940 | |
c906108c SS |
8941 | MMALLOC_CFLAGS= |
8942 | MMALLOC= | |
8943 | ||
8944 | ||
8945 | ||
8946 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8947 | if test "${with_mmalloc+set}" = set; then | |
8948 | withval="$with_mmalloc" | |
8949 | case "${withval}" in | |
8950 | yes) want_mmalloc=true ;; | |
8951 | no) want_mmalloc=false;; | |
8952 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8953 | esac | |
8954 | else | |
8955 | want_mmalloc=false | |
8956 | fi | |
8957 | ||
8958 | if test x$want_mmalloc = xtrue; then | |
8959 | cat >> confdefs.h <<\EOF | |
8960 | #define USE_MMALLOC 1 | |
8961 | EOF | |
8962 | ||
8963 | cat >> confdefs.h <<\EOF | |
8964 | #define MMCHECK_FORCE 1 | |
8965 | EOF | |
8966 | ||
8967 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8968 | MMALLOC='../mmalloc/libmmalloc.a' | |
8969 | fi | |
8970 | ||
7a292a7a SS |
8971 | # In the Cygwin environment, we need some additional flags. |
8972 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
b9362cc7 | 8973 | echo "configure:8974: checking for cygwin" >&5 |
7a292a7a SS |
8974 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8976 | else | |
8977 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 8978 | #line 8979 "configure" |
7a292a7a SS |
8979 | #include "confdefs.h" |
8980 | ||
8981 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8982 | lose | |
8983 | #endif | |
8984 | EOF | |
8985 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8986 | egrep "lose" >/dev/null 2>&1; then | |
8987 | rm -rf conftest* | |
8988 | gdb_cv_os_cygwin=yes | |
8989 | else | |
8990 | rm -rf conftest* | |
8991 | gdb_cv_os_cygwin=no | |
8992 | fi | |
8993 | rm -f conftest* | |
8994 | ||
8995 | fi | |
8996 | ||
8997 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8998 | ||
aff38e61 AC |
8999 | |
9000 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
9001 | case ${host} in | |
95cbc983 AC |
9002 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
9003 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
9004 | esac |
9005 | ||
9006 | ||
cd0fc7c3 SS |
9007 | # libreadline needs libuser32.a in a cygwin environment |
9008 | WIN32LIBS= | |
9009 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
9010 | WIN32LIBS="-luser32" |
9011 | case "${target}" in | |
9012 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
9013 | ;; | |
9014 | esac | |
cd0fc7c3 | 9015 | fi |
c906108c | 9016 | |
7a292a7a | 9017 | |
3fc11d3e JM |
9018 | LIBGUI="../libgui/src/libgui.a" |
9019 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
9020 | ||
9021 | ||
7a292a7a | 9022 | |
3fc11d3e JM |
9023 | WIN32LDAPP= |
9024 | ||
9025 | ||
9026 | ||
9027 | configdir="unix" | |
9028 | ||
9029 | GDBTKLIBS= | |
9030 | if test "${enable_gdbtk}" = "yes"; then | |
9031 | ||
d1c3b63a KS |
9032 | # Gdbtk must have an absolute path to srcdir in order to run |
9033 | # properly when not installed. | |
9034 | here=`pwd` | |
9035 | cd ${srcdir} | |
9036 | GDBTK_SRC_DIR=`pwd` | |
9037 | cd $here | |
9038 | ||
3fc11d3e JM |
9039 | |
9040 | # | |
9041 | # Ok, lets find the tcl configuration | |
9042 | # First, look for one uninstalled. | |
9043 | # the alternative search directory is invoked by --with-tclconfig | |
9044 | # | |
9045 | ||
9046 | if test x"${no_tcl}" = x ; then | |
9047 | # we reset no_tcl in case something fails here | |
9048 | no_tcl=true | |
9049 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
9050 | if test "${with_tclconfig+set}" = set; then | |
9051 | withval="$with_tclconfig" | |
9052 | with_tclconfig=${withval} | |
9053 | fi | |
9054 | ||
9055 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
b9362cc7 | 9056 | echo "configure:9057: checking for Tcl configuration" >&5 |
3fc11d3e JM |
9057 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
9058 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9059 | else | |
9060 | ||
9061 | ||
9062 | # First check to see if --with-tclconfig was specified. | |
9063 | if test x"${with_tclconfig}" != x ; then | |
9064 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
9065 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
9066 | else | |
9067 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
9068 | fi | |
9069 | fi | |
9070 | ||
9071 | # then check for a private Tcl installation | |
9072 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9073 | for i in \ | |
9074 | ../tcl \ | |
9075 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
9076 | ../../tcl \ | |
9077 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
9078 | ../../../tcl \ | |
9079 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
9080 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9081 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9082 | break | |
9083 | fi | |
9084 | done | |
9085 | fi | |
9086 | # check in a few common install locations | |
9087 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9088 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9089 | if test -f "$i/tclConfig.sh" ; then | |
9090 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
9091 | break | |
9092 | fi | |
9093 | done | |
9094 | fi | |
9095 | # check in a few other private locations | |
9096 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9097 | for i in \ | |
9098 | ${srcdir}/../tcl \ | |
9099 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
9100 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
9101 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
9102 | break | |
9103 | fi | |
9104 | done | |
9105 | fi | |
9106 | ||
9107 | fi | |
9108 | ||
9109 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9110 | TCLCONFIG="# no Tcl configs found" | |
9111 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
9112 | else | |
9113 | no_tcl= | |
9114 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
9115 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
9116 | fi | |
9117 | fi | |
9118 | ||
9119 | if test -z "${no_tcl}"; then | |
9120 | ||
9121 | . $TCLCONFIG | |
9122 | ||
9123 | ||
9124 | ||
9125 | ||
9126 | ||
9127 | ||
9128 | ||
9129 | ||
9130 | ||
9131 | ||
9132 | ||
9133 | ||
9134 | ||
9135 | ||
9136 | ||
9137 | ||
9138 | ||
9139 | ||
9140 | ||
9141 | ||
033afc63 | 9142 | |
3fc11d3e JM |
9143 | |
9144 | ||
9145 | ||
9146 | ||
9147 | ||
9148 | ||
9149 | # | |
9150 | # Ok, lets find the tk configuration | |
9151 | # First, look for one uninstalled. | |
9152 | # the alternative search directory is invoked by --with-tkconfig | |
9153 | # | |
9154 | ||
9155 | if test x"${no_tk}" = x ; then | |
9156 | # we reset no_tk in case something fails here | |
9157 | no_tk=true | |
9158 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
9159 | if test "${with_tkconfig+set}" = set; then | |
9160 | withval="$with_tkconfig" | |
9161 | with_tkconfig=${withval} | |
9162 | fi | |
9163 | ||
9164 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
b9362cc7 | 9165 | echo "configure:9166: checking for Tk configuration" >&5 |
3fc11d3e JM |
9166 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
9167 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9168 | else | |
9169 | ||
9170 | ||
9171 | # First check to see if --with-tkconfig was specified. | |
9172 | if test x"${with_tkconfig}" != x ; then | |
9173 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
9174 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
9175 | else | |
9176 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
9177 | fi | |
9178 | fi | |
9179 | ||
9180 | # then check for a private Tk library | |
9181 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9182 | for i in \ | |
9183 | ../tk \ | |
9184 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
9185 | ../../tk \ | |
9186 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
9187 | ../../../tk \ | |
9188 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
9189 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9190 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9191 | break | |
9192 | fi | |
9193 | done | |
9194 | fi | |
9195 | # check in a few common install locations | |
9196 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9197 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9198 | if test -f "$i/tkConfig.sh" ; then | |
9199 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
9200 | break | |
9201 | fi | |
9202 | done | |
9203 | fi | |
9204 | # check in a few other private locations | |
9205 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9206 | for i in \ | |
9207 | ${srcdir}/../tk \ | |
9208 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
9209 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
9210 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
9211 | break | |
9212 | fi | |
9213 | done | |
9214 | fi | |
9215 | ||
9216 | fi | |
9217 | ||
9218 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9219 | TKCONFIG="# no Tk configs found" | |
9220 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
9221 | else | |
9222 | no_tk= | |
9223 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
9224 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
9225 | fi | |
9226 | fi | |
9227 | ||
9228 | ||
9229 | ||
dd2504ab JM |
9230 | # now look for Tcl library stuff |
9231 | ||
9232 | case "${host}" in | |
9233 | *-*-cygwin*) | |
9234 | tcldir=../tcl/win/ | |
9235 | ;; | |
9236 | *) | |
9237 | tcldir=../tcl/unix/ | |
9238 | ;; | |
9239 | esac | |
9240 | ||
9241 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9242 | ||
3fc11d3e JM |
9243 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9244 | # point to doing Tcl. | |
9245 | if test -z "${no_tk}"; then | |
9246 | ||
9247 | if test -f "$TKCONFIG" ; then | |
9248 | . $TKCONFIG | |
9249 | fi | |
9250 | ||
9251 | ||
9252 | ||
9253 | ||
9254 | ||
9255 | ||
9256 | ||
9257 | ||
9258 | ||
9259 | ||
9260 | ||
9261 | ||
9262 | ||
9263 | ||
9264 | # | |
9265 | # Ok, lets find the tcl source trees so we can use the headers | |
9266 | # Warning: transition of version 9 to 10 will break this algorithm | |
9267 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9268 | # be careful that we don't match stuff like tclX by accident. | |
9269 | # the alternative search directory is involked by --with-tclinclude | |
9270 | # | |
9271 | ||
9272 | no_tcl=true | |
9273 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
b9362cc7 | 9274 | echo "configure:9275: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9275 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9276 | if test "${with_tclinclude+set}" = set; then | |
9277 | withval="$with_tclinclude" | |
9278 | with_tclinclude=${withval} | |
9279 | fi | |
9280 | ||
9281 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9283 | else | |
9284 | ||
9285 | # first check to see if --with-tclinclude was specified | |
9286 | if test x"${with_tclinclude}" != x ; then | |
9287 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9288 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9289 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9290 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9291 | else | |
9292 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9293 | fi | |
9294 | fi | |
9295 | ||
9296 | # next check if it came with Tcl configuration file | |
9297 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9298 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9299 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9300 | fi | |
9301 | fi | |
9302 | ||
9303 | # next check in private source directory | |
9304 | # | |
9305 | # since ls returns lowest version numbers first, reverse its output | |
9306 | if test x"${ac_cv_c_tclh}" = x ; then | |
9307 | for i in \ | |
9308 | ${srcdir}/../tcl \ | |
9309 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9310 | ${srcdir}/../../tcl \ | |
9311 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9312 | ${srcdir}/../../../tcl \ | |
9313 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9314 | if test -f $i/generic/tclInt.h ; then | |
9315 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9316 | break | |
9317 | fi | |
9318 | done | |
9319 | fi | |
9320 | # finally check in a few common install locations | |
9321 | # | |
9322 | # since ls returns lowest version numbers first, reverse its output | |
9323 | if test x"${ac_cv_c_tclh}" = x ; then | |
9324 | for i in \ | |
9325 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9326 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9327 | /usr/local/src/tcl \ | |
9328 | /usr/local/lib/tcl \ | |
9329 | ${prefix}/include ; do | |
9330 | if test -f $i/generic/tclInt.h ; then | |
9331 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9332 | break | |
9333 | fi | |
9334 | done | |
9335 | fi | |
9336 | # see if one is installed | |
9337 | if test x"${ac_cv_c_tclh}" = x ; then | |
9338 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9339 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
b9362cc7 | 9340 | echo "configure:9341: checking for tclInt.h" >&5 |
3fc11d3e JM |
9341 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9342 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9343 | else | |
9344 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 9345 | #line 9346 "configure" |
3fc11d3e JM |
9346 | #include "confdefs.h" |
9347 | #include <tclInt.h> | |
9348 | EOF | |
9349 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b9362cc7 | 9350 | { (eval echo configure:9351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9351 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9352 | if test -z "$ac_err"; then | |
9353 | rm -rf conftest* | |
9354 | eval "ac_cv_header_$ac_safe=yes" | |
9355 | else | |
9356 | echo "$ac_err" >&5 | |
9357 | echo "configure: failed program was:" >&5 | |
9358 | cat conftest.$ac_ext >&5 | |
9359 | rm -rf conftest* | |
9360 | eval "ac_cv_header_$ac_safe=no" | |
9361 | fi | |
9362 | rm -f conftest* | |
9363 | fi | |
9364 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9365 | echo "$ac_t""yes" 1>&6 | |
9366 | ac_cv_c_tclh=installed | |
9367 | else | |
9368 | echo "$ac_t""no" 1>&6 | |
9369 | ac_cv_c_tclh="" | |
9370 | fi | |
9371 | ||
9372 | fi | |
9373 | ||
9374 | fi | |
9375 | ||
9376 | if test x"${ac_cv_c_tclh}" = x ; then | |
9377 | TCLHDIR="# no Tcl private headers found" | |
9378 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9379 | fi | |
9380 | if test x"${ac_cv_c_tclh}" != x ; then | |
9381 | no_tcl="" | |
9382 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9383 | echo "$ac_t""is installed" 1>&6 | |
9384 | TCLHDIR="" | |
9385 | else | |
9386 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9387 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9388 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9389 | fi | |
9390 | fi | |
9391 | ||
9392 | ||
9393 | ||
9394 | ||
9395 | # | |
9396 | # Ok, lets find the tk source trees so we can use the headers | |
9397 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9398 | # in preference to any others. Same logic is used when choosing library | |
9399 | # and again with Tcl. The search order is the best place to look first, then in | |
9400 | # decreasing significance. The loop breaks if the trigger file is found. | |
9401 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9402 | # directory. This converts the path from a relative to an absolute, so | |
9403 | # recursive cache variables for the path will work right. We check all | |
9404 | # the possible paths in one loop rather than many seperate loops to speed | |
9405 | # things up. | |
9406 | # the alternative search directory is involked by --with-tkinclude | |
9407 | # | |
9408 | no_tk=true | |
9409 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
b9362cc7 | 9410 | echo "configure:9411: checking for Tk private headers" >&5 |
3fc11d3e JM |
9411 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9412 | if test "${with_tkinclude+set}" = set; then | |
9413 | withval="$with_tkinclude" | |
9414 | with_tkinclude=${withval} | |
9415 | fi | |
9416 | ||
9417 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9419 | else | |
9420 | ||
9421 | # first check to see if --with-tkinclude was specified | |
9422 | if test x"${with_tkinclude}" != x ; then | |
9423 | if test -f ${with_tkinclude}/tk.h ; then | |
9424 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9425 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9426 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9427 | else | |
9428 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9429 | fi | |
9430 | fi | |
9431 | ||
9432 | # next check if it came with Tk configuration file | |
9433 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9434 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9435 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9436 | fi | |
9437 | fi | |
9438 | ||
9439 | # next check in private source directory | |
9440 | # | |
9441 | # since ls returns lowest version numbers first, reverse its output | |
9442 | if test x"${ac_cv_c_tkh}" = x ; then | |
9443 | for i in \ | |
9444 | ${srcdir}/../tk \ | |
9445 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9446 | ${srcdir}/../../tk \ | |
9447 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9448 | ${srcdir}/../../../tk \ | |
9449 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9450 | if test -f $i/generic/tk.h ; then | |
9451 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9452 | break | |
9453 | fi | |
9454 | done | |
9455 | fi | |
9456 | # finally check in a few common install locations | |
9457 | # | |
9458 | # since ls returns lowest version numbers first, reverse its output | |
9459 | if test x"${ac_cv_c_tkh}" = x ; then | |
9460 | for i in \ | |
9461 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9462 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9463 | /usr/local/src/tk \ | |
9464 | /usr/local/lib/tk \ | |
9465 | ${prefix}/include ; do | |
9466 | if test -f $i/generic/tk.h ; then | |
9467 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9468 | break | |
9469 | fi | |
9470 | done | |
9471 | fi | |
9472 | # see if one is installed | |
9473 | if test x"${ac_cv_c_tkh}" = x ; then | |
9474 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9475 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
b9362cc7 | 9476 | echo "configure:9477: checking for tk.h" >&5 |
3fc11d3e JM |
9477 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9478 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9479 | else | |
9480 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 9481 | #line 9482 "configure" |
3fc11d3e JM |
9482 | #include "confdefs.h" |
9483 | #include <tk.h> | |
9484 | EOF | |
9485 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b9362cc7 | 9486 | { (eval echo configure:9487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9487 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9488 | if test -z "$ac_err"; then | |
9489 | rm -rf conftest* | |
9490 | eval "ac_cv_header_$ac_safe=yes" | |
9491 | else | |
9492 | echo "$ac_err" >&5 | |
9493 | echo "configure: failed program was:" >&5 | |
9494 | cat conftest.$ac_ext >&5 | |
9495 | rm -rf conftest* | |
9496 | eval "ac_cv_header_$ac_safe=no" | |
9497 | fi | |
9498 | rm -f conftest* | |
9499 | fi | |
9500 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9501 | echo "$ac_t""yes" 1>&6 | |
9502 | ac_cv_c_tkh=installed | |
9503 | else | |
9504 | echo "$ac_t""no" 1>&6 | |
9505 | ac_cv_c_tkh="" | |
9506 | fi | |
9507 | ||
9508 | fi | |
9509 | ||
9510 | fi | |
9511 | ||
9512 | if test x"${ac_cv_c_tkh}" != x ; then | |
9513 | no_tk="" | |
9514 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9515 | echo "$ac_t""is installed" 1>&6 | |
9516 | TKHDIR="" | |
9517 | else | |
9518 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9519 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9520 | TKHDIR="-I${ac_cv_c_tkh}" | |
9521 | fi | |
9522 | else | |
9523 | TKHDIR="# no Tk directory found" | |
9524 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9525 | no_tk=true | |
9526 | fi | |
9527 | ||
9528 | ||
9529 | ||
9530 | ||
9531 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b9362cc7 | 9532 | echo "configure:9533: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9533 | if test x"${ac_cv_c_itclh}" = x ; then |
9534 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9535 | if test -f $i/generic/itcl.h ; then | |
9536 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9537 | break | |
9538 | fi | |
9539 | done | |
9540 | fi | |
9541 | if test x"${ac_cv_c_itclh}" = x ; then | |
9542 | ITCLHDIR="# no Itcl private headers found" | |
9543 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9544 | fi | |
9545 | if test x"${ac_cv_c_itclh}" != x ; then | |
9546 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9547 | fi | |
9548 | # should always be here | |
9549 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9550 | ||
9551 | #AC_SUBST(ITCLLIB) | |
9552 | ||
9553 | ||
9554 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b9362cc7 | 9555 | echo "configure:9556: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9556 | if test x"${ac_cv_c_itkh}" = x ; then |
9557 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9558 | if test -f $i/generic/itk.h ; then | |
9559 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9560 | break | |
9561 | fi | |
9562 | done | |
9563 | fi | |
9564 | if test x"${ac_cv_c_itkh}" = x ; then | |
9565 | ITKHDIR="# no Itk private headers found" | |
9566 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9567 | fi | |
9568 | if test x"${ac_cv_c_itkh}" != x ; then | |
9569 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9570 | fi | |
9571 | # should always be here | |
9572 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9573 | ||
9574 | #AC_SUBST(ITKLIB) | |
9575 | ||
3fc11d3e | 9576 | |
dd2504ab JM |
9577 | |
9578 | # now look for Tk library stuff | |
9579 | ||
9580 | case "${host}" in | |
9581 | *-*-cygwin*) | |
9582 | tkdir=../tk/win/ | |
9583 | ;; | |
9584 | *) | |
9585 | tkdir=../tk/unix/ | |
9586 | ;; | |
9587 | esac | |
9588 | ||
9589 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9590 | ||
3fc11d3e JM |
9591 | # now look for Itcl library stuff |
9592 | ||
9593 | ||
9594 | # | |
9595 | # Ok, lets find the itcl configuration | |
9596 | # First, look for one uninstalled. | |
9597 | # the alternative search directory is invoked by --with-itclconfig | |
9598 | # | |
9599 | ||
9600 | if test x"${no_itcl}" = x ; then | |
9601 | # we reset no_itcl in case something fails here | |
9602 | no_itcl=true | |
9603 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9604 | if test "${with_itclconfig+set}" = set; then | |
9605 | withval="$with_itclconfig" | |
9606 | with_itclconfig=${withval} | |
9607 | fi | |
9608 | ||
9609 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
b9362cc7 | 9610 | echo "configure:9611: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9611 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9613 | else | |
9614 | ||
9615 | ||
9616 | # First check to see if --with-itclconfig was specified. | |
9617 | if test x"${with_itclconfig}" != x ; then | |
9618 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9619 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9620 | else | |
9621 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9622 | fi | |
9623 | fi | |
9624 | ||
9625 | # then check for a private Itcl library | |
9626 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9627 | for i in \ | |
9628 | ../itcl/itcl \ | |
9629 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9630 | ../../itcl \ | |
9631 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9632 | ../../../itcl \ | |
9633 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9634 | if test -f "$i/itclConfig.sh" ; then | |
9635 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9636 | break | |
9637 | fi | |
9638 | done | |
9639 | fi | |
9640 | # check in a few common install locations | |
9641 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9642 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9643 | if test -f "$i/itclConfig.sh" ; then | |
9644 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9645 | break | |
9646 | fi | |
9647 | done | |
9648 | fi | |
9649 | # check in a few other private locations | |
9650 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9651 | for i in \ | |
9652 | ${srcdir}/../itcl/itcl \ | |
9653 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9654 | if test -f "$i/itclConfig.sh" ; then | |
9655 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9656 | break | |
9657 | fi | |
9658 | done | |
9659 | fi | |
9660 | ||
9661 | fi | |
9662 | ||
9663 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9664 | ITCLCONFIG="# no Itcl configs found" | |
9665 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9666 | else | |
9667 | no_itcl= | |
9668 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9669 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9670 | fi | |
9671 | fi | |
9672 | ||
9673 | if test -z "${no_itcl}"; then | |
9674 | ||
9675 | if test -f "$ITCLCONFIG" ; then | |
9676 | . $ITCLCONFIG | |
9677 | fi | |
9678 | ||
9679 | ||
9680 | ||
9681 | ||
9682 | ||
9683 | ||
9684 | ||
9685 | ||
9686 | ||
9687 | ||
3fc11d3e JM |
9688 | |
9689 | ||
9690 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9691 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9692 | fi |
9693 | ||
9694 | ||
9695 | # now look for Itk library stuff | |
9696 | ||
9697 | # | |
9698 | # Ok, lets find the itk configuration | |
9699 | # First, look for one uninstalled. | |
9700 | # the alternative search directory is invoked by --with-itkconfig | |
9701 | # | |
9702 | ||
9703 | if test x"${no_itk}" = x ; then | |
9704 | # we reset no_itk in case something fails here | |
9705 | no_itk=true | |
9706 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9707 | if test "${with_itkconfig+set}" = set; then | |
9708 | withval="$with_itkconfig" | |
9709 | with_itkconfig=${withval} | |
9710 | fi | |
9711 | ||
9712 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
b9362cc7 | 9713 | echo "configure:9714: checking for Itk configuration" >&5 |
3fc11d3e JM |
9714 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9716 | else | |
9717 | ||
9718 | ||
9719 | # First check to see if --with-itkconfig was specified. | |
9720 | if test x"${with_itkconfig}" != x ; then | |
9721 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9722 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9723 | else | |
9724 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9725 | fi | |
9726 | fi | |
9727 | ||
9728 | # then check for a private Itk library | |
9729 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9730 | for i in \ | |
9731 | ../itcl/itk \ | |
9732 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9733 | ../../itk \ | |
9734 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9735 | ../../../itk \ | |
9736 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9737 | if test -f "$i/itkConfig.sh" ; then | |
9738 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9739 | break | |
9740 | fi | |
9741 | done | |
9742 | fi | |
9743 | # check in a few common install locations | |
9744 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9745 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9746 | if test -f "$i/itkConfig.sh" ; then | |
9747 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9748 | break | |
9749 | fi | |
9750 | done | |
9751 | fi | |
9752 | # check in a few other private locations | |
9753 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9754 | for i in \ | |
9755 | ${srcdir}/../itcl/itk \ | |
9756 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9757 | if test -f "$i/itkConfig.sh" ; then | |
9758 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9759 | break | |
9760 | fi | |
9761 | done | |
9762 | fi | |
9763 | ||
9764 | fi | |
9765 | ||
9766 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9767 | ITKCONFIG="# no Itk configs found" | |
9768 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9769 | else | |
9770 | no_itk= | |
9771 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9772 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9773 | fi | |
9774 | fi | |
9775 | ||
9776 | ||
9777 | if test -z "${no_itcl}"; then | |
9778 | ||
9779 | if test -f "$ITKCONFIG" ; then | |
9780 | . $ITKCONFIG | |
9781 | fi | |
9782 | ||
9783 | ||
9784 | ||
9785 | ||
9786 | ||
9787 | ||
9788 | ||
9789 | ||
9790 | ||
9791 | ||
9792 | ||
9793 | ||
3fc11d3e | 9794 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9795 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9796 | fi |
9797 | ||
4226a5a5 | 9798 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9799 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9800 | # know whether 8.2 will or not, but I bet it will. | |
9801 | # I don't have to worry about 7.x since we don't support it. | |
9802 | GDBTK_CFLAGS="" | |
9803 | if test "$GCC" = "yes"; then | |
9804 | if test "$TCL_VERSION" != "8.0" ; then | |
9805 | GDBTK_CFLAGS="-fwritable-strings" | |
9806 | fi | |
9807 | fi | |
9808 | ||
9809 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9810 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9811 | # Yes, the ordering seems wrong here. But it isn't. |
9812 | # TK_LIBS is the list of libraries that need to be linked | |
9813 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9814 | # were in LIBS then any link tests after this point would | |
9815 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9816 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9817 | |
9818 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9819 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9820 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9821 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9822 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9823 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9824 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9825 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9826 | |
9827 | if test x$gdb_cv_os_cygwin = xyes; then | |
9828 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9829 | WIN32LDAPP="-Wl,--subsystem,console" | |
9830 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9831 | fi | |
9832 | fi | |
9833 | fi | |
ffc6a242 | 9834 | |
ffc6a242 | 9835 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9836 | fi |
9837 | ||
9838 | ||
9839 | ||
9840 | ||
9841 | ||
9842 | ||
9843 | ||
9844 | ||
9845 | ||
9846 | ||
9847 | ||
9848 | ||
9849 | ||
dd2504ab | 9850 | |
c906108c SS |
9851 | # If we find X, set shell vars x_includes and x_libraries to the |
9852 | # paths, otherwise set no_x=yes. | |
9853 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9854 | # --without-x overrides everything else, but does not touch the cache. | |
9855 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
b9362cc7 | 9856 | echo "configure:9857: checking for X" >&5 |
c906108c SS |
9857 | |
9858 | # Check whether --with-x or --without-x was given. | |
9859 | if test "${with_x+set}" = set; then | |
9860 | withval="$with_x" | |
9861 | : | |
9862 | fi | |
9863 | ||
9864 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9865 | if test "x$with_x" = xno; then | |
9866 | # The user explicitly disabled X. | |
9867 | have_x=disabled | |
9868 | else | |
9869 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9870 | # Both variables are already set. | |
9871 | have_x=yes | |
9872 | else | |
9873 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9874 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9875 | else | |
9876 | # One or both of the vars are not set, and there is no cached value. | |
9877 | ac_x_includes=NO ac_x_libraries=NO | |
9878 | rm -fr conftestdir | |
9879 | if mkdir conftestdir; then | |
9880 | cd conftestdir | |
9881 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9882 | cat > Imakefile <<'EOF' | |
9883 | acfindx: | |
9884 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9885 | EOF | |
9886 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9887 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9888 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9889 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9890 | for ac_extension in a so sl; do | |
9891 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9892 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9893 | ac_im_usrlibdir=$ac_im_libdir; break | |
9894 | fi | |
9895 | done | |
9896 | # Screen out bogus values from the imake configuration. They are | |
9897 | # bogus both because they are the default anyway, and because | |
9898 | # using them would break gcc on systems where it needs fixed includes. | |
9899 | case "$ac_im_incroot" in | |
9900 | /usr/include) ;; | |
9901 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9902 | esac | |
9903 | case "$ac_im_usrlibdir" in | |
9904 | /usr/lib | /lib) ;; | |
9905 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9906 | esac | |
9907 | fi | |
9908 | cd .. | |
9909 | rm -fr conftestdir | |
9910 | fi | |
9911 | ||
9912 | if test "$ac_x_includes" = NO; then | |
9913 | # Guess where to find include files, by looking for this one X11 .h file. | |
9914 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9915 | ||
9916 | # First, try using that file with no special directory specified. | |
9917 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 9918 | #line 9919 "configure" |
c906108c SS |
9919 | #include "confdefs.h" |
9920 | #include <$x_direct_test_include> | |
9921 | EOF | |
9922 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b9362cc7 | 9923 | { (eval echo configure:9924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9924 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9925 | if test -z "$ac_err"; then | |
9926 | rm -rf conftest* | |
9927 | # We can compile using X headers with no special include directory. | |
9928 | ac_x_includes= | |
9929 | else | |
9930 | echo "$ac_err" >&5 | |
9931 | echo "configure: failed program was:" >&5 | |
9932 | cat conftest.$ac_ext >&5 | |
9933 | rm -rf conftest* | |
9934 | # Look for the header file in a standard set of common directories. | |
9935 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9936 | for ac_dir in \ | |
9937 | /usr/X11/include \ | |
9938 | /usr/X11R6/include \ | |
9939 | /usr/X11R5/include \ | |
9940 | /usr/X11R4/include \ | |
9941 | \ | |
9942 | /usr/include/X11 \ | |
9943 | /usr/include/X11R6 \ | |
9944 | /usr/include/X11R5 \ | |
9945 | /usr/include/X11R4 \ | |
9946 | \ | |
9947 | /usr/local/X11/include \ | |
9948 | /usr/local/X11R6/include \ | |
9949 | /usr/local/X11R5/include \ | |
9950 | /usr/local/X11R4/include \ | |
9951 | \ | |
9952 | /usr/local/include/X11 \ | |
9953 | /usr/local/include/X11R6 \ | |
9954 | /usr/local/include/X11R5 \ | |
9955 | /usr/local/include/X11R4 \ | |
9956 | \ | |
9957 | /usr/X386/include \ | |
9958 | /usr/x386/include \ | |
9959 | /usr/XFree86/include/X11 \ | |
9960 | \ | |
9961 | /usr/include \ | |
9962 | /usr/local/include \ | |
9963 | /usr/unsupported/include \ | |
9964 | /usr/athena/include \ | |
9965 | /usr/local/x11r5/include \ | |
9966 | /usr/lpp/Xamples/include \ | |
9967 | \ | |
9968 | /usr/openwin/include \ | |
9969 | /usr/openwin/share/include \ | |
9970 | ; \ | |
9971 | do | |
9972 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9973 | ac_x_includes=$ac_dir | |
9974 | break | |
9975 | fi | |
9976 | done | |
9977 | fi | |
9978 | rm -f conftest* | |
9979 | fi # $ac_x_includes = NO | |
9980 | ||
9981 | if test "$ac_x_libraries" = NO; then | |
9982 | # Check for the libraries. | |
9983 | ||
9984 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9985 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9986 | ||
9987 | # See if we find them without any special options. | |
9988 | # Don't add to $LIBS permanently. | |
9989 | ac_save_LIBS="$LIBS" | |
9990 | LIBS="-l$x_direct_test_library $LIBS" | |
9991 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 9992 | #line 9993 "configure" |
c906108c SS |
9993 | #include "confdefs.h" |
9994 | ||
9995 | int main() { | |
9996 | ${x_direct_test_function}() | |
9997 | ; return 0; } | |
9998 | EOF | |
b9362cc7 | 9999 | if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
10000 | rm -rf conftest* |
10001 | LIBS="$ac_save_LIBS" | |
10002 | # We can link X programs with no special library path. | |
10003 | ac_x_libraries= | |
10004 | else | |
10005 | echo "configure: failed program was:" >&5 | |
10006 | cat conftest.$ac_ext >&5 | |
10007 | rm -rf conftest* | |
10008 | LIBS="$ac_save_LIBS" | |
10009 | # First see if replacing the include by lib works. | |
10010 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
10011 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
10012 | /usr/X11/lib \ | |
10013 | /usr/X11R6/lib \ | |
10014 | /usr/X11R5/lib \ | |
10015 | /usr/X11R4/lib \ | |
10016 | \ | |
10017 | /usr/lib/X11 \ | |
10018 | /usr/lib/X11R6 \ | |
10019 | /usr/lib/X11R5 \ | |
10020 | /usr/lib/X11R4 \ | |
10021 | \ | |
10022 | /usr/local/X11/lib \ | |
10023 | /usr/local/X11R6/lib \ | |
10024 | /usr/local/X11R5/lib \ | |
10025 | /usr/local/X11R4/lib \ | |
10026 | \ | |
10027 | /usr/local/lib/X11 \ | |
10028 | /usr/local/lib/X11R6 \ | |
10029 | /usr/local/lib/X11R5 \ | |
10030 | /usr/local/lib/X11R4 \ | |
10031 | \ | |
10032 | /usr/X386/lib \ | |
10033 | /usr/x386/lib \ | |
10034 | /usr/XFree86/lib/X11 \ | |
10035 | \ | |
10036 | /usr/lib \ | |
10037 | /usr/local/lib \ | |
10038 | /usr/unsupported/lib \ | |
10039 | /usr/athena/lib \ | |
10040 | /usr/local/x11r5/lib \ | |
10041 | /usr/lpp/Xamples/lib \ | |
10042 | /lib/usr/lib/X11 \ | |
10043 | \ | |
10044 | /usr/openwin/lib \ | |
10045 | /usr/openwin/share/lib \ | |
10046 | ; \ | |
10047 | do | |
10048 | for ac_extension in a so sl; do | |
10049 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
10050 | ac_x_libraries=$ac_dir | |
10051 | break 2 | |
10052 | fi | |
10053 | done | |
10054 | done | |
10055 | fi | |
10056 | rm -f conftest* | |
10057 | fi # $ac_x_libraries = NO | |
10058 | ||
10059 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
10060 | # Didn't find X anywhere. Cache the known absence of X. | |
10061 | ac_cv_have_x="have_x=no" | |
10062 | else | |
10063 | # Record where we found X for the cache. | |
10064 | ac_cv_have_x="have_x=yes \ | |
10065 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
10066 | fi | |
10067 | fi | |
10068 | fi | |
10069 | eval "$ac_cv_have_x" | |
10070 | fi # $with_x != no | |
10071 | ||
10072 | if test "$have_x" != yes; then | |
10073 | echo "$ac_t""$have_x" 1>&6 | |
10074 | no_x=yes | |
10075 | else | |
10076 | # If each of the values was on the command line, it overrides each guess. | |
10077 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
10078 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
10079 | # Update the cache value to reflect the command line values. | |
10080 | ac_cv_have_x="have_x=yes \ | |
10081 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
10082 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
10083 | fi | |
10084 | ||
10085 | ||
7a292a7a SS |
10086 | |
10087 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
10088 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
10089 | # This code just checks for a few cases where we'd like to ignore those | |
10090 | # definitions, even when they're present in the '.mt' file. These cases | |
10091 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 10092 | # not part of the source tree. |
7a292a7a SS |
10093 | # |
10094 | # Check whether --enable-sim or --disable-sim was given. | |
10095 | if test "${enable_sim+set}" = set; then | |
10096 | enableval="$enable_sim" | |
10097 | echo "enable_sim = $enable_sim"; | |
10098 | echo "enableval = ${enableval}"; | |
10099 | case "${enableval}" in | |
10100 | yes) ignore_sim=false ;; | |
10101 | no) ignore_sim=true ;; | |
10102 | *) ignore_sim=false ;; | |
10103 | esac | |
10104 | else | |
10105 | ignore_sim=false | |
10106 | fi | |
10107 | ||
10108 | ||
10109 | if test ! -d "${srcdir}/../sim"; then | |
10110 | ignore_sim=true | |
10111 | fi | |
10112 | ||
10113 | if test "${ignore_sim}" = "true"; then | |
10114 | IGNORE_SIM="SIM=" | |
10115 | IGNORE_SIM_OBS="SIM_OBS=" | |
10116 | else | |
10117 | IGNORE_SIM="" | |
10118 | IGNORE_SIM_OBS="" | |
10119 | cat >> confdefs.h <<\EOF | |
10120 | #define WITH_SIM 1 | |
10121 | EOF | |
10122 | ||
10123 | fi | |
10124 | ||
10125 | ||
10126 | ||
c906108c SS |
10127 | |
10128 | ||
10129 | ||
10130 | ||
10131 | ||
10132 | ||
dfcd3bfb | 10133 | |
e56ac5c3 AC |
10134 | |
10135 | ||
b3a90332 AC |
10136 | |
10137 | ||
b46cd165 | 10138 | |
d28f9cdf | 10139 | |
c906108c SS |
10140 | # target_subdir is used by the testsuite to find the target libraries. |
10141 | target_subdir= | |
10142 | if test "${host}" != "${target}"; then | |
10143 | target_subdir="${target_alias}/" | |
10144 | fi | |
10145 | ||
10146 | ||
10147 | frags= | |
10148 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
10149 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
10150 | # When building a native debuger the .mh file containing things |
10151 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
10152 | # since it no longer contains anything useful. | |
10153 | if test "${target}" = "${host}"; then | |
10154 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
10155 | else | |
10156 | host_makefile_frag=/dev/null | |
10157 | fi | |
c906108c SS |
10158 | fi |
10159 | frags="$frags $host_makefile_frag" | |
10160 | ||
10161 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
10162 | if test ! -f ${target_makefile_frag}; then | |
10163 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
10164 | fi | |
10165 | frags="$frags $target_makefile_frag" | |
10166 | ||
10167 | ||
10168 | ||
10169 | ||
10170 | ||
10171 | hostfile=`sed -n ' | |
10172 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10173 | ' ${host_makefile_frag}` | |
10174 | ||
10175 | targetfile=`sed -n ' | |
10176 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10177 | ' ${target_makefile_frag}` | |
10178 | ||
6166d547 AC |
10179 | GDB_MULTI_ARCH=`sed -n ' |
10180 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
10181 | ' ${target_makefile_frag}` | |
10182 | ||
c906108c | 10183 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
10184 | # We pick this up from the host configuration file (.mh) because we |
10185 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
10186 | nativefile=`sed -n ' |
10187 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
10188 | ' ${host_makefile_frag}` | |
c906108c SS |
10189 | fi |
10190 | ||
10191 | ||
6166d547 AC |
10192 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
10193 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
10194 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
10195 | # will be the default. | |
10196 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
10197 | case "${gdb_multi_arch}" in | |
10198 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
10199 | no ) GDB_MULTI_ARCH=0 ;; | |
10200 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
10201 | esac | |
10202 | fi | |
10203 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
10204 | cat >> confdefs.h <<EOF | |
10205 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
10206 | EOF | |
10207 | ||
10208 | fi | |
6c5cfe5b | 10209 | # Warn the user when they use an old practice |
6166d547 AC |
10210 | case "${GDB_MULTI_ARCH}" in |
10211 | "" ) ;; | |
10212 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
10213 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
10214 | GDB_MULTI_ARCH_PURE ) | |
10215 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 10216 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 10217 | targetfile="" |
6166d547 AC |
10218 | fi ;; |
10219 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
10220 | esac | |
10221 | ||
b00a8037 DJ |
10222 | if test x"${gdb_osabi}" != x ; then |
10223 | cat >> confdefs.h <<EOF | |
10224 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
10225 | EOF | |
10226 | ||
10227 | fi | |
10228 | ||
8dcde887 MK |
10229 | # Enable multi-ice-gdb-server. |
10230 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10231 | if test "${enable_multi_ice+set}" = set; then | |
10232 | enableval="$enable_multi_ice" | |
10233 | case $enableval in | |
10234 | yes | no) | |
10235 | ;; | |
10236 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10237 | esac | |
96baa820 JM |
10238 | fi |
10239 | ||
8dcde887 MK |
10240 | if test "x$enable_multi_ice" = xyes; then |
10241 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10242 | fi |
10243 | ||
8dcde887 MK |
10244 | # We only build gdbserver automatically if host and target are the same. |
10245 | if test "x$target" = "x$host"; then | |
10246 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
b9362cc7 | 10247 | echo "configure:10248: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10248 | if test "x$build_gdbserver" = xyes; then |
10249 | configdirs="$configdirs gdbserver" | |
10250 | echo "$ac_t""yes" 1>&6 | |
10251 | else | |
10252 | echo "$ac_t""no" 1>&6 | |
10253 | fi | |
10254 | fi | |
10255 | ||
10256 | subdirs="doc testsuite $configdirs" | |
10257 | ||
96baa820 | 10258 | |
c906108c | 10259 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10260 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10261 | # version. | |
c906108c SS |
10262 | |
10263 | files= | |
10264 | links= | |
5a2402b8 | 10265 | |
c906108c | 10266 | rm -f xm.h |
5a2402b8 | 10267 | xm_h="" |
c906108c | 10268 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10269 | xm_h=xm.h |
10270 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10271 | files="${files} ${GDB_XM_FILE}" | |
10272 | links="${links} xm.h" | |
10273 | cat >> confdefs.h <<EOF | |
10274 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10275 | EOF | |
10276 | ||
c906108c | 10277 | fi |
5a2402b8 AC |
10278 | |
10279 | ||
c906108c | 10280 | rm -f tm.h |
5a2402b8 | 10281 | tm_h="" |
c906108c | 10282 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10283 | tm_h=tm.h |
10284 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10285 | files="${files} ${GDB_TM_FILE}" | |
10286 | links="${links} tm.h" | |
10287 | cat >> confdefs.h <<EOF | |
10288 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10289 | EOF | |
10290 | ||
c906108c | 10291 | fi |
5a2402b8 AC |
10292 | |
10293 | ||
c906108c | 10294 | rm -f nm.h |
5a2402b8 | 10295 | nm_h="" |
c906108c | 10296 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10297 | nm_h=nm.h |
10298 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10299 | files="${files} ${GDB_NM_FILE}" | |
10300 | links="${links} nm.h" | |
10301 | cat >> confdefs.h <<EOF | |
10302 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10303 | EOF | |
10304 | ||
c906108c | 10305 | fi |
5a2402b8 AC |
10306 | |
10307 | ||
c906108c SS |
10308 | |
10309 | ||
10310 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
b9362cc7 | 10311 | echo "configure:10312: checking for Cygwin environment" >&5 |
c906108c SS |
10312 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10313 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10314 | else | |
10315 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 10316 | #line 10317 "configure" |
c906108c SS |
10317 | #include "confdefs.h" |
10318 | ||
10319 | int main() { | |
10320 | ||
10321 | #ifndef __CYGWIN__ | |
10322 | #define __CYGWIN__ __CYGWIN32__ | |
10323 | #endif | |
10324 | return __CYGWIN__; | |
10325 | ; return 0; } | |
10326 | EOF | |
b9362cc7 | 10327 | if { (eval echo configure:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10328 | rm -rf conftest* |
10329 | ac_cv_cygwin=yes | |
10330 | else | |
10331 | echo "configure: failed program was:" >&5 | |
10332 | cat conftest.$ac_ext >&5 | |
10333 | rm -rf conftest* | |
10334 | ac_cv_cygwin=no | |
10335 | fi | |
10336 | rm -f conftest* | |
10337 | rm -f conftest* | |
10338 | fi | |
10339 | ||
10340 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10341 | CYGWIN= | |
10342 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10343 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
b9362cc7 | 10344 | echo "configure:10345: checking for mingw32 environment" >&5 |
c906108c SS |
10345 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10347 | else | |
10348 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 10349 | #line 10350 "configure" |
c906108c SS |
10350 | #include "confdefs.h" |
10351 | ||
10352 | int main() { | |
10353 | return __MINGW32__; | |
10354 | ; return 0; } | |
10355 | EOF | |
b9362cc7 | 10356 | if { (eval echo configure:10357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10357 | rm -rf conftest* |
10358 | ac_cv_mingw32=yes | |
10359 | else | |
10360 | echo "configure: failed program was:" >&5 | |
10361 | cat conftest.$ac_ext >&5 | |
10362 | rm -rf conftest* | |
10363 | ac_cv_mingw32=no | |
10364 | fi | |
10365 | rm -f conftest* | |
10366 | rm -f conftest* | |
10367 | fi | |
10368 | ||
10369 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10370 | MINGW32= | |
10371 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10372 | ||
10373 | ||
10374 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b9362cc7 | 10375 | echo "configure:10376: checking for executable suffix" >&5 |
c906108c SS |
10376 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10378 | else | |
10379 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10380 | ac_cv_exeext=.exe | |
10381 | else | |
10382 | rm -f conftest* | |
10383 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10384 | ac_cv_exeext= | |
b9362cc7 | 10385 | if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10386 | for file in conftest.*; do |
10387 | case $file in | |
d3e0a5bf | 10388 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10389 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10390 | esac | |
10391 | done | |
10392 | else | |
10393 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10394 | fi | |
10395 | rm -f conftest* | |
10396 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10397 | fi | |
10398 | fi | |
10399 | ||
10400 | EXEEXT="" | |
10401 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10402 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10403 | ac_exeext=$EXEEXT | |
10404 | ||
10405 | ||
234b45d4 KB |
10406 | |
10407 | cat >> confdefs.h <<\EOF | |
10408 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10409 | EOF | |
10410 | ||
10411 | ||
10412 | ||
10413 | ||
10414 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10415 | if test "${with_libiconv_prefix+set}" = set; then | |
10416 | withval="$with_libiconv_prefix" | |
10417 | ||
10418 | for dir in `echo "$withval" | tr : ' '`; do | |
10419 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10420 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10421 | done | |
10422 | ||
10423 | fi | |
10424 | ||
10425 | ||
10426 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
b9362cc7 | 10427 | echo "configure:10428: checking for iconv" >&5 |
234b45d4 KB |
10428 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10429 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10430 | else | |
10431 | ||
10432 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10433 | am_cv_lib_iconv=no | |
10434 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 10435 | #line 10436 "configure" |
234b45d4 KB |
10436 | #include "confdefs.h" |
10437 | #include <stdlib.h> | |
10438 | #include <iconv.h> | |
10439 | int main() { | |
10440 | iconv_t cd = iconv_open("",""); | |
10441 | iconv(cd,NULL,NULL,NULL,NULL); | |
10442 | iconv_close(cd); | |
10443 | ; return 0; } | |
10444 | EOF | |
b9362cc7 | 10445 | if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10446 | rm -rf conftest* |
10447 | am_cv_func_iconv=yes | |
10448 | else | |
10449 | echo "configure: failed program was:" >&5 | |
10450 | cat conftest.$ac_ext >&5 | |
10451 | fi | |
10452 | rm -f conftest* | |
10453 | if test "$am_cv_func_iconv" != yes; then | |
10454 | am_save_LIBS="$LIBS" | |
10455 | LIBS="$LIBS -liconv" | |
10456 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 10457 | #line 10458 "configure" |
234b45d4 KB |
10458 | #include "confdefs.h" |
10459 | #include <stdlib.h> | |
10460 | #include <iconv.h> | |
10461 | int main() { | |
10462 | iconv_t cd = iconv_open("",""); | |
10463 | iconv(cd,NULL,NULL,NULL,NULL); | |
10464 | iconv_close(cd); | |
10465 | ; return 0; } | |
10466 | EOF | |
b9362cc7 | 10467 | if { (eval echo configure:10468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10468 | rm -rf conftest* |
10469 | am_cv_lib_iconv=yes | |
10470 | am_cv_func_iconv=yes | |
10471 | else | |
10472 | echo "configure: failed program was:" >&5 | |
10473 | cat conftest.$ac_ext >&5 | |
10474 | fi | |
10475 | rm -f conftest* | |
10476 | LIBS="$am_save_LIBS" | |
10477 | fi | |
10478 | ||
10479 | fi | |
10480 | ||
10481 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10482 | if test "$am_cv_func_iconv" = yes; then | |
10483 | cat >> confdefs.h <<\EOF | |
10484 | #define HAVE_ICONV 1 | |
10485 | EOF | |
10486 | ||
10487 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
b9362cc7 | 10488 | echo "configure:10489: checking for iconv declaration" >&5 |
234b45d4 KB |
10489 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10490 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10491 | else | |
10492 | ||
10493 | cat > conftest.$ac_ext <<EOF | |
b9362cc7 | 10494 | #line 10495 "configure" |
234b45d4 KB |
10495 | #include "confdefs.h" |
10496 | ||
10497 | #include <stdlib.h> | |
10498 | #include <iconv.h> | |
10499 | extern | |
10500 | #ifdef __cplusplus | |
10501 | "C" | |
10502 | #endif | |
10503 | #if defined(__STDC__) || defined(__cplusplus) | |
10504 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10505 | #else | |
10506 | size_t iconv(); | |
10507 | #endif | |
10508 | ||
10509 | int main() { | |
10510 | ||
10511 | ; return 0; } | |
10512 | EOF | |
b9362cc7 | 10513 | if { (eval echo configure:10514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10514 | rm -rf conftest* |
10515 | am_cv_proto_iconv_arg1="" | |
10516 | else | |
10517 | echo "configure: failed program was:" >&5 | |
10518 | cat conftest.$ac_ext >&5 | |
10519 | rm -rf conftest* | |
10520 | am_cv_proto_iconv_arg1="const" | |
10521 | fi | |
10522 | rm -f conftest* | |
10523 | 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);" | |
10524 | fi | |
10525 | ||
10526 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10527 | echo "$ac_t""${ac_t:- | |
10528 | }$am_cv_proto_iconv" 1>&6 | |
10529 | cat >> confdefs.h <<EOF | |
10530 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10531 | EOF | |
10532 | ||
10533 | fi | |
10534 | LIBICONV= | |
10535 | if test "$am_cv_lib_iconv" = yes; then | |
10536 | LIBICONV="-liconv" | |
10537 | fi | |
10538 | ||
10539 | ||
10540 | ||
c906108c SS |
10541 | trap '' 1 2 15 |
10542 | cat > confcache <<\EOF | |
10543 | # This file is a shell script that caches the results of configure | |
10544 | # tests run on this system so they can be shared between configure | |
10545 | # scripts and configure runs. It is not useful on other systems. | |
10546 | # If it contains results you don't want to keep, you may remove or edit it. | |
10547 | # | |
10548 | # By default, configure uses ./config.cache as the cache file, | |
10549 | # creating it if it does not exist already. You can give configure | |
10550 | # the --cache-file=FILE option to use a different cache file; that is | |
10551 | # what configure does when it calls configure scripts in | |
10552 | # subdirectories, so they share the cache. | |
10553 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10554 | # config.status only pays attention to the cache file if you give it the | |
10555 | # --recheck option to rerun configure. | |
10556 | # | |
10557 | EOF | |
10558 | # The following way of writing the cache mishandles newlines in values, | |
10559 | # but we know of no workaround that is simple, portable, and efficient. | |
10560 | # So, don't put newlines in cache variables' values. | |
10561 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10562 | # and sets the high bit in the cache file unless we assign to the vars. | |
10563 | (set) 2>&1 | | |
10564 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10565 | *ac_space=\ *) | |
10566 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10567 | # turns \\\\ into \\, and sed turns \\ into \). | |
10568 | sed -n \ | |
10569 | -e "s/'/'\\\\''/g" \ | |
10570 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10571 | ;; | |
10572 | *) | |
10573 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10574 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10575 | ;; | |
10576 | esac >> confcache | |
10577 | if cmp -s $cache_file confcache; then | |
10578 | : | |
10579 | else | |
10580 | if test -w $cache_file; then | |
10581 | echo "updating cache $cache_file" | |
10582 | cat confcache > $cache_file | |
10583 | else | |
10584 | echo "not updating unwritable cache $cache_file" | |
10585 | fi | |
10586 | fi | |
10587 | rm -f confcache | |
10588 | ||
10589 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10590 | ||
10591 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10592 | # Let make expand exec_prefix. | |
10593 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10594 | ||
10595 | # Any assignment to VPATH causes Sun make to only execute | |
10596 | # the first set of double-colon rules, so remove it if not needed. | |
10597 | # If there is a colon in the path, we need to keep it. | |
10598 | if test "x$srcdir" = x.; then | |
10599 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10600 | fi | |
10601 | ||
10602 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10603 | ||
10604 | DEFS=-DHAVE_CONFIG_H | |
10605 | ||
10606 | # Without the "./", some shells look in PATH for config.status. | |
10607 | : ${CONFIG_STATUS=./config.status} | |
10608 | ||
10609 | echo creating $CONFIG_STATUS | |
10610 | rm -f $CONFIG_STATUS | |
10611 | cat > $CONFIG_STATUS <<EOF | |
10612 | #! /bin/sh | |
10613 | # Generated automatically by configure. | |
10614 | # Run this file to recreate the current configuration. | |
10615 | # This directory was configured as follows, | |
10616 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10617 | # | |
10618 | # $0 $ac_configure_args | |
10619 | # | |
10620 | # Compiler output produced by configure, useful for debugging | |
10621 | # configure, is in ./config.log if it exists. | |
10622 | ||
10623 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10624 | for ac_option | |
10625 | do | |
10626 | case "\$ac_option" in | |
10627 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10628 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10629 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10630 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10631 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10632 | exit 0 ;; | |
10633 | -help | --help | --hel | --he | --h) | |
10634 | echo "\$ac_cs_usage"; exit 0 ;; | |
10635 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10636 | esac | |
10637 | done | |
10638 | ||
10639 | ac_given_srcdir=$srcdir | |
10640 | ac_given_INSTALL="$INSTALL" | |
10641 | ||
ed952ac5 | 10642 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10643 | EOF |
10644 | cat >> $CONFIG_STATUS <<EOF | |
10645 | ||
10646 | # Protect against being on the right side of a sed subst in config.status. | |
10647 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10648 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10649 | $ac_vpsub | |
10650 | $extrasub | |
10651 | s%@SHELL@%$SHELL%g | |
10652 | s%@CFLAGS@%$CFLAGS%g | |
10653 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10654 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10655 | s%@FFLAGS@%$FFLAGS%g | |
10656 | s%@DEFS@%$DEFS%g | |
10657 | s%@LDFLAGS@%$LDFLAGS%g | |
10658 | s%@LIBS@%$LIBS%g | |
10659 | s%@exec_prefix@%$exec_prefix%g | |
10660 | s%@prefix@%$prefix%g | |
10661 | s%@program_transform_name@%$program_transform_name%g | |
10662 | s%@bindir@%$bindir%g | |
10663 | s%@sbindir@%$sbindir%g | |
10664 | s%@libexecdir@%$libexecdir%g | |
10665 | s%@datadir@%$datadir%g | |
10666 | s%@sysconfdir@%$sysconfdir%g | |
10667 | s%@sharedstatedir@%$sharedstatedir%g | |
10668 | s%@localstatedir@%$localstatedir%g | |
10669 | s%@libdir@%$libdir%g | |
10670 | s%@includedir@%$includedir%g | |
10671 | s%@oldincludedir@%$oldincludedir%g | |
10672 | s%@infodir@%$infodir%g | |
10673 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10674 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10675 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10676 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10677 | s%@CC@%$CC%g |
10678 | s%@CPP@%$CPP%g | |
10679 | s%@host@%$host%g | |
10680 | s%@host_alias@%$host_alias%g | |
10681 | s%@host_cpu@%$host_cpu%g | |
10682 | s%@host_vendor@%$host_vendor%g | |
10683 | s%@host_os@%$host_os%g | |
10684 | s%@target@%$target%g | |
10685 | s%@target_alias@%$target_alias%g | |
10686 | s%@target_cpu@%$target_cpu%g | |
10687 | s%@target_vendor@%$target_vendor%g | |
10688 | s%@target_os@%$target_os%g | |
10689 | s%@build@%$build%g | |
10690 | s%@build_alias@%$build_alias%g | |
10691 | s%@build_cpu@%$build_cpu%g | |
10692 | s%@build_vendor@%$build_vendor%g | |
10693 | s%@build_os@%$build_os%g | |
c906108c | 10694 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10695 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10696 | s%@ALLOCA@%$ALLOCA%g |
10697 | s%@USE_NLS@%$USE_NLS%g | |
10698 | s%@MSGFMT@%$MSGFMT%g | |
10699 | s%@GMSGFMT@%$GMSGFMT%g | |
10700 | s%@XGETTEXT@%$XGETTEXT%g | |
10701 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10702 | s%@CATALOGS@%$CATALOGS%g | |
10703 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10704 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10705 | s%@GMOFILES@%$GMOFILES%g | |
10706 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10707 | s%@INTLDEPS@%$INTLDEPS%g | |
10708 | s%@INTLLIBS@%$INTLLIBS%g | |
10709 | s%@INTLOBJS@%$INTLOBJS%g | |
10710 | s%@POFILES@%$POFILES%g | |
10711 | s%@POSUB@%$POSUB%g | |
10712 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10713 | s%@GT_NO@%$GT_NO%g | |
10714 | s%@GT_YES@%$GT_YES%g | |
10715 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10716 | s%@l@%$l%g | |
8dcde887 | 10717 | s%@subdirs@%$subdirs%g |
7a292a7a | 10718 | s%@AWK@%$AWK%g |
c906108c SS |
10719 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10720 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10721 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10722 | s%@LN_S@%$LN_S%g |
10723 | s%@YACC@%$YACC%g | |
c906108c | 10724 | s%@AR@%$AR%g |
95ca63c4 CF |
10725 | s%@DLLTOOL@%$DLLTOOL%g |
10726 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10727 | s%@MIG@%$MIG%g |
c906108c | 10728 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
10729 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
10730 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 10731 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10732 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10733 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10734 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10735 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10736 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10737 | s%@LIBGUI@%$LIBGUI%g |
10738 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10739 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10740 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10741 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10742 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10743 | s%@TCL_CC@%$TCL_CC%g | |
10744 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10745 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10746 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10747 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10748 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10749 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10750 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10751 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
033afc63 | 10752 | s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g |
7a292a7a SS |
10753 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g |
10754 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10755 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10756 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10757 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10758 | s%@TK_VERSION@%$TK_VERSION%g | |
10759 | s%@TK_DEFS@%$TK_DEFS%g | |
10760 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10761 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10762 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10763 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10764 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10765 | s%@TCLHDIR@%$TCLHDIR%g | |
10766 | s%@TKHDIR@%$TKHDIR%g | |
10767 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10768 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10769 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10770 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10771 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10772 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10773 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10774 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10775 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10776 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10777 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10778 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10779 | s%@X_CFLAGS@%$X_CFLAGS%g |
10780 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10781 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10782 | s%@TCL_DEPS@%$TCL_DEPS%g |
10783 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10784 | s%@ITCLLIB@%$ITCLLIB%g |
10785 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10786 | s%@ITKLIB@%$ITKLIB%g | |
10787 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10788 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10789 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10790 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10791 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10792 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 10793 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 10794 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 10795 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 10796 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10797 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10798 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10799 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10800 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10801 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10802 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10803 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10804 | s%@target_subdir@%$target_subdir%g |
10805 | /@host_makefile_frag@/r $host_makefile_frag | |
10806 | s%@host_makefile_frag@%%g | |
10807 | /@target_makefile_frag@/r $target_makefile_frag | |
10808 | s%@target_makefile_frag@%%g | |
10809 | s%@frags@%$frags%g | |
5a2402b8 AC |
10810 | s%@xm_h@%$xm_h%g |
10811 | s%@tm_h@%$tm_h%g | |
10812 | s%@nm_h@%$nm_h%g | |
c906108c | 10813 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10814 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10815 | |
10816 | CEOF | |
10817 | EOF | |
10818 | ||
10819 | cat >> $CONFIG_STATUS <<\EOF | |
10820 | ||
10821 | # Split the substitutions into bite-sized pieces for seds with | |
10822 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10823 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10824 | ac_file=1 # Number of current file. |
10825 | ac_beg=1 # First line for current file. | |
10826 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10827 | ac_more_lines=: | |
10828 | ac_sed_cmds="" | |
10829 | while $ac_more_lines; do | |
10830 | if test $ac_beg -gt 1; then | |
10831 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10832 | else | |
10833 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10834 | fi | |
10835 | if test ! -s conftest.s$ac_file; then | |
10836 | ac_more_lines=false | |
10837 | rm -f conftest.s$ac_file | |
10838 | else | |
10839 | if test -z "$ac_sed_cmds"; then | |
10840 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10841 | else | |
10842 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10843 | fi | |
10844 | ac_file=`expr $ac_file + 1` | |
10845 | ac_beg=$ac_end | |
10846 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10847 | fi | |
10848 | done | |
10849 | if test -z "$ac_sed_cmds"; then | |
10850 | ac_sed_cmds=cat | |
10851 | fi | |
10852 | EOF | |
10853 | ||
10854 | cat >> $CONFIG_STATUS <<EOF | |
10855 | ||
ed952ac5 | 10856 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10857 | EOF |
10858 | cat >> $CONFIG_STATUS <<\EOF | |
10859 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10860 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10861 | case "$ac_file" in | |
10862 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10863 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10864 | *) ac_file_in="${ac_file}.in" ;; | |
10865 | esac | |
10866 | ||
10867 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10868 | ||
10869 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10870 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10871 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10872 | # The file is in a subdirectory. | |
10873 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10874 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10875 | # A "../" for each directory in $ac_dir_suffix. | |
10876 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10877 | else | |
10878 | ac_dir_suffix= ac_dots= | |
10879 | fi | |
10880 | ||
10881 | case "$ac_given_srcdir" in | |
10882 | .) srcdir=. | |
10883 | if test -z "$ac_dots"; then top_srcdir=. | |
10884 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10885 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10886 | *) # Relative path. | |
10887 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10888 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10889 | esac | |
10890 | ||
10891 | case "$ac_given_INSTALL" in | |
10892 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10893 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10894 | esac | |
10895 | ||
10896 | echo creating "$ac_file" | |
10897 | rm -f "$ac_file" | |
10898 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10899 | case "$ac_file" in | |
10900 | *Makefile*) ac_comsub="1i\\ | |
10901 | # $configure_input" ;; | |
10902 | *) ac_comsub= ;; | |
10903 | esac | |
10904 | ||
10905 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10906 | sed -e "$ac_comsub | |
10907 | s%@configure_input@%$configure_input%g | |
10908 | s%@srcdir@%$srcdir%g | |
10909 | s%@top_srcdir@%$top_srcdir%g | |
10910 | s%@INSTALL@%$INSTALL%g | |
10911 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10912 | fi; done | |
10913 | rm -f conftest.s* | |
10914 | ||
10915 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10916 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10917 | # | |
10918 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10919 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10920 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10921 | ac_dC='\3' | |
10922 | ac_dD='%g' | |
10923 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10924 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10925 | ac_uB='\([ ]\)%\1#\2define\3' | |
10926 | ac_uC=' ' | |
10927 | ac_uD='\4%g' | |
10928 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10929 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10930 | ac_eB='$%\1#\2define\3' | |
10931 | ac_eC=' ' | |
10932 | ac_eD='%g' | |
10933 | ||
10934 | if test "${CONFIG_HEADERS+set}" != set; then | |
10935 | EOF | |
10936 | cat >> $CONFIG_STATUS <<EOF | |
10937 | CONFIG_HEADERS="config.h:config.in" | |
10938 | EOF | |
10939 | cat >> $CONFIG_STATUS <<\EOF | |
10940 | fi | |
10941 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10942 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10943 | case "$ac_file" in | |
10944 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10945 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10946 | *) ac_file_in="${ac_file}.in" ;; | |
10947 | esac | |
10948 | ||
10949 | echo creating $ac_file | |
10950 | ||
10951 | rm -f conftest.frag conftest.in conftest.out | |
10952 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10953 | cat $ac_file_inputs > conftest.in | |
10954 | ||
10955 | EOF | |
10956 | ||
10957 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10958 | # the proper values into config.h.in to produce config.h. And first: | |
10959 | # Protect against being on the right side of a sed subst in config.status. | |
10960 | # Protect against being in an unquoted here document in config.status. | |
10961 | rm -f conftest.vals | |
10962 | cat > conftest.hdr <<\EOF | |
10963 | s/[\\&%]/\\&/g | |
10964 | s%[\\$`]%\\&%g | |
10965 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10966 | s%ac_d%ac_u%gp | |
10967 | s%ac_u%ac_e%gp | |
10968 | EOF | |
10969 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10970 | rm -f conftest.hdr | |
10971 | ||
10972 | # This sed command replaces #undef with comments. This is necessary, for | |
10973 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10974 | # on some systems where configure will not decide to define it. | |
10975 | cat >> conftest.vals <<\EOF | |
10976 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10977 | EOF | |
10978 | ||
10979 | # Break up conftest.vals because some shells have a limit on | |
10980 | # the size of here documents, and old seds have small limits too. | |
10981 | ||
10982 | rm -f conftest.tail | |
10983 | while : | |
10984 | do | |
10985 | ac_lines=`grep -c . conftest.vals` | |
10986 | # grep -c gives empty output for an empty file on some AIX systems. | |
10987 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10988 | # Write a limited-size here document to conftest.frag. | |
10989 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10990 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10991 | echo 'CEOF | |
10992 | sed -f conftest.frag conftest.in > conftest.out | |
10993 | rm -f conftest.in | |
10994 | mv conftest.out conftest.in | |
10995 | ' >> $CONFIG_STATUS | |
10996 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10997 | rm -f conftest.vals | |
10998 | mv conftest.tail conftest.vals | |
10999 | done | |
11000 | rm -f conftest.vals | |
11001 | ||
11002 | cat >> $CONFIG_STATUS <<\EOF | |
11003 | rm -f conftest.frag conftest.h | |
11004 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
11005 | cat conftest.in >> conftest.h | |
11006 | rm -f conftest.in | |
11007 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
11008 | echo "$ac_file is unchanged" | |
11009 | rm -f conftest.h | |
11010 | else | |
11011 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11012 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
11013 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
11014 | # The file is in a subdirectory. | |
11015 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
11016 | fi | |
11017 | rm -f $ac_file | |
11018 | mv conftest.h $ac_file | |
11019 | fi | |
11020 | fi; done | |
11021 | ||
11022 | EOF | |
11023 | ||
11024 | cat >> $CONFIG_STATUS <<EOF | |
11025 | ac_sources="$files" | |
11026 | ac_dests="$links" | |
11027 | EOF | |
11028 | ||
11029 | cat >> $CONFIG_STATUS <<\EOF | |
11030 | srcdir=$ac_given_srcdir | |
11031 | while test -n "$ac_sources"; do | |
11032 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
11033 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
11034 | ||
11035 | echo "linking $srcdir/$ac_source to $ac_dest" | |
11036 | ||
11037 | if test ! -r $srcdir/$ac_source; then | |
11038 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
11039 | fi | |
11040 | rm -f $ac_dest | |
11041 | ||
11042 | # Make relative symlinks. | |
11043 | # Remove last slash and all that follows it. Not all systems have dirname. | |
11044 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
11045 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
11046 | # The dest file is in a subdirectory. | |
11047 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
11048 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
11049 | # A "../" for each directory in $ac_dest_dir_suffix. | |
11050 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
11051 | else | |
11052 | ac_dest_dir_suffix= ac_dots= | |
11053 | fi | |
11054 | ||
11055 | case "$srcdir" in | |
11056 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
11057 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
11058 | esac | |
11059 | ||
11060 | # Make a symlink if possible; otherwise try a hard link. | |
11061 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
11062 | ln $srcdir/$ac_source $ac_dest; then : | |
11063 | else | |
11064 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
11065 | fi | |
11066 | done | |
11067 | EOF | |
11068 | cat >> $CONFIG_STATUS <<EOF | |
11069 | ||
11070 | gdb_host_cpu=$gdb_host_cpu | |
11071 | gdb_target_cpu=$gdb_target_cpu | |
11072 | nativefile=$nativefile | |
11073 | ||
11074 | EOF | |
11075 | cat >> $CONFIG_STATUS <<\EOF | |
11076 | ||
7ee6d7eb | 11077 | if test "${nativefile}" = ""; then |
c4620205 | 11078 | < Makefile \ |
e27da16d JT |
11079 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
11080 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
11081 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
11082 | > Makefile.tem | |
c906108c SS |
11083 | mv -f Makefile.tem Makefile |
11084 | fi | |
11085 | ||
11086 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
11087 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
11088 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
11089 | mv -f Makefile.tmp Makefile | |
11090 | ||
2acceee2 | 11091 | |
c906108c SS |
11092 | case x$CONFIG_HEADERS in |
11093 | xconfig.h:config.in) | |
11094 | echo > stamp-h ;; | |
11095 | esac | |
11096 | ||
11097 | exit 0 | |
11098 | EOF | |
11099 | chmod +x $CONFIG_STATUS | |
11100 | rm -fr confdefs* $ac_clean_files | |
11101 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
11102 | ||
11103 | if test "$no_recursion" != yes; then | |
11104 | ||
11105 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
11106 | ac_sub_configure_args= | |
11107 | ac_prev= | |
11108 | for ac_arg in $ac_configure_args; do | |
11109 | if test -n "$ac_prev"; then | |
11110 | ac_prev= | |
11111 | continue | |
11112 | fi | |
11113 | case "$ac_arg" in | |
11114 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
11115 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
11116 | ac_prev=cache_file ;; | |
11117 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
11118 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
11119 | ;; | |
11120 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
11121 | ac_prev=srcdir ;; | |
11122 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
11123 | ;; | |
11124 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
11125 | esac | |
11126 | done | |
11127 | ||
8dcde887 | 11128 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
11129 | |
11130 | # Do not complain, so a configure script can configure whichever | |
11131 | # parts of a large source tree are present. | |
11132 | if test ! -d $srcdir/$ac_config_dir; then | |
11133 | continue | |
11134 | fi | |
11135 | ||
11136 | echo configuring in $ac_config_dir | |
11137 | ||
11138 | case "$srcdir" in | |
11139 | .) ;; | |
11140 | *) | |
11141 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
11142 | else | |
11143 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
11144 | fi | |
11145 | ;; | |
11146 | esac | |
11147 | ||
11148 | ac_popdir=`pwd` | |
11149 | cd $ac_config_dir | |
11150 | ||
11151 | # A "../" for each directory in /$ac_config_dir. | |
11152 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
11153 | ||
11154 | case "$srcdir" in | |
11155 | .) # No --srcdir option. We are building in place. | |
11156 | ac_sub_srcdir=$srcdir ;; | |
11157 | /*) # Absolute path. | |
11158 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
11159 | *) # Relative path. | |
11160 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
11161 | esac | |
11162 | ||
11163 | # Check for guested configure; otherwise get Cygnus style configure. | |
11164 | if test -f $ac_sub_srcdir/configure; then | |
11165 | ac_sub_configure=$ac_sub_srcdir/configure | |
11166 | elif test -f $ac_sub_srcdir/configure.in; then | |
11167 | ac_sub_configure=$ac_configure | |
11168 | else | |
11169 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
11170 | ac_sub_configure= | |
11171 | fi | |
11172 | ||
11173 | # The recursion is here. | |
11174 | if test -n "$ac_sub_configure"; then | |
11175 | ||
11176 | # Make the cache file name correct relative to the subdirectory. | |
11177 | case "$cache_file" in | |
11178 | /*) ac_sub_cache_file=$cache_file ;; | |
11179 | *) # Relative path. | |
11180 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
11181 | esac | |
11182 | case "$ac_given_INSTALL" in | |
11183 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
11184 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
11185 | esac | |
11186 | ||
11187 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
11188 | # The eval makes quoting arguments work. | |
11189 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
11190 | then : | |
11191 | else | |
11192 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
11193 | fi | |
11194 | fi | |
11195 | ||
11196 | cd $ac_popdir | |
11197 | done | |
11198 | fi | |
11199 | ||
11200 | ||
11201 | exit 0 |