Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
96baa820 JM |
21 | ac_help="$ac_help |
22 | --enable-multi-ice Build the multi-ice-gdb-server" | |
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)" | |
29 | ac_help="$ac_help | |
30 | --without-included-regex don't use included regex; this is the default | |
31 | on systems with version 2 of the GNU C library | |
32 | (use with caution on other system)" | |
c906108c SS |
33 | ac_help="$ac_help |
34 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
35 | ac_help="$ac_help |
36 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
39 | ac_help="$ac_help |
40 | --enable-gdbtk Enable GDBTK GUI front end" | |
41 | ac_help="$ac_help | |
42 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
43 | ac_help="$ac_help | |
44 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
45 | ac_help="$ac_help | |
46 | --with-tclinclude=DIR Directory where tcl private headers are" | |
47 | ac_help="$ac_help | |
48 | --with-tkinclude=DIR Directory where tk private headers are" | |
49 | ac_help="$ac_help | |
50 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
51 | ac_help="$ac_help | |
52 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
53 | ac_help="$ac_help |
54 | --with-x use the X Window System" | |
7a292a7a SS |
55 | ac_help="$ac_help |
56 | --enable-sim Link gdb with simulator" | |
c906108c SS |
57 | ac_help="$ac_help |
58 | --enable-shared Use shared libraries" | |
234b45d4 KB |
59 | ac_help="$ac_help |
60 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
61 | |
62 | # Initialize some variables set by options. | |
63 | # The variables have the same names as the options, with | |
64 | # dashes changed to underlines. | |
65 | build=NONE | |
66 | cache_file=./config.cache | |
67 | exec_prefix=NONE | |
68 | host=NONE | |
69 | no_create= | |
70 | nonopt=NONE | |
71 | no_recursion= | |
72 | prefix=NONE | |
73 | program_prefix=NONE | |
74 | program_suffix=NONE | |
75 | program_transform_name=s,x,x, | |
76 | silent= | |
77 | site= | |
c41b7eb1 | 78 | sitefile= |
c906108c SS |
79 | srcdir= |
80 | target=NONE | |
81 | verbose= | |
82 | x_includes=NONE | |
83 | x_libraries=NONE | |
84 | bindir='${exec_prefix}/bin' | |
85 | sbindir='${exec_prefix}/sbin' | |
86 | libexecdir='${exec_prefix}/libexec' | |
87 | datadir='${prefix}/share' | |
88 | sysconfdir='${prefix}/etc' | |
89 | sharedstatedir='${prefix}/com' | |
90 | localstatedir='${prefix}/var' | |
91 | libdir='${exec_prefix}/lib' | |
92 | includedir='${prefix}/include' | |
93 | oldincludedir='/usr/include' | |
94 | infodir='${prefix}/info' | |
95 | mandir='${prefix}/man' | |
96 | ||
97 | # Initialize some other variables. | |
98 | subdirs= | |
99 | MFLAGS= MAKEFLAGS= | |
100 | SHELL=${CONFIG_SHELL-/bin/sh} | |
101 | # Maximum number of lines to put in a shell here document. | |
102 | ac_max_here_lines=12 | |
103 | ||
104 | ac_prev= | |
105 | for ac_option | |
106 | do | |
107 | ||
108 | # If the previous option needs an argument, assign it. | |
109 | if test -n "$ac_prev"; then | |
110 | eval "$ac_prev=\$ac_option" | |
111 | ac_prev= | |
112 | continue | |
113 | fi | |
114 | ||
115 | case "$ac_option" in | |
116 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
117 | *) ac_optarg= ;; | |
118 | esac | |
119 | ||
120 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
121 | ||
122 | case "$ac_option" in | |
123 | ||
124 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
125 | ac_prev=bindir ;; | |
126 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
127 | bindir="$ac_optarg" ;; | |
128 | ||
129 | -build | --build | --buil | --bui | --bu) | |
130 | ac_prev=build ;; | |
131 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
132 | build="$ac_optarg" ;; | |
133 | ||
134 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
135 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
136 | ac_prev=cache_file ;; | |
137 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
138 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
139 | cache_file="$ac_optarg" ;; | |
140 | ||
141 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
142 | ac_prev=datadir ;; | |
143 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
144 | | --da=*) | |
145 | datadir="$ac_optarg" ;; | |
146 | ||
147 | -disable-* | --disable-*) | |
148 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
149 | # Reject names that are not valid shell variable names. | |
150 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
151 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
152 | fi | |
153 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
154 | eval "enable_${ac_feature}=no" ;; | |
155 | ||
156 | -enable-* | --enable-*) | |
157 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
158 | # Reject names that are not valid shell variable names. | |
159 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
160 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
161 | fi | |
162 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
163 | case "$ac_option" in | |
164 | *=*) ;; | |
165 | *) ac_optarg=yes ;; | |
166 | esac | |
167 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
168 | ||
169 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
170 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
171 | | --exec | --exe | --ex) | |
172 | ac_prev=exec_prefix ;; | |
173 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
174 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
175 | | --exec=* | --exe=* | --ex=*) | |
176 | exec_prefix="$ac_optarg" ;; | |
177 | ||
178 | -gas | --gas | --ga | --g) | |
179 | # Obsolete; use --with-gas. | |
180 | with_gas=yes ;; | |
181 | ||
182 | -help | --help | --hel | --he) | |
183 | # Omit some internal or obsolete options to make the list less imposing. | |
184 | # This message is too long to be a string in the A/UX 3.1 sh. | |
185 | cat << EOF | |
186 | Usage: configure [options] [host] | |
187 | Options: [defaults in brackets after descriptions] | |
188 | Configuration: | |
189 | --cache-file=FILE cache test results in FILE | |
190 | --help print this message | |
191 | --no-create do not create output files | |
192 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 193 | --site-file=FILE use FILE as the site file |
c906108c SS |
194 | --version print the version of autoconf that created configure |
195 | Directory and file names: | |
196 | --prefix=PREFIX install architecture-independent files in PREFIX | |
197 | [$ac_default_prefix] | |
198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
199 | [same as prefix] | |
200 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
203 | --datadir=DIR read-only architecture-independent data in DIR | |
204 | [PREFIX/share] | |
205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
207 | [PREFIX/com] | |
208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
210 | --includedir=DIR C header files in DIR [PREFIX/include] | |
211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
212 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
213 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
214 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
215 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
216 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
217 | --program-transform-name=PROGRAM | |
218 | run sed PROGRAM on installed program names | |
219 | EOF | |
220 | cat << EOF | |
221 | Host type: | |
222 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
223 | --host=HOST configure for HOST [guessed] | |
224 | --target=TARGET configure for TARGET [TARGET=HOST] | |
225 | Features and packages: | |
226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
230 | --x-includes=DIR X include files are in DIR | |
231 | --x-libraries=DIR X library files are in DIR | |
232 | EOF | |
233 | if test -n "$ac_help"; then | |
234 | echo "--enable and --with options recognized:$ac_help" | |
235 | fi | |
236 | exit 0 ;; | |
237 | ||
238 | -host | --host | --hos | --ho) | |
239 | ac_prev=host ;; | |
240 | -host=* | --host=* | --hos=* | --ho=*) | |
241 | host="$ac_optarg" ;; | |
242 | ||
243 | -includedir | --includedir | --includedi | --included | --include \ | |
244 | | --includ | --inclu | --incl | --inc) | |
245 | ac_prev=includedir ;; | |
246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
247 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
248 | includedir="$ac_optarg" ;; | |
249 | ||
250 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
251 | ac_prev=infodir ;; | |
252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
253 | infodir="$ac_optarg" ;; | |
254 | ||
255 | -libdir | --libdir | --libdi | --libd) | |
256 | ac_prev=libdir ;; | |
257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
258 | libdir="$ac_optarg" ;; | |
259 | ||
260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
261 | | --libexe | --libex | --libe) | |
262 | ac_prev=libexecdir ;; | |
263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
264 | | --libexe=* | --libex=* | --libe=*) | |
265 | libexecdir="$ac_optarg" ;; | |
266 | ||
267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
268 | | --localstate | --localstat | --localsta | --localst \ | |
269 | | --locals | --local | --loca | --loc | --lo) | |
270 | ac_prev=localstatedir ;; | |
271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
274 | localstatedir="$ac_optarg" ;; | |
275 | ||
276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
277 | ac_prev=mandir ;; | |
278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
279 | mandir="$ac_optarg" ;; | |
280 | ||
281 | -nfp | --nfp | --nf) | |
282 | # Obsolete; use --without-fp. | |
283 | with_fp=no ;; | |
284 | ||
285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
286 | | --no-cr | --no-c) | |
287 | no_create=yes ;; | |
288 | ||
289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
291 | no_recursion=yes ;; | |
292 | ||
293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
295 | | --oldin | --oldi | --old | --ol | --o) | |
296 | ac_prev=oldincludedir ;; | |
297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
300 | oldincludedir="$ac_optarg" ;; | |
301 | ||
302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
303 | ac_prev=prefix ;; | |
304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
305 | prefix="$ac_optarg" ;; | |
306 | ||
307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
308 | | --program-pre | --program-pr | --program-p) | |
309 | ac_prev=program_prefix ;; | |
310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
312 | program_prefix="$ac_optarg" ;; | |
313 | ||
314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
315 | | --program-suf | --program-su | --program-s) | |
316 | ac_prev=program_suffix ;; | |
317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
319 | program_suffix="$ac_optarg" ;; | |
320 | ||
321 | -program-transform-name | --program-transform-name \ | |
322 | | --program-transform-nam | --program-transform-na \ | |
323 | | --program-transform-n | --program-transform- \ | |
324 | | --program-transform | --program-transfor \ | |
325 | | --program-transfo | --program-transf \ | |
326 | | --program-trans | --program-tran \ | |
327 | | --progr-tra | --program-tr | --program-t) | |
328 | ac_prev=program_transform_name ;; | |
329 | -program-transform-name=* | --program-transform-name=* \ | |
330 | | --program-transform-nam=* | --program-transform-na=* \ | |
331 | | --program-transform-n=* | --program-transform-=* \ | |
332 | | --program-transform=* | --program-transfor=* \ | |
333 | | --program-transfo=* | --program-transf=* \ | |
334 | | --program-trans=* | --program-tran=* \ | |
335 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
336 | program_transform_name="$ac_optarg" ;; | |
337 | ||
338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
339 | | -silent | --silent | --silen | --sile | --sil) | |
340 | silent=yes ;; | |
341 | ||
342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
343 | ac_prev=sbindir ;; | |
344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
345 | | --sbi=* | --sb=*) | |
346 | sbindir="$ac_optarg" ;; | |
347 | ||
348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
350 | | --sharedst | --shareds | --shared | --share | --shar \ | |
351 | | --sha | --sh) | |
352 | ac_prev=sharedstatedir ;; | |
353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
356 | | --sha=* | --sh=*) | |
357 | sharedstatedir="$ac_optarg" ;; | |
358 | ||
359 | -site | --site | --sit) | |
360 | ac_prev=site ;; | |
361 | -site=* | --site=* | --sit=*) | |
362 | site="$ac_optarg" ;; | |
363 | ||
c41b7eb1 JB |
364 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
365 | ac_prev=sitefile ;; | |
366 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
367 | sitefile="$ac_optarg" ;; | |
368 | ||
c906108c SS |
369 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
370 | ac_prev=srcdir ;; | |
371 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
372 | srcdir="$ac_optarg" ;; | |
373 | ||
374 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
375 | | --syscon | --sysco | --sysc | --sys | --sy) | |
376 | ac_prev=sysconfdir ;; | |
377 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
378 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
379 | sysconfdir="$ac_optarg" ;; | |
380 | ||
381 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
382 | ac_prev=target ;; | |
383 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
384 | target="$ac_optarg" ;; | |
385 | ||
386 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
387 | verbose=yes ;; | |
388 | ||
389 | -version | --version | --versio | --versi | --vers) | |
390 | echo "configure generated by autoconf version 2.13" | |
391 | exit 0 ;; | |
392 | ||
393 | -with-* | --with-*) | |
394 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
395 | # Reject names that are not valid shell variable names. | |
396 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
397 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
398 | fi | |
399 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
400 | case "$ac_option" in | |
401 | *=*) ;; | |
402 | *) ac_optarg=yes ;; | |
403 | esac | |
404 | eval "with_${ac_package}='$ac_optarg'" ;; | |
405 | ||
406 | -without-* | --without-*) | |
407 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
408 | # Reject names that are not valid shell variable names. | |
409 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
410 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
411 | fi | |
412 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
413 | eval "with_${ac_package}=no" ;; | |
414 | ||
415 | --x) | |
416 | # Obsolete; use --with-x. | |
417 | with_x=yes ;; | |
418 | ||
419 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
420 | | --x-incl | --x-inc | --x-in | --x-i) | |
421 | ac_prev=x_includes ;; | |
422 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
423 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
424 | x_includes="$ac_optarg" ;; | |
425 | ||
426 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
427 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
428 | ac_prev=x_libraries ;; | |
429 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
430 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
431 | x_libraries="$ac_optarg" ;; | |
432 | ||
433 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
434 | ;; | |
435 | ||
436 | *) | |
437 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
438 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
439 | fi | |
440 | if test "x$nonopt" != xNONE; then | |
441 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
442 | fi | |
443 | nonopt="$ac_option" | |
444 | ;; | |
445 | ||
446 | esac | |
447 | done | |
448 | ||
449 | if test -n "$ac_prev"; then | |
450 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
451 | fi | |
452 | ||
453 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
454 | ||
455 | # File descriptor usage: | |
456 | # 0 standard input | |
457 | # 1 file creation | |
458 | # 2 errors and warnings | |
459 | # 3 some systems may open it to /dev/tty | |
460 | # 4 used on the Kubota Titan | |
461 | # 6 checking for... messages and results | |
462 | # 5 compiler messages saved in config.log | |
463 | if test "$silent" = yes; then | |
464 | exec 6>/dev/null | |
465 | else | |
466 | exec 6>&1 | |
467 | fi | |
468 | exec 5>./config.log | |
469 | ||
470 | echo "\ | |
471 | This file contains any messages produced by compilers while | |
472 | running configure, to aid debugging if configure makes a mistake. | |
473 | " 1>&5 | |
474 | ||
475 | # Strip out --no-create and --no-recursion so they do not pile up. | |
476 | # Also quote any args containing shell metacharacters. | |
477 | ac_configure_args= | |
478 | for ac_arg | |
479 | do | |
480 | case "$ac_arg" in | |
481 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
482 | | --no-cr | --no-c) ;; | |
483 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
484 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
485 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
486 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
487 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
488 | esac | |
489 | done | |
490 | ||
491 | # NLS nuisances. | |
492 | # Only set these to C if already set. These must not be set unconditionally | |
493 | # because not all systems understand e.g. LANG=C (notably SCO). | |
494 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
495 | # Non-C LC_CTYPE values break the ctype check. | |
496 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
497 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
498 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
499 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
500 | ||
501 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
502 | rm -rf conftest* confdefs.h | |
503 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
504 | echo > confdefs.h | |
505 | ||
506 | # A filename unique to this package, relative to the directory that | |
507 | # configure is in, which we can look for to find out if srcdir is correct. | |
508 | ac_unique_file=main.c | |
509 | ||
510 | # Find the source files, if location was not specified. | |
511 | if test -z "$srcdir"; then | |
512 | ac_srcdir_defaulted=yes | |
513 | # Try the directory containing this script, then its parent. | |
514 | ac_prog=$0 | |
515 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
516 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
517 | srcdir=$ac_confdir | |
518 | if test ! -r $srcdir/$ac_unique_file; then | |
519 | srcdir=.. | |
520 | fi | |
521 | else | |
522 | ac_srcdir_defaulted=no | |
523 | fi | |
524 | if test ! -r $srcdir/$ac_unique_file; then | |
525 | if test "$ac_srcdir_defaulted" = yes; then | |
526 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
527 | else | |
528 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
529 | fi | |
530 | fi | |
531 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
532 | ||
533 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
534 | if test -z "$sitefile"; then |
535 | if test -z "$CONFIG_SITE"; then | |
536 | if test "x$prefix" != xNONE; then | |
537 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
538 | else | |
539 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
540 | fi | |
c906108c | 541 | fi |
c41b7eb1 JB |
542 | else |
543 | CONFIG_SITE="$sitefile" | |
c906108c SS |
544 | fi |
545 | for ac_site_file in $CONFIG_SITE; do | |
546 | if test -r "$ac_site_file"; then | |
547 | echo "loading site script $ac_site_file" | |
548 | . "$ac_site_file" | |
549 | fi | |
550 | done | |
551 | ||
552 | if test -r "$cache_file"; then | |
553 | echo "loading cache $cache_file" | |
554 | . $cache_file | |
555 | else | |
556 | echo "creating cache $cache_file" | |
557 | > $cache_file | |
558 | fi | |
559 | ||
560 | ac_ext=c | |
561 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
562 | ac_cpp='$CPP $CPPFLAGS' | |
563 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
564 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
565 | cross_compiling=$ac_cv_prog_cc_cross | |
566 | ||
567 | ac_exeext= | |
568 | ac_objext=o | |
569 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
570 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
571 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
572 | ac_n= ac_c=' | |
573 | ' ac_t=' ' | |
574 | else | |
575 | ac_n=-n ac_c= ac_t= | |
576 | fi | |
577 | else | |
578 | ac_n= ac_c='\c' ac_t= | |
579 | fi | |
580 | ||
581 | ||
582 | ||
413ccac7 | 583 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
91151a06 | 584 | echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
585 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
586 | if test "${enable_maintainer_mode+set}" = set; then | |
587 | enableval="$enable_maintainer_mode" | |
588 | USE_MAINTAINER_MODE=$enableval | |
589 | else | |
590 | USE_MAINTAINER_MODE=no | |
591 | fi | |
592 | ||
593 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
594 | ||
595 | ||
596 | if test $USE_MAINTAINER_MODE = yes; then | |
597 | MAINTAINER_MODE_TRUE= | |
598 | MAINTAINER_MODE_FALSE='#' | |
599 | else | |
600 | MAINTAINER_MODE_TRUE='#' | |
601 | MAINTAINER_MODE_FALSE= | |
602 | fi | |
603 | MAINT=$MAINTAINER_MODE_TRUE | |
604 | ||
605 | ||
c906108c SS |
606 | |
607 | # Extract the first word of "gcc", so it can be a program name with args. | |
608 | set dummy gcc; ac_word=$2 | |
609 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 610 | echo "configure:611: checking for $ac_word" >&5 |
c906108c SS |
611 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
613 | else | |
614 | if test -n "$CC"; then | |
615 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
616 | else | |
617 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
618 | ac_dummy="$PATH" | |
619 | for ac_dir in $ac_dummy; do | |
620 | test -z "$ac_dir" && ac_dir=. | |
621 | if test -f $ac_dir/$ac_word; then | |
622 | ac_cv_prog_CC="gcc" | |
623 | break | |
624 | fi | |
625 | done | |
626 | IFS="$ac_save_ifs" | |
627 | fi | |
628 | fi | |
629 | CC="$ac_cv_prog_CC" | |
630 | if test -n "$CC"; then | |
631 | echo "$ac_t""$CC" 1>&6 | |
632 | else | |
633 | echo "$ac_t""no" 1>&6 | |
634 | fi | |
635 | ||
636 | if test -z "$CC"; then | |
637 | # Extract the first word of "cc", so it can be a program name with args. | |
638 | set dummy cc; ac_word=$2 | |
639 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 640 | echo "configure:641: checking for $ac_word" >&5 |
c906108c SS |
641 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
642 | echo $ac_n "(cached) $ac_c" 1>&6 | |
643 | else | |
644 | if test -n "$CC"; then | |
645 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
646 | else | |
647 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
648 | ac_prog_rejected=no | |
649 | ac_dummy="$PATH" | |
650 | for ac_dir in $ac_dummy; do | |
651 | test -z "$ac_dir" && ac_dir=. | |
652 | if test -f $ac_dir/$ac_word; then | |
653 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
654 | ac_prog_rejected=yes | |
655 | continue | |
656 | fi | |
657 | ac_cv_prog_CC="cc" | |
658 | break | |
659 | fi | |
660 | done | |
661 | IFS="$ac_save_ifs" | |
662 | if test $ac_prog_rejected = yes; then | |
663 | # We found a bogon in the path, so make sure we never use it. | |
664 | set dummy $ac_cv_prog_CC | |
665 | shift | |
666 | if test $# -gt 0; then | |
667 | # We chose a different compiler from the bogus one. | |
668 | # However, it has the same basename, so the bogon will be chosen | |
669 | # first if we set CC to just the basename; use the full file name. | |
670 | shift | |
671 | set dummy "$ac_dir/$ac_word" "$@" | |
672 | shift | |
673 | ac_cv_prog_CC="$@" | |
674 | fi | |
675 | fi | |
676 | fi | |
677 | fi | |
678 | CC="$ac_cv_prog_CC" | |
679 | if test -n "$CC"; then | |
680 | echo "$ac_t""$CC" 1>&6 | |
681 | else | |
682 | echo "$ac_t""no" 1>&6 | |
683 | fi | |
684 | ||
685 | if test -z "$CC"; then | |
686 | case "`uname -s`" in | |
687 | *win32* | *WIN32*) | |
688 | # Extract the first word of "cl", so it can be a program name with args. | |
689 | set dummy cl; ac_word=$2 | |
690 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 691 | echo "configure:692: checking for $ac_word" >&5 |
c906108c SS |
692 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
694 | else | |
695 | if test -n "$CC"; then | |
696 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
697 | else | |
698 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
699 | ac_dummy="$PATH" | |
700 | for ac_dir in $ac_dummy; do | |
701 | test -z "$ac_dir" && ac_dir=. | |
702 | if test -f $ac_dir/$ac_word; then | |
703 | ac_cv_prog_CC="cl" | |
704 | break | |
705 | fi | |
706 | done | |
707 | IFS="$ac_save_ifs" | |
708 | fi | |
709 | fi | |
710 | CC="$ac_cv_prog_CC" | |
711 | if test -n "$CC"; then | |
712 | echo "$ac_t""$CC" 1>&6 | |
713 | else | |
714 | echo "$ac_t""no" 1>&6 | |
715 | fi | |
716 | ;; | |
717 | esac | |
718 | fi | |
719 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
720 | fi | |
721 | ||
722 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
91151a06 | 723 | echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
724 | |
725 | ac_ext=c | |
726 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
727 | ac_cpp='$CPP $CPPFLAGS' | |
728 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
729 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
730 | cross_compiling=$ac_cv_prog_cc_cross | |
731 | ||
732 | cat > conftest.$ac_ext << EOF | |
733 | ||
91151a06 | 734 | #line 735 "configure" |
c906108c SS |
735 | #include "confdefs.h" |
736 | ||
737 | main(){return(0);} | |
738 | EOF | |
91151a06 | 739 | if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
740 | ac_cv_prog_cc_works=yes |
741 | # If we can't run a trivial program, we are probably using a cross compiler. | |
742 | if (./conftest; exit) 2>/dev/null; then | |
743 | ac_cv_prog_cc_cross=no | |
744 | else | |
745 | ac_cv_prog_cc_cross=yes | |
746 | fi | |
747 | else | |
748 | echo "configure: failed program was:" >&5 | |
749 | cat conftest.$ac_ext >&5 | |
750 | ac_cv_prog_cc_works=no | |
751 | fi | |
752 | rm -fr conftest* | |
753 | ac_ext=c | |
754 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
755 | ac_cpp='$CPP $CPPFLAGS' | |
756 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
757 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
758 | cross_compiling=$ac_cv_prog_cc_cross | |
759 | ||
760 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
761 | if test $ac_cv_prog_cc_works = no; then | |
762 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
763 | fi | |
764 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
91151a06 | 765 | echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
766 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
767 | cross_compiling=$ac_cv_prog_cc_cross | |
768 | ||
769 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
91151a06 | 770 | echo "configure:771: checking whether we are using GNU C" >&5 |
c906108c SS |
771 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftest.c <<EOF | |
775 | #ifdef __GNUC__ | |
776 | yes; | |
777 | #endif | |
778 | EOF | |
91151a06 | 779 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
780 | ac_cv_prog_gcc=yes |
781 | else | |
782 | ac_cv_prog_gcc=no | |
783 | fi | |
784 | fi | |
785 | ||
786 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
787 | ||
788 | if test $ac_cv_prog_gcc = yes; then | |
789 | GCC=yes | |
790 | else | |
791 | GCC= | |
792 | fi | |
793 | ||
794 | ac_test_CFLAGS="${CFLAGS+set}" | |
795 | ac_save_CFLAGS="$CFLAGS" | |
796 | CFLAGS= | |
797 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
91151a06 | 798 | echo "configure:799: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
799 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
801 | else | |
802 | echo 'void f(){}' > conftest.c | |
803 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
804 | ac_cv_prog_cc_g=yes | |
805 | else | |
806 | ac_cv_prog_cc_g=no | |
807 | fi | |
808 | rm -f conftest* | |
809 | ||
810 | fi | |
811 | ||
812 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
813 | if test "$ac_test_CFLAGS" = set; then | |
814 | CFLAGS="$ac_save_CFLAGS" | |
815 | elif test $ac_cv_prog_cc_g = yes; then | |
816 | if test "$GCC" = yes; then | |
817 | CFLAGS="-g -O2" | |
818 | else | |
819 | CFLAGS="-g" | |
820 | fi | |
821 | else | |
822 | if test "$GCC" = yes; then | |
823 | CFLAGS="-O2" | |
824 | else | |
825 | CFLAGS= | |
826 | fi | |
827 | fi | |
828 | ||
829 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
91151a06 | 830 | echo "configure:831: checking how to run the C preprocessor" >&5 |
c906108c SS |
831 | # On Suns, sometimes $CPP names a directory. |
832 | if test -n "$CPP" && test -d "$CPP"; then | |
833 | CPP= | |
834 | fi | |
835 | if test -z "$CPP"; then | |
836 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
838 | else | |
839 | # This must be in double quotes, not single quotes, because CPP may get | |
840 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
841 | CPP="${CC-cc} -E" | |
842 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
843 | # not just through cpp. | |
844 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 845 | #line 846 "configure" |
c906108c SS |
846 | #include "confdefs.h" |
847 | #include <assert.h> | |
848 | Syntax Error | |
849 | EOF | |
850 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 851 | { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
852 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
853 | if test -z "$ac_err"; then | |
854 | : | |
855 | else | |
856 | echo "$ac_err" >&5 | |
857 | echo "configure: failed program was:" >&5 | |
858 | cat conftest.$ac_ext >&5 | |
859 | rm -rf conftest* | |
860 | CPP="${CC-cc} -E -traditional-cpp" | |
861 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 862 | #line 863 "configure" |
c906108c SS |
863 | #include "confdefs.h" |
864 | #include <assert.h> | |
865 | Syntax Error | |
866 | EOF | |
867 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 868 | { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
869 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
870 | if test -z "$ac_err"; then | |
871 | : | |
872 | else | |
873 | echo "$ac_err" >&5 | |
874 | echo "configure: failed program was:" >&5 | |
875 | cat conftest.$ac_ext >&5 | |
876 | rm -rf conftest* | |
877 | CPP="${CC-cc} -nologo -E" | |
878 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 879 | #line 880 "configure" |
c906108c SS |
880 | #include "confdefs.h" |
881 | #include <assert.h> | |
882 | Syntax Error | |
883 | EOF | |
884 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 885 | { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
886 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
887 | if test -z "$ac_err"; then | |
888 | : | |
889 | else | |
890 | echo "$ac_err" >&5 | |
891 | echo "configure: failed program was:" >&5 | |
892 | cat conftest.$ac_ext >&5 | |
893 | rm -rf conftest* | |
894 | CPP=/lib/cpp | |
895 | fi | |
896 | rm -f conftest* | |
897 | fi | |
898 | rm -f conftest* | |
899 | fi | |
900 | rm -f conftest* | |
901 | ac_cv_prog_CPP="$CPP" | |
902 | fi | |
903 | CPP="$ac_cv_prog_CPP" | |
904 | else | |
905 | ac_cv_prog_CPP="$CPP" | |
906 | fi | |
907 | echo "$ac_t""$CPP" 1>&6 | |
908 | ||
909 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
91151a06 | 910 | echo "configure:911: checking for AIX" >&5 |
c906108c | 911 | cat > conftest.$ac_ext <<EOF |
91151a06 | 912 | #line 913 "configure" |
c906108c SS |
913 | #include "confdefs.h" |
914 | #ifdef _AIX | |
915 | yes | |
916 | #endif | |
917 | ||
918 | EOF | |
919 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
920 | egrep "yes" >/dev/null 2>&1; then | |
921 | rm -rf conftest* | |
922 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
923 | #define _ALL_SOURCE 1 | |
924 | EOF | |
925 | ||
926 | else | |
927 | rm -rf conftest* | |
928 | echo "$ac_t""no" 1>&6 | |
929 | fi | |
930 | rm -f conftest* | |
931 | ||
932 | ||
56157b4a | 933 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
91151a06 | 934 | echo "configure:935: checking for POSIXized ISC" >&5 |
56157b4a AC |
935 | if test -d /etc/conf/kconfig.d && |
936 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
937 | then | |
938 | echo "$ac_t""yes" 1>&6 | |
939 | ISC=yes # If later tests want to check for ISC. | |
940 | cat >> confdefs.h <<\EOF | |
941 | #define _POSIX_SOURCE 1 | |
c906108c SS |
942 | EOF |
943 | ||
56157b4a AC |
944 | if test "$GCC" = yes; then |
945 | CC="$CC -posix" | |
946 | else | |
947 | CC="$CC -Xp" | |
948 | fi | |
c906108c SS |
949 | else |
950 | echo "$ac_t""no" 1>&6 | |
56157b4a | 951 | ISC= |
c906108c SS |
952 | fi |
953 | ||
954 | ||
955 | ||
956 | ||
957 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
91151a06 | 958 | echo "configure:959: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
959 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
961 | else | |
962 | am_cv_prog_cc_stdc=no | |
963 | ac_save_CC="$CC" | |
964 | # Don't try gcc -ansi; that turns off useful extensions and | |
965 | # breaks some systems' header files. | |
966 | # AIX -qlanglvl=ansi | |
967 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
968 | # HP-UX 10.20 and later -Ae |
969 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 970 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 971 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
972 | do |
973 | CC="$ac_save_CC $ac_arg" | |
974 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 975 | #line 976 "configure" |
c906108c SS |
976 | #include "confdefs.h" |
977 | #include <stdarg.h> | |
978 | #include <stdio.h> | |
979 | #include <sys/types.h> | |
980 | #include <sys/stat.h> | |
981 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
982 | struct buf { int x; }; | |
983 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
984 | static char *e (p, i) | |
985 | char **p; | |
986 | int i; | |
987 | { | |
988 | return p[i]; | |
989 | } | |
990 | static char *f (char * (*g) (char **, int), char **p, ...) | |
991 | { | |
992 | char *s; | |
993 | va_list v; | |
994 | va_start (v,p); | |
995 | s = g (p, va_arg (v,int)); | |
996 | va_end (v); | |
997 | return s; | |
998 | } | |
999 | int test (int i, double x); | |
1000 | struct s1 {int (*f) (int a);}; | |
1001 | struct s2 {int (*f) (double a);}; | |
1002 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1003 | int argc; | |
1004 | char **argv; | |
1005 | ||
1006 | int main() { | |
1007 | ||
1008 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1009 | ||
1010 | ; return 0; } | |
1011 | EOF | |
91151a06 | 1012 | if { (eval echo configure:1013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1013 | rm -rf conftest* |
1014 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1015 | else | |
1016 | echo "configure: failed program was:" >&5 | |
1017 | cat conftest.$ac_ext >&5 | |
1018 | fi | |
1019 | rm -f conftest* | |
1020 | done | |
1021 | CC="$ac_save_CC" | |
1022 | ||
1023 | fi | |
1024 | ||
1025 | if test -z "$am_cv_prog_cc_stdc"; then | |
1026 | echo "$ac_t""none needed" 1>&6 | |
1027 | else | |
1028 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1029 | fi | |
1030 | case "x$am_cv_prog_cc_stdc" in | |
1031 | x|xno) ;; | |
1032 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1033 | esac | |
1034 | ||
1035 | ||
1036 | ac_aux_dir= | |
1037 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1038 | if test -f $ac_dir/install-sh; then | |
1039 | ac_aux_dir=$ac_dir | |
1040 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1041 | break | |
1042 | elif test -f $ac_dir/install.sh; then | |
1043 | ac_aux_dir=$ac_dir | |
1044 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1045 | break | |
1046 | fi | |
1047 | done | |
1048 | if test -z "$ac_aux_dir"; then | |
1049 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1050 | fi | |
1051 | ac_config_guess=$ac_aux_dir/config.guess | |
1052 | ac_config_sub=$ac_aux_dir/config.sub | |
1053 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1054 | ||
1055 | ||
1056 | # Do some error checking and defaulting for the host and target type. | |
1057 | # The inputs are: | |
1058 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1059 | # | |
1060 | # The rules are: | |
1061 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1062 | # same time. | |
1063 | # 2. Host defaults to nonopt. | |
1064 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1065 | # as determined by config.guess. | |
1066 | # 4. Target and build default to nonopt. | |
1067 | # 5. If nonopt is not specified, then target and build default to host. | |
1068 | ||
1069 | # The aliases save the names the user supplied, while $host etc. | |
1070 | # will get canonicalized. | |
1071 | case $host---$target---$nonopt in | |
1072 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1073 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1074 | esac | |
1075 | ||
1076 | ||
1077 | # Make sure we can run config.sub. | |
1078 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1079 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1080 | fi | |
1081 | ||
1082 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
91151a06 | 1083 | echo "configure:1084: checking host system type" >&5 |
c906108c SS |
1084 | |
1085 | host_alias=$host | |
1086 | case "$host_alias" in | |
1087 | NONE) | |
1088 | case $nonopt in | |
1089 | NONE) | |
1090 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1091 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1092 | fi ;; | |
1093 | *) host_alias=$nonopt ;; | |
1094 | esac ;; | |
1095 | esac | |
1096 | ||
1097 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1098 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1099 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1100 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1101 | echo "$ac_t""$host" 1>&6 | |
1102 | ||
1103 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
91151a06 | 1104 | echo "configure:1105: checking target system type" >&5 |
c906108c SS |
1105 | |
1106 | target_alias=$target | |
1107 | case "$target_alias" in | |
1108 | NONE) | |
1109 | case $nonopt in | |
1110 | NONE) target_alias=$host_alias ;; | |
1111 | *) target_alias=$nonopt ;; | |
1112 | esac ;; | |
1113 | esac | |
1114 | ||
1115 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1116 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1117 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1118 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1119 | echo "$ac_t""$target" 1>&6 | |
1120 | ||
1121 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
91151a06 | 1122 | echo "configure:1123: checking build system type" >&5 |
c906108c SS |
1123 | |
1124 | build_alias=$build | |
1125 | case "$build_alias" in | |
1126 | NONE) | |
1127 | case $nonopt in | |
1128 | NONE) build_alias=$host_alias ;; | |
1129 | *) build_alias=$nonopt ;; | |
1130 | esac ;; | |
1131 | esac | |
1132 | ||
1133 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1134 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1135 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1136 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1137 | echo "$ac_t""$build" 1>&6 | |
1138 | ||
1139 | test "$host_alias" != "$target_alias" && | |
1140 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1141 | NONENONEs,x,x, && | |
1142 | program_prefix=${target_alias}- | |
1143 | ||
1144 | ||
8bb2c122 MK |
1145 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1146 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1147 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1148 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1149 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1150 | # 2.5x. | |
1151 | if test $host != $build; then | |
1152 | ac_tool_prefix=${host_alias}- | |
1153 | else | |
1154 | ac_tool_prefix= | |
1155 | fi | |
1156 | ||
1157 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1158 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1159 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1160 | echo "configure:1161: checking for $ac_word" >&5 |
8bb2c122 MK |
1161 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1162 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1163 | else | |
1164 | if test -n "$RANLIB"; then | |
1165 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1166 | else | |
1167 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1168 | ac_dummy="$PATH" | |
1169 | for ac_dir in $ac_dummy; do | |
1170 | test -z "$ac_dir" && ac_dir=. | |
1171 | if test -f $ac_dir/$ac_word; then | |
1172 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1173 | break | |
1174 | fi | |
1175 | done | |
1176 | IFS="$ac_save_ifs" | |
1177 | fi | |
1178 | fi | |
1179 | RANLIB="$ac_cv_prog_RANLIB" | |
1180 | if test -n "$RANLIB"; then | |
1181 | echo "$ac_t""$RANLIB" 1>&6 | |
1182 | else | |
1183 | echo "$ac_t""no" 1>&6 | |
1184 | fi | |
1185 | ||
1186 | ||
1187 | if test -z "$ac_cv_prog_RANLIB"; then | |
1188 | if test -n "$ac_tool_prefix"; then | |
1189 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1190 | set dummy ranlib; ac_word=$2 | |
1191 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1192 | echo "configure:1193: checking for $ac_word" >&5 |
8bb2c122 MK |
1193 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1194 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1195 | else | |
1196 | if test -n "$RANLIB"; then | |
1197 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1198 | else | |
1199 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1200 | ac_dummy="$PATH" | |
1201 | for ac_dir in $ac_dummy; do | |
1202 | test -z "$ac_dir" && ac_dir=. | |
1203 | if test -f $ac_dir/$ac_word; then | |
1204 | ac_cv_prog_RANLIB="ranlib" | |
1205 | break | |
1206 | fi | |
1207 | done | |
1208 | IFS="$ac_save_ifs" | |
1209 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1210 | fi | |
1211 | fi | |
1212 | RANLIB="$ac_cv_prog_RANLIB" | |
1213 | if test -n "$RANLIB"; then | |
1214 | echo "$ac_t""$RANLIB" 1>&6 | |
1215 | else | |
1216 | echo "$ac_t""no" 1>&6 | |
1217 | fi | |
1218 | ||
1219 | else | |
1220 | RANLIB=":" | |
1221 | fi | |
1222 | fi | |
1223 | ||
1224 | ||
c906108c SS |
1225 | ALL_LINGUAS= |
1226 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
91151a06 | 1227 | echo "configure:1228: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1228 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1229 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1230 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1231 | else | |
1232 | cat > conftestmake <<\EOF | |
1233 | all: | |
1234 | @echo 'ac_maketemp="${MAKE}"' | |
1235 | EOF | |
1236 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1237 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1238 | if test -n "$ac_maketemp"; then | |
1239 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1240 | else | |
1241 | eval ac_cv_prog_make_${ac_make}_set=no | |
1242 | fi | |
1243 | rm -f conftestmake | |
1244 | fi | |
1245 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1246 | echo "$ac_t""yes" 1>&6 | |
1247 | SET_MAKE= | |
1248 | else | |
1249 | echo "$ac_t""no" 1>&6 | |
1250 | SET_MAKE="MAKE=${MAKE-make}" | |
1251 | fi | |
1252 | ||
1253 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1254 | set dummy ranlib; ac_word=$2 | |
1255 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 1256 | echo "configure:1257: checking for $ac_word" >&5 |
c906108c SS |
1257 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1258 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1259 | else | |
1260 | if test -n "$RANLIB"; then | |
1261 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1262 | else | |
1263 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1264 | ac_dummy="$PATH" | |
1265 | for ac_dir in $ac_dummy; do | |
1266 | test -z "$ac_dir" && ac_dir=. | |
1267 | if test -f $ac_dir/$ac_word; then | |
1268 | ac_cv_prog_RANLIB="ranlib" | |
1269 | break | |
1270 | fi | |
1271 | done | |
1272 | IFS="$ac_save_ifs" | |
1273 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1274 | fi | |
1275 | fi | |
1276 | RANLIB="$ac_cv_prog_RANLIB" | |
1277 | if test -n "$RANLIB"; then | |
1278 | echo "$ac_t""$RANLIB" 1>&6 | |
1279 | else | |
1280 | echo "$ac_t""no" 1>&6 | |
1281 | fi | |
1282 | ||
1283 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
91151a06 | 1284 | echo "configure:1285: checking for ANSI C header files" >&5 |
c906108c SS |
1285 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1286 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1287 | else | |
1288 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1289 | #line 1290 "configure" |
c906108c SS |
1290 | #include "confdefs.h" |
1291 | #include <stdlib.h> | |
1292 | #include <stdarg.h> | |
1293 | #include <string.h> | |
1294 | #include <float.h> | |
1295 | EOF | |
1296 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 1297 | { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1298 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1299 | if test -z "$ac_err"; then | |
1300 | rm -rf conftest* | |
1301 | ac_cv_header_stdc=yes | |
1302 | else | |
1303 | echo "$ac_err" >&5 | |
1304 | echo "configure: failed program was:" >&5 | |
1305 | cat conftest.$ac_ext >&5 | |
1306 | rm -rf conftest* | |
1307 | ac_cv_header_stdc=no | |
1308 | fi | |
1309 | rm -f conftest* | |
1310 | ||
1311 | if test $ac_cv_header_stdc = yes; then | |
1312 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1313 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1314 | #line 1315 "configure" |
c906108c SS |
1315 | #include "confdefs.h" |
1316 | #include <string.h> | |
1317 | EOF | |
1318 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1319 | egrep "memchr" >/dev/null 2>&1; then | |
1320 | : | |
1321 | else | |
1322 | rm -rf conftest* | |
1323 | ac_cv_header_stdc=no | |
1324 | fi | |
1325 | rm -f conftest* | |
1326 | ||
1327 | fi | |
1328 | ||
1329 | if test $ac_cv_header_stdc = yes; then | |
1330 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1331 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1332 | #line 1333 "configure" |
c906108c SS |
1333 | #include "confdefs.h" |
1334 | #include <stdlib.h> | |
1335 | EOF | |
1336 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1337 | egrep "free" >/dev/null 2>&1; then | |
1338 | : | |
1339 | else | |
1340 | rm -rf conftest* | |
1341 | ac_cv_header_stdc=no | |
1342 | fi | |
1343 | rm -f conftest* | |
1344 | ||
1345 | fi | |
1346 | ||
1347 | if test $ac_cv_header_stdc = yes; then | |
1348 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1349 | if test "$cross_compiling" = yes; then | |
1350 | : | |
1351 | else | |
1352 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1353 | #line 1354 "configure" |
c906108c SS |
1354 | #include "confdefs.h" |
1355 | #include <ctype.h> | |
1356 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1357 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1358 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1359 | int main () { int i; for (i = 0; i < 256; i++) | |
1360 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1361 | exit (0); } | |
1362 | ||
1363 | EOF | |
91151a06 | 1364 | if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1365 | then |
1366 | : | |
1367 | else | |
1368 | echo "configure: failed program was:" >&5 | |
1369 | cat conftest.$ac_ext >&5 | |
1370 | rm -fr conftest* | |
1371 | ac_cv_header_stdc=no | |
1372 | fi | |
1373 | rm -fr conftest* | |
1374 | fi | |
1375 | ||
1376 | fi | |
1377 | fi | |
1378 | ||
1379 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1380 | if test $ac_cv_header_stdc = yes; then | |
1381 | cat >> confdefs.h <<\EOF | |
1382 | #define STDC_HEADERS 1 | |
1383 | EOF | |
1384 | ||
1385 | fi | |
1386 | ||
1387 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
91151a06 | 1388 | echo "configure:1389: checking for working const" >&5 |
c906108c SS |
1389 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1391 | else | |
1392 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1393 | #line 1394 "configure" |
c906108c SS |
1394 | #include "confdefs.h" |
1395 | ||
1396 | int main() { | |
1397 | ||
1398 | /* Ultrix mips cc rejects this. */ | |
1399 | typedef int charset[2]; const charset x; | |
1400 | /* SunOS 4.1.1 cc rejects this. */ | |
1401 | char const *const *ccp; | |
1402 | char **p; | |
1403 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1404 | struct point {int x, y;}; | |
1405 | static struct point const zero = {0,0}; | |
1406 | /* AIX XL C 1.02.0.0 rejects this. | |
1407 | It does not let you subtract one const X* pointer from another in an arm | |
1408 | of an if-expression whose if-part is not a constant expression */ | |
1409 | const char *g = "string"; | |
1410 | ccp = &g + (g ? g-g : 0); | |
1411 | /* HPUX 7.0 cc rejects these. */ | |
1412 | ++ccp; | |
1413 | p = (char**) ccp; | |
1414 | ccp = (char const *const *) p; | |
1415 | { /* SCO 3.2v4 cc rejects this. */ | |
1416 | char *t; | |
1417 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1418 | ||
1419 | *t++ = 0; | |
1420 | } | |
1421 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1422 | int x[] = {25, 17}; | |
1423 | const int *foo = &x[0]; | |
1424 | ++foo; | |
1425 | } | |
1426 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1427 | typedef const int *iptr; | |
1428 | iptr p = 0; | |
1429 | ++p; | |
1430 | } | |
1431 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1432 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1433 | struct s { int j; const int *ap[3]; }; | |
1434 | struct s *b; b->j = 5; | |
1435 | } | |
1436 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1437 | const int foo = 10; | |
1438 | } | |
1439 | ||
1440 | ; return 0; } | |
1441 | EOF | |
91151a06 | 1442 | if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1443 | rm -rf conftest* |
1444 | ac_cv_c_const=yes | |
1445 | else | |
1446 | echo "configure: failed program was:" >&5 | |
1447 | cat conftest.$ac_ext >&5 | |
1448 | rm -rf conftest* | |
1449 | ac_cv_c_const=no | |
1450 | fi | |
1451 | rm -f conftest* | |
1452 | fi | |
1453 | ||
1454 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1455 | if test $ac_cv_c_const = no; then | |
1456 | cat >> confdefs.h <<\EOF | |
1457 | #define const | |
1458 | EOF | |
1459 | ||
1460 | fi | |
1461 | ||
1462 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
91151a06 | 1463 | echo "configure:1464: checking for inline" >&5 |
c906108c SS |
1464 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1466 | else | |
1467 | ac_cv_c_inline=no | |
1468 | for ac_kw in inline __inline__ __inline; do | |
1469 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1470 | #line 1471 "configure" |
c906108c SS |
1471 | #include "confdefs.h" |
1472 | ||
1473 | int main() { | |
1474 | } $ac_kw foo() { | |
1475 | ; return 0; } | |
1476 | EOF | |
91151a06 | 1477 | if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1478 | rm -rf conftest* |
1479 | ac_cv_c_inline=$ac_kw; break | |
1480 | else | |
1481 | echo "configure: failed program was:" >&5 | |
1482 | cat conftest.$ac_ext >&5 | |
1483 | fi | |
1484 | rm -f conftest* | |
1485 | done | |
1486 | ||
1487 | fi | |
1488 | ||
1489 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1490 | case "$ac_cv_c_inline" in | |
1491 | inline | yes) ;; | |
1492 | no) cat >> confdefs.h <<\EOF | |
1493 | #define inline | |
1494 | EOF | |
1495 | ;; | |
1496 | *) cat >> confdefs.h <<EOF | |
1497 | #define inline $ac_cv_c_inline | |
1498 | EOF | |
1499 | ;; | |
1500 | esac | |
1501 | ||
1502 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
91151a06 | 1503 | echo "configure:1504: checking for off_t" >&5 |
c906108c SS |
1504 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1505 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1506 | else | |
1507 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1508 | #line 1509 "configure" |
c906108c SS |
1509 | #include "confdefs.h" |
1510 | #include <sys/types.h> | |
1511 | #if STDC_HEADERS | |
1512 | #include <stdlib.h> | |
1513 | #include <stddef.h> | |
1514 | #endif | |
1515 | EOF | |
1516 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1517 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1518 | rm -rf conftest* | |
1519 | ac_cv_type_off_t=yes | |
1520 | else | |
1521 | rm -rf conftest* | |
1522 | ac_cv_type_off_t=no | |
1523 | fi | |
1524 | rm -f conftest* | |
1525 | ||
1526 | fi | |
1527 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1528 | if test $ac_cv_type_off_t = no; then | |
1529 | cat >> confdefs.h <<\EOF | |
1530 | #define off_t long | |
1531 | EOF | |
1532 | ||
1533 | fi | |
1534 | ||
1535 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
91151a06 | 1536 | echo "configure:1537: checking for size_t" >&5 |
c906108c SS |
1537 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1538 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1539 | else | |
1540 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1541 | #line 1542 "configure" |
c906108c SS |
1542 | #include "confdefs.h" |
1543 | #include <sys/types.h> | |
1544 | #if STDC_HEADERS | |
1545 | #include <stdlib.h> | |
1546 | #include <stddef.h> | |
1547 | #endif | |
1548 | EOF | |
1549 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1550 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1551 | rm -rf conftest* | |
1552 | ac_cv_type_size_t=yes | |
1553 | else | |
1554 | rm -rf conftest* | |
1555 | ac_cv_type_size_t=no | |
1556 | fi | |
1557 | rm -f conftest* | |
1558 | ||
1559 | fi | |
1560 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1561 | if test $ac_cv_type_size_t = no; then | |
1562 | cat >> confdefs.h <<\EOF | |
1563 | #define size_t unsigned | |
1564 | EOF | |
1565 | ||
1566 | fi | |
1567 | ||
1568 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1569 | # for constant arguments. Useless! | |
1570 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
91151a06 | 1571 | echo "configure:1572: checking for working alloca.h" >&5 |
c906108c SS |
1572 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1574 | else | |
1575 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1576 | #line 1577 "configure" |
c906108c SS |
1577 | #include "confdefs.h" |
1578 | #include <alloca.h> | |
1579 | int main() { | |
1580 | char *p = alloca(2 * sizeof(int)); | |
1581 | ; return 0; } | |
1582 | EOF | |
91151a06 | 1583 | if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1584 | rm -rf conftest* |
1585 | ac_cv_header_alloca_h=yes | |
1586 | else | |
1587 | echo "configure: failed program was:" >&5 | |
1588 | cat conftest.$ac_ext >&5 | |
1589 | rm -rf conftest* | |
1590 | ac_cv_header_alloca_h=no | |
1591 | fi | |
1592 | rm -f conftest* | |
1593 | fi | |
1594 | ||
1595 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1596 | if test $ac_cv_header_alloca_h = yes; then | |
1597 | cat >> confdefs.h <<\EOF | |
1598 | #define HAVE_ALLOCA_H 1 | |
1599 | EOF | |
1600 | ||
1601 | fi | |
1602 | ||
1603 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
91151a06 | 1604 | echo "configure:1605: checking for alloca" >&5 |
c906108c SS |
1605 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1606 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1607 | else | |
1608 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1609 | #line 1610 "configure" |
c906108c SS |
1610 | #include "confdefs.h" |
1611 | ||
1612 | #ifdef __GNUC__ | |
1613 | # define alloca __builtin_alloca | |
1614 | #else | |
1615 | # ifdef _MSC_VER | |
1616 | # include <malloc.h> | |
1617 | # define alloca _alloca | |
1618 | # else | |
1619 | # if HAVE_ALLOCA_H | |
1620 | # include <alloca.h> | |
1621 | # else | |
1622 | # ifdef _AIX | |
1623 | #pragma alloca | |
1624 | # else | |
1625 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1626 | char *alloca (); | |
1627 | # endif | |
1628 | # endif | |
1629 | # endif | |
1630 | # endif | |
1631 | #endif | |
1632 | ||
1633 | int main() { | |
1634 | char *p = (char *) alloca(1); | |
1635 | ; return 0; } | |
1636 | EOF | |
91151a06 | 1637 | if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1638 | rm -rf conftest* |
1639 | ac_cv_func_alloca_works=yes | |
1640 | else | |
1641 | echo "configure: failed program was:" >&5 | |
1642 | cat conftest.$ac_ext >&5 | |
1643 | rm -rf conftest* | |
1644 | ac_cv_func_alloca_works=no | |
1645 | fi | |
1646 | rm -f conftest* | |
1647 | fi | |
1648 | ||
1649 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1650 | if test $ac_cv_func_alloca_works = yes; then | |
1651 | cat >> confdefs.h <<\EOF | |
1652 | #define HAVE_ALLOCA 1 | |
1653 | EOF | |
1654 | ||
1655 | fi | |
1656 | ||
1657 | if test $ac_cv_func_alloca_works = no; then | |
1658 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1659 | # that cause trouble. Some versions do not even contain alloca or | |
1660 | # contain a buggy version. If you still want to use their alloca, | |
1661 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1662 | ALLOCA=alloca.${ac_objext} | |
1663 | cat >> confdefs.h <<\EOF | |
1664 | #define C_ALLOCA 1 | |
1665 | EOF | |
1666 | ||
1667 | ||
1668 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
91151a06 | 1669 | echo "configure:1670: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1670 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1672 | else | |
1673 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1674 | #line 1675 "configure" |
c906108c SS |
1675 | #include "confdefs.h" |
1676 | #if defined(CRAY) && ! defined(CRAY2) | |
1677 | webecray | |
1678 | #else | |
1679 | wenotbecray | |
1680 | #endif | |
1681 | ||
1682 | EOF | |
1683 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1684 | egrep "webecray" >/dev/null 2>&1; then | |
1685 | rm -rf conftest* | |
1686 | ac_cv_os_cray=yes | |
1687 | else | |
1688 | rm -rf conftest* | |
1689 | ac_cv_os_cray=no | |
1690 | fi | |
1691 | rm -f conftest* | |
1692 | ||
1693 | fi | |
1694 | ||
1695 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1696 | if test $ac_cv_os_cray = yes; then | |
1697 | for ac_func in _getb67 GETB67 getb67; do | |
1698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 1699 | echo "configure:1700: checking for $ac_func" >&5 |
c906108c SS |
1700 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1702 | else | |
1703 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1704 | #line 1705 "configure" |
c906108c SS |
1705 | #include "confdefs.h" |
1706 | /* System header to define __stub macros and hopefully few prototypes, | |
1707 | which can conflict with char $ac_func(); below. */ | |
1708 | #include <assert.h> | |
1709 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1710 | /* We use char because int might match the return type of a gcc2 | |
1711 | builtin and then its argument prototype would still apply. */ | |
1712 | char $ac_func(); | |
1713 | ||
1714 | int main() { | |
1715 | ||
1716 | /* The GNU C library defines this for functions which it implements | |
1717 | to always fail with ENOSYS. Some functions are actually named | |
1718 | something starting with __ and the normal name is an alias. */ | |
1719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1720 | choke me | |
1721 | #else | |
1722 | $ac_func(); | |
1723 | #endif | |
1724 | ||
1725 | ; return 0; } | |
1726 | EOF | |
91151a06 | 1727 | if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1728 | rm -rf conftest* |
1729 | eval "ac_cv_func_$ac_func=yes" | |
1730 | else | |
1731 | echo "configure: failed program was:" >&5 | |
1732 | cat conftest.$ac_ext >&5 | |
1733 | rm -rf conftest* | |
1734 | eval "ac_cv_func_$ac_func=no" | |
1735 | fi | |
1736 | rm -f conftest* | |
1737 | fi | |
1738 | ||
1739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1740 | echo "$ac_t""yes" 1>&6 | |
1741 | cat >> confdefs.h <<EOF | |
1742 | #define CRAY_STACKSEG_END $ac_func | |
1743 | EOF | |
1744 | ||
1745 | break | |
1746 | else | |
1747 | echo "$ac_t""no" 1>&6 | |
1748 | fi | |
1749 | ||
1750 | done | |
1751 | fi | |
1752 | ||
1753 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
91151a06 | 1754 | echo "configure:1755: checking stack direction for C alloca" >&5 |
c906108c SS |
1755 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1756 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1757 | else | |
1758 | if test "$cross_compiling" = yes; then | |
1759 | ac_cv_c_stack_direction=0 | |
1760 | else | |
1761 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1762 | #line 1763 "configure" |
c906108c SS |
1763 | #include "confdefs.h" |
1764 | find_stack_direction () | |
1765 | { | |
1766 | static char *addr = 0; | |
1767 | auto char dummy; | |
1768 | if (addr == 0) | |
1769 | { | |
1770 | addr = &dummy; | |
1771 | return find_stack_direction (); | |
1772 | } | |
1773 | else | |
1774 | return (&dummy > addr) ? 1 : -1; | |
1775 | } | |
1776 | main () | |
1777 | { | |
1778 | exit (find_stack_direction() < 0); | |
1779 | } | |
1780 | EOF | |
91151a06 | 1781 | if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1782 | then |
1783 | ac_cv_c_stack_direction=1 | |
1784 | else | |
1785 | echo "configure: failed program was:" >&5 | |
1786 | cat conftest.$ac_ext >&5 | |
1787 | rm -fr conftest* | |
1788 | ac_cv_c_stack_direction=-1 | |
1789 | fi | |
1790 | rm -fr conftest* | |
1791 | fi | |
1792 | ||
1793 | fi | |
1794 | ||
1795 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1796 | cat >> confdefs.h <<EOF | |
1797 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1798 | EOF | |
1799 | ||
1800 | fi | |
1801 | ||
c41b7eb1 | 1802 | for ac_hdr in unistd.h |
c906108c SS |
1803 | do |
1804 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1805 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 1806 | echo "configure:1807: checking for $ac_hdr" >&5 |
c906108c SS |
1807 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1809 | else | |
1810 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1811 | #line 1812 "configure" |
c906108c SS |
1812 | #include "confdefs.h" |
1813 | #include <$ac_hdr> | |
1814 | EOF | |
1815 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 1816 | { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1817 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1818 | if test -z "$ac_err"; then | |
1819 | rm -rf conftest* | |
1820 | eval "ac_cv_header_$ac_safe=yes" | |
1821 | else | |
1822 | echo "$ac_err" >&5 | |
1823 | echo "configure: failed program was:" >&5 | |
1824 | cat conftest.$ac_ext >&5 | |
1825 | rm -rf conftest* | |
1826 | eval "ac_cv_header_$ac_safe=no" | |
1827 | fi | |
1828 | rm -f conftest* | |
1829 | fi | |
1830 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1831 | echo "$ac_t""yes" 1>&6 | |
1832 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1833 | cat >> confdefs.h <<EOF | |
1834 | #define $ac_tr_hdr 1 | |
1835 | EOF | |
1836 | ||
1837 | else | |
1838 | echo "$ac_t""no" 1>&6 | |
1839 | fi | |
1840 | done | |
1841 | ||
1842 | for ac_func in getpagesize | |
1843 | do | |
1844 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 1845 | echo "configure:1846: checking for $ac_func" >&5 |
c906108c SS |
1846 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1848 | else | |
1849 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1850 | #line 1851 "configure" |
c906108c SS |
1851 | #include "confdefs.h" |
1852 | /* System header to define __stub macros and hopefully few prototypes, | |
1853 | which can conflict with char $ac_func(); below. */ | |
1854 | #include <assert.h> | |
1855 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1856 | /* We use char because int might match the return type of a gcc2 | |
1857 | builtin and then its argument prototype would still apply. */ | |
1858 | char $ac_func(); | |
1859 | ||
1860 | int main() { | |
1861 | ||
1862 | /* The GNU C library defines this for functions which it implements | |
1863 | to always fail with ENOSYS. Some functions are actually named | |
1864 | something starting with __ and the normal name is an alias. */ | |
1865 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1866 | choke me | |
1867 | #else | |
1868 | $ac_func(); | |
1869 | #endif | |
1870 | ||
1871 | ; return 0; } | |
1872 | EOF | |
91151a06 | 1873 | if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1874 | rm -rf conftest* |
1875 | eval "ac_cv_func_$ac_func=yes" | |
1876 | else | |
1877 | echo "configure: failed program was:" >&5 | |
1878 | cat conftest.$ac_ext >&5 | |
1879 | rm -rf conftest* | |
1880 | eval "ac_cv_func_$ac_func=no" | |
1881 | fi | |
1882 | rm -f conftest* | |
1883 | fi | |
1884 | ||
1885 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1886 | echo "$ac_t""yes" 1>&6 | |
1887 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1888 | cat >> confdefs.h <<EOF | |
1889 | #define $ac_tr_func 1 | |
1890 | EOF | |
1891 | ||
1892 | else | |
1893 | echo "$ac_t""no" 1>&6 | |
1894 | fi | |
1895 | done | |
1896 | ||
1897 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
91151a06 | 1898 | echo "configure:1899: checking for working mmap" >&5 |
c906108c SS |
1899 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1901 | else | |
1902 | if test "$cross_compiling" = yes; then | |
1903 | ac_cv_func_mmap_fixed_mapped=no | |
1904 | else | |
1905 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 1906 | #line 1907 "configure" |
c906108c SS |
1907 | #include "confdefs.h" |
1908 | ||
1909 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1910 | Here is a matrix of mmap possibilities: | |
1911 | mmap private not fixed | |
1912 | mmap private fixed at somewhere currently unmapped | |
1913 | mmap private fixed at somewhere already mapped | |
1914 | mmap shared not fixed | |
1915 | mmap shared fixed at somewhere currently unmapped | |
1916 | mmap shared fixed at somewhere already mapped | |
1917 | For private mappings, we should verify that changes cannot be read() | |
1918 | back from the file, nor mmap's back from the file at a different | |
1919 | address. (There have been systems where private was not correctly | |
1920 | implemented like the infamous i386 svr4.0, and systems where the | |
1921 | VM page cache was not coherent with the filesystem buffer cache | |
1922 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1923 | For shared mappings, we should conversely verify that changes get | |
1924 | propogated back to all the places they're supposed to be. | |
1925 | ||
1926 | Grep wants private fixed already mapped. | |
1927 | The main things grep needs to know about mmap are: | |
1928 | * does it exist and is it safe to write into the mmap'd area | |
1929 | * how to use it (BSD variants) */ | |
1930 | #include <sys/types.h> | |
1931 | #include <fcntl.h> | |
1932 | #include <sys/mman.h> | |
1933 | ||
1934 | /* This mess was copied from the GNU getpagesize.h. */ | |
1935 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1936 | # ifdef HAVE_UNISTD_H |
1937 | # include <unistd.h> | |
1938 | # endif | |
c906108c SS |
1939 | |
1940 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1941 | # ifndef HAVE_SYS_PARAM_H | |
1942 | # define HAVE_SYS_PARAM_H 1 | |
1943 | # endif | |
1944 | ||
1945 | # ifdef _SC_PAGESIZE | |
1946 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1947 | # else /* no _SC_PAGESIZE */ | |
1948 | # ifdef HAVE_SYS_PARAM_H | |
1949 | # include <sys/param.h> | |
1950 | # ifdef EXEC_PAGESIZE | |
1951 | # define getpagesize() EXEC_PAGESIZE | |
1952 | # else /* no EXEC_PAGESIZE */ | |
1953 | # ifdef NBPG | |
1954 | # define getpagesize() NBPG * CLSIZE | |
1955 | # ifndef CLSIZE | |
1956 | # define CLSIZE 1 | |
1957 | # endif /* no CLSIZE */ | |
1958 | # else /* no NBPG */ | |
1959 | # ifdef NBPC | |
1960 | # define getpagesize() NBPC | |
1961 | # else /* no NBPC */ | |
1962 | # ifdef PAGESIZE | |
1963 | # define getpagesize() PAGESIZE | |
1964 | # endif /* PAGESIZE */ | |
1965 | # endif /* no NBPC */ | |
1966 | # endif /* no NBPG */ | |
1967 | # endif /* no EXEC_PAGESIZE */ | |
1968 | # else /* no HAVE_SYS_PARAM_H */ | |
1969 | # define getpagesize() 8192 /* punt totally */ | |
1970 | # endif /* no HAVE_SYS_PARAM_H */ | |
1971 | # endif /* no _SC_PAGESIZE */ | |
1972 | ||
1973 | #endif /* no HAVE_GETPAGESIZE */ | |
1974 | ||
1975 | #ifdef __cplusplus | |
1976 | extern "C" { void *malloc(unsigned); } | |
1977 | #else | |
1978 | char *malloc(); | |
1979 | #endif | |
1980 | ||
1981 | int | |
1982 | main() | |
1983 | { | |
1984 | char *data, *data2, *data3; | |
1985 | int i, pagesize; | |
1986 | int fd; | |
1987 | ||
1988 | pagesize = getpagesize(); | |
1989 | ||
1990 | /* | |
1991 | * First, make a file with some known garbage in it. | |
1992 | */ | |
1993 | data = malloc(pagesize); | |
1994 | if (!data) | |
1995 | exit(1); | |
1996 | for (i = 0; i < pagesize; ++i) | |
1997 | *(data + i) = rand(); | |
1998 | umask(0); | |
1999 | fd = creat("conftestmmap", 0600); | |
2000 | if (fd < 0) | |
2001 | exit(1); | |
2002 | if (write(fd, data, pagesize) != pagesize) | |
2003 | exit(1); | |
2004 | close(fd); | |
2005 | ||
2006 | /* | |
2007 | * Next, try to mmap the file at a fixed address which | |
2008 | * already has something else allocated at it. If we can, | |
2009 | * also make sure that we see the same garbage. | |
2010 | */ | |
2011 | fd = open("conftestmmap", O_RDWR); | |
2012 | if (fd < 0) | |
2013 | exit(1); | |
2014 | data2 = malloc(2 * pagesize); | |
2015 | if (!data2) | |
2016 | exit(1); | |
2017 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2018 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2019 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2020 | exit(1); | |
2021 | for (i = 0; i < pagesize; ++i) | |
2022 | if (*(data + i) != *(data2 + i)) | |
2023 | exit(1); | |
2024 | ||
2025 | /* | |
2026 | * Finally, make sure that changes to the mapped area | |
2027 | * do not percolate back to the file as seen by read(). | |
2028 | * (This is a bug on some variants of i386 svr4.0.) | |
2029 | */ | |
2030 | for (i = 0; i < pagesize; ++i) | |
2031 | *(data2 + i) = *(data2 + i) + 1; | |
2032 | data3 = malloc(pagesize); | |
2033 | if (!data3) | |
2034 | exit(1); | |
2035 | if (read(fd, data3, pagesize) != pagesize) | |
2036 | exit(1); | |
2037 | for (i = 0; i < pagesize; ++i) | |
2038 | if (*(data + i) != *(data3 + i)) | |
2039 | exit(1); | |
2040 | close(fd); | |
2041 | unlink("conftestmmap"); | |
2042 | exit(0); | |
2043 | } | |
2044 | ||
2045 | EOF | |
91151a06 | 2046 | if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2047 | then |
2048 | ac_cv_func_mmap_fixed_mapped=yes | |
2049 | else | |
2050 | echo "configure: failed program was:" >&5 | |
2051 | cat conftest.$ac_ext >&5 | |
2052 | rm -fr conftest* | |
2053 | ac_cv_func_mmap_fixed_mapped=no | |
2054 | fi | |
2055 | rm -fr conftest* | |
2056 | fi | |
2057 | ||
2058 | fi | |
2059 | ||
2060 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2061 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2062 | cat >> confdefs.h <<\EOF | |
2063 | #define HAVE_MMAP 1 | |
2064 | EOF | |
2065 | ||
2066 | fi | |
2067 | ||
2068 | ||
2069 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2070 | unistd.h values.h sys/param.h | |
2071 | do | |
2072 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2073 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 2074 | echo "configure:2075: checking for $ac_hdr" >&5 |
c906108c SS |
2075 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2076 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2077 | else | |
2078 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2079 | #line 2080 "configure" |
c906108c SS |
2080 | #include "confdefs.h" |
2081 | #include <$ac_hdr> | |
2082 | EOF | |
2083 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2084 | { (eval echo configure:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2085 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2086 | if test -z "$ac_err"; then | |
2087 | rm -rf conftest* | |
2088 | eval "ac_cv_header_$ac_safe=yes" | |
2089 | else | |
2090 | echo "$ac_err" >&5 | |
2091 | echo "configure: failed program was:" >&5 | |
2092 | cat conftest.$ac_ext >&5 | |
2093 | rm -rf conftest* | |
2094 | eval "ac_cv_header_$ac_safe=no" | |
2095 | fi | |
2096 | rm -f conftest* | |
2097 | fi | |
2098 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2099 | echo "$ac_t""yes" 1>&6 | |
2100 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2101 | cat >> confdefs.h <<EOF | |
2102 | #define $ac_tr_hdr 1 | |
2103 | EOF | |
2104 | ||
2105 | else | |
2106 | echo "$ac_t""no" 1>&6 | |
2107 | fi | |
2108 | done | |
2109 | ||
2110 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2111 | __argz_count __argz_stringify __argz_next | |
2112 | do | |
2113 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2114 | echo "configure:2115: checking for $ac_func" >&5 |
c906108c SS |
2115 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2116 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2117 | else | |
2118 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2119 | #line 2120 "configure" |
c906108c SS |
2120 | #include "confdefs.h" |
2121 | /* System header to define __stub macros and hopefully few prototypes, | |
2122 | which can conflict with char $ac_func(); below. */ | |
2123 | #include <assert.h> | |
2124 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2125 | /* We use char because int might match the return type of a gcc2 | |
2126 | builtin and then its argument prototype would still apply. */ | |
2127 | char $ac_func(); | |
2128 | ||
2129 | int main() { | |
2130 | ||
2131 | /* The GNU C library defines this for functions which it implements | |
2132 | to always fail with ENOSYS. Some functions are actually named | |
2133 | something starting with __ and the normal name is an alias. */ | |
2134 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2135 | choke me | |
2136 | #else | |
2137 | $ac_func(); | |
2138 | #endif | |
2139 | ||
2140 | ; return 0; } | |
2141 | EOF | |
91151a06 | 2142 | if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2143 | rm -rf conftest* |
2144 | eval "ac_cv_func_$ac_func=yes" | |
2145 | else | |
2146 | echo "configure: failed program was:" >&5 | |
2147 | cat conftest.$ac_ext >&5 | |
2148 | rm -rf conftest* | |
2149 | eval "ac_cv_func_$ac_func=no" | |
2150 | fi | |
2151 | rm -f conftest* | |
2152 | fi | |
2153 | ||
2154 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2155 | echo "$ac_t""yes" 1>&6 | |
2156 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2157 | cat >> confdefs.h <<EOF | |
2158 | #define $ac_tr_func 1 | |
2159 | EOF | |
2160 | ||
2161 | else | |
2162 | echo "$ac_t""no" 1>&6 | |
2163 | fi | |
2164 | done | |
2165 | ||
2166 | ||
2167 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2168 | for ac_func in stpcpy | |
2169 | do | |
2170 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2171 | echo "configure:2172: checking for $ac_func" >&5 |
c906108c SS |
2172 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2174 | else | |
2175 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2176 | #line 2177 "configure" |
c906108c SS |
2177 | #include "confdefs.h" |
2178 | /* System header to define __stub macros and hopefully few prototypes, | |
2179 | which can conflict with char $ac_func(); below. */ | |
2180 | #include <assert.h> | |
2181 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2182 | /* We use char because int might match the return type of a gcc2 | |
2183 | builtin and then its argument prototype would still apply. */ | |
2184 | char $ac_func(); | |
2185 | ||
2186 | int main() { | |
2187 | ||
2188 | /* The GNU C library defines this for functions which it implements | |
2189 | to always fail with ENOSYS. Some functions are actually named | |
2190 | something starting with __ and the normal name is an alias. */ | |
2191 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2192 | choke me | |
2193 | #else | |
2194 | $ac_func(); | |
2195 | #endif | |
2196 | ||
2197 | ; return 0; } | |
2198 | EOF | |
91151a06 | 2199 | if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2200 | rm -rf conftest* |
2201 | eval "ac_cv_func_$ac_func=yes" | |
2202 | else | |
2203 | echo "configure: failed program was:" >&5 | |
2204 | cat conftest.$ac_ext >&5 | |
2205 | rm -rf conftest* | |
2206 | eval "ac_cv_func_$ac_func=no" | |
2207 | fi | |
2208 | rm -f conftest* | |
2209 | fi | |
2210 | ||
2211 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2212 | echo "$ac_t""yes" 1>&6 | |
2213 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2214 | cat >> confdefs.h <<EOF | |
2215 | #define $ac_tr_func 1 | |
2216 | EOF | |
2217 | ||
2218 | else | |
2219 | echo "$ac_t""no" 1>&6 | |
2220 | fi | |
2221 | done | |
2222 | ||
2223 | fi | |
2224 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2225 | cat >> confdefs.h <<\EOF | |
2226 | #define HAVE_STPCPY 1 | |
2227 | EOF | |
2228 | ||
2229 | fi | |
2230 | ||
2231 | if test $ac_cv_header_locale_h = yes; then | |
2232 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
91151a06 | 2233 | echo "configure:2234: checking for LC_MESSAGES" >&5 |
c906108c SS |
2234 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2236 | else | |
2237 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2238 | #line 2239 "configure" |
c906108c SS |
2239 | #include "confdefs.h" |
2240 | #include <locale.h> | |
2241 | int main() { | |
2242 | return LC_MESSAGES | |
2243 | ; return 0; } | |
2244 | EOF | |
91151a06 | 2245 | if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2246 | rm -rf conftest* |
2247 | am_cv_val_LC_MESSAGES=yes | |
2248 | else | |
2249 | echo "configure: failed program was:" >&5 | |
2250 | cat conftest.$ac_ext >&5 | |
2251 | rm -rf conftest* | |
2252 | am_cv_val_LC_MESSAGES=no | |
2253 | fi | |
2254 | rm -f conftest* | |
2255 | fi | |
2256 | ||
2257 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2258 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2259 | cat >> confdefs.h <<\EOF | |
2260 | #define HAVE_LC_MESSAGES 1 | |
2261 | EOF | |
2262 | ||
2263 | fi | |
2264 | fi | |
2265 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
91151a06 | 2266 | echo "configure:2267: checking whether NLS is requested" >&5 |
c906108c SS |
2267 | # Check whether --enable-nls or --disable-nls was given. |
2268 | if test "${enable_nls+set}" = set; then | |
2269 | enableval="$enable_nls" | |
2270 | USE_NLS=$enableval | |
2271 | else | |
2272 | USE_NLS=yes | |
2273 | fi | |
2274 | ||
2275 | echo "$ac_t""$USE_NLS" 1>&6 | |
2276 | ||
2277 | ||
2278 | USE_INCLUDED_LIBINTL=no | |
2279 | ||
2280 | if test "$USE_NLS" = "yes"; then | |
2281 | cat >> confdefs.h <<\EOF | |
2282 | #define ENABLE_NLS 1 | |
2283 | EOF | |
2284 | ||
2285 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
91151a06 | 2286 | echo "configure:2287: checking whether included gettext is requested" >&5 |
c906108c SS |
2287 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2288 | if test "${with_included_gettext+set}" = set; then | |
2289 | withval="$with_included_gettext" | |
2290 | nls_cv_force_use_gnu_gettext=$withval | |
2291 | else | |
2292 | nls_cv_force_use_gnu_gettext=no | |
2293 | fi | |
2294 | ||
2295 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2296 | ||
2297 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2298 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2299 | nls_cv_header_intl= | |
2300 | nls_cv_header_libgt= | |
2301 | CATOBJEXT=NONE | |
2302 | ||
2303 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2304 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
91151a06 | 2305 | echo "configure:2306: checking for libintl.h" >&5 |
c906108c SS |
2306 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2307 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2308 | else | |
2309 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2310 | #line 2311 "configure" |
c906108c SS |
2311 | #include "confdefs.h" |
2312 | #include <libintl.h> | |
2313 | EOF | |
2314 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2315 | { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2316 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2317 | if test -z "$ac_err"; then | |
2318 | rm -rf conftest* | |
2319 | eval "ac_cv_header_$ac_safe=yes" | |
2320 | else | |
2321 | echo "$ac_err" >&5 | |
2322 | echo "configure: failed program was:" >&5 | |
2323 | cat conftest.$ac_ext >&5 | |
2324 | rm -rf conftest* | |
2325 | eval "ac_cv_header_$ac_safe=no" | |
2326 | fi | |
2327 | rm -f conftest* | |
2328 | fi | |
2329 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2330 | echo "$ac_t""yes" 1>&6 | |
2331 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
91151a06 | 2332 | echo "configure:2333: checking for gettext in libc" >&5 |
c906108c SS |
2333 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2334 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2335 | else | |
2336 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2337 | #line 2338 "configure" |
c906108c SS |
2338 | #include "confdefs.h" |
2339 | #include <libintl.h> | |
2340 | int main() { | |
2341 | return (int) gettext ("") | |
2342 | ; return 0; } | |
2343 | EOF | |
91151a06 | 2344 | if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2345 | rm -rf conftest* |
2346 | gt_cv_func_gettext_libc=yes | |
2347 | else | |
2348 | echo "configure: failed program was:" >&5 | |
2349 | cat conftest.$ac_ext >&5 | |
2350 | rm -rf conftest* | |
2351 | gt_cv_func_gettext_libc=no | |
2352 | fi | |
2353 | rm -f conftest* | |
2354 | fi | |
2355 | ||
2356 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2357 | ||
2358 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2359 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
91151a06 | 2360 | echo "configure:2361: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2361 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2362 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2364 | else | |
2365 | ac_save_LIBS="$LIBS" | |
2366 | LIBS="-lintl $LIBS" | |
2367 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2368 | #line 2369 "configure" |
c906108c SS |
2369 | #include "confdefs.h" |
2370 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2371 | /* We use char because int might match the return type of a gcc2 | |
2372 | builtin and then its argument prototype would still apply. */ | |
2373 | char bindtextdomain(); | |
2374 | ||
2375 | int main() { | |
2376 | bindtextdomain() | |
2377 | ; return 0; } | |
2378 | EOF | |
91151a06 | 2379 | if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2380 | rm -rf conftest* |
2381 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2382 | else | |
2383 | echo "configure: failed program was:" >&5 | |
2384 | cat conftest.$ac_ext >&5 | |
2385 | rm -rf conftest* | |
2386 | eval "ac_cv_lib_$ac_lib_var=no" | |
2387 | fi | |
2388 | rm -f conftest* | |
2389 | LIBS="$ac_save_LIBS" | |
2390 | ||
2391 | fi | |
2392 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2393 | echo "$ac_t""yes" 1>&6 | |
2394 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
91151a06 | 2395 | echo "configure:2396: checking for gettext in libintl" >&5 |
c906108c SS |
2396 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2398 | else | |
2399 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2400 | #line 2401 "configure" |
c906108c SS |
2401 | #include "confdefs.h" |
2402 | ||
2403 | int main() { | |
2404 | return (int) gettext ("") | |
2405 | ; return 0; } | |
2406 | EOF | |
91151a06 | 2407 | if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2408 | rm -rf conftest* |
2409 | gt_cv_func_gettext_libintl=yes | |
2410 | else | |
2411 | echo "configure: failed program was:" >&5 | |
2412 | cat conftest.$ac_ext >&5 | |
2413 | rm -rf conftest* | |
2414 | gt_cv_func_gettext_libintl=no | |
2415 | fi | |
2416 | rm -f conftest* | |
2417 | fi | |
2418 | ||
2419 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2420 | else | |
2421 | echo "$ac_t""no" 1>&6 | |
2422 | fi | |
2423 | ||
2424 | fi | |
2425 | ||
2426 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2427 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2428 | cat >> confdefs.h <<\EOF | |
2429 | #define HAVE_GETTEXT 1 | |
2430 | EOF | |
2431 | ||
2432 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2433 | set dummy msgfmt; ac_word=$2 | |
2434 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2435 | echo "configure:2436: checking for $ac_word" >&5 |
c906108c SS |
2436 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2437 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2438 | else | |
2439 | case "$MSGFMT" in | |
2440 | /*) | |
2441 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2442 | ;; | |
2443 | *) | |
2444 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2445 | for ac_dir in $PATH; do | |
2446 | test -z "$ac_dir" && ac_dir=. | |
2447 | if test -f $ac_dir/$ac_word; then | |
2448 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2449 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2450 | break | |
2451 | fi | |
2452 | fi | |
2453 | done | |
2454 | IFS="$ac_save_ifs" | |
2455 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2456 | ;; | |
2457 | esac | |
2458 | fi | |
2459 | MSGFMT="$ac_cv_path_MSGFMT" | |
2460 | if test -n "$MSGFMT"; then | |
2461 | echo "$ac_t""$MSGFMT" 1>&6 | |
2462 | else | |
2463 | echo "$ac_t""no" 1>&6 | |
2464 | fi | |
2465 | if test "$MSGFMT" != "no"; then | |
2466 | for ac_func in dcgettext | |
2467 | do | |
2468 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 2469 | echo "configure:2470: checking for $ac_func" >&5 |
c906108c SS |
2470 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2471 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2472 | else | |
2473 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2474 | #line 2475 "configure" |
c906108c SS |
2475 | #include "confdefs.h" |
2476 | /* System header to define __stub macros and hopefully few prototypes, | |
2477 | which can conflict with char $ac_func(); below. */ | |
2478 | #include <assert.h> | |
2479 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2480 | /* We use char because int might match the return type of a gcc2 | |
2481 | builtin and then its argument prototype would still apply. */ | |
2482 | char $ac_func(); | |
2483 | ||
2484 | int main() { | |
2485 | ||
2486 | /* The GNU C library defines this for functions which it implements | |
2487 | to always fail with ENOSYS. Some functions are actually named | |
2488 | something starting with __ and the normal name is an alias. */ | |
2489 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2490 | choke me | |
2491 | #else | |
2492 | $ac_func(); | |
2493 | #endif | |
2494 | ||
2495 | ; return 0; } | |
2496 | EOF | |
91151a06 | 2497 | if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2498 | rm -rf conftest* |
2499 | eval "ac_cv_func_$ac_func=yes" | |
2500 | else | |
2501 | echo "configure: failed program was:" >&5 | |
2502 | cat conftest.$ac_ext >&5 | |
2503 | rm -rf conftest* | |
2504 | eval "ac_cv_func_$ac_func=no" | |
2505 | fi | |
2506 | rm -f conftest* | |
2507 | fi | |
2508 | ||
2509 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2510 | echo "$ac_t""yes" 1>&6 | |
2511 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2512 | cat >> confdefs.h <<EOF | |
2513 | #define $ac_tr_func 1 | |
2514 | EOF | |
2515 | ||
2516 | else | |
2517 | echo "$ac_t""no" 1>&6 | |
2518 | fi | |
2519 | done | |
2520 | ||
2521 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2522 | set dummy gmsgfmt; ac_word=$2 | |
2523 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2524 | echo "configure:2525: checking for $ac_word" >&5 |
c906108c SS |
2525 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2527 | else | |
2528 | case "$GMSGFMT" in | |
2529 | /*) | |
2530 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2531 | ;; | |
2532 | ?:/*) | |
2533 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2534 | ;; | |
2535 | *) | |
2536 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2537 | ac_dummy="$PATH" | |
2538 | for ac_dir in $ac_dummy; do | |
2539 | test -z "$ac_dir" && ac_dir=. | |
2540 | if test -f $ac_dir/$ac_word; then | |
2541 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2542 | break | |
2543 | fi | |
2544 | done | |
2545 | IFS="$ac_save_ifs" | |
2546 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2547 | ;; | |
2548 | esac | |
2549 | fi | |
2550 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2551 | if test -n "$GMSGFMT"; then | |
2552 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2553 | else | |
2554 | echo "$ac_t""no" 1>&6 | |
2555 | fi | |
2556 | ||
2557 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2558 | set dummy xgettext; ac_word=$2 | |
2559 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2560 | echo "configure:2561: checking for $ac_word" >&5 |
c906108c SS |
2561 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2563 | else | |
2564 | case "$XGETTEXT" in | |
2565 | /*) | |
2566 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2567 | ;; | |
2568 | *) | |
2569 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2570 | for ac_dir in $PATH; do | |
2571 | test -z "$ac_dir" && ac_dir=. | |
2572 | if test -f $ac_dir/$ac_word; then | |
2573 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2574 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2575 | break | |
2576 | fi | |
2577 | fi | |
2578 | done | |
2579 | IFS="$ac_save_ifs" | |
2580 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2581 | ;; | |
2582 | esac | |
2583 | fi | |
2584 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2585 | if test -n "$XGETTEXT"; then | |
2586 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2587 | else | |
2588 | echo "$ac_t""no" 1>&6 | |
2589 | fi | |
2590 | ||
2591 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2592 | #line 2593 "configure" |
c906108c SS |
2593 | #include "confdefs.h" |
2594 | ||
2595 | int main() { | |
2596 | extern int _nl_msg_cat_cntr; | |
2597 | return _nl_msg_cat_cntr | |
2598 | ; return 0; } | |
2599 | EOF | |
91151a06 | 2600 | if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2601 | rm -rf conftest* |
2602 | CATOBJEXT=.gmo | |
2603 | DATADIRNAME=share | |
2604 | else | |
2605 | echo "configure: failed program was:" >&5 | |
2606 | cat conftest.$ac_ext >&5 | |
2607 | rm -rf conftest* | |
2608 | CATOBJEXT=.mo | |
2609 | DATADIRNAME=lib | |
2610 | fi | |
2611 | rm -f conftest* | |
2612 | INSTOBJEXT=.mo | |
2613 | fi | |
2614 | fi | |
2615 | ||
2616 | else | |
2617 | echo "$ac_t""no" 1>&6 | |
2618 | fi | |
2619 | ||
2620 | ||
2621 | ||
2622 | if test "$CATOBJEXT" = "NONE"; then | |
2623 | nls_cv_use_gnu_gettext=yes | |
2624 | fi | |
2625 | fi | |
2626 | ||
2627 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2628 | INTLOBJS="\$(GETTOBJS)" | |
2629 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2630 | set dummy msgfmt; ac_word=$2 | |
2631 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2632 | echo "configure:2633: checking for $ac_word" >&5 |
c906108c SS |
2633 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2635 | else | |
2636 | case "$MSGFMT" in | |
2637 | /*) | |
2638 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2639 | ;; | |
2640 | *) | |
2641 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2642 | for ac_dir in $PATH; do | |
2643 | test -z "$ac_dir" && ac_dir=. | |
2644 | if test -f $ac_dir/$ac_word; then | |
2645 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2646 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2647 | break | |
2648 | fi | |
2649 | fi | |
2650 | done | |
2651 | IFS="$ac_save_ifs" | |
2652 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2653 | ;; | |
2654 | esac | |
2655 | fi | |
2656 | MSGFMT="$ac_cv_path_MSGFMT" | |
2657 | if test -n "$MSGFMT"; then | |
2658 | echo "$ac_t""$MSGFMT" 1>&6 | |
2659 | else | |
2660 | echo "$ac_t""no" 1>&6 | |
2661 | fi | |
2662 | ||
2663 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2664 | set dummy gmsgfmt; ac_word=$2 | |
2665 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2666 | echo "configure:2667: checking for $ac_word" >&5 |
c906108c SS |
2667 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2669 | else | |
2670 | case "$GMSGFMT" in | |
2671 | /*) | |
2672 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2673 | ;; | |
2674 | ?:/*) | |
2675 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2676 | ;; | |
2677 | *) | |
2678 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2679 | ac_dummy="$PATH" | |
2680 | for ac_dir in $ac_dummy; do | |
2681 | test -z "$ac_dir" && ac_dir=. | |
2682 | if test -f $ac_dir/$ac_word; then | |
2683 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2684 | break | |
2685 | fi | |
2686 | done | |
2687 | IFS="$ac_save_ifs" | |
2688 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2689 | ;; | |
2690 | esac | |
2691 | fi | |
2692 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2693 | if test -n "$GMSGFMT"; then | |
2694 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2695 | else | |
2696 | echo "$ac_t""no" 1>&6 | |
2697 | fi | |
2698 | ||
2699 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2700 | set dummy xgettext; ac_word=$2 | |
2701 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 2702 | echo "configure:2703: checking for $ac_word" >&5 |
c906108c SS |
2703 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2705 | else | |
2706 | case "$XGETTEXT" in | |
2707 | /*) | |
2708 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2709 | ;; | |
2710 | *) | |
2711 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2712 | for ac_dir in $PATH; do | |
2713 | test -z "$ac_dir" && ac_dir=. | |
2714 | if test -f $ac_dir/$ac_word; then | |
2715 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2716 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2717 | break | |
2718 | fi | |
2719 | fi | |
2720 | done | |
2721 | IFS="$ac_save_ifs" | |
2722 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2723 | ;; | |
2724 | esac | |
2725 | fi | |
2726 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2727 | if test -n "$XGETTEXT"; then | |
2728 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2729 | else | |
2730 | echo "$ac_t""no" 1>&6 | |
2731 | fi | |
2732 | ||
2733 | ||
2734 | USE_INCLUDED_LIBINTL=yes | |
2735 | CATOBJEXT=.gmo | |
2736 | INSTOBJEXT=.mo | |
2737 | DATADIRNAME=share | |
2738 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2739 | INTLLIBS=$INTLDEPS | |
2740 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2741 | nls_cv_header_intl=libintl.h | |
2742 | nls_cv_header_libgt=libgettext.h | |
2743 | fi | |
2744 | ||
2745 | if test "$XGETTEXT" != ":"; then | |
2746 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2747 | : ; | |
2748 | else | |
2749 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2750 | XGETTEXT=":" | |
2751 | fi | |
2752 | fi | |
2753 | ||
2754 | # We need to process the po/ directory. | |
2755 | POSUB=po | |
2756 | else | |
2757 | DATADIRNAME=share | |
2758 | nls_cv_header_intl=libintl.h | |
2759 | nls_cv_header_libgt=libgettext.h | |
2760 | fi | |
2761 | ||
2762 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2763 | # because some of the sources are only built for this goal. | |
2764 | if test "$PACKAGE" = gettext; then | |
2765 | USE_NLS=yes | |
2766 | USE_INCLUDED_LIBINTL=yes | |
2767 | fi | |
2768 | ||
2769 | for lang in $ALL_LINGUAS; do | |
2770 | GMOFILES="$GMOFILES $lang.gmo" | |
2771 | POFILES="$POFILES $lang.po" | |
2772 | done | |
2773 | ||
2774 | ||
2775 | ||
2776 | ||
2777 | ||
2778 | ||
2779 | ||
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | if test "x$CATOBJEXT" != "x"; then | |
2788 | if test "x$ALL_LINGUAS" = "x"; then | |
2789 | LINGUAS= | |
2790 | else | |
2791 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
91151a06 | 2792 | echo "configure:2793: checking for catalogs to be installed" >&5 |
c906108c SS |
2793 | NEW_LINGUAS= |
2794 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2795 | case "$ALL_LINGUAS" in | |
2796 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2797 | esac | |
2798 | done | |
2799 | LINGUAS=$NEW_LINGUAS | |
2800 | echo "$ac_t""$LINGUAS" 1>&6 | |
2801 | fi | |
2802 | ||
2803 | if test -n "$LINGUAS"; then | |
2804 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2805 | fi | |
2806 | fi | |
2807 | ||
2808 | if test $ac_cv_header_locale_h = yes; then | |
2809 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2810 | else | |
2811 | INCLUDE_LOCALE_H="\ | |
2812 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2813 | fi | |
2814 | ||
2815 | ||
2816 | if test -f $srcdir/po2tbl.sed.in; then | |
2817 | if test "$CATOBJEXT" = ".cat"; then | |
2818 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2819 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
91151a06 | 2820 | echo "configure:2821: checking for linux/version.h" >&5 |
c906108c SS |
2821 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2822 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2823 | else | |
2824 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 2825 | #line 2826 "configure" |
c906108c SS |
2826 | #include "confdefs.h" |
2827 | #include <linux/version.h> | |
2828 | EOF | |
2829 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 2830 | { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2831 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2832 | if test -z "$ac_err"; then | |
2833 | rm -rf conftest* | |
2834 | eval "ac_cv_header_$ac_safe=yes" | |
2835 | else | |
2836 | echo "$ac_err" >&5 | |
2837 | echo "configure: failed program was:" >&5 | |
2838 | cat conftest.$ac_ext >&5 | |
2839 | rm -rf conftest* | |
2840 | eval "ac_cv_header_$ac_safe=no" | |
2841 | fi | |
2842 | rm -f conftest* | |
2843 | fi | |
2844 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2845 | echo "$ac_t""yes" 1>&6 | |
2846 | msgformat=linux | |
2847 | else | |
2848 | echo "$ac_t""no" 1>&6 | |
2849 | msgformat=xopen | |
2850 | fi | |
2851 | ||
2852 | ||
2853 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2854 | fi | |
2855 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2856 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2857 | fi | |
2858 | ||
2859 | if test "$PACKAGE" = "gettext"; then | |
2860 | GT_NO="#NO#" | |
2861 | GT_YES= | |
2862 | else | |
2863 | GT_NO= | |
2864 | GT_YES="#YES#" | |
2865 | fi | |
2866 | ||
2867 | ||
2868 | ||
2869 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2870 | ||
2871 | ||
2872 | l= | |
2873 | ||
2874 | ||
4536bbc6 | 2875 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2876 | test -d po || mkdir po |
2877 | if test "x$srcdir" != "x."; then | |
2878 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2879 | posrcprefix="$srcdir/" | |
2880 | else | |
2881 | posrcprefix="../$srcdir/" | |
2882 | fi | |
2883 | else | |
2884 | posrcprefix="../" | |
2885 | fi | |
2886 | rm -f po/POTFILES | |
2887 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2888 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2889 | fi | |
2890 | ||
0fbb3da7 TT |
2891 | cat >> confdefs.h <<\EOF |
2892 | #define PACKAGE "gdb" | |
2893 | EOF | |
2894 | ||
2895 | ||
c906108c SS |
2896 | |
2897 | ||
2898 | CONFIG_OBS= | |
66b965bb | 2899 | CONFIG_LIB_OBS= |
c906108c SS |
2900 | CONFIG_DEPS= |
2901 | CONFIG_SRCS= | |
fb40c209 AC |
2902 | CONFIG_INITS= |
2903 | ENABLE_CFLAGS= | |
b3a90332 AC |
2904 | CONFIG_ALL= |
2905 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2906 | CONFIG_INSTALL= |
2907 | CONFIG_UNINSTALL= | |
c906108c | 2908 | |
ffc6a242 | 2909 | SUBDIRS="doc testsuite nlm" |
c906108c SS |
2910 | configdirs="doc testsuite" |
2911 | ||
96baa820 JM |
2912 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
2913 | if test "${enable_multi_ice+set}" = set; then | |
2914 | enableval="$enable_multi_ice" | |
2915 | case "${enableval}" in | |
2916 | yes ) enable_multi_ice="yes" ;; | |
2917 | no) enable_multi_ice="no" ;; | |
2918 | *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;; | |
2919 | esac | |
2920 | ||
2921 | fi | |
2922 | ||
2923 | ||
2924 | if test "${enable_multi_ice}" = "yes"; then | |
2925 | configdirs="${configdirs} multi-ice" | |
2926 | fi | |
2927 | ||
27e9bf90 | 2928 | . $srcdir/configure.host |
c906108c | 2929 | |
27e9bf90 | 2930 | . $srcdir/configure.tgt |
c906108c | 2931 | |
27e9bf90 MK |
2932 | # Fetch the default architecture and default target vector from BFD. |
2933 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2934 | |
27e9bf90 MK |
2935 | # We only want the first architecture, so strip off the others if |
2936 | # there is more than one. | |
2937 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2938 | |
27e9bf90 MK |
2939 | if test "x$targ_archs" != x; then |
2940 | cat >> confdefs.h <<EOF | |
2941 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2942 | EOF |
2943 | ||
2944 | fi | |
27e9bf90 MK |
2945 | if test "x$targ_defvec" != x; then |
2946 | cat >> confdefs.h <<EOF | |
2947 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2948 | EOF |
2949 | ||
2950 | fi | |
c906108c | 2951 | |
8bb2c122 MK |
2952 | if test "$program_transform_name" = s,x,x,; then |
2953 | program_transform_name= | |
2954 | else | |
2955 | # Double any \ or $. echo might interpret backslashes. | |
2956 | cat <<\EOF_SED > conftestsed | |
2957 | s,\\,\\\\,g; s,\$,$$,g | |
2958 | EOF_SED | |
2959 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2960 | rm -f conftestsed | |
2961 | fi | |
2962 | test "$program_prefix" != NONE && | |
2963 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2964 | # Use a double $ so make ignores it. | |
2965 | test "$program_suffix" != NONE && | |
2966 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2967 | ||
2968 | # sed with no file args requires a program. | |
2969 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2970 | ||
2971 | ||
627af7ea MK |
2972 | # The CLI cannot be disabled yet, but may be in the future. |
2973 | ||
2974 | # Enable CLI. | |
2975 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2976 | if test "${enable_gdbcli+set}" = set; then | |
2977 | enableval="$enable_gdbcli" | |
2978 | case $enableval in | |
2979 | yes) | |
2980 | ;; | |
2981 | no) | |
2982 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2983 | *) | |
2984 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2985 | esac | |
2986 | else | |
2987 | enable_gdbcli=yes | |
2988 | fi | |
2989 | ||
2990 | if test x"$enable_gdbcli" = xyes; then | |
2991 | if test -d $srcdir/cli; then | |
2992 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
2993 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
2994 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
2995 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
2996 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
2997 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
2998 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
2999 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
3000 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
3001 | fi | |
3002 | fi | |
3003 | ||
3004 | # Enable MI. | |
3005 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
3006 | if test "${enable_gdbmi+set}" = set; then | |
3007 | enableval="$enable_gdbmi" | |
3008 | case $enableval in | |
3009 | yes | no) | |
3010 | ;; | |
3011 | *) | |
3012 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3013 | esac | |
3014 | else | |
3015 | enable_gdbmi=yes | |
3016 | fi | |
3017 | ||
3018 | if test x"$enable_gdbmi" = xyes; then | |
3019 | if test -d $srcdir/mi; then | |
3020 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3021 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3022 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3023 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3024 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3025 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3026 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3027 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3028 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3029 | fi | |
3030 | fi | |
3031 | ||
06825bd1 MK |
3032 | # Enable TUI. |
3033 | # Check whether --enable-tui or --disable-tui was given. | |
3034 | if test "${enable_tui+set}" = set; then | |
3035 | enableval="$enable_tui" | |
3036 | case $enableval in | |
3037 | yes | no) | |
3038 | ;; | |
3039 | *) | |
3040 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3041 | esac | |
3042 | fi | |
3043 | ||
3044 | if test x"$enable_tui" = xyes; then | |
3045 | if test -d $srcdir/tui; then | |
3046 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3047 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3048 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3049 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3050 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3051 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3052 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3053 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3054 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3055 | need_curses=yes | |
3056 | fi | |
3057 | fi | |
3058 | ||
8bb2c122 MK |
3059 | # --------------------- # |
3060 | # Checks for programs. # | |
3061 | # --------------------- # | |
3062 | ||
c41b7eb1 | 3063 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3064 | do |
3065 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3066 | set dummy $ac_prog; ac_word=$2 | |
3067 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 3068 | echo "configure:3069: checking for $ac_word" >&5 |
7a292a7a SS |
3069 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3070 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3071 | else | |
3072 | if test -n "$AWK"; then | |
3073 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3074 | else | |
3075 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3076 | ac_dummy="$PATH" | |
3077 | for ac_dir in $ac_dummy; do | |
3078 | test -z "$ac_dir" && ac_dir=. | |
3079 | if test -f $ac_dir/$ac_word; then | |
3080 | ac_cv_prog_AWK="$ac_prog" | |
3081 | break | |
3082 | fi | |
3083 | done | |
3084 | IFS="$ac_save_ifs" | |
3085 | fi | |
3086 | fi | |
3087 | AWK="$ac_cv_prog_AWK" | |
3088 | if test -n "$AWK"; then | |
3089 | echo "$ac_t""$AWK" 1>&6 | |
3090 | else | |
3091 | echo "$ac_t""no" 1>&6 | |
3092 | fi | |
3093 | ||
3094 | test -n "$AWK" && break | |
3095 | done | |
3096 | ||
c906108c SS |
3097 | # Find a good install program. We prefer a C program (faster), |
3098 | # so one script is as good as another. But avoid the broken or | |
3099 | # incompatible versions: | |
3100 | # SysV /etc/install, /usr/sbin/install | |
3101 | # SunOS /usr/etc/install | |
3102 | # IRIX /sbin/install | |
3103 | # AIX /bin/install | |
3104 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3105 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3106 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3107 | # ./install, which can be erroneously created by make from ./install.sh. | |
3108 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
91151a06 | 3109 | echo "configure:3110: checking for a BSD compatible install" >&5 |
c906108c SS |
3110 | if test -z "$INSTALL"; then |
3111 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3112 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3113 | else | |
3114 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3115 | for ac_dir in $PATH; do | |
3116 | # Account for people who put trailing slashes in PATH elements. | |
3117 | case "$ac_dir/" in | |
3118 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3119 | *) | |
3120 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3121 | # Don't use installbsd from OSF since it installs stuff as root | |
3122 | # by default. | |
3123 | for ac_prog in ginstall scoinst install; do | |
3124 | if test -f $ac_dir/$ac_prog; then | |
3125 | if test $ac_prog = install && | |
3126 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3127 | # AIX install. It has an incompatible calling convention. | |
3128 | : | |
3129 | else | |
3130 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3131 | break 2 | |
3132 | fi | |
3133 | fi | |
3134 | done | |
3135 | ;; | |
3136 | esac | |
3137 | done | |
3138 | IFS="$ac_save_IFS" | |
3139 | ||
3140 | fi | |
3141 | if test "${ac_cv_path_install+set}" = set; then | |
3142 | INSTALL="$ac_cv_path_install" | |
3143 | else | |
3144 | # As a last resort, use the slow shell script. We don't cache a | |
3145 | # path for INSTALL within a source directory, because that will | |
3146 | # break other packages using the cache if that directory is | |
3147 | # removed, or if the path is relative. | |
3148 | INSTALL="$ac_install_sh" | |
3149 | fi | |
3150 | fi | |
3151 | echo "$ac_t""$INSTALL" 1>&6 | |
3152 | ||
3153 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3154 | # It thinks the first close brace ends the variable substitution. | |
3155 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3156 | ||
3157 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3158 | ||
3159 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3160 | ||
8bb2c122 | 3161 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
91151a06 | 3162 | echo "configure:3163: checking whether ln -s works" >&5 |
8bb2c122 MK |
3163 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3165 | else |
8bb2c122 MK |
3166 | rm -f conftestdata |
3167 | if ln -s X conftestdata 2>/dev/null | |
3168 | then | |
3169 | rm -f conftestdata | |
3170 | ac_cv_prog_LN_S="ln -s" | |
3171 | else | |
3172 | ac_cv_prog_LN_S=ln | |
3173 | fi | |
3174 | fi | |
3175 | LN_S="$ac_cv_prog_LN_S" | |
3176 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3177 | echo "$ac_t""yes" 1>&6 | |
3178 | else | |
3179 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3180 | fi |
3181 | ||
8bb2c122 MK |
3182 | # Extract the first word of "ranlib", so it can be a program name with args. |
3183 | set dummy ranlib; ac_word=$2 | |
c906108c | 3184 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
91151a06 | 3185 | echo "configure:3186: checking for $ac_word" >&5 |
8bb2c122 | 3186 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3187 | echo $ac_n "(cached) $ac_c" 1>&6 |
3188 | else | |
8bb2c122 MK |
3189 | if test -n "$RANLIB"; then |
3190 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3191 | else |
3192 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3193 | ac_dummy="$PATH" | |
3194 | for ac_dir in $ac_dummy; do | |
3195 | test -z "$ac_dir" && ac_dir=. | |
3196 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3197 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3198 | break |
3199 | fi | |
3200 | done | |
3201 | IFS="$ac_save_ifs" | |
8bb2c122 | 3202 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3203 | fi |
3204 | fi | |
8bb2c122 MK |
3205 | RANLIB="$ac_cv_prog_RANLIB" |
3206 | if test -n "$RANLIB"; then | |
3207 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3208 | else |
3209 | echo "$ac_t""no" 1>&6 | |
3210 | fi | |
3211 | ||
8bb2c122 MK |
3212 | for ac_prog in 'bison -y' byacc |
3213 | do | |
3214 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3215 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3216 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
91151a06 | 3217 | echo "configure:3218: checking for $ac_word" >&5 |
8bb2c122 | 3218 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3219 | echo $ac_n "(cached) $ac_c" 1>&6 |
3220 | else | |
8bb2c122 MK |
3221 | if test -n "$YACC"; then |
3222 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3223 | else |
3224 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3225 | ac_dummy="$PATH" | |
3226 | for ac_dir in $ac_dummy; do | |
3227 | test -z "$ac_dir" && ac_dir=. | |
3228 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3229 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3230 | break |
3231 | fi | |
3232 | done | |
3233 | IFS="$ac_save_ifs" | |
3234 | fi | |
3235 | fi | |
8bb2c122 MK |
3236 | YACC="$ac_cv_prog_YACC" |
3237 | if test -n "$YACC"; then | |
3238 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3239 | else |
3240 | echo "$ac_t""no" 1>&6 | |
3241 | fi | |
3242 | ||
8bb2c122 MK |
3243 | test -n "$YACC" && break |
3244 | done | |
3245 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3246 | |
8bb2c122 MK |
3247 | |
3248 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3249 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3250 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
91151a06 | 3251 | echo "configure:3252: checking for $ac_word" >&5 |
8bb2c122 | 3252 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3253 | echo $ac_n "(cached) $ac_c" 1>&6 |
3254 | else | |
8bb2c122 MK |
3255 | if test -n "$AR"; then |
3256 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3257 | else |
3258 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3259 | ac_dummy="$PATH" | |
3260 | for ac_dir in $ac_dummy; do | |
3261 | test -z "$ac_dir" && ac_dir=. | |
3262 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3263 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3264 | break |
3265 | fi | |
3266 | done | |
3267 | IFS="$ac_save_ifs" | |
8bb2c122 | 3268 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3269 | fi |
3270 | fi | |
8bb2c122 MK |
3271 | AR="$ac_cv_prog_AR" |
3272 | if test -n "$AR"; then | |
3273 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3274 | else |
3275 | echo "$ac_t""no" 1>&6 | |
3276 | fi | |
3277 | ||
8bb2c122 | 3278 | |
c906108c | 3279 | |
95ca63c4 CF |
3280 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3281 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3282 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 3283 | echo "configure:3284: checking for $ac_word" >&5 |
95ca63c4 CF |
3284 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3285 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3286 | else | |
3287 | if test -n "$DLLTOOL"; then | |
3288 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3289 | else | |
3290 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3291 | ac_dummy="$PATH" | |
3292 | for ac_dir in $ac_dummy; do | |
3293 | test -z "$ac_dir" && ac_dir=. | |
3294 | if test -f $ac_dir/$ac_word; then | |
3295 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3296 | break | |
3297 | fi | |
3298 | done | |
3299 | IFS="$ac_save_ifs" | |
3300 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3301 | fi | |
3302 | fi | |
3303 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3304 | if test -n "$DLLTOOL"; then | |
3305 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3306 | else | |
3307 | echo "$ac_t""no" 1>&6 | |
3308 | fi | |
3309 | ||
3310 | ||
3311 | ||
3312 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3313 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3314 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 3315 | echo "configure:3316: checking for $ac_word" >&5 |
95ca63c4 CF |
3316 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3317 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3318 | else | |
3319 | if test -n "$WINDRES"; then | |
3320 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3321 | else | |
3322 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3323 | ac_dummy="$PATH" | |
3324 | for ac_dir in $ac_dummy; do | |
3325 | test -z "$ac_dir" && ac_dir=. | |
3326 | if test -f $ac_dir/$ac_word; then | |
3327 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3328 | break | |
3329 | fi | |
3330 | done | |
3331 | IFS="$ac_save_ifs" | |
3332 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3333 | fi | |
3334 | fi | |
3335 | WINDRES="$ac_cv_prog_WINDRES" | |
3336 | if test -n "$WINDRES"; then | |
3337 | echo "$ac_t""$WINDRES" 1>&6 | |
3338 | else | |
3339 | echo "$ac_t""no" 1>&6 | |
3340 | fi | |
3341 | ||
3342 | ||
3343 | ||
c906108c | 3344 | |
8bb2c122 | 3345 | # Needed for GNU/Hurd. |
75c6e08a MK |
3346 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3347 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3348 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
91151a06 | 3349 | echo "configure:3350: checking for $ac_word" >&5 |
75c6e08a MK |
3350 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3351 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3352 | else | |
3353 | if test -n "$MIG"; then | |
3354 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3355 | else | |
3356 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3357 | ac_dummy="$PATH" | |
3358 | for ac_dir in $ac_dummy; do | |
3359 | test -z "$ac_dir" && ac_dir=. | |
3360 | if test -f $ac_dir/$ac_word; then | |
3361 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3362 | break | |
3363 | fi | |
3364 | done | |
3365 | IFS="$ac_save_ifs" | |
3366 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3367 | fi | |
3368 | fi | |
3369 | MIG="$ac_cv_prog_MIG" | |
3370 | if test -n "$MIG"; then | |
3371 | echo "$ac_t""$MIG" 1>&6 | |
3372 | else | |
3373 | echo "$ac_t""no" 1>&6 | |
3374 | fi | |
3375 | ||
3376 | ||
3377 | ||
3378 | ||
9a156167 MK |
3379 | # ---------------------- # |
3380 | # Checks for libraries. # | |
3381 | # ---------------------- # | |
3382 | ||
3383 | # We might need to link with -lm; most simulators need it. | |
3384 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
91151a06 | 3385 | echo "configure:3386: checking for main in -lm" >&5 |
9a156167 MK |
3386 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3387 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3388 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3389 | else | |
3390 | ac_save_LIBS="$LIBS" | |
3391 | LIBS="-lm $LIBS" | |
3392 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3393 | #line 3394 "configure" |
9a156167 MK |
3394 | #include "confdefs.h" |
3395 | ||
3396 | int main() { | |
3397 | main() | |
3398 | ; return 0; } | |
3399 | EOF | |
91151a06 | 3400 | if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3401 | rm -rf conftest* |
3402 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3403 | else | |
3404 | echo "configure: failed program was:" >&5 | |
3405 | cat conftest.$ac_ext >&5 | |
3406 | rm -rf conftest* | |
3407 | eval "ac_cv_lib_$ac_lib_var=no" | |
3408 | fi | |
3409 | rm -f conftest* | |
3410 | LIBS="$ac_save_LIBS" | |
3411 | ||
3412 | fi | |
3413 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3414 | echo "$ac_t""yes" 1>&6 | |
3415 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3416 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3417 | cat >> confdefs.h <<EOF | |
3418 | #define $ac_tr_lib 1 | |
3419 | EOF | |
3420 | ||
3421 | LIBS="-lm $LIBS" | |
3422 | ||
3423 | else | |
3424 | echo "$ac_t""no" 1>&6 | |
3425 | fi | |
3426 | ||
3427 | ||
3428 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3429 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3430 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3431 | # is known to have this problem). Therefore we avoid libw if we can. | |
3432 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
91151a06 | 3433 | echo "configure:3434: checking for wctype" >&5 |
9a156167 MK |
3434 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3435 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3436 | else | |
3437 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3438 | #line 3439 "configure" |
9a156167 MK |
3439 | #include "confdefs.h" |
3440 | /* System header to define __stub macros and hopefully few prototypes, | |
3441 | which can conflict with char wctype(); below. */ | |
3442 | #include <assert.h> | |
3443 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3444 | /* We use char because int might match the return type of a gcc2 | |
3445 | builtin and then its argument prototype would still apply. */ | |
3446 | char wctype(); | |
3447 | ||
3448 | int main() { | |
3449 | ||
3450 | /* The GNU C library defines this for functions which it implements | |
3451 | to always fail with ENOSYS. Some functions are actually named | |
3452 | something starting with __ and the normal name is an alias. */ | |
3453 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3454 | choke me | |
3455 | #else | |
3456 | wctype(); | |
3457 | #endif | |
3458 | ||
3459 | ; return 0; } | |
3460 | EOF | |
91151a06 | 3461 | if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3462 | rm -rf conftest* |
3463 | eval "ac_cv_func_wctype=yes" | |
3464 | else | |
3465 | echo "configure: failed program was:" >&5 | |
3466 | cat conftest.$ac_ext >&5 | |
3467 | rm -rf conftest* | |
3468 | eval "ac_cv_func_wctype=no" | |
3469 | fi | |
3470 | rm -f conftest* | |
3471 | fi | |
3472 | ||
3473 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3474 | echo "$ac_t""yes" 1>&6 | |
3475 | : | |
3476 | else | |
3477 | echo "$ac_t""no" 1>&6 | |
3478 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
91151a06 | 3479 | echo "configure:3480: checking for wctype in -lw" >&5 |
9a156167 MK |
3480 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3481 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3482 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3483 | else | |
3484 | ac_save_LIBS="$LIBS" | |
3485 | LIBS="-lw $LIBS" | |
3486 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3487 | #line 3488 "configure" |
9a156167 MK |
3488 | #include "confdefs.h" |
3489 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3490 | /* We use char because int might match the return type of a gcc2 | |
3491 | builtin and then its argument prototype would still apply. */ | |
3492 | char wctype(); | |
3493 | ||
3494 | int main() { | |
3495 | wctype() | |
3496 | ; return 0; } | |
3497 | EOF | |
91151a06 | 3498 | if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3499 | rm -rf conftest* |
3500 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3501 | else | |
3502 | echo "configure: failed program was:" >&5 | |
3503 | cat conftest.$ac_ext >&5 | |
3504 | rm -rf conftest* | |
3505 | eval "ac_cv_lib_$ac_lib_var=no" | |
3506 | fi | |
3507 | rm -f conftest* | |
3508 | LIBS="$ac_save_LIBS" | |
3509 | ||
3510 | fi | |
3511 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3512 | echo "$ac_t""yes" 1>&6 | |
3513 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3514 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3515 | cat >> confdefs.h <<EOF | |
3516 | #define $ac_tr_lib 1 | |
3517 | EOF | |
3518 | ||
3519 | LIBS="-lw $LIBS" | |
3520 | ||
3521 | else | |
3522 | echo "$ac_t""no" 1>&6 | |
3523 | fi | |
3524 | ||
3525 | fi | |
3526 | ||
3527 | ||
3528 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3529 | ||
3530 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
91151a06 | 3531 | echo "configure:3532: checking for library containing socketpair" >&5 |
9a156167 MK |
3532 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3534 | else | |
3535 | ac_func_search_save_LIBS="$LIBS" | |
3536 | ac_cv_search_socketpair="no" | |
3537 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3538 | #line 3539 "configure" |
9a156167 MK |
3539 | #include "confdefs.h" |
3540 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3541 | /* We use char because int might match the return type of a gcc2 | |
3542 | builtin and then its argument prototype would still apply. */ | |
3543 | char socketpair(); | |
3544 | ||
3545 | int main() { | |
3546 | socketpair() | |
3547 | ; return 0; } | |
3548 | EOF | |
91151a06 | 3549 | if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3550 | rm -rf conftest* |
3551 | ac_cv_search_socketpair="none required" | |
3552 | else | |
3553 | echo "configure: failed program was:" >&5 | |
3554 | cat conftest.$ac_ext >&5 | |
3555 | fi | |
3556 | rm -f conftest* | |
3557 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3558 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3559 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3560 | #line 3561 "configure" |
9a156167 MK |
3561 | #include "confdefs.h" |
3562 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3563 | /* We use char because int might match the return type of a gcc2 | |
3564 | builtin and then its argument prototype would still apply. */ | |
3565 | char socketpair(); | |
3566 | ||
3567 | int main() { | |
3568 | socketpair() | |
3569 | ; return 0; } | |
3570 | EOF | |
91151a06 | 3571 | if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3572 | rm -rf conftest* |
3573 | ac_cv_search_socketpair="-l$i" | |
3574 | break | |
3575 | else | |
3576 | echo "configure: failed program was:" >&5 | |
3577 | cat conftest.$ac_ext >&5 | |
3578 | fi | |
3579 | rm -f conftest* | |
3580 | done | |
3581 | LIBS="$ac_func_search_save_LIBS" | |
3582 | fi | |
3583 | ||
3584 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3585 | if test "$ac_cv_search_socketpair" != "no"; then | |
3586 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3587 | ||
3588 | else : | |
3589 | ||
3590 | fi | |
3591 | ||
06825bd1 MK |
3592 | # Since GDB uses Readline, we need termcap functionality, so we need |
3593 | # to find a library that provides that. When GDB is configured with | |
3594 | # --enable-tui, we need full curses functionality. | |
3595 | # | |
3596 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3597 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3598 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3599 | # `curses'. I don't see why we should use HP curses if a more | |
3600 | # standard curses is available, except that according to HP's | |
3601 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3602 | # HP-UX 10.10 and 10.20. | |
3603 | ||
3604 | if test "$need_curses" = yes; then | |
3605 | ||
3606 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
91151a06 | 3607 | echo "configure:3608: checking for library containing initscr" >&5 |
06825bd1 MK |
3608 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3609 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3610 | else | |
3611 | ac_func_search_save_LIBS="$LIBS" | |
3612 | ac_cv_search_initscr="no" | |
3613 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3614 | #line 3615 "configure" |
06825bd1 MK |
3615 | #include "confdefs.h" |
3616 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3617 | /* We use char because int might match the return type of a gcc2 | |
3618 | builtin and then its argument prototype would still apply. */ | |
3619 | char initscr(); | |
3620 | ||
3621 | int main() { | |
3622 | initscr() | |
3623 | ; return 0; } | |
3624 | EOF | |
91151a06 | 3625 | if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3626 | rm -rf conftest* |
3627 | ac_cv_search_initscr="none required" | |
3628 | else | |
3629 | echo "configure: failed program was:" >&5 | |
3630 | cat conftest.$ac_ext >&5 | |
3631 | fi | |
3632 | rm -f conftest* | |
3633 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3634 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3635 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3636 | #line 3637 "configure" |
06825bd1 MK |
3637 | #include "confdefs.h" |
3638 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3639 | /* We use char because int might match the return type of a gcc2 | |
3640 | builtin and then its argument prototype would still apply. */ | |
3641 | char initscr(); | |
3642 | ||
3643 | int main() { | |
3644 | initscr() | |
3645 | ; return 0; } | |
3646 | EOF | |
91151a06 | 3647 | if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3648 | rm -rf conftest* |
3649 | ac_cv_search_initscr="-l$i" | |
3650 | break | |
3651 | else | |
3652 | echo "configure: failed program was:" >&5 | |
3653 | cat conftest.$ac_ext >&5 | |
3654 | fi | |
3655 | rm -f conftest* | |
3656 | done | |
3657 | LIBS="$ac_func_search_save_LIBS" | |
3658 | fi | |
3659 | ||
3660 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3661 | if test "$ac_cv_search_initscr" != "no"; then | |
3662 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3663 | ||
3664 | else : | |
3665 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3666 | fi | |
3667 | fi | |
3668 | ||
3669 | case $host_os in | |
3670 | cygwin*) | |
3671 | if test -d $srcdir/libtermcap; then | |
3672 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3673 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3674 | fi ;; | |
3675 | go32*) | |
3676 | # ??? Is this really true? | |
3677 | ac_cv_search_tgetent="none required" | |
3678 | ;; | |
3679 | aix*) | |
3680 | # Readline prefers curses over termcap on AIX. | |
3681 | # ??? Why? | |
3682 | ||
3683 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
91151a06 | 3684 | echo "configure:3685: checking for library containing tgetent" >&5 |
06825bd1 MK |
3685 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3687 | else | |
3688 | ac_func_search_save_LIBS="$LIBS" | |
3689 | ac_cv_search_tgetent="no" | |
3690 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3691 | #line 3692 "configure" |
06825bd1 MK |
3692 | #include "confdefs.h" |
3693 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3694 | /* We use char because int might match the return type of a gcc2 | |
3695 | builtin and then its argument prototype would still apply. */ | |
3696 | char tgetent(); | |
3697 | ||
3698 | int main() { | |
3699 | tgetent() | |
3700 | ; return 0; } | |
3701 | EOF | |
91151a06 | 3702 | if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3703 | rm -rf conftest* |
3704 | ac_cv_search_tgetent="none required" | |
3705 | else | |
3706 | echo "configure: failed program was:" >&5 | |
3707 | cat conftest.$ac_ext >&5 | |
3708 | fi | |
3709 | rm -f conftest* | |
3710 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3711 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3712 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3713 | #line 3714 "configure" |
06825bd1 MK |
3714 | #include "confdefs.h" |
3715 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3716 | /* We use char because int might match the return type of a gcc2 | |
3717 | builtin and then its argument prototype would still apply. */ | |
3718 | char tgetent(); | |
3719 | ||
3720 | int main() { | |
3721 | tgetent() | |
3722 | ; return 0; } | |
3723 | EOF | |
91151a06 | 3724 | if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3725 | rm -rf conftest* |
3726 | ac_cv_search_tgetent="-l$i" | |
3727 | break | |
3728 | else | |
3729 | echo "configure: failed program was:" >&5 | |
3730 | cat conftest.$ac_ext >&5 | |
3731 | fi | |
3732 | rm -f conftest* | |
3733 | done | |
3734 | LIBS="$ac_func_search_save_LIBS" | |
3735 | fi | |
3736 | ||
3737 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3738 | if test "$ac_cv_search_tgetent" != "no"; then | |
3739 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3740 | ||
3741 | else : | |
3742 | ||
3743 | fi | |
3744 | ;; | |
3745 | esac | |
3746 | ||
3747 | # Note: We used to check for libtermlib and libterminfo too, but | |
3748 | # Readline doesn't, so I think we're safe with leaving them out. | |
3749 | ||
3750 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
91151a06 | 3751 | echo "configure:3752: checking for library containing tgetent" >&5 |
06825bd1 MK |
3752 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3753 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3754 | else | |
3755 | ac_func_search_save_LIBS="$LIBS" | |
3756 | ac_cv_search_tgetent="no" | |
3757 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3758 | #line 3759 "configure" |
06825bd1 MK |
3759 | #include "confdefs.h" |
3760 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3761 | /* We use char because int might match the return type of a gcc2 | |
3762 | builtin and then its argument prototype would still apply. */ | |
3763 | char tgetent(); | |
3764 | ||
3765 | int main() { | |
3766 | tgetent() | |
3767 | ; return 0; } | |
3768 | EOF | |
91151a06 | 3769 | if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3770 | rm -rf conftest* |
3771 | ac_cv_search_tgetent="none required" | |
3772 | else | |
3773 | echo "configure: failed program was:" >&5 | |
3774 | cat conftest.$ac_ext >&5 | |
3775 | fi | |
3776 | rm -f conftest* | |
3777 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3778 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3779 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3780 | #line 3781 "configure" |
06825bd1 MK |
3781 | #include "confdefs.h" |
3782 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3783 | /* We use char because int might match the return type of a gcc2 | |
3784 | builtin and then its argument prototype would still apply. */ | |
3785 | char tgetent(); | |
3786 | ||
3787 | int main() { | |
3788 | tgetent() | |
3789 | ; return 0; } | |
3790 | EOF | |
91151a06 | 3791 | if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3792 | rm -rf conftest* |
3793 | ac_cv_search_tgetent="-l$i" | |
3794 | break | |
3795 | else | |
3796 | echo "configure: failed program was:" >&5 | |
3797 | cat conftest.$ac_ext >&5 | |
3798 | fi | |
3799 | rm -f conftest* | |
3800 | done | |
3801 | LIBS="$ac_func_search_save_LIBS" | |
3802 | fi | |
3803 | ||
3804 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3805 | if test "$ac_cv_search_tgetent" != "no"; then | |
3806 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3807 | ||
3808 | else : | |
3809 | ||
3810 | fi | |
3811 | ||
3812 | if test "$ac_cv_search_tgetent" = no; then | |
3813 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3814 | fi | |
3815 | ||
5ee754fc MK |
3816 | # ------------------------- # |
3817 | # Checks for header files. # | |
3818 | # ------------------------- # | |
3819 | ||
3820 | ac_header_dirent=no | |
3821 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3822 | do | |
3823 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3824 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
91151a06 | 3825 | echo "configure:3826: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3826 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3827 | echo $ac_n "(cached) $ac_c" 1>&6 |
3828 | else | |
3829 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3830 | #line 3831 "configure" |
c906108c SS |
3831 | #include "confdefs.h" |
3832 | #include <sys/types.h> | |
5ee754fc MK |
3833 | #include <$ac_hdr> |
3834 | int main() { | |
3835 | DIR *dirp = 0; | |
3836 | ; return 0; } | |
3837 | EOF | |
91151a06 | 3838 | if { (eval echo configure:3839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
3839 | rm -rf conftest* |
3840 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3841 | else | |
3842 | echo "configure: failed program was:" >&5 | |
3843 | cat conftest.$ac_ext >&5 | |
3844 | rm -rf conftest* | |
3845 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3846 | fi | |
3847 | rm -f conftest* | |
3848 | fi | |
3849 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3850 | echo "$ac_t""yes" 1>&6 | |
3851 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3852 | cat >> confdefs.h <<EOF | |
3853 | #define $ac_tr_hdr 1 | |
3854 | EOF | |
3855 | ac_header_dirent=$ac_hdr; break | |
3856 | else | |
3857 | echo "$ac_t""no" 1>&6 | |
3858 | fi | |
3859 | done | |
3860 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
3861 | if test $ac_header_dirent = dirent.h; then | |
3862 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
91151a06 | 3863 | echo "configure:3864: checking for opendir in -ldir" >&5 |
5ee754fc MK |
3864 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
3865 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3866 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3867 | else | |
3868 | ac_save_LIBS="$LIBS" | |
3869 | LIBS="-ldir $LIBS" | |
3870 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3871 | #line 3872 "configure" |
5ee754fc MK |
3872 | #include "confdefs.h" |
3873 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3874 | /* We use char because int might match the return type of a gcc2 | |
3875 | builtin and then its argument prototype would still apply. */ | |
3876 | char opendir(); | |
c906108c SS |
3877 | |
3878 | int main() { | |
5ee754fc | 3879 | opendir() |
c906108c SS |
3880 | ; return 0; } |
3881 | EOF | |
91151a06 | 3882 | if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 3883 | rm -rf conftest* |
5ee754fc | 3884 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
3885 | else |
3886 | echo "configure: failed program was:" >&5 | |
3887 | cat conftest.$ac_ext >&5 | |
3888 | rm -rf conftest* | |
5ee754fc | 3889 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
3890 | fi |
3891 | rm -f conftest* | |
5ee754fc MK |
3892 | LIBS="$ac_save_LIBS" |
3893 | ||
3894 | fi | |
3895 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3896 | echo "$ac_t""yes" 1>&6 | |
3897 | LIBS="$LIBS -ldir" | |
3898 | else | |
3899 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3900 | fi |
3901 | ||
5ee754fc MK |
3902 | else |
3903 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
91151a06 | 3904 | echo "configure:3905: checking for opendir in -lx" >&5 |
5ee754fc MK |
3905 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
3906 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3907 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3908 | else | |
3909 | ac_save_LIBS="$LIBS" | |
3910 | LIBS="-lx $LIBS" | |
3911 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3912 | #line 3913 "configure" |
5ee754fc MK |
3913 | #include "confdefs.h" |
3914 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3915 | /* We use char because int might match the return type of a gcc2 | |
3916 | builtin and then its argument prototype would still apply. */ | |
3917 | char opendir(); | |
3918 | ||
3919 | int main() { | |
3920 | opendir() | |
3921 | ; return 0; } | |
c906108c | 3922 | EOF |
91151a06 | 3923 | if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
3924 | rm -rf conftest* |
3925 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3926 | else | |
3927 | echo "configure: failed program was:" >&5 | |
3928 | cat conftest.$ac_ext >&5 | |
3929 | rm -rf conftest* | |
3930 | eval "ac_cv_lib_$ac_lib_var=no" | |
3931 | fi | |
3932 | rm -f conftest* | |
3933 | LIBS="$ac_save_LIBS" | |
c906108c | 3934 | |
5ee754fc MK |
3935 | fi |
3936 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3937 | echo "$ac_t""yes" 1>&6 | |
3938 | LIBS="$LIBS -lx" | |
3939 | else | |
3940 | echo "$ac_t""no" 1>&6 | |
3941 | fi | |
c906108c | 3942 | |
5ee754fc | 3943 | fi |
c906108c | 3944 | |
5ee754fc | 3945 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
91151a06 | 3946 | echo "configure:3947: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 3947 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
3948 | echo $ac_n "(cached) $ac_c" 1>&6 |
3949 | else | |
3950 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 3951 | #line 3952 "configure" |
9608ab8b MK |
3952 | #include "confdefs.h" |
3953 | #include <sys/types.h> | |
5ee754fc MK |
3954 | #include <sys/stat.h> |
3955 | ||
3956 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3957 | # if S_ISBLK (S_IFDIR) | |
3958 | You lose. | |
3959 | # endif | |
3960 | #endif | |
3961 | ||
3962 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3963 | # if S_ISBLK (S_IFCHR) | |
3964 | You lose. | |
3965 | # endif | |
3966 | #endif | |
3967 | ||
3968 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3969 | # if S_ISLNK (S_IFREG) | |
3970 | You lose. | |
3971 | # endif | |
3972 | #endif | |
3973 | ||
3974 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3975 | # if S_ISSOCK (S_IFREG) | |
3976 | You lose. | |
3977 | # endif | |
3978 | #endif | |
3979 | ||
9608ab8b | 3980 | EOF |
5ee754fc MK |
3981 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3982 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 3983 | rm -rf conftest* |
5ee754fc MK |
3984 | ac_cv_header_stat_broken=yes |
3985 | else | |
3986 | rm -rf conftest* | |
3987 | ac_cv_header_stat_broken=no | |
3988 | fi | |
3989 | rm -f conftest* | |
3990 | ||
3991 | fi | |
3992 | ||
3993 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
3994 | if test $ac_cv_header_stat_broken = yes; then | |
3995 | cat >> confdefs.h <<\EOF | |
3996 | #define STAT_MACROS_BROKEN 1 | |
3997 | EOF | |
3998 | ||
3999 | fi | |
4000 | ||
4001 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
91151a06 | 4002 | echo "configure:4003: checking for ANSI C header files" >&5 |
5ee754fc MK |
4003 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4005 | else | |
4006 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4007 | #line 4008 "configure" |
5ee754fc MK |
4008 | #include "confdefs.h" |
4009 | #include <stdlib.h> | |
4010 | #include <stdarg.h> | |
4011 | #include <string.h> | |
4012 | #include <float.h> | |
4013 | EOF | |
4014 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4015 | { (eval echo configure:4016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4016 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4017 | if test -z "$ac_err"; then | |
4018 | rm -rf conftest* | |
4019 | ac_cv_header_stdc=yes | |
4020 | else | |
4021 | echo "$ac_err" >&5 | |
4022 | echo "configure: failed program was:" >&5 | |
4023 | cat conftest.$ac_ext >&5 | |
4024 | rm -rf conftest* | |
4025 | ac_cv_header_stdc=no | |
4026 | fi | |
4027 | rm -f conftest* | |
4028 | ||
4029 | if test $ac_cv_header_stdc = yes; then | |
4030 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4031 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4032 | #line 4033 "configure" |
5ee754fc MK |
4033 | #include "confdefs.h" |
4034 | #include <string.h> | |
4035 | EOF | |
4036 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4037 | egrep "memchr" >/dev/null 2>&1; then | |
4038 | : | |
4039 | else | |
4040 | rm -rf conftest* | |
4041 | ac_cv_header_stdc=no | |
4042 | fi | |
4043 | rm -f conftest* | |
4044 | ||
4045 | fi | |
4046 | ||
4047 | if test $ac_cv_header_stdc = yes; then | |
4048 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4049 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4050 | #line 4051 "configure" |
5ee754fc MK |
4051 | #include "confdefs.h" |
4052 | #include <stdlib.h> | |
4053 | EOF | |
4054 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4055 | egrep "free" >/dev/null 2>&1; then | |
4056 | : | |
4057 | else | |
4058 | rm -rf conftest* | |
4059 | ac_cv_header_stdc=no | |
4060 | fi | |
4061 | rm -f conftest* | |
4062 | ||
4063 | fi | |
4064 | ||
4065 | if test $ac_cv_header_stdc = yes; then | |
4066 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4067 | if test "$cross_compiling" = yes; then | |
4068 | : | |
4069 | else | |
4070 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4071 | #line 4072 "configure" |
5ee754fc MK |
4072 | #include "confdefs.h" |
4073 | #include <ctype.h> | |
4074 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4075 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4076 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4077 | int main () { int i; for (i = 0; i < 256; i++) | |
4078 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4079 | exit (0); } | |
4080 | ||
4081 | EOF | |
91151a06 | 4082 | if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4083 | then |
4084 | : | |
9608ab8b | 4085 | else |
5ee754fc MK |
4086 | echo "configure: failed program was:" >&5 |
4087 | cat conftest.$ac_ext >&5 | |
4088 | rm -fr conftest* | |
4089 | ac_cv_header_stdc=no | |
4090 | fi | |
4091 | rm -fr conftest* | |
4092 | fi | |
4093 | ||
4094 | fi | |
4095 | fi | |
4096 | ||
4097 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4098 | if test $ac_cv_header_stdc = yes; then | |
4099 | cat >> confdefs.h <<\EOF | |
4100 | #define STDC_HEADERS 1 | |
4101 | EOF | |
4102 | ||
4103 | fi | |
4104 | ||
4105 | for ac_hdr in link.h | |
4106 | do | |
4107 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4108 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4109 | echo "configure:4110: checking for $ac_hdr" >&5 |
5ee754fc MK |
4110 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4112 | else | |
4113 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4114 | #line 4115 "configure" |
5ee754fc MK |
4115 | #include "confdefs.h" |
4116 | #include <$ac_hdr> | |
4117 | EOF | |
4118 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4119 | { (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4120 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4121 | if test -z "$ac_err"; then | |
4122 | rm -rf conftest* | |
4123 | eval "ac_cv_header_$ac_safe=yes" | |
4124 | else | |
4125 | echo "$ac_err" >&5 | |
4126 | echo "configure: failed program was:" >&5 | |
4127 | cat conftest.$ac_ext >&5 | |
4128 | rm -rf conftest* | |
4129 | eval "ac_cv_header_$ac_safe=no" | |
4130 | fi | |
4131 | rm -f conftest* | |
4132 | fi | |
4133 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4134 | echo "$ac_t""yes" 1>&6 | |
4135 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4136 | cat >> confdefs.h <<EOF | |
4137 | #define $ac_tr_hdr 1 | |
4138 | EOF | |
4139 | ||
4140 | else | |
4141 | echo "$ac_t""no" 1>&6 | |
4142 | fi | |
4143 | done | |
4144 | ||
4145 | for ac_hdr in nlist.h | |
4146 | do | |
4147 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4148 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4149 | echo "configure:4150: checking for $ac_hdr" >&5 |
5ee754fc MK |
4150 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4151 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4152 | else | |
4153 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4154 | #line 4155 "configure" |
5ee754fc MK |
4155 | #include "confdefs.h" |
4156 | #include <$ac_hdr> | |
4157 | EOF | |
4158 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4159 | { (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4160 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4161 | if test -z "$ac_err"; then | |
4162 | rm -rf conftest* | |
4163 | eval "ac_cv_header_$ac_safe=yes" | |
4164 | else | |
4165 | echo "$ac_err" >&5 | |
4166 | echo "configure: failed program was:" >&5 | |
4167 | cat conftest.$ac_ext >&5 | |
4168 | rm -rf conftest* | |
4169 | eval "ac_cv_header_$ac_safe=no" | |
4170 | fi | |
4171 | rm -f conftest* | |
4172 | fi | |
4173 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4174 | echo "$ac_t""yes" 1>&6 | |
4175 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4176 | cat >> confdefs.h <<EOF | |
4177 | #define $ac_tr_hdr 1 | |
4178 | EOF | |
4179 | ||
4180 | else | |
4181 | echo "$ac_t""no" 1>&6 | |
4182 | fi | |
4183 | done | |
4184 | ||
4185 | for ac_hdr in poll.h sys/poll.h | |
4186 | do | |
4187 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4188 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4189 | echo "configure:4190: checking for $ac_hdr" >&5 |
5ee754fc MK |
4190 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4192 | else | |
4193 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4194 | #line 4195 "configure" |
5ee754fc MK |
4195 | #include "confdefs.h" |
4196 | #include <$ac_hdr> | |
4197 | EOF | |
4198 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4199 | { (eval echo configure:4200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4200 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4201 | if test -z "$ac_err"; then | |
4202 | rm -rf conftest* | |
4203 | eval "ac_cv_header_$ac_safe=yes" | |
4204 | else | |
4205 | echo "$ac_err" >&5 | |
4206 | echo "configure: failed program was:" >&5 | |
4207 | cat conftest.$ac_ext >&5 | |
4208 | rm -rf conftest* | |
4209 | eval "ac_cv_header_$ac_safe=no" | |
4210 | fi | |
4211 | rm -f conftest* | |
4212 | fi | |
4213 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4214 | echo "$ac_t""yes" 1>&6 | |
4215 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4216 | cat >> confdefs.h <<EOF | |
4217 | #define $ac_tr_hdr 1 | |
4218 | EOF | |
4219 | ||
4220 | else | |
4221 | echo "$ac_t""no" 1>&6 | |
4222 | fi | |
4223 | done | |
4224 | ||
4225 | for ac_hdr in proc_service.h thread_db.h | |
4226 | do | |
4227 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4228 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4229 | echo "configure:4230: checking for $ac_hdr" >&5 |
5ee754fc MK |
4230 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4231 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4232 | else | |
4233 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4234 | #line 4235 "configure" |
5ee754fc MK |
4235 | #include "confdefs.h" |
4236 | #include <$ac_hdr> | |
4237 | EOF | |
4238 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4239 | { (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4240 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4241 | if test -z "$ac_err"; then | |
4242 | rm -rf conftest* | |
4243 | eval "ac_cv_header_$ac_safe=yes" | |
4244 | else | |
4245 | echo "$ac_err" >&5 | |
4246 | echo "configure: failed program was:" >&5 | |
4247 | cat conftest.$ac_ext >&5 | |
4248 | rm -rf conftest* | |
4249 | eval "ac_cv_header_$ac_safe=no" | |
4250 | fi | |
4251 | rm -f conftest* | |
4252 | fi | |
4253 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4254 | echo "$ac_t""yes" 1>&6 | |
4255 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4256 | cat >> confdefs.h <<EOF | |
4257 | #define $ac_tr_hdr 1 | |
4258 | EOF | |
4259 | ||
4260 | else | |
4261 | echo "$ac_t""no" 1>&6 | |
4262 | fi | |
4263 | done | |
4264 | ||
4265 | for ac_hdr in stddef.h | |
4266 | do | |
4267 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4268 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4269 | echo "configure:4270: checking for $ac_hdr" >&5 |
5ee754fc MK |
4270 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4271 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4272 | else | |
4273 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4274 | #line 4275 "configure" |
5ee754fc MK |
4275 | #include "confdefs.h" |
4276 | #include <$ac_hdr> | |
4277 | EOF | |
4278 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4279 | { (eval echo configure:4280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4280 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4281 | if test -z "$ac_err"; then | |
4282 | rm -rf conftest* | |
4283 | eval "ac_cv_header_$ac_safe=yes" | |
4284 | else | |
4285 | echo "$ac_err" >&5 | |
4286 | echo "configure: failed program was:" >&5 | |
4287 | cat conftest.$ac_ext >&5 | |
4288 | rm -rf conftest* | |
4289 | eval "ac_cv_header_$ac_safe=no" | |
4290 | fi | |
4291 | rm -f conftest* | |
4292 | fi | |
4293 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4294 | echo "$ac_t""yes" 1>&6 | |
4295 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4296 | cat >> confdefs.h <<EOF | |
4297 | #define $ac_tr_hdr 1 | |
4298 | EOF | |
4299 | ||
4300 | else | |
4301 | echo "$ac_t""no" 1>&6 | |
4302 | fi | |
4303 | done | |
4304 | ||
4305 | for ac_hdr in stdlib.h | |
4306 | do | |
4307 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4308 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4309 | echo "configure:4310: checking for $ac_hdr" >&5 |
5ee754fc MK |
4310 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4311 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4312 | else | |
4313 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4314 | #line 4315 "configure" |
5ee754fc MK |
4315 | #include "confdefs.h" |
4316 | #include <$ac_hdr> | |
4317 | EOF | |
4318 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4319 | { (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4320 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4321 | if test -z "$ac_err"; then | |
4322 | rm -rf conftest* | |
4323 | eval "ac_cv_header_$ac_safe=yes" | |
4324 | else | |
4325 | echo "$ac_err" >&5 | |
4326 | echo "configure: failed program was:" >&5 | |
4327 | cat conftest.$ac_ext >&5 | |
4328 | rm -rf conftest* | |
4329 | eval "ac_cv_header_$ac_safe=no" | |
4330 | fi | |
4331 | rm -f conftest* | |
4332 | fi | |
4333 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4334 | echo "$ac_t""yes" 1>&6 | |
4335 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4336 | cat >> confdefs.h <<EOF | |
4337 | #define $ac_tr_hdr 1 | |
4338 | EOF | |
4339 | ||
4340 | else | |
4341 | echo "$ac_t""no" 1>&6 | |
4342 | fi | |
4343 | done | |
4344 | ||
4345 | for ac_hdr in stdint.h | |
4346 | do | |
4347 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4348 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4349 | echo "configure:4350: checking for $ac_hdr" >&5 |
5ee754fc MK |
4350 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4351 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4352 | else | |
4353 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4354 | #line 4355 "configure" |
5ee754fc MK |
4355 | #include "confdefs.h" |
4356 | #include <$ac_hdr> | |
4357 | EOF | |
4358 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4359 | { (eval echo configure:4360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4360 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4361 | if test -z "$ac_err"; then | |
4362 | rm -rf conftest* | |
4363 | eval "ac_cv_header_$ac_safe=yes" | |
4364 | else | |
4365 | echo "$ac_err" >&5 | |
4366 | echo "configure: failed program was:" >&5 | |
4367 | cat conftest.$ac_ext >&5 | |
4368 | rm -rf conftest* | |
4369 | eval "ac_cv_header_$ac_safe=no" | |
4370 | fi | |
4371 | rm -f conftest* | |
4372 | fi | |
4373 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4374 | echo "$ac_t""yes" 1>&6 | |
4375 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4376 | cat >> confdefs.h <<EOF | |
4377 | #define $ac_tr_hdr 1 | |
4378 | EOF | |
4379 | ||
4380 | else | |
4381 | echo "$ac_t""no" 1>&6 | |
4382 | fi | |
4383 | done | |
4384 | ||
4385 | for ac_hdr in string.h memory.h strings.h | |
4386 | do | |
4387 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4388 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4389 | echo "configure:4390: checking for $ac_hdr" >&5 |
5ee754fc MK |
4390 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4392 | else | |
4393 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4394 | #line 4395 "configure" |
5ee754fc MK |
4395 | #include "confdefs.h" |
4396 | #include <$ac_hdr> | |
4397 | EOF | |
4398 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4399 | { (eval echo configure:4400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4400 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4401 | if test -z "$ac_err"; then | |
4402 | rm -rf conftest* | |
4403 | eval "ac_cv_header_$ac_safe=yes" | |
4404 | else | |
4405 | echo "$ac_err" >&5 | |
4406 | echo "configure: failed program was:" >&5 | |
4407 | cat conftest.$ac_ext >&5 | |
4408 | rm -rf conftest* | |
4409 | eval "ac_cv_header_$ac_safe=no" | |
4410 | fi | |
4411 | rm -f conftest* | |
4412 | fi | |
4413 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4414 | echo "$ac_t""yes" 1>&6 | |
4415 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4416 | cat >> confdefs.h <<EOF | |
4417 | #define $ac_tr_hdr 1 | |
4418 | EOF | |
4419 | ||
4420 | else | |
4421 | echo "$ac_t""no" 1>&6 | |
4422 | fi | |
4423 | done | |
4424 | ||
4425 | for ac_hdr in sys/fault.h | |
4426 | do | |
4427 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4428 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4429 | echo "configure:4430: checking for $ac_hdr" >&5 |
5ee754fc MK |
4430 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4431 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4432 | else | |
4433 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4434 | #line 4435 "configure" |
5ee754fc MK |
4435 | #include "confdefs.h" |
4436 | #include <$ac_hdr> | |
4437 | EOF | |
4438 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4439 | { (eval echo configure:4440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4440 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4441 | if test -z "$ac_err"; then | |
4442 | rm -rf conftest* | |
4443 | eval "ac_cv_header_$ac_safe=yes" | |
4444 | else | |
4445 | echo "$ac_err" >&5 | |
4446 | echo "configure: failed program was:" >&5 | |
4447 | cat conftest.$ac_ext >&5 | |
4448 | rm -rf conftest* | |
4449 | eval "ac_cv_header_$ac_safe=no" | |
4450 | fi | |
4451 | rm -f conftest* | |
4452 | fi | |
4453 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4454 | echo "$ac_t""yes" 1>&6 | |
4455 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4456 | cat >> confdefs.h <<EOF | |
4457 | #define $ac_tr_hdr 1 | |
4458 | EOF | |
4459 | ||
4460 | else | |
4461 | echo "$ac_t""no" 1>&6 | |
4462 | fi | |
4463 | done | |
4464 | ||
4465 | for ac_hdr in sys/file.h | |
4466 | do | |
4467 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4468 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4469 | echo "configure:4470: checking for $ac_hdr" >&5 |
5ee754fc MK |
4470 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4471 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4472 | else | |
4473 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4474 | #line 4475 "configure" |
5ee754fc MK |
4475 | #include "confdefs.h" |
4476 | #include <$ac_hdr> | |
4477 | EOF | |
4478 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4479 | { (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4480 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4481 | if test -z "$ac_err"; then | |
4482 | rm -rf conftest* | |
4483 | eval "ac_cv_header_$ac_safe=yes" | |
4484 | else | |
4485 | echo "$ac_err" >&5 | |
4486 | echo "configure: failed program was:" >&5 | |
4487 | cat conftest.$ac_ext >&5 | |
4488 | rm -rf conftest* | |
4489 | eval "ac_cv_header_$ac_safe=no" | |
4490 | fi | |
4491 | rm -f conftest* | |
4492 | fi | |
4493 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4494 | echo "$ac_t""yes" 1>&6 | |
4495 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4496 | cat >> confdefs.h <<EOF | |
4497 | #define $ac_tr_hdr 1 | |
4498 | EOF | |
4499 | ||
4500 | else | |
4501 | echo "$ac_t""no" 1>&6 | |
4502 | fi | |
4503 | done | |
4504 | ||
4505 | for ac_hdr in sys/filio.h | |
4506 | do | |
4507 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4508 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4509 | echo "configure:4510: checking for $ac_hdr" >&5 |
5ee754fc MK |
4510 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4512 | else | |
4513 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4514 | #line 4515 "configure" |
5ee754fc MK |
4515 | #include "confdefs.h" |
4516 | #include <$ac_hdr> | |
4517 | EOF | |
4518 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4519 | { (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4520 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4521 | if test -z "$ac_err"; then | |
4522 | rm -rf conftest* | |
4523 | eval "ac_cv_header_$ac_safe=yes" | |
4524 | else | |
4525 | echo "$ac_err" >&5 | |
4526 | echo "configure: failed program was:" >&5 | |
4527 | cat conftest.$ac_ext >&5 | |
4528 | rm -rf conftest* | |
4529 | eval "ac_cv_header_$ac_safe=no" | |
4530 | fi | |
4531 | rm -f conftest* | |
4532 | fi | |
4533 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4534 | echo "$ac_t""yes" 1>&6 | |
4535 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4536 | cat >> confdefs.h <<EOF | |
4537 | #define $ac_tr_hdr 1 | |
4538 | EOF | |
4539 | ||
4540 | else | |
4541 | echo "$ac_t""no" 1>&6 | |
4542 | fi | |
4543 | done | |
4544 | ||
4545 | for ac_hdr in sys/ioctl.h | |
4546 | do | |
4547 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4548 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4549 | echo "configure:4550: checking for $ac_hdr" >&5 |
5ee754fc MK |
4550 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4552 | else | |
4553 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4554 | #line 4555 "configure" |
5ee754fc MK |
4555 | #include "confdefs.h" |
4556 | #include <$ac_hdr> | |
4557 | EOF | |
4558 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4559 | { (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4560 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4561 | if test -z "$ac_err"; then | |
4562 | rm -rf conftest* | |
4563 | eval "ac_cv_header_$ac_safe=yes" | |
4564 | else | |
4565 | echo "$ac_err" >&5 | |
4566 | echo "configure: failed program was:" >&5 | |
4567 | cat conftest.$ac_ext >&5 | |
4568 | rm -rf conftest* | |
4569 | eval "ac_cv_header_$ac_safe=no" | |
4570 | fi | |
4571 | rm -f conftest* | |
4572 | fi | |
4573 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4574 | echo "$ac_t""yes" 1>&6 | |
4575 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4576 | cat >> confdefs.h <<EOF | |
4577 | #define $ac_tr_hdr 1 | |
4578 | EOF | |
4579 | ||
4580 | else | |
4581 | echo "$ac_t""no" 1>&6 | |
4582 | fi | |
4583 | done | |
4584 | ||
4585 | for ac_hdr in sys/param.h | |
4586 | do | |
4587 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4588 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4589 | echo "configure:4590: checking for $ac_hdr" >&5 |
5ee754fc MK |
4590 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4592 | else | |
4593 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4594 | #line 4595 "configure" |
5ee754fc MK |
4595 | #include "confdefs.h" |
4596 | #include <$ac_hdr> | |
4597 | EOF | |
4598 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4599 | { (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4600 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4601 | if test -z "$ac_err"; then | |
4602 | rm -rf conftest* | |
4603 | eval "ac_cv_header_$ac_safe=yes" | |
4604 | else | |
4605 | echo "$ac_err" >&5 | |
4606 | echo "configure: failed program was:" >&5 | |
4607 | cat conftest.$ac_ext >&5 | |
4608 | rm -rf conftest* | |
4609 | eval "ac_cv_header_$ac_safe=no" | |
4610 | fi | |
4611 | rm -f conftest* | |
4612 | fi | |
4613 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4614 | echo "$ac_t""yes" 1>&6 | |
4615 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4616 | cat >> confdefs.h <<EOF | |
4617 | #define $ac_tr_hdr 1 | |
4618 | EOF | |
4619 | ||
4620 | else | |
4621 | echo "$ac_t""no" 1>&6 | |
4622 | fi | |
4623 | done | |
4624 | ||
4625 | for ac_hdr in sys/proc.h | |
4626 | do | |
4627 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4628 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4629 | echo "configure:4630: checking for $ac_hdr" >&5 |
5ee754fc MK |
4630 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4631 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4632 | else | |
4633 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4634 | #line 4635 "configure" |
5ee754fc MK |
4635 | #include "confdefs.h" |
4636 | #include <$ac_hdr> | |
4637 | EOF | |
4638 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4639 | { (eval echo configure:4640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4640 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4641 | if test -z "$ac_err"; then | |
4642 | rm -rf conftest* | |
4643 | eval "ac_cv_header_$ac_safe=yes" | |
4644 | else | |
4645 | echo "$ac_err" >&5 | |
4646 | echo "configure: failed program was:" >&5 | |
4647 | cat conftest.$ac_ext >&5 | |
4648 | rm -rf conftest* | |
4649 | eval "ac_cv_header_$ac_safe=no" | |
4650 | fi | |
4651 | rm -f conftest* | |
4652 | fi | |
4653 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4654 | echo "$ac_t""yes" 1>&6 | |
4655 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4656 | cat >> confdefs.h <<EOF | |
4657 | #define $ac_tr_hdr 1 | |
4658 | EOF | |
4659 | ||
4660 | else | |
4661 | echo "$ac_t""no" 1>&6 | |
4662 | fi | |
4663 | done | |
4664 | ||
4665 | for ac_hdr in sys/procfs.h | |
4666 | do | |
4667 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4668 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4669 | echo "configure:4670: checking for $ac_hdr" >&5 |
5ee754fc MK |
4670 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4672 | else | |
4673 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4674 | #line 4675 "configure" |
5ee754fc MK |
4675 | #include "confdefs.h" |
4676 | #include <$ac_hdr> | |
4677 | EOF | |
4678 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4679 | { (eval echo configure:4680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4680 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4681 | if test -z "$ac_err"; then | |
4682 | rm -rf conftest* | |
4683 | eval "ac_cv_header_$ac_safe=yes" | |
4684 | else | |
4685 | echo "$ac_err" >&5 | |
4686 | echo "configure: failed program was:" >&5 | |
4687 | cat conftest.$ac_ext >&5 | |
4688 | rm -rf conftest* | |
4689 | eval "ac_cv_header_$ac_safe=no" | |
4690 | fi | |
4691 | rm -f conftest* | |
4692 | fi | |
4693 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4694 | echo "$ac_t""yes" 1>&6 | |
4695 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4696 | cat >> confdefs.h <<EOF | |
4697 | #define $ac_tr_hdr 1 | |
4698 | EOF | |
4699 | ||
4700 | else | |
4701 | echo "$ac_t""no" 1>&6 | |
4702 | fi | |
4703 | done | |
4704 | ||
4705 | for ac_hdr in sys/ptrace.h ptrace.h | |
4706 | do | |
4707 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4708 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4709 | echo "configure:4710: checking for $ac_hdr" >&5 |
5ee754fc MK |
4710 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4712 | else | |
4713 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4714 | #line 4715 "configure" |
5ee754fc MK |
4715 | #include "confdefs.h" |
4716 | #include <$ac_hdr> | |
4717 | EOF | |
4718 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4719 | { (eval echo configure:4720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4720 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4721 | if test -z "$ac_err"; then | |
4722 | rm -rf conftest* | |
4723 | eval "ac_cv_header_$ac_safe=yes" | |
4724 | else | |
4725 | echo "$ac_err" >&5 | |
4726 | echo "configure: failed program was:" >&5 | |
4727 | cat conftest.$ac_ext >&5 | |
4728 | rm -rf conftest* | |
4729 | eval "ac_cv_header_$ac_safe=no" | |
4730 | fi | |
4731 | rm -f conftest* | |
4732 | fi | |
4733 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4734 | echo "$ac_t""yes" 1>&6 | |
4735 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4736 | cat >> confdefs.h <<EOF | |
4737 | #define $ac_tr_hdr 1 | |
4738 | EOF | |
4739 | ||
4740 | else | |
4741 | echo "$ac_t""no" 1>&6 | |
4742 | fi | |
4743 | done | |
4744 | ||
4745 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4746 | do | |
4747 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4748 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4749 | echo "configure:4750: checking for $ac_hdr" >&5 |
5ee754fc MK |
4750 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4752 | else | |
4753 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4754 | #line 4755 "configure" |
5ee754fc MK |
4755 | #include "confdefs.h" |
4756 | #include <$ac_hdr> | |
4757 | EOF | |
4758 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4759 | { (eval echo configure:4760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4760 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4761 | if test -z "$ac_err"; then | |
4762 | rm -rf conftest* | |
4763 | eval "ac_cv_header_$ac_safe=yes" | |
4764 | else | |
4765 | echo "$ac_err" >&5 | |
4766 | echo "configure: failed program was:" >&5 | |
4767 | cat conftest.$ac_ext >&5 | |
4768 | rm -rf conftest* | |
4769 | eval "ac_cv_header_$ac_safe=no" | |
4770 | fi | |
4771 | rm -f conftest* | |
4772 | fi | |
4773 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4774 | echo "$ac_t""yes" 1>&6 | |
4775 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4776 | cat >> confdefs.h <<EOF | |
4777 | #define $ac_tr_hdr 1 | |
4778 | EOF | |
4779 | ||
4780 | else | |
4781 | echo "$ac_t""no" 1>&6 | |
4782 | fi | |
4783 | done | |
4784 | ||
4785 | for ac_hdr in sys/select.h | |
4786 | do | |
4787 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4788 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4789 | echo "configure:4790: checking for $ac_hdr" >&5 |
5ee754fc MK |
4790 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4791 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4792 | else | |
4793 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4794 | #line 4795 "configure" |
5ee754fc MK |
4795 | #include "confdefs.h" |
4796 | #include <$ac_hdr> | |
4797 | EOF | |
4798 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4799 | { (eval echo configure:4800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4800 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4801 | if test -z "$ac_err"; then | |
4802 | rm -rf conftest* | |
4803 | eval "ac_cv_header_$ac_safe=yes" | |
4804 | else | |
4805 | echo "$ac_err" >&5 | |
4806 | echo "configure: failed program was:" >&5 | |
4807 | cat conftest.$ac_ext >&5 | |
4808 | rm -rf conftest* | |
4809 | eval "ac_cv_header_$ac_safe=no" | |
4810 | fi | |
4811 | rm -f conftest* | |
4812 | fi | |
4813 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4814 | echo "$ac_t""yes" 1>&6 | |
4815 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4816 | cat >> confdefs.h <<EOF | |
4817 | #define $ac_tr_hdr 1 | |
4818 | EOF | |
4819 | ||
4820 | else | |
4821 | echo "$ac_t""no" 1>&6 | |
4822 | fi | |
4823 | done | |
4824 | ||
4825 | for ac_hdr in sys/syscall.h | |
4826 | do | |
4827 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4828 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4829 | echo "configure:4830: checking for $ac_hdr" >&5 |
5ee754fc MK |
4830 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4832 | else | |
4833 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4834 | #line 4835 "configure" |
5ee754fc MK |
4835 | #include "confdefs.h" |
4836 | #include <$ac_hdr> | |
4837 | EOF | |
4838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4839 | { (eval echo configure:4840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4841 | if test -z "$ac_err"; then | |
4842 | rm -rf conftest* | |
4843 | eval "ac_cv_header_$ac_safe=yes" | |
4844 | else | |
4845 | echo "$ac_err" >&5 | |
4846 | echo "configure: failed program was:" >&5 | |
4847 | cat conftest.$ac_ext >&5 | |
4848 | rm -rf conftest* | |
4849 | eval "ac_cv_header_$ac_safe=no" | |
4850 | fi | |
4851 | rm -f conftest* | |
4852 | fi | |
4853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4854 | echo "$ac_t""yes" 1>&6 | |
4855 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4856 | cat >> confdefs.h <<EOF | |
4857 | #define $ac_tr_hdr 1 | |
4858 | EOF | |
4859 | ||
4860 | else | |
4861 | echo "$ac_t""no" 1>&6 | |
4862 | fi | |
4863 | done | |
4864 | ||
4865 | for ac_hdr in sys/user.h | |
4866 | do | |
4867 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4868 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4869 | echo "configure:4870: checking for $ac_hdr" >&5 |
5ee754fc MK |
4870 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4872 | else | |
4873 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4874 | #line 4875 "configure" |
5ee754fc MK |
4875 | #include "confdefs.h" |
4876 | #include <$ac_hdr> | |
4877 | EOF | |
4878 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4879 | { (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4880 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4881 | if test -z "$ac_err"; then | |
4882 | rm -rf conftest* | |
4883 | eval "ac_cv_header_$ac_safe=yes" | |
4884 | else | |
4885 | echo "$ac_err" >&5 | |
4886 | echo "configure: failed program was:" >&5 | |
4887 | cat conftest.$ac_ext >&5 | |
4888 | rm -rf conftest* | |
4889 | eval "ac_cv_header_$ac_safe=no" | |
4890 | fi | |
4891 | rm -f conftest* | |
4892 | fi | |
4893 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4894 | echo "$ac_t""yes" 1>&6 | |
4895 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4896 | cat >> confdefs.h <<EOF | |
4897 | #define $ac_tr_hdr 1 | |
4898 | EOF | |
4899 | ||
4900 | else | |
4901 | echo "$ac_t""no" 1>&6 | |
4902 | fi | |
4903 | done | |
4904 | ||
4905 | for ac_hdr in sys/wait.h wait.h | |
4906 | do | |
4907 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4908 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4909 | echo "configure:4910: checking for $ac_hdr" >&5 |
5ee754fc MK |
4910 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4911 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4912 | else | |
4913 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 4914 | #line 4915 "configure" |
5ee754fc MK |
4915 | #include "confdefs.h" |
4916 | #include <$ac_hdr> | |
4917 | EOF | |
4918 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 4919 | { (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4920 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4921 | if test -z "$ac_err"; then | |
4922 | rm -rf conftest* | |
4923 | eval "ac_cv_header_$ac_safe=yes" | |
4924 | else | |
4925 | echo "$ac_err" >&5 | |
9608ab8b MK |
4926 | echo "configure: failed program was:" >&5 |
4927 | cat conftest.$ac_ext >&5 | |
4928 | rm -rf conftest* | |
5ee754fc | 4929 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4930 | fi |
4931 | rm -f conftest* | |
4932 | fi | |
5ee754fc | 4933 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
4934 | echo "$ac_t""yes" 1>&6 |
4935 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4936 | cat >> confdefs.h <<EOF | |
4937 | #define $ac_tr_hdr 1 | |
4938 | EOF | |
5ee754fc | 4939 | |
9608ab8b MK |
4940 | else |
4941 | echo "$ac_t""no" 1>&6 | |
4942 | fi | |
4943 | done | |
5ee754fc MK |
4944 | |
4945 | for ac_hdr in termios.h termio.h sgtty.h | |
4946 | do | |
4947 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4948 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4949 | echo "configure:4950: checking for $ac_hdr" >&5 |
5ee754fc | 4950 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4951 | echo $ac_n "(cached) $ac_c" 1>&6 |
4952 | else | |
5ee754fc | 4953 | cat > conftest.$ac_ext <<EOF |
91151a06 | 4954 | #line 4955 "configure" |
9608ab8b | 4955 | #include "confdefs.h" |
5ee754fc | 4956 | #include <$ac_hdr> |
9608ab8b | 4957 | EOF |
5ee754fc | 4958 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
91151a06 | 4959 | { (eval echo configure:4960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4960 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4961 | if test -z "$ac_err"; then | |
9608ab8b | 4962 | rm -rf conftest* |
5ee754fc | 4963 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 4964 | else |
5ee754fc | 4965 | echo "$ac_err" >&5 |
9608ab8b MK |
4966 | echo "configure: failed program was:" >&5 |
4967 | cat conftest.$ac_ext >&5 | |
4968 | rm -rf conftest* | |
5ee754fc | 4969 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
4970 | fi |
4971 | rm -f conftest* | |
9608ab8b | 4972 | fi |
5ee754fc | 4973 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 4974 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
4975 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4976 | cat >> confdefs.h <<EOF | |
4977 | #define $ac_tr_hdr 1 | |
4978 | EOF | |
4979 | ||
9608ab8b MK |
4980 | else |
4981 | echo "$ac_t""no" 1>&6 | |
4982 | fi | |
5ee754fc | 4983 | done |
9608ab8b | 4984 | |
5ee754fc MK |
4985 | for ac_hdr in unistd.h |
4986 | do | |
4987 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4988 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 4989 | echo "configure:4990: checking for $ac_hdr" >&5 |
5ee754fc | 4990 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
4991 | echo $ac_n "(cached) $ac_c" 1>&6 |
4992 | else | |
5ee754fc | 4993 | cat > conftest.$ac_ext <<EOF |
91151a06 | 4994 | #line 4995 "configure" |
9608ab8b | 4995 | #include "confdefs.h" |
5ee754fc | 4996 | #include <$ac_hdr> |
9608ab8b | 4997 | EOF |
5ee754fc | 4998 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
91151a06 | 4999 | { (eval echo configure:5000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5000 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5001 | if test -z "$ac_err"; then | |
9608ab8b | 5002 | rm -rf conftest* |
5ee754fc | 5003 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5004 | else |
5ee754fc | 5005 | echo "$ac_err" >&5 |
9608ab8b MK |
5006 | echo "configure: failed program was:" >&5 |
5007 | cat conftest.$ac_ext >&5 | |
5008 | rm -rf conftest* | |
5ee754fc | 5009 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5010 | fi |
5011 | rm -f conftest* | |
9608ab8b | 5012 | fi |
5ee754fc | 5013 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5014 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5015 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5016 | cat >> confdefs.h <<EOF | |
5017 | #define $ac_tr_hdr 1 | |
5018 | EOF | |
5019 | ||
9608ab8b MK |
5020 | else |
5021 | echo "$ac_t""no" 1>&6 | |
5022 | fi | |
5ee754fc | 5023 | done |
9608ab8b | 5024 | |
9608ab8b | 5025 | |
5ee754fc MK |
5026 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5027 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5028 | # think that we don't have <curses.h> if we're using GCC. | |
5029 | case $host_os in | |
5030 | solaris2.[78]) | |
5031 | if test "$GCC" = yes; then | |
5032 | cat >> confdefs.h <<\EOF | |
5033 | #define _MSE_INT_H 1 | |
5034 | EOF | |
5035 | ||
5036 | fi ;; | |
5037 | esac | |
5038 | for ac_hdr in curses.h ncurses.h term.h | |
5039 | do | |
5040 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5041 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 5042 | echo "configure:5043: checking for $ac_hdr" >&5 |
5ee754fc | 5043 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5044 | echo $ac_n "(cached) $ac_c" 1>&6 |
5045 | else | |
5046 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5047 | #line 5048 "configure" |
c906108c | 5048 | #include "confdefs.h" |
5ee754fc | 5049 | #include <$ac_hdr> |
c906108c SS |
5050 | EOF |
5051 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 5052 | { (eval echo configure:5053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5053 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5054 | if test -z "$ac_err"; then | |
5055 | rm -rf conftest* | |
5ee754fc | 5056 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5057 | else |
5058 | echo "$ac_err" >&5 | |
5059 | echo "configure: failed program was:" >&5 | |
5060 | cat conftest.$ac_ext >&5 | |
5061 | rm -rf conftest* | |
5ee754fc | 5062 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5063 | fi |
5064 | rm -f conftest* | |
c906108c | 5065 | fi |
5ee754fc MK |
5066 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5067 | echo "$ac_t""yes" 1>&6 | |
5068 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5069 | cat >> confdefs.h <<EOF | |
5070 | #define $ac_tr_hdr 1 | |
c906108c | 5071 | EOF |
5ee754fc | 5072 | |
c906108c | 5073 | else |
5ee754fc | 5074 | echo "$ac_t""no" 1>&6 |
c906108c | 5075 | fi |
5ee754fc | 5076 | done |
c906108c SS |
5077 | |
5078 | ||
5ee754fc MK |
5079 | # FIXME: kettenis/20030102: In most cases we include these |
5080 | # unconditionally, so what's the point in checking these? | |
5081 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5082 | do |
5083 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5084 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 5085 | echo "configure:5086: checking for $ac_hdr" >&5 |
c906108c SS |
5086 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5087 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5088 | else | |
5089 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5090 | #line 5091 "configure" |
c906108c SS |
5091 | #include "confdefs.h" |
5092 | #include <$ac_hdr> | |
5093 | EOF | |
5094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 5095 | { (eval echo configure:5096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5097 | if test -z "$ac_err"; then | |
5098 | rm -rf conftest* | |
5099 | eval "ac_cv_header_$ac_safe=yes" | |
5100 | else | |
5101 | echo "$ac_err" >&5 | |
5102 | echo "configure: failed program was:" >&5 | |
5103 | cat conftest.$ac_ext >&5 | |
5104 | rm -rf conftest* | |
5105 | eval "ac_cv_header_$ac_safe=no" | |
5106 | fi | |
5107 | rm -f conftest* | |
5108 | fi | |
5109 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5110 | echo "$ac_t""yes" 1>&6 | |
5111 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5112 | cat >> confdefs.h <<EOF | |
5113 | #define $ac_tr_hdr 1 | |
5114 | EOF | |
5115 | ||
5116 | else | |
5117 | echo "$ac_t""no" 1>&6 | |
5118 | fi | |
5119 | done | |
5120 | ||
5ee754fc MK |
5121 | |
5122 | # ------------------ # | |
5123 | # Checks for types. # | |
5124 | # ------------------ # | |
5125 | ||
5126 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
91151a06 | 5127 | echo "configure:5128: checking return type of signal handlers" >&5 |
5ee754fc | 5128 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5129 | echo $ac_n "(cached) $ac_c" 1>&6 |
5130 | else | |
5131 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5132 | #line 5133 "configure" |
c906108c SS |
5133 | #include "confdefs.h" |
5134 | #include <sys/types.h> | |
5ee754fc MK |
5135 | #include <signal.h> |
5136 | #ifdef signal | |
5137 | #undef signal | |
c906108c | 5138 | #endif |
5ee754fc MK |
5139 | #ifdef __cplusplus |
5140 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5141 | #else | |
5142 | void (*signal ()) (); | |
c906108c SS |
5143 | #endif |
5144 | ||
5ee754fc MK |
5145 | int main() { |
5146 | int i; | |
5147 | ; return 0; } | |
c906108c | 5148 | EOF |
91151a06 | 5149 | if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5150 | rm -rf conftest* |
5ee754fc | 5151 | ac_cv_type_signal=void |
c906108c | 5152 | else |
5ee754fc MK |
5153 | echo "configure: failed program was:" >&5 |
5154 | cat conftest.$ac_ext >&5 | |
c906108c | 5155 | rm -rf conftest* |
5ee754fc | 5156 | ac_cv_type_signal=int |
c906108c SS |
5157 | fi |
5158 | rm -f conftest* | |
c906108c SS |
5159 | fi |
5160 | ||
5ee754fc MK |
5161 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5162 | cat >> confdefs.h <<EOF | |
5163 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5164 | EOF |
5165 | ||
c906108c SS |
5166 | |
5167 | ||
5ee754fc MK |
5168 | # ------------------------------------- # |
5169 | # Checks for compiler characteristics. # | |
5170 | # ------------------------------------- # | |
5171 | ||
c906108c | 5172 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
91151a06 | 5173 | echo "configure:5174: checking for working const" >&5 |
c906108c SS |
5174 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5176 | else | |
5177 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5178 | #line 5179 "configure" |
c906108c SS |
5179 | #include "confdefs.h" |
5180 | ||
5181 | int main() { | |
5182 | ||
5183 | /* Ultrix mips cc rejects this. */ | |
5184 | typedef int charset[2]; const charset x; | |
5185 | /* SunOS 4.1.1 cc rejects this. */ | |
5186 | char const *const *ccp; | |
5187 | char **p; | |
5188 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5189 | struct point {int x, y;}; | |
5190 | static struct point const zero = {0,0}; | |
5191 | /* AIX XL C 1.02.0.0 rejects this. | |
5192 | It does not let you subtract one const X* pointer from another in an arm | |
5193 | of an if-expression whose if-part is not a constant expression */ | |
5194 | const char *g = "string"; | |
5195 | ccp = &g + (g ? g-g : 0); | |
5196 | /* HPUX 7.0 cc rejects these. */ | |
5197 | ++ccp; | |
5198 | p = (char**) ccp; | |
5199 | ccp = (char const *const *) p; | |
5200 | { /* SCO 3.2v4 cc rejects this. */ | |
5201 | char *t; | |
5202 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5203 | ||
5204 | *t++ = 0; | |
5205 | } | |
5206 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5207 | int x[] = {25, 17}; | |
5208 | const int *foo = &x[0]; | |
5209 | ++foo; | |
5210 | } | |
5211 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5212 | typedef const int *iptr; | |
5213 | iptr p = 0; | |
5214 | ++p; | |
5215 | } | |
5216 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5217 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5218 | struct s { int j; const int *ap[3]; }; | |
5219 | struct s *b; b->j = 5; | |
5220 | } | |
5221 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5222 | const int foo = 10; | |
5223 | } | |
5224 | ||
5225 | ; return 0; } | |
5226 | EOF | |
91151a06 | 5227 | if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5228 | rm -rf conftest* |
5229 | ac_cv_c_const=yes | |
5230 | else | |
5231 | echo "configure: failed program was:" >&5 | |
5232 | cat conftest.$ac_ext >&5 | |
5233 | rm -rf conftest* | |
5234 | ac_cv_c_const=no | |
5235 | fi | |
5236 | rm -f conftest* | |
5237 | fi | |
5238 | ||
5239 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5240 | if test $ac_cv_c_const = no; then | |
5241 | cat >> confdefs.h <<\EOF | |
5242 | #define const | |
5243 | EOF | |
5244 | ||
5245 | fi | |
5246 | ||
bce58c09 | 5247 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
91151a06 | 5248 | echo "configure:5249: checking for inline" >&5 |
bce58c09 JB |
5249 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5250 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5251 | else | |
5252 | ac_cv_c_inline=no | |
5253 | for ac_kw in inline __inline__ __inline; do | |
5254 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5255 | #line 5256 "configure" |
bce58c09 JB |
5256 | #include "confdefs.h" |
5257 | ||
5258 | int main() { | |
5259 | } $ac_kw foo() { | |
5260 | ; return 0; } | |
5261 | EOF | |
91151a06 | 5262 | if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5263 | rm -rf conftest* |
5264 | ac_cv_c_inline=$ac_kw; break | |
5265 | else | |
5266 | echo "configure: failed program was:" >&5 | |
5267 | cat conftest.$ac_ext >&5 | |
5268 | fi | |
5269 | rm -f conftest* | |
5270 | done | |
5271 | ||
5272 | fi | |
5273 | ||
5274 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5275 | case "$ac_cv_c_inline" in | |
5276 | inline | yes) ;; | |
5277 | no) cat >> confdefs.h <<\EOF | |
5278 | #define inline | |
5279 | EOF | |
5280 | ;; | |
5281 | *) cat >> confdefs.h <<EOF | |
5282 | #define inline $ac_cv_c_inline | |
5283 | EOF | |
5284 | ;; | |
5285 | esac | |
5286 | ||
c906108c | 5287 | |
5ee754fc MK |
5288 | # ------------------------------ # |
5289 | # Checks for library functions. # | |
5290 | # ------------------------------ # | |
5291 | ||
46711df8 MK |
5292 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5293 | # for constant arguments. Useless! | |
5294 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
91151a06 | 5295 | echo "configure:5296: checking for working alloca.h" >&5 |
46711df8 MK |
5296 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5298 | else | |
5299 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5300 | #line 5301 "configure" |
46711df8 MK |
5301 | #include "confdefs.h" |
5302 | #include <alloca.h> | |
5303 | int main() { | |
5304 | char *p = alloca(2 * sizeof(int)); | |
5305 | ; return 0; } | |
5306 | EOF | |
91151a06 | 5307 | if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5308 | rm -rf conftest* |
5309 | ac_cv_header_alloca_h=yes | |
5310 | else | |
5311 | echo "configure: failed program was:" >&5 | |
5312 | cat conftest.$ac_ext >&5 | |
5313 | rm -rf conftest* | |
5314 | ac_cv_header_alloca_h=no | |
5315 | fi | |
5316 | rm -f conftest* | |
5317 | fi | |
5318 | ||
5319 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5320 | if test $ac_cv_header_alloca_h = yes; then | |
5321 | cat >> confdefs.h <<\EOF | |
5322 | #define HAVE_ALLOCA_H 1 | |
5323 | EOF | |
5324 | ||
5325 | fi | |
5326 | ||
5327 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
91151a06 | 5328 | echo "configure:5329: checking for alloca" >&5 |
46711df8 MK |
5329 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5330 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5331 | else | |
5332 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5333 | #line 5334 "configure" |
46711df8 MK |
5334 | #include "confdefs.h" |
5335 | ||
5336 | #ifdef __GNUC__ | |
5337 | # define alloca __builtin_alloca | |
5338 | #else | |
5339 | # ifdef _MSC_VER | |
5340 | # include <malloc.h> | |
5341 | # define alloca _alloca | |
5342 | # else | |
5343 | # if HAVE_ALLOCA_H | |
5344 | # include <alloca.h> | |
5345 | # else | |
5346 | # ifdef _AIX | |
5347 | #pragma alloca | |
5348 | # else | |
5349 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5350 | char *alloca (); | |
5351 | # endif | |
5352 | # endif | |
5353 | # endif | |
5354 | # endif | |
5355 | #endif | |
5356 | ||
5357 | int main() { | |
5358 | char *p = (char *) alloca(1); | |
5359 | ; return 0; } | |
5360 | EOF | |
91151a06 | 5361 | if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5362 | rm -rf conftest* |
5363 | ac_cv_func_alloca_works=yes | |
5364 | else | |
5365 | echo "configure: failed program was:" >&5 | |
5366 | cat conftest.$ac_ext >&5 | |
5367 | rm -rf conftest* | |
5368 | ac_cv_func_alloca_works=no | |
5369 | fi | |
5370 | rm -f conftest* | |
5371 | fi | |
5372 | ||
5373 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5374 | if test $ac_cv_func_alloca_works = yes; then | |
5375 | cat >> confdefs.h <<\EOF | |
5376 | #define HAVE_ALLOCA 1 | |
5377 | EOF | |
5378 | ||
5379 | fi | |
5380 | ||
5381 | if test $ac_cv_func_alloca_works = no; then | |
5382 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5383 | # that cause trouble. Some versions do not even contain alloca or | |
5384 | # contain a buggy version. If you still want to use their alloca, | |
5385 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5386 | ALLOCA=alloca.${ac_objext} | |
5387 | cat >> confdefs.h <<\EOF | |
5388 | #define C_ALLOCA 1 | |
5389 | EOF | |
5390 | ||
5391 | ||
5392 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
91151a06 | 5393 | echo "configure:5394: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5394 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5396 | else | |
5397 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5398 | #line 5399 "configure" |
46711df8 MK |
5399 | #include "confdefs.h" |
5400 | #if defined(CRAY) && ! defined(CRAY2) | |
5401 | webecray | |
5402 | #else | |
5403 | wenotbecray | |
5404 | #endif | |
5405 | ||
5406 | EOF | |
5407 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5408 | egrep "webecray" >/dev/null 2>&1; then | |
5409 | rm -rf conftest* | |
5410 | ac_cv_os_cray=yes | |
5411 | else | |
5412 | rm -rf conftest* | |
5413 | ac_cv_os_cray=no | |
5414 | fi | |
5415 | rm -f conftest* | |
5416 | ||
5417 | fi | |
5418 | ||
5419 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5420 | if test $ac_cv_os_cray = yes; then | |
5421 | for ac_func in _getb67 GETB67 getb67; do | |
5422 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 5423 | echo "configure:5424: checking for $ac_func" >&5 |
46711df8 MK |
5424 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5426 | else | |
5427 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5428 | #line 5429 "configure" |
46711df8 MK |
5429 | #include "confdefs.h" |
5430 | /* System header to define __stub macros and hopefully few prototypes, | |
5431 | which can conflict with char $ac_func(); below. */ | |
5432 | #include <assert.h> | |
5433 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5434 | /* We use char because int might match the return type of a gcc2 | |
5435 | builtin and then its argument prototype would still apply. */ | |
5436 | char $ac_func(); | |
5437 | ||
5438 | int main() { | |
5439 | ||
5440 | /* The GNU C library defines this for functions which it implements | |
5441 | to always fail with ENOSYS. Some functions are actually named | |
5442 | something starting with __ and the normal name is an alias. */ | |
5443 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5444 | choke me | |
5445 | #else | |
5446 | $ac_func(); | |
5447 | #endif | |
5448 | ||
5449 | ; return 0; } | |
5450 | EOF | |
91151a06 | 5451 | if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5452 | rm -rf conftest* |
5453 | eval "ac_cv_func_$ac_func=yes" | |
5454 | else | |
5455 | echo "configure: failed program was:" >&5 | |
5456 | cat conftest.$ac_ext >&5 | |
5457 | rm -rf conftest* | |
5458 | eval "ac_cv_func_$ac_func=no" | |
5459 | fi | |
5460 | rm -f conftest* | |
5461 | fi | |
5462 | ||
5463 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5464 | echo "$ac_t""yes" 1>&6 | |
5465 | cat >> confdefs.h <<EOF | |
5466 | #define CRAY_STACKSEG_END $ac_func | |
5467 | EOF | |
5468 | ||
5469 | break | |
5470 | else | |
5471 | echo "$ac_t""no" 1>&6 | |
5472 | fi | |
5473 | ||
5474 | done | |
5475 | fi | |
5476 | ||
5477 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
91151a06 | 5478 | echo "configure:5479: checking stack direction for C alloca" >&5 |
46711df8 MK |
5479 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5481 | else | |
5482 | if test "$cross_compiling" = yes; then | |
5483 | ac_cv_c_stack_direction=0 | |
5484 | else | |
5485 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5486 | #line 5487 "configure" |
46711df8 MK |
5487 | #include "confdefs.h" |
5488 | find_stack_direction () | |
5489 | { | |
5490 | static char *addr = 0; | |
5491 | auto char dummy; | |
5492 | if (addr == 0) | |
5493 | { | |
5494 | addr = &dummy; | |
5495 | return find_stack_direction (); | |
5496 | } | |
5497 | else | |
5498 | return (&dummy > addr) ? 1 : -1; | |
5499 | } | |
5500 | main () | |
5501 | { | |
5502 | exit (find_stack_direction() < 0); | |
5503 | } | |
5504 | EOF | |
91151a06 | 5505 | if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5506 | then |
5507 | ac_cv_c_stack_direction=1 | |
5508 | else | |
5509 | echo "configure: failed program was:" >&5 | |
5510 | cat conftest.$ac_ext >&5 | |
5511 | rm -fr conftest* | |
5512 | ac_cv_c_stack_direction=-1 | |
5513 | fi | |
5514 | rm -fr conftest* | |
5515 | fi | |
5516 | ||
5517 | fi | |
5518 | ||
5519 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5520 | cat >> confdefs.h <<EOF | |
5521 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5522 | EOF | |
5523 | ||
5524 | fi | |
5525 | ||
97bf5e38 MK |
5526 | for ac_hdr in unistd.h |
5527 | do | |
5528 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5529 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
91151a06 | 5530 | echo "configure:5531: checking for $ac_hdr" >&5 |
74c1b268 AC |
5531 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5532 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5533 | else | |
5534 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5535 | #line 5536 "configure" |
74c1b268 | 5536 | #include "confdefs.h" |
97bf5e38 | 5537 | #include <$ac_hdr> |
74c1b268 AC |
5538 | EOF |
5539 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 5540 | { (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5541 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5542 | if test -z "$ac_err"; then | |
5543 | rm -rf conftest* | |
5544 | eval "ac_cv_header_$ac_safe=yes" | |
5545 | else | |
5546 | echo "$ac_err" >&5 | |
5547 | echo "configure: failed program was:" >&5 | |
5548 | cat conftest.$ac_ext >&5 | |
5549 | rm -rf conftest* | |
5550 | eval "ac_cv_header_$ac_safe=no" | |
5551 | fi | |
5552 | rm -f conftest* | |
5553 | fi | |
5554 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5555 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5556 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5557 | cat >> confdefs.h <<EOF | |
5558 | #define $ac_tr_hdr 1 | |
74c1b268 | 5559 | EOF |
97bf5e38 | 5560 | |
74c1b268 AC |
5561 | else |
5562 | echo "$ac_t""no" 1>&6 | |
5563 | fi | |
97bf5e38 | 5564 | done |
74c1b268 | 5565 | |
97bf5e38 MK |
5566 | for ac_func in getpagesize |
5567 | do | |
5568 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 5569 | echo "configure:5570: checking for $ac_func" >&5 |
97bf5e38 | 5570 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5571 | echo $ac_n "(cached) $ac_c" 1>&6 |
5572 | else | |
5573 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5574 | #line 5575 "configure" |
74c1b268 AC |
5575 | #include "confdefs.h" |
5576 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5577 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5578 | #include <assert.h> |
5579 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5580 | /* We use char because int might match the return type of a gcc2 | |
5581 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5582 | char $ac_func(); |
74c1b268 AC |
5583 | |
5584 | int main() { | |
5585 | ||
5586 | /* The GNU C library defines this for functions which it implements | |
5587 | to always fail with ENOSYS. Some functions are actually named | |
5588 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5589 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5590 | choke me |
5591 | #else | |
97bf5e38 | 5592 | $ac_func(); |
74c1b268 AC |
5593 | #endif |
5594 | ||
5595 | ; return 0; } | |
5596 | EOF | |
91151a06 | 5597 | if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5598 | rm -rf conftest* |
97bf5e38 | 5599 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5600 | else |
5601 | echo "configure: failed program was:" >&5 | |
5602 | cat conftest.$ac_ext >&5 | |
5603 | rm -rf conftest* | |
97bf5e38 | 5604 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5605 | fi |
5606 | rm -f conftest* | |
5607 | fi | |
5608 | ||
97bf5e38 | 5609 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5610 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5611 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5612 | cat >> confdefs.h <<EOF | |
5613 | #define $ac_tr_func 1 | |
5614 | EOF | |
5615 | ||
74c1b268 AC |
5616 | else |
5617 | echo "$ac_t""no" 1>&6 | |
5618 | fi | |
97bf5e38 | 5619 | done |
74c1b268 | 5620 | |
97bf5e38 | 5621 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
91151a06 | 5622 | echo "configure:5623: checking for working mmap" >&5 |
97bf5e38 MK |
5623 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5625 | else | |
5626 | if test "$cross_compiling" = yes; then | |
5627 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5628 | else |
5629 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5630 | #line 5631 "configure" |
74c1b268 | 5631 | #include "confdefs.h" |
97bf5e38 MK |
5632 | |
5633 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5634 | Here is a matrix of mmap possibilities: | |
5635 | mmap private not fixed | |
5636 | mmap private fixed at somewhere currently unmapped | |
5637 | mmap private fixed at somewhere already mapped | |
5638 | mmap shared not fixed | |
5639 | mmap shared fixed at somewhere currently unmapped | |
5640 | mmap shared fixed at somewhere already mapped | |
5641 | For private mappings, we should verify that changes cannot be read() | |
5642 | back from the file, nor mmap's back from the file at a different | |
5643 | address. (There have been systems where private was not correctly | |
5644 | implemented like the infamous i386 svr4.0, and systems where the | |
5645 | VM page cache was not coherent with the filesystem buffer cache | |
5646 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5647 | For shared mappings, we should conversely verify that changes get | |
5648 | propogated back to all the places they're supposed to be. | |
5649 | ||
5650 | Grep wants private fixed already mapped. | |
5651 | The main things grep needs to know about mmap are: | |
5652 | * does it exist and is it safe to write into the mmap'd area | |
5653 | * how to use it (BSD variants) */ | |
74c1b268 | 5654 | #include <sys/types.h> |
97bf5e38 MK |
5655 | #include <fcntl.h> |
5656 | #include <sys/mman.h> | |
5657 | ||
5658 | /* This mess was copied from the GNU getpagesize.h. */ | |
5659 | #ifndef HAVE_GETPAGESIZE | |
5660 | # ifdef HAVE_UNISTD_H | |
5661 | # include <unistd.h> | |
5662 | # endif | |
5663 | ||
5664 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5665 | # ifndef HAVE_SYS_PARAM_H | |
5666 | # define HAVE_SYS_PARAM_H 1 | |
5667 | # endif | |
5668 | ||
5669 | # ifdef _SC_PAGESIZE | |
5670 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5671 | # else /* no _SC_PAGESIZE */ | |
5672 | # ifdef HAVE_SYS_PARAM_H | |
5673 | # include <sys/param.h> | |
5674 | # ifdef EXEC_PAGESIZE | |
5675 | # define getpagesize() EXEC_PAGESIZE | |
5676 | # else /* no EXEC_PAGESIZE */ | |
5677 | # ifdef NBPG | |
5678 | # define getpagesize() NBPG * CLSIZE | |
5679 | # ifndef CLSIZE | |
5680 | # define CLSIZE 1 | |
5681 | # endif /* no CLSIZE */ | |
5682 | # else /* no NBPG */ | |
5683 | # ifdef NBPC | |
5684 | # define getpagesize() NBPC | |
5685 | # else /* no NBPC */ | |
5686 | # ifdef PAGESIZE | |
5687 | # define getpagesize() PAGESIZE | |
5688 | # endif /* PAGESIZE */ | |
5689 | # endif /* no NBPC */ | |
5690 | # endif /* no NBPG */ | |
5691 | # endif /* no EXEC_PAGESIZE */ | |
5692 | # else /* no HAVE_SYS_PARAM_H */ | |
5693 | # define getpagesize() 8192 /* punt totally */ | |
5694 | # endif /* no HAVE_SYS_PARAM_H */ | |
5695 | # endif /* no _SC_PAGESIZE */ | |
5696 | ||
5697 | #endif /* no HAVE_GETPAGESIZE */ | |
5698 | ||
74c1b268 | 5699 | #ifdef __cplusplus |
97bf5e38 | 5700 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5701 | #else |
97bf5e38 | 5702 | char *malloc(); |
74c1b268 | 5703 | #endif |
74c1b268 | 5704 | |
97bf5e38 MK |
5705 | int |
5706 | main() | |
5707 | { | |
5708 | char *data, *data2, *data3; | |
5709 | int i, pagesize; | |
5710 | int fd; | |
74c1b268 | 5711 | |
97bf5e38 | 5712 | pagesize = getpagesize(); |
74c1b268 | 5713 | |
97bf5e38 MK |
5714 | /* |
5715 | * First, make a file with some known garbage in it. | |
5716 | */ | |
5717 | data = malloc(pagesize); | |
5718 | if (!data) | |
5719 | exit(1); | |
5720 | for (i = 0; i < pagesize; ++i) | |
5721 | *(data + i) = rand(); | |
5722 | umask(0); | |
5723 | fd = creat("conftestmmap", 0600); | |
5724 | if (fd < 0) | |
5725 | exit(1); | |
5726 | if (write(fd, data, pagesize) != pagesize) | |
5727 | exit(1); | |
5728 | close(fd); | |
74c1b268 | 5729 | |
97bf5e38 MK |
5730 | /* |
5731 | * Next, try to mmap the file at a fixed address which | |
5732 | * already has something else allocated at it. If we can, | |
5733 | * also make sure that we see the same garbage. | |
5734 | */ | |
5735 | fd = open("conftestmmap", O_RDWR); | |
5736 | if (fd < 0) | |
5737 | exit(1); | |
5738 | data2 = malloc(2 * pagesize); | |
5739 | if (!data2) | |
5740 | exit(1); | |
5741 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5742 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5743 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5744 | exit(1); | |
5745 | for (i = 0; i < pagesize; ++i) | |
5746 | if (*(data + i) != *(data2 + i)) | |
5747 | exit(1); | |
74c1b268 | 5748 | |
97bf5e38 MK |
5749 | /* |
5750 | * Finally, make sure that changes to the mapped area | |
5751 | * do not percolate back to the file as seen by read(). | |
5752 | * (This is a bug on some variants of i386 svr4.0.) | |
5753 | */ | |
5754 | for (i = 0; i < pagesize; ++i) | |
5755 | *(data2 + i) = *(data2 + i) + 1; | |
5756 | data3 = malloc(pagesize); | |
5757 | if (!data3) | |
5758 | exit(1); | |
5759 | if (read(fd, data3, pagesize) != pagesize) | |
5760 | exit(1); | |
5761 | for (i = 0; i < pagesize; ++i) | |
5762 | if (*(data + i) != *(data3 + i)) | |
5763 | exit(1); | |
5764 | close(fd); | |
5765 | unlink("conftestmmap"); | |
5766 | exit(0); | |
74c1b268 | 5767 | } |
97bf5e38 | 5768 | |
74c1b268 | 5769 | EOF |
91151a06 | 5770 | if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5771 | then |
97bf5e38 | 5772 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5773 | else |
5774 | echo "configure: failed program was:" >&5 | |
5775 | cat conftest.$ac_ext >&5 | |
5776 | rm -fr conftest* | |
97bf5e38 | 5777 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5778 | fi |
5779 | rm -fr conftest* | |
5780 | fi | |
5781 | ||
5782 | fi | |
5783 | ||
97bf5e38 MK |
5784 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5785 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5786 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5787 | #define HAVE_MMAP 1 |
74c1b268 AC |
5788 | EOF |
5789 | ||
5790 | fi | |
5791 | ||
97bf5e38 | 5792 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
91151a06 | 5793 | echo "configure:5794: checking for pid_t" >&5 |
97bf5e38 | 5794 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5795 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5796 | else |
5797 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5798 | #line 5799 "configure" |
0200359f | 5799 | #include "confdefs.h" |
97bf5e38 MK |
5800 | #include <sys/types.h> |
5801 | #if STDC_HEADERS | |
5802 | #include <stdlib.h> | |
5803 | #include <stddef.h> | |
0200359f | 5804 | #endif |
0200359f | 5805 | EOF |
97bf5e38 MK |
5806 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5807 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5808 | rm -rf conftest* | |
5809 | ac_cv_type_pid_t=yes | |
0200359f | 5810 | else |
97bf5e38 MK |
5811 | rm -rf conftest* |
5812 | ac_cv_type_pid_t=no | |
0200359f | 5813 | fi |
97bf5e38 | 5814 | rm -f conftest* |
0200359f MK |
5815 | |
5816 | fi | |
97bf5e38 MK |
5817 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5818 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5819 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5820 | #define pid_t int |
0200359f MK |
5821 | EOF |
5822 | ||
5823 | fi | |
5824 | ||
97bf5e38 MK |
5825 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5826 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
91151a06 | 5827 | echo "configure:5828: checking for vfork.h" >&5 |
97bf5e38 | 5828 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5829 | echo $ac_n "(cached) $ac_c" 1>&6 |
5830 | else | |
5831 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5832 | #line 5833 "configure" |
72473524 | 5833 | #include "confdefs.h" |
97bf5e38 | 5834 | #include <vfork.h> |
72473524 | 5835 | EOF |
97bf5e38 | 5836 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
91151a06 | 5837 | { (eval echo configure:5838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
5838 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5839 | if test -z "$ac_err"; then | |
72473524 | 5840 | rm -rf conftest* |
97bf5e38 | 5841 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5842 | else |
97bf5e38 | 5843 | echo "$ac_err" >&5 |
72473524 DJ |
5844 | echo "configure: failed program was:" >&5 |
5845 | cat conftest.$ac_ext >&5 | |
5846 | rm -rf conftest* | |
97bf5e38 | 5847 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5848 | fi |
5849 | rm -f conftest* | |
5850 | fi | |
97bf5e38 MK |
5851 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5852 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5853 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5854 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5855 | EOF |
5856 | ||
97bf5e38 MK |
5857 | else |
5858 | echo "$ac_t""no" 1>&6 | |
72473524 | 5859 | fi |
c906108c | 5860 | |
97bf5e38 | 5861 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
91151a06 | 5862 | echo "configure:5863: checking for working vfork" >&5 |
97bf5e38 MK |
5863 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
5864 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5865 | else | |
5866 | if test "$cross_compiling" = yes; then | |
5867 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
91151a06 | 5868 | echo "configure:5869: checking for vfork" >&5 |
97bf5e38 | 5869 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
5870 | echo $ac_n "(cached) $ac_c" 1>&6 |
5871 | else | |
5872 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5873 | #line 5874 "configure" |
2b2d558c | 5874 | #include "confdefs.h" |
97bf5e38 MK |
5875 | /* System header to define __stub macros and hopefully few prototypes, |
5876 | which can conflict with char vfork(); below. */ | |
5877 | #include <assert.h> | |
5878 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5879 | /* We use char because int might match the return type of a gcc2 | |
5880 | builtin and then its argument prototype would still apply. */ | |
5881 | char vfork(); | |
2b2d558c MK |
5882 | |
5883 | int main() { | |
97bf5e38 MK |
5884 | |
5885 | /* The GNU C library defines this for functions which it implements | |
5886 | to always fail with ENOSYS. Some functions are actually named | |
5887 | something starting with __ and the normal name is an alias. */ | |
5888 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
5889 | choke me | |
5890 | #else | |
5891 | vfork(); | |
5892 | #endif | |
5893 | ||
2b2d558c MK |
5894 | ; return 0; } |
5895 | EOF | |
91151a06 | 5896 | if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 5897 | rm -rf conftest* |
97bf5e38 | 5898 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
5899 | else |
5900 | echo "configure: failed program was:" >&5 | |
5901 | cat conftest.$ac_ext >&5 | |
5902 | rm -rf conftest* | |
97bf5e38 | 5903 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
5904 | fi |
5905 | rm -f conftest* | |
5906 | fi | |
5907 | ||
97bf5e38 MK |
5908 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
5909 | echo "$ac_t""yes" 1>&6 | |
5910 | : | |
5911 | else | |
5912 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
5913 | fi |
5914 | ||
97bf5e38 | 5915 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
5916 | else |
5917 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 5918 | #line 5919 "configure" |
7dfa765c | 5919 | #include "confdefs.h" |
97bf5e38 MK |
5920 | /* Thanks to Paul Eggert for this test. */ |
5921 | #include <stdio.h> | |
5922 | #include <sys/types.h> | |
5923 | #include <sys/stat.h> | |
5924 | #ifdef HAVE_UNISTD_H | |
5925 | #include <unistd.h> | |
5926 | #endif | |
5927 | #ifdef HAVE_VFORK_H | |
5928 | #include <vfork.h> | |
5929 | #endif | |
5930 | /* On some sparc systems, changes by the child to local and incoming | |
5931 | argument registers are propagated back to the parent. | |
5932 | The compiler is told about this with #include <vfork.h>, | |
5933 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
5934 | Test for this by using a static variable whose address | |
5935 | is put into a register that is clobbered by the vfork. */ | |
5936 | static | |
5937 | #ifdef __cplusplus | |
5938 | sparc_address_test (int arg) | |
5939 | #else | |
5940 | sparc_address_test (arg) int arg; | |
5941 | #endif | |
5942 | { | |
5943 | static pid_t child; | |
5944 | if (!child) { | |
5945 | child = vfork (); | |
5946 | if (child < 0) { | |
5947 | perror ("vfork"); | |
5948 | _exit(2); | |
5949 | } | |
5950 | if (!child) { | |
5951 | arg = getpid(); | |
5952 | write(-1, "", 0); | |
5953 | _exit (arg); | |
5954 | } | |
5955 | } | |
5956 | } | |
5957 | main() { | |
5958 | pid_t parent = getpid (); | |
5959 | pid_t child; | |
7dfa765c | 5960 | |
97bf5e38 | 5961 | sparc_address_test (); |
7dfa765c | 5962 | |
97bf5e38 | 5963 | child = vfork (); |
7dfa765c | 5964 | |
97bf5e38 MK |
5965 | if (child == 0) { |
5966 | /* Here is another test for sparc vfork register problems. | |
5967 | This test uses lots of local variables, at least | |
5968 | as many local variables as main has allocated so far | |
5969 | including compiler temporaries. 4 locals are enough for | |
5970 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
5971 | A buggy compiler should reuse the register of parent | |
5972 | for one of the local variables, since it will think that | |
5973 | parent can't possibly be used any more in this routine. | |
5974 | Assigning to the local variable will thus munge parent | |
5975 | in the parent process. */ | |
5976 | pid_t | |
5977 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5978 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5979 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5980 | use the same hardware register for all 8 local variables. */ | |
5981 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5982 | || p != p5 || p != p6 || p != p7) | |
5983 | _exit(1); | |
7dfa765c | 5984 | |
97bf5e38 MK |
5985 | /* On some systems (e.g. IRIX 3.3), |
5986 | vfork doesn't separate parent from child file descriptors. | |
5987 | If the child closes a descriptor before it execs or exits, | |
5988 | this munges the parent's descriptor as well. | |
5989 | Test for this by closing stdout in the child. */ | |
5990 | _exit(close(fileno(stdout)) != 0); | |
5991 | } else { | |
5992 | int status; | |
5993 | struct stat st; | |
64bb1671 | 5994 | |
97bf5e38 MK |
5995 | while (wait(&status) != child) |
5996 | ; | |
5997 | exit( | |
5998 | /* Was there some problem with vforking? */ | |
5999 | child < 0 | |
64bb1671 | 6000 | |
97bf5e38 MK |
6001 | /* Did the child fail? (This shouldn't happen.) */ |
6002 | || status | |
64bb1671 | 6003 | |
97bf5e38 MK |
6004 | /* Did the vfork/compiler bug occur? */ |
6005 | || parent != getpid() | |
6006 | ||
6007 | /* Did the file descriptor bug occur? */ | |
6008 | || fstat(fileno(stdout), &st) != 0 | |
6009 | ); | |
6010 | } | |
6011 | } | |
5c44784c | 6012 | EOF |
91151a06 | 6013 | if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6014 | then |
6015 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6016 | else |
6017 | echo "configure: failed program was:" >&5 | |
6018 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6019 | rm -fr conftest* |
6020 | ac_cv_func_vfork_works=no | |
5c44784c | 6021 | fi |
97bf5e38 | 6022 | rm -fr conftest* |
5c44784c JM |
6023 | fi |
6024 | ||
0afdd437 MK |
6025 | fi |
6026 | ||
97bf5e38 MK |
6027 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6028 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6029 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6030 | #define vfork fork |
0afdd437 MK |
6031 | EOF |
6032 | ||
6033 | fi | |
6034 | ||
97bf5e38 MK |
6035 | for ac_func in canonicalize_file_name realpath |
6036 | do | |
6037 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6038 | echo "configure:6039: checking for $ac_func" >&5 |
97bf5e38 | 6039 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6040 | echo $ac_n "(cached) $ac_c" 1>&6 |
6041 | else | |
6042 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6043 | #line 6044 "configure" |
7e89e357 | 6044 | #include "confdefs.h" |
97bf5e38 MK |
6045 | /* System header to define __stub macros and hopefully few prototypes, |
6046 | which can conflict with char $ac_func(); below. */ | |
6047 | #include <assert.h> | |
6048 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6049 | /* We use char because int might match the return type of a gcc2 | |
6050 | builtin and then its argument prototype would still apply. */ | |
6051 | char $ac_func(); | |
6052 | ||
7e89e357 | 6053 | int main() { |
97bf5e38 MK |
6054 | |
6055 | /* The GNU C library defines this for functions which it implements | |
6056 | to always fail with ENOSYS. Some functions are actually named | |
6057 | something starting with __ and the normal name is an alias. */ | |
6058 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6059 | choke me | |
6060 | #else | |
6061 | $ac_func(); | |
6062 | #endif | |
6063 | ||
7e89e357 JT |
6064 | ; return 0; } |
6065 | EOF | |
91151a06 | 6066 | if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6067 | rm -rf conftest* |
97bf5e38 | 6068 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6069 | else |
6070 | echo "configure: failed program was:" >&5 | |
6071 | cat conftest.$ac_ext >&5 | |
6072 | rm -rf conftest* | |
97bf5e38 | 6073 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6074 | fi |
6075 | rm -f conftest* | |
6076 | fi | |
6077 | ||
97bf5e38 MK |
6078 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6079 | echo "$ac_t""yes" 1>&6 | |
6080 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6081 | cat >> confdefs.h <<EOF | |
6082 | #define $ac_tr_func 1 | |
7e89e357 | 6083 | EOF |
97bf5e38 MK |
6084 | |
6085 | else | |
6086 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6087 | fi |
97bf5e38 | 6088 | done |
7e89e357 | 6089 | |
97bf5e38 | 6090 | for ac_func in poll |
7be570e7 JM |
6091 | do |
6092 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6093 | echo "configure:6094: checking for $ac_func" >&5 |
7be570e7 JM |
6094 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6096 | else | |
6097 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6098 | #line 6099 "configure" |
7be570e7 JM |
6099 | #include "confdefs.h" |
6100 | /* System header to define __stub macros and hopefully few prototypes, | |
6101 | which can conflict with char $ac_func(); below. */ | |
6102 | #include <assert.h> | |
6103 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6104 | /* We use char because int might match the return type of a gcc2 | |
6105 | builtin and then its argument prototype would still apply. */ | |
6106 | char $ac_func(); | |
6107 | ||
6108 | int main() { | |
6109 | ||
6110 | /* The GNU C library defines this for functions which it implements | |
6111 | to always fail with ENOSYS. Some functions are actually named | |
6112 | something starting with __ and the normal name is an alias. */ | |
6113 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6114 | choke me | |
6115 | #else | |
6116 | $ac_func(); | |
6117 | #endif | |
6118 | ||
6119 | ; return 0; } | |
6120 | EOF | |
91151a06 | 6121 | if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6122 | rm -rf conftest* |
6123 | eval "ac_cv_func_$ac_func=yes" | |
6124 | else | |
6125 | echo "configure: failed program was:" >&5 | |
6126 | cat conftest.$ac_ext >&5 | |
6127 | rm -rf conftest* | |
6128 | eval "ac_cv_func_$ac_func=no" | |
6129 | fi | |
6130 | rm -f conftest* | |
6131 | fi | |
6132 | ||
6133 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6134 | echo "$ac_t""yes" 1>&6 | |
6135 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6136 | cat >> confdefs.h <<EOF | |
6137 | #define $ac_tr_func 1 | |
6138 | EOF | |
6139 | ||
6140 | else | |
6141 | echo "$ac_t""no" 1>&6 | |
6142 | fi | |
6143 | done | |
6144 | ||
97bf5e38 MK |
6145 | for ac_func in sbrk |
6146 | do | |
6147 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6148 | echo "configure:6149: checking for $ac_func" >&5 |
97bf5e38 | 6149 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6150 | echo $ac_n "(cached) $ac_c" 1>&6 |
6151 | else | |
6152 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6153 | #line 6154 "configure" |
c906108c | 6154 | #include "confdefs.h" |
97bf5e38 MK |
6155 | /* System header to define __stub macros and hopefully few prototypes, |
6156 | which can conflict with char $ac_func(); below. */ | |
6157 | #include <assert.h> | |
6158 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6159 | /* We use char because int might match the return type of a gcc2 | |
6160 | builtin and then its argument prototype would still apply. */ | |
6161 | char $ac_func(); | |
c906108c | 6162 | |
97bf5e38 MK |
6163 | int main() { |
6164 | ||
6165 | /* The GNU C library defines this for functions which it implements | |
6166 | to always fail with ENOSYS. Some functions are actually named | |
6167 | something starting with __ and the normal name is an alias. */ | |
6168 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6169 | choke me | |
c906108c | 6170 | #else |
97bf5e38 | 6171 | $ac_func(); |
c906108c | 6172 | #endif |
97bf5e38 | 6173 | |
c906108c SS |
6174 | ; return 0; } |
6175 | EOF | |
91151a06 | 6176 | if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6177 | rm -rf conftest* |
97bf5e38 | 6178 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6179 | else |
6180 | echo "configure: failed program was:" >&5 | |
6181 | cat conftest.$ac_ext >&5 | |
6182 | rm -rf conftest* | |
97bf5e38 | 6183 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6184 | fi |
6185 | rm -f conftest* | |
6186 | fi | |
6187 | ||
97bf5e38 MK |
6188 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6189 | echo "$ac_t""yes" 1>&6 | |
6190 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6191 | cat >> confdefs.h <<EOF | |
6192 | #define $ac_tr_func 1 | |
c906108c | 6193 | EOF |
97bf5e38 MK |
6194 | |
6195 | else | |
6196 | echo "$ac_t""no" 1>&6 | |
c906108c | 6197 | fi |
97bf5e38 | 6198 | done |
c906108c | 6199 | |
97bf5e38 MK |
6200 | for ac_func in setpgid setpgrp |
6201 | do | |
6202 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6203 | echo "configure:6204: checking for $ac_func" >&5 |
97bf5e38 | 6204 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6205 | echo $ac_n "(cached) $ac_c" 1>&6 |
6206 | else | |
6207 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6208 | #line 6209 "configure" |
c906108c | 6209 | #include "confdefs.h" |
97bf5e38 MK |
6210 | /* System header to define __stub macros and hopefully few prototypes, |
6211 | which can conflict with char $ac_func(); below. */ | |
6212 | #include <assert.h> | |
6213 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6214 | /* We use char because int might match the return type of a gcc2 | |
6215 | builtin and then its argument prototype would still apply. */ | |
6216 | char $ac_func(); | |
c906108c | 6217 | |
97bf5e38 MK |
6218 | int main() { |
6219 | ||
6220 | /* The GNU C library defines this for functions which it implements | |
6221 | to always fail with ENOSYS. Some functions are actually named | |
6222 | something starting with __ and the normal name is an alias. */ | |
6223 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6224 | choke me | |
c906108c | 6225 | #else |
97bf5e38 | 6226 | $ac_func(); |
c906108c | 6227 | #endif |
97bf5e38 | 6228 | |
c906108c SS |
6229 | ; return 0; } |
6230 | EOF | |
91151a06 | 6231 | if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6232 | rm -rf conftest* |
97bf5e38 | 6233 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6234 | else |
6235 | echo "configure: failed program was:" >&5 | |
6236 | cat conftest.$ac_ext >&5 | |
6237 | rm -rf conftest* | |
97bf5e38 | 6238 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6239 | fi |
6240 | rm -f conftest* | |
6241 | fi | |
6242 | ||
97bf5e38 MK |
6243 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6244 | echo "$ac_t""yes" 1>&6 | |
6245 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6246 | cat >> confdefs.h <<EOF | |
6247 | #define $ac_tr_func 1 | |
c906108c | 6248 | EOF |
97bf5e38 MK |
6249 | |
6250 | else | |
6251 | echo "$ac_t""no" 1>&6 | |
c906108c | 6252 | fi |
97bf5e38 | 6253 | done |
c906108c | 6254 | |
e1ea1d75 | 6255 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6256 | do |
6257 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6258 | echo "configure:6259: checking for $ac_func" >&5 |
97bf5e38 | 6259 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6260 | echo $ac_n "(cached) $ac_c" 1>&6 |
6261 | else | |
6262 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6263 | #line 6264 "configure" |
c906108c | 6264 | #include "confdefs.h" |
97bf5e38 MK |
6265 | /* System header to define __stub macros and hopefully few prototypes, |
6266 | which can conflict with char $ac_func(); below. */ | |
6267 | #include <assert.h> | |
6268 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6269 | /* We use char because int might match the return type of a gcc2 | |
6270 | builtin and then its argument prototype would still apply. */ | |
6271 | char $ac_func(); | |
c906108c | 6272 | |
97bf5e38 MK |
6273 | int main() { |
6274 | ||
6275 | /* The GNU C library defines this for functions which it implements | |
6276 | to always fail with ENOSYS. Some functions are actually named | |
6277 | something starting with __ and the normal name is an alias. */ | |
6278 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6279 | choke me | |
c906108c | 6280 | #else |
97bf5e38 | 6281 | $ac_func(); |
c906108c | 6282 | #endif |
97bf5e38 | 6283 | |
c906108c SS |
6284 | ; return 0; } |
6285 | EOF | |
91151a06 | 6286 | if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6287 | rm -rf conftest* |
97bf5e38 | 6288 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6289 | else |
6290 | echo "configure: failed program was:" >&5 | |
6291 | cat conftest.$ac_ext >&5 | |
6292 | rm -rf conftest* | |
97bf5e38 | 6293 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6294 | fi |
6295 | rm -f conftest* | |
6296 | fi | |
6297 | ||
97bf5e38 MK |
6298 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6299 | echo "$ac_t""yes" 1>&6 | |
6300 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6301 | cat >> confdefs.h <<EOF | |
6302 | #define $ac_tr_func 1 | |
c906108c | 6303 | EOF |
e1ea1d75 | 6304 | |
97bf5e38 MK |
6305 | else |
6306 | echo "$ac_t""no" 1>&6 | |
c906108c | 6307 | fi |
97bf5e38 | 6308 | done |
c906108c | 6309 | |
97bf5e38 MK |
6310 | for ac_func in socketpair |
6311 | do | |
6312 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
91151a06 | 6313 | echo "configure:6314: checking for $ac_func" >&5 |
97bf5e38 | 6314 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6315 | echo $ac_n "(cached) $ac_c" 1>&6 |
6316 | else | |
6317 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6318 | #line 6319 "configure" |
c906108c | 6319 | #include "confdefs.h" |
97bf5e38 MK |
6320 | /* System header to define __stub macros and hopefully few prototypes, |
6321 | which can conflict with char $ac_func(); below. */ | |
6322 | #include <assert.h> | |
6323 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6324 | /* We use char because int might match the return type of a gcc2 | |
6325 | builtin and then its argument prototype would still apply. */ | |
6326 | char $ac_func(); | |
c906108c | 6327 | |
97bf5e38 MK |
6328 | int main() { |
6329 | ||
6330 | /* The GNU C library defines this for functions which it implements | |
6331 | to always fail with ENOSYS. Some functions are actually named | |
6332 | something starting with __ and the normal name is an alias. */ | |
6333 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6334 | choke me | |
c906108c | 6335 | #else |
97bf5e38 | 6336 | $ac_func(); |
c906108c | 6337 | #endif |
97bf5e38 | 6338 | |
c906108c SS |
6339 | ; return 0; } |
6340 | EOF | |
91151a06 | 6341 | if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6342 | rm -rf conftest* |
97bf5e38 | 6343 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6344 | else |
6345 | echo "configure: failed program was:" >&5 | |
6346 | cat conftest.$ac_ext >&5 | |
6347 | rm -rf conftest* | |
97bf5e38 | 6348 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6349 | fi |
6350 | rm -f conftest* | |
6351 | fi | |
6352 | ||
97bf5e38 MK |
6353 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6354 | echo "$ac_t""yes" 1>&6 | |
6355 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6356 | cat >> confdefs.h <<EOF | |
6357 | #define $ac_tr_func 1 | |
c906108c | 6358 | EOF |
97bf5e38 MK |
6359 | |
6360 | else | |
6361 | echo "$ac_t""no" 1>&6 | |
c906108c | 6362 | fi |
97bf5e38 | 6363 | done |
c906108c | 6364 | |
97bf5e38 MK |
6365 | |
6366 | if test "$cross_compiling" = no; then | |
6367 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
91151a06 | 6368 | echo "configure:6369: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6369 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6370 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6371 | else |
6372 | if test "$cross_compiling" = yes; then | |
6373 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6374 | else |
6375 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6376 | #line 6377 "configure" |
c906108c SS |
6377 | #include "confdefs.h" |
6378 | ||
c906108c SS |
6379 | #ifdef HAVE_UNISTD_H |
6380 | #include <unistd.h> | |
6381 | #endif | |
97bf5e38 MK |
6382 | |
6383 | /* | |
6384 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6385 | * successfully. | |
6386 | */ | |
6387 | main() | |
6388 | { | |
6389 | if (setpgrp(1,1) == -1) | |
6390 | exit(0); | |
6391 | else | |
6392 | exit(1); | |
6393 | } | |
6394 | ||
c906108c | 6395 | EOF |
91151a06 | 6396 | if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6397 | then |
6398 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6399 | else |
6400 | echo "configure: failed program was:" >&5 | |
6401 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6402 | rm -fr conftest* |
6403 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6404 | fi |
97bf5e38 | 6405 | rm -fr conftest* |
c906108c SS |
6406 | fi |
6407 | ||
97bf5e38 MK |
6408 | |
6409 | fi | |
6410 | ||
6411 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6412 | if test $ac_cv_func_setpgrp_void = yes; then | |
6413 | cat >> confdefs.h <<\EOF | |
6414 | #define SETPGRP_VOID 1 | |
c906108c SS |
6415 | EOF |
6416 | ||
6417 | fi | |
6418 | ||
97bf5e38 MK |
6419 | else |
6420 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
91151a06 | 6421 | echo "configure:6422: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6422 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6423 | echo $ac_n "(cached) $ac_c" 1>&6 |
6424 | else | |
6425 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6426 | #line 6427 "configure" |
b83266a0 SS |
6427 | #include "confdefs.h" |
6428 | ||
b83266a0 | 6429 | #include <unistd.h> |
97bf5e38 | 6430 | |
b83266a0 | 6431 | int main() { |
97bf5e38 MK |
6432 | |
6433 | if (setpgrp(1,1) == -1) | |
6434 | exit (0); | |
6435 | else | |
6436 | exit (1); | |
6437 | ||
b83266a0 SS |
6438 | ; return 0; } |
6439 | EOF | |
91151a06 | 6440 | if { (eval echo configure:6441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6441 | rm -rf conftest* |
97bf5e38 | 6442 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6443 | else |
6444 | echo "configure: failed program was:" >&5 | |
6445 | cat conftest.$ac_ext >&5 | |
6446 | rm -rf conftest* | |
97bf5e38 | 6447 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6448 | fi |
6449 | rm -f conftest* | |
6450 | fi | |
6451 | ||
97bf5e38 MK |
6452 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6453 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6454 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6455 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6456 | EOF |
6457 | ||
97bf5e38 | 6458 | fi |
b83266a0 SS |
6459 | fi |
6460 | ||
97bf5e38 MK |
6461 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6462 | # since sigsetjmp might only be defined as a macro. | |
6463 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
91151a06 | 6464 | echo "configure:6465: checking for sigsetjmp" >&5 |
97bf5e38 | 6465 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6466 | echo $ac_n "(cached) $ac_c" 1>&6 |
6467 | else | |
6468 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6469 | #line 6470 "configure" |
a4db0f07 RH |
6470 | #include "confdefs.h" |
6471 | ||
97bf5e38 MK |
6472 | #include <setjmp.h> |
6473 | ||
a4db0f07 | 6474 | int main() { |
97bf5e38 | 6475 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6476 | ; return 0; } |
6477 | EOF | |
91151a06 | 6478 | if { (eval echo configure:6479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6479 | rm -rf conftest* |
97bf5e38 | 6480 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6481 | else |
6482 | echo "configure: failed program was:" >&5 | |
6483 | cat conftest.$ac_ext >&5 | |
6484 | rm -rf conftest* | |
97bf5e38 | 6485 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6486 | fi |
6487 | rm -f conftest* | |
6488 | fi | |
6489 | ||
97bf5e38 MK |
6490 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6491 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6492 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6493 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6494 | EOF |
6495 | ||
6496 | fi | |
c906108c | 6497 | |
06825bd1 MK |
6498 | # Assume we'll default to using the included libiberty regex. |
6499 | gdb_use_included_regex=yes | |
6500 | ||
6501 | # However, if the system regex is GNU regex, then default to *not* | |
6502 | # using the included regex. | |
6503 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
91151a06 | 6504 | echo "configure:6505: checking for GNU regex" >&5 |
06825bd1 MK |
6505 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6507 | else | |
6508 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6509 | #line 6510 "configure" |
06825bd1 MK |
6510 | #include "confdefs.h" |
6511 | #include <gnu-versions.h> | |
6512 | int main() { | |
6513 | #define REGEX_INTERFACE_VERSION 1 | |
6514 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6515 | # error "Version mismatch" | |
6516 | #endif | |
6517 | ; return 0; } | |
6518 | EOF | |
91151a06 | 6519 | if { (eval echo configure:6520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6520 | rm -rf conftest* |
6521 | gdb_cv_have_gnu_regex=yes | |
6522 | else | |
6523 | echo "configure: failed program was:" >&5 | |
6524 | cat conftest.$ac_ext >&5 | |
6525 | rm -rf conftest* | |
6526 | gdb_cv_have_gnu_regex=no | |
6527 | fi | |
6528 | rm -f conftest* | |
6529 | fi | |
6530 | ||
6531 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6532 | if test $gdb_cv_have_gnu_regex = yes; then | |
6533 | gdb_use_included_regex=no | |
6534 | fi | |
6535 | ||
6536 | # Check whether --with-included-regex or --without-included-regex was given. | |
6537 | if test "${with_included_regex+set}" = set; then | |
6538 | withval="$with_included_regex" | |
6539 | gdb_with_regex=$withval | |
6540 | else | |
6541 | gdb_with_regex=$gdb_use_included_regex | |
6542 | fi | |
6543 | ||
6544 | if test "$gdb_with_regex" = yes; then | |
6545 | cat >> confdefs.h <<\EOF | |
6546 | #define USE_INCLUDED_REGEX 1 | |
6547 | EOF | |
6548 | ||
6549 | fi | |
6550 | ||
97bf5e38 MK |
6551 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6552 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6553 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
91151a06 | 6554 | echo "configure:6555: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6555 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6556 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6557 | else | |
6558 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6559 | #line 6560 "configure" |
c906108c | 6560 | #include "confdefs.h" |
97bf5e38 MK |
6561 | #include <machine/reg.h> |
6562 | int main() { | |
6563 | struct reg r; r.r_fs; | |
6564 | ; return 0; } | |
c906108c | 6565 | EOF |
91151a06 | 6566 | if { (eval echo configure:6567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6567 | rm -rf conftest* |
97bf5e38 | 6568 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6569 | else |
97bf5e38 MK |
6570 | echo "configure: failed program was:" >&5 |
6571 | cat conftest.$ac_ext >&5 | |
c906108c | 6572 | rm -rf conftest* |
97bf5e38 | 6573 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6574 | fi |
6575 | rm -f conftest* | |
97bf5e38 | 6576 | fi |
c906108c | 6577 | |
97bf5e38 MK |
6578 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6579 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6580 | cat >> confdefs.h <<\EOF | |
6581 | #define HAVE_STRUCT_REG_R_FS 1 | |
6582 | EOF | |
6583 | ||
6584 | fi | |
6585 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
91151a06 | 6586 | echo "configure:6587: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6587 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6588 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6589 | else | |
6590 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6591 | #line 6592 "configure" |
c906108c | 6592 | #include "confdefs.h" |
97bf5e38 MK |
6593 | #include <machine/reg.h> |
6594 | int main() { | |
6595 | struct reg r; r.r_gs; | |
6596 | ; return 0; } | |
c906108c | 6597 | EOF |
91151a06 | 6598 | if { (eval echo configure:6599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6599 | rm -rf conftest* |
97bf5e38 | 6600 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6601 | else |
97bf5e38 MK |
6602 | echo "configure: failed program was:" >&5 |
6603 | cat conftest.$ac_ext >&5 | |
c906108c | 6604 | rm -rf conftest* |
97bf5e38 | 6605 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6606 | fi |
6607 | rm -f conftest* | |
c906108c | 6608 | fi |
c906108c | 6609 | |
97bf5e38 MK |
6610 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6611 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6612 | cat >> confdefs.h <<\EOF | |
6613 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6614 | EOF |
6615 | ||
c906108c SS |
6616 | fi |
6617 | ||
97bf5e38 MK |
6618 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6619 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
91151a06 | 6620 | echo "configure:6621: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6621 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6622 | echo $ac_n "(cached) $ac_c" 1>&6 |
6623 | else | |
6624 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6625 | #line 6626 "configure" |
c906108c | 6626 | #include "confdefs.h" |
97bf5e38 | 6627 | #include <sys/ptrace.h> |
c906108c | 6628 | int main() { |
97bf5e38 | 6629 | PTRACE_GETREGS; |
c906108c SS |
6630 | ; return 0; } |
6631 | EOF | |
91151a06 | 6632 | if { (eval echo configure:6633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6633 | rm -rf conftest* |
97bf5e38 | 6634 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6635 | else |
6636 | echo "configure: failed program was:" >&5 | |
6637 | cat conftest.$ac_ext >&5 | |
6638 | rm -rf conftest* | |
97bf5e38 | 6639 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6640 | fi |
6641 | rm -f conftest* | |
6642 | fi | |
6643 | ||
97bf5e38 MK |
6644 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6645 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6646 | cat >> confdefs.h <<\EOF | |
6647 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6648 | EOF |
6649 | ||
97bf5e38 | 6650 | fi |
c906108c | 6651 | |
97bf5e38 MK |
6652 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6653 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
91151a06 | 6654 | echo "configure:6655: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6655 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6656 | echo $ac_n "(cached) $ac_c" 1>&6 |
6657 | else | |
6658 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6659 | #line 6660 "configure" |
c906108c | 6660 | #include "confdefs.h" |
97bf5e38 | 6661 | #include <sys/ptrace.h> |
c906108c | 6662 | int main() { |
97bf5e38 | 6663 | PTRACE_GETFPXREGS; |
c906108c SS |
6664 | ; return 0; } |
6665 | EOF | |
91151a06 | 6666 | if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6667 | rm -rf conftest* |
97bf5e38 | 6668 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6669 | else |
6670 | echo "configure: failed program was:" >&5 | |
6671 | cat conftest.$ac_ext >&5 | |
6672 | rm -rf conftest* | |
97bf5e38 | 6673 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6674 | fi |
6675 | rm -f conftest* | |
6676 | fi | |
6677 | ||
97bf5e38 MK |
6678 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6679 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6680 | cat >> confdefs.h <<\EOF | |
6681 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6682 | EOF |
6683 | ||
97bf5e38 | 6684 | fi |
c906108c | 6685 | |
97bf5e38 MK |
6686 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6687 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
91151a06 | 6688 | echo "configure:6689: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6689 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6690 | echo $ac_n "(cached) $ac_c" 1>&6 |
6691 | else | |
6692 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6693 | #line 6694 "configure" |
c906108c | 6694 | #include "confdefs.h" |
97bf5e38 MK |
6695 | #include <sys/types.h> |
6696 | #include <sys/ptrace.h> | |
c906108c | 6697 | int main() { |
97bf5e38 | 6698 | PT_GETDBREGS; |
c906108c SS |
6699 | ; return 0; } |
6700 | EOF | |
91151a06 | 6701 | if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6702 | rm -rf conftest* |
97bf5e38 | 6703 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6704 | else |
6705 | echo "configure: failed program was:" >&5 | |
6706 | cat conftest.$ac_ext >&5 | |
6707 | rm -rf conftest* | |
97bf5e38 | 6708 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6709 | fi |
6710 | rm -f conftest* | |
6711 | fi | |
6712 | ||
97bf5e38 MK |
6713 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6714 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6715 | cat >> confdefs.h <<\EOF | |
6716 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6717 | EOF |
6718 | ||
97bf5e38 | 6719 | fi |
c906108c | 6720 | |
97bf5e38 MK |
6721 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6722 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
91151a06 | 6723 | echo "configure:6724: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6724 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6725 | echo $ac_n "(cached) $ac_c" 1>&6 |
6726 | else | |
6727 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6728 | #line 6729 "configure" |
c906108c | 6729 | #include "confdefs.h" |
97bf5e38 MK |
6730 | #include <sys/types.h> |
6731 | #include <sys/ptrace.h> | |
c906108c | 6732 | int main() { |
97bf5e38 | 6733 | PT_GETXMMREGS; |
c906108c SS |
6734 | ; return 0; } |
6735 | EOF | |
91151a06 | 6736 | if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6737 | rm -rf conftest* |
97bf5e38 | 6738 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6739 | else |
6740 | echo "configure: failed program was:" >&5 | |
6741 | cat conftest.$ac_ext >&5 | |
6742 | rm -rf conftest* | |
97bf5e38 | 6743 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6744 | fi |
6745 | rm -f conftest* | |
6746 | fi | |
6747 | ||
97bf5e38 MK |
6748 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6749 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6750 | cat >> confdefs.h <<\EOF | |
6751 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6752 | EOF |
6753 | ||
97bf5e38 | 6754 | fi |
c906108c | 6755 | |
97bf5e38 MK |
6756 | |
6757 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
91151a06 | 6758 | echo "configure:6759: checking whether malloc must be declared" >&5 |
97bf5e38 | 6759 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6760 | echo $ac_n "(cached) $ac_c" 1>&6 |
6761 | else | |
6762 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6763 | #line 6764 "configure" |
3862412b | 6764 | #include "confdefs.h" |
e17bf198 | 6765 | |
97bf5e38 MK |
6766 | #include <stdio.h> |
6767 | #ifdef HAVE_STRING_H | |
6768 | #include <string.h> | |
6769 | #else | |
6770 | #ifdef HAVE_STRINGS_H | |
6771 | #include <strings.h> | |
6772 | #endif | |
6773 | #endif | |
6774 | #ifdef HAVE_STDLIB_H | |
6775 | #include <stdlib.h> | |
6776 | #endif | |
6777 | #ifdef HAVE_UNISTD_H | |
6778 | #include <unistd.h> | |
6779 | #endif | |
3862412b | 6780 | int main() { |
97bf5e38 | 6781 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6782 | ; return 0; } |
6783 | EOF | |
91151a06 | 6784 | if { (eval echo configure:6785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6785 | rm -rf conftest* |
97bf5e38 | 6786 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6787 | else |
6788 | echo "configure: failed program was:" >&5 | |
6789 | cat conftest.$ac_ext >&5 | |
6790 | rm -rf conftest* | |
97bf5e38 | 6791 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6792 | fi |
6793 | rm -f conftest* | |
6794 | fi | |
6795 | ||
97bf5e38 MK |
6796 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6797 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6798 | cat >> confdefs.h <<\EOF | |
6799 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6800 | EOF |
6801 | ||
97bf5e38 | 6802 | fi |
3862412b | 6803 | |
97bf5e38 | 6804 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
91151a06 | 6805 | echo "configure:6806: checking whether realloc must be declared" >&5 |
97bf5e38 | 6806 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
6807 | echo $ac_n "(cached) $ac_c" 1>&6 |
6808 | else | |
6809 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6810 | #line 6811 "configure" |
3862412b | 6811 | #include "confdefs.h" |
e17bf198 | 6812 | |
97bf5e38 MK |
6813 | #include <stdio.h> |
6814 | #ifdef HAVE_STRING_H | |
6815 | #include <string.h> | |
6816 | #else | |
6817 | #ifdef HAVE_STRINGS_H | |
6818 | #include <strings.h> | |
6819 | #endif | |
6820 | #endif | |
6821 | #ifdef HAVE_STDLIB_H | |
6822 | #include <stdlib.h> | |
6823 | #endif | |
6824 | #ifdef HAVE_UNISTD_H | |
6825 | #include <unistd.h> | |
6826 | #endif | |
3862412b | 6827 | int main() { |
97bf5e38 | 6828 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
6829 | ; return 0; } |
6830 | EOF | |
91151a06 | 6831 | if { (eval echo configure:6832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6832 | rm -rf conftest* |
97bf5e38 | 6833 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
6834 | else |
6835 | echo "configure: failed program was:" >&5 | |
6836 | cat conftest.$ac_ext >&5 | |
6837 | rm -rf conftest* | |
97bf5e38 | 6838 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
6839 | fi |
6840 | rm -f conftest* | |
6841 | fi | |
6842 | ||
97bf5e38 MK |
6843 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
6844 | if test $bfd_cv_decl_needed_realloc = yes; then | |
6845 | cat >> confdefs.h <<\EOF | |
6846 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
6847 | EOF |
6848 | ||
97bf5e38 | 6849 | fi |
3862412b | 6850 | |
97bf5e38 | 6851 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
91151a06 | 6852 | echo "configure:6853: checking whether free must be declared" >&5 |
97bf5e38 | 6853 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
6854 | echo $ac_n "(cached) $ac_c" 1>&6 |
6855 | else | |
6856 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6857 | #line 6858 "configure" |
451928c5 | 6858 | #include "confdefs.h" |
e17bf198 | 6859 | |
97bf5e38 MK |
6860 | #include <stdio.h> |
6861 | #ifdef HAVE_STRING_H | |
6862 | #include <string.h> | |
6863 | #else | |
6864 | #ifdef HAVE_STRINGS_H | |
6865 | #include <strings.h> | |
6866 | #endif | |
6867 | #endif | |
6868 | #ifdef HAVE_STDLIB_H | |
6869 | #include <stdlib.h> | |
6870 | #endif | |
6871 | #ifdef HAVE_UNISTD_H | |
6872 | #include <unistd.h> | |
6873 | #endif | |
451928c5 | 6874 | int main() { |
97bf5e38 | 6875 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
6876 | ; return 0; } |
6877 | EOF | |
91151a06 | 6878 | if { (eval echo configure:6879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6879 | rm -rf conftest* |
97bf5e38 | 6880 | bfd_cv_decl_needed_free=no |
451928c5 AC |
6881 | else |
6882 | echo "configure: failed program was:" >&5 | |
6883 | cat conftest.$ac_ext >&5 | |
6884 | rm -rf conftest* | |
97bf5e38 | 6885 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
6886 | fi |
6887 | rm -f conftest* | |
6888 | fi | |
6889 | ||
97bf5e38 MK |
6890 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
6891 | if test $bfd_cv_decl_needed_free = yes; then | |
6892 | cat >> confdefs.h <<\EOF | |
6893 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
6894 | EOF |
6895 | ||
97bf5e38 | 6896 | fi |
451928c5 | 6897 | |
97bf5e38 | 6898 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
91151a06 | 6899 | echo "configure:6900: checking whether strerror must be declared" >&5 |
97bf5e38 | 6900 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
6901 | echo $ac_n "(cached) $ac_c" 1>&6 |
6902 | else | |
6903 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6904 | #line 6905 "configure" |
451928c5 | 6905 | #include "confdefs.h" |
e17bf198 | 6906 | |
97bf5e38 MK |
6907 | #include <stdio.h> |
6908 | #ifdef HAVE_STRING_H | |
6909 | #include <string.h> | |
6910 | #else | |
6911 | #ifdef HAVE_STRINGS_H | |
6912 | #include <strings.h> | |
6913 | #endif | |
6914 | #endif | |
6915 | #ifdef HAVE_STDLIB_H | |
6916 | #include <stdlib.h> | |
6917 | #endif | |
6918 | #ifdef HAVE_UNISTD_H | |
6919 | #include <unistd.h> | |
6920 | #endif | |
451928c5 | 6921 | int main() { |
97bf5e38 | 6922 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
6923 | ; return 0; } |
6924 | EOF | |
91151a06 | 6925 | if { (eval echo configure:6926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 6926 | rm -rf conftest* |
97bf5e38 | 6927 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
6928 | else |
6929 | echo "configure: failed program was:" >&5 | |
6930 | cat conftest.$ac_ext >&5 | |
6931 | rm -rf conftest* | |
97bf5e38 | 6932 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
6933 | fi |
6934 | rm -f conftest* | |
6935 | fi | |
6936 | ||
97bf5e38 MK |
6937 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
6938 | if test $bfd_cv_decl_needed_strerror = yes; then | |
6939 | cat >> confdefs.h <<\EOF | |
6940 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
6941 | EOF |
6942 | ||
97bf5e38 | 6943 | fi |
451928c5 | 6944 | |
97bf5e38 | 6945 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
91151a06 | 6946 | echo "configure:6947: checking whether strdup must be declared" >&5 |
97bf5e38 | 6947 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
6948 | echo $ac_n "(cached) $ac_c" 1>&6 |
6949 | else | |
6950 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6951 | #line 6952 "configure" |
3862412b | 6952 | #include "confdefs.h" |
e17bf198 | 6953 | |
97bf5e38 MK |
6954 | #include <stdio.h> |
6955 | #ifdef HAVE_STRING_H | |
6956 | #include <string.h> | |
6957 | #else | |
6958 | #ifdef HAVE_STRINGS_H | |
6959 | #include <strings.h> | |
6960 | #endif | |
6961 | #endif | |
6962 | #ifdef HAVE_STDLIB_H | |
6963 | #include <stdlib.h> | |
6964 | #endif | |
6965 | #ifdef HAVE_UNISTD_H | |
6966 | #include <unistd.h> | |
6967 | #endif | |
3862412b | 6968 | int main() { |
97bf5e38 | 6969 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
6970 | ; return 0; } |
6971 | EOF | |
91151a06 | 6972 | if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6973 | rm -rf conftest* |
97bf5e38 | 6974 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
6975 | else |
6976 | echo "configure: failed program was:" >&5 | |
6977 | cat conftest.$ac_ext >&5 | |
6978 | rm -rf conftest* | |
97bf5e38 | 6979 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
6980 | fi |
6981 | rm -f conftest* | |
6982 | fi | |
6983 | ||
97bf5e38 MK |
6984 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
6985 | if test $bfd_cv_decl_needed_strdup = yes; then | |
6986 | cat >> confdefs.h <<\EOF | |
6987 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
6988 | EOF |
6989 | ||
97bf5e38 | 6990 | fi |
3862412b | 6991 | |
97bf5e38 | 6992 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
91151a06 | 6993 | echo "configure:6994: checking whether strstr must be declared" >&5 |
97bf5e38 | 6994 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
6995 | echo $ac_n "(cached) $ac_c" 1>&6 |
6996 | else | |
6997 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 6998 | #line 6999 "configure" |
3862412b | 6999 | #include "confdefs.h" |
e17bf198 | 7000 | |
97bf5e38 MK |
7001 | #include <stdio.h> |
7002 | #ifdef HAVE_STRING_H | |
7003 | #include <string.h> | |
7004 | #else | |
7005 | #ifdef HAVE_STRINGS_H | |
7006 | #include <strings.h> | |
7007 | #endif | |
7008 | #endif | |
7009 | #ifdef HAVE_STDLIB_H | |
7010 | #include <stdlib.h> | |
7011 | #endif | |
7012 | #ifdef HAVE_UNISTD_H | |
7013 | #include <unistd.h> | |
7014 | #endif | |
3862412b | 7015 | int main() { |
97bf5e38 | 7016 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7017 | ; return 0; } |
7018 | EOF | |
91151a06 | 7019 | if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7020 | rm -rf conftest* |
97bf5e38 | 7021 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7022 | else |
7023 | echo "configure: failed program was:" >&5 | |
7024 | cat conftest.$ac_ext >&5 | |
7025 | rm -rf conftest* | |
97bf5e38 | 7026 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7027 | fi |
7028 | rm -f conftest* | |
7029 | fi | |
7030 | ||
97bf5e38 MK |
7031 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7032 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7033 | cat >> confdefs.h <<\EOF | |
7034 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7035 | EOF |
7036 | ||
97bf5e38 | 7037 | fi |
3862412b | 7038 | |
97bf5e38 | 7039 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
91151a06 | 7040 | echo "configure:7041: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7041 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7042 | echo $ac_n "(cached) $ac_c" 1>&6 |
7043 | else | |
7044 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7045 | #line 7046 "configure" |
596c9d4b KB |
7046 | #include "confdefs.h" |
7047 | ||
97bf5e38 MK |
7048 | #include <stdio.h> |
7049 | #ifdef HAVE_STRING_H | |
7050 | #include <string.h> | |
7051 | #else | |
7052 | #ifdef HAVE_STRINGS_H | |
7053 | #include <strings.h> | |
7054 | #endif | |
7055 | #endif | |
7056 | #ifdef HAVE_STDLIB_H | |
7057 | #include <stdlib.h> | |
7058 | #endif | |
7059 | #ifdef HAVE_UNISTD_H | |
7060 | #include <unistd.h> | |
7061 | #endif | |
596c9d4b | 7062 | int main() { |
97bf5e38 | 7063 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7064 | ; return 0; } |
7065 | EOF | |
91151a06 | 7066 | if { (eval echo configure:7067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7067 | rm -rf conftest* |
97bf5e38 | 7068 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7069 | else |
7070 | echo "configure: failed program was:" >&5 | |
7071 | cat conftest.$ac_ext >&5 | |
7072 | rm -rf conftest* | |
97bf5e38 | 7073 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7074 | fi |
7075 | rm -f conftest* | |
7076 | fi | |
7077 | ||
97bf5e38 MK |
7078 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7079 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7080 | cat >> confdefs.h <<\EOF | |
7081 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7082 | EOF |
7083 | ||
97bf5e38 | 7084 | fi |
596c9d4b | 7085 | |
97bf5e38 MK |
7086 | |
7087 | # The following save_state_t checkery is only necessary for HPUX | |
7088 | # versions earlier than 10.20. When those fade from memory, this | |
7089 | # could be expunged. --jsm 1999-03-22 | |
7090 | ||
7091 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
91151a06 | 7092 | echo "configure:7093: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7093 | cat > conftest.$ac_ext <<EOF |
91151a06 | 7094 | #line 7095 "configure" |
97bf5e38 MK |
7095 | #include "confdefs.h" |
7096 | #include <machine/save_state.h> | |
7097 | EOF | |
7098 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7099 | egrep "save_state_t" >/dev/null 2>&1; then | |
7100 | rm -rf conftest* | |
7101 | gdb_cv_hpux_savestate=yes | |
7102 | else | |
7103 | rm -rf conftest* | |
7104 | gdb_cv_hpux_savestate=no | |
7105 | fi | |
7106 | rm -f conftest* | |
7107 | ||
7108 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7109 | #line 7110 "configure" |
97bf5e38 MK |
7110 | #include "confdefs.h" |
7111 | #include <machine/save_state.h> | |
7112 | EOF | |
7113 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7114 | egrep "ss_wide" >/dev/null 2>&1; then | |
7115 | rm -rf conftest* | |
7116 | gdb_cv_hpux_sswide=yes | |
7117 | else | |
7118 | rm -rf conftest* | |
7119 | gdb_cv_hpux_sswide=no | |
7120 | fi | |
7121 | rm -f conftest* | |
7122 | ||
7123 | if test $gdb_cv_hpux_savestate = yes | |
7124 | then | |
7125 | cat >> confdefs.h <<\EOF | |
7126 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7127 | EOF | |
7128 | ||
7129 | fi | |
7130 | if test $gdb_cv_hpux_sswide = yes | |
7131 | then | |
7132 | cat >> confdefs.h <<\EOF | |
7133 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7134 | EOF | |
7135 | ||
7136 | fi | |
7137 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7138 | ||
7139 | ||
7140 | # If we are configured native on GNU/Linux, work around problems with | |
7141 | # sys/procfs.h | |
7142 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7143 | ||
7144 | if test "${target}" = "${host}"; then | |
7145 | case "${host}" in | |
7146 | i[3456]86-*-linux*) | |
7147 | cat >> confdefs.h <<\EOF | |
7148 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7149 | EOF | |
7150 | ||
7151 | cat >> confdefs.h <<\EOF | |
7152 | #define sys_quotactl 1 | |
7153 | EOF | |
7154 | ||
7155 | ;; | |
7156 | ia64-*-aix*) | |
7157 | cat >> confdefs.h <<\EOF | |
7158 | #define NEW_PROC_API 1 | |
7159 | EOF | |
7160 | ||
7161 | ;; | |
7162 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7163 | cat >> confdefs.h <<\EOF | |
7164 | #define NEW_PROC_API 1 | |
7165 | EOF | |
7166 | ||
7167 | ;; | |
7168 | *-*-solaris2.[678]) | |
7169 | cat >> confdefs.h <<\EOF | |
7170 | #define NEW_PROC_API 1 | |
7171 | EOF | |
7172 | ||
7173 | ;; | |
7174 | esac | |
7175 | fi | |
7176 | ||
7177 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7178 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
91151a06 | 7179 | echo "configure:7180: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7180 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7181 | echo $ac_n "(cached) $ac_c" 1>&6 |
7182 | else | |
7183 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7184 | #line 7185 "configure" |
596c9d4b KB |
7185 | #include "confdefs.h" |
7186 | ||
7187 | #define _SYSCALL32 | |
7188 | #include <sys/procfs.h> | |
7189 | int main() { | |
97bf5e38 | 7190 | pstatus_t avar |
596c9d4b KB |
7191 | ; return 0; } |
7192 | EOF | |
91151a06 | 7193 | if { (eval echo configure:7194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7194 | rm -rf conftest* |
97bf5e38 | 7195 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7196 | else |
7197 | echo "configure: failed program was:" >&5 | |
7198 | cat conftest.$ac_ext >&5 | |
7199 | rm -rf conftest* | |
97bf5e38 | 7200 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7201 | |
7202 | fi | |
7203 | rm -f conftest* | |
7204 | fi | |
7205 | ||
97bf5e38 | 7206 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7207 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7208 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7209 | EOF |
7210 | ||
7211 | fi | |
97bf5e38 | 7212 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7213 | |
97bf5e38 | 7214 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7215 | echo "configure:7216: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7216 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7217 | echo $ac_n "(cached) $ac_c" 1>&6 |
7218 | else | |
7219 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7220 | #line 7221 "configure" |
596c9d4b KB |
7221 | #include "confdefs.h" |
7222 | ||
7223 | #define _SYSCALL32 | |
7224 | #include <sys/procfs.h> | |
7225 | int main() { | |
97bf5e38 | 7226 | prrun_t avar |
596c9d4b KB |
7227 | ; return 0; } |
7228 | EOF | |
91151a06 | 7229 | if { (eval echo configure:7230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7230 | rm -rf conftest* |
97bf5e38 | 7231 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7232 | else |
7233 | echo "configure: failed program was:" >&5 | |
7234 | cat conftest.$ac_ext >&5 | |
7235 | rm -rf conftest* | |
97bf5e38 | 7236 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7237 | |
7238 | fi | |
7239 | rm -f conftest* | |
7240 | fi | |
7241 | ||
97bf5e38 | 7242 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7243 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7244 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7245 | EOF |
7246 | ||
7247 | fi | |
97bf5e38 | 7248 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7249 | |
97bf5e38 | 7250 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7251 | echo "configure:7252: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7252 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7253 | echo $ac_n "(cached) $ac_c" 1>&6 |
7254 | else | |
7255 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7256 | #line 7257 "configure" |
596c9d4b KB |
7257 | #include "confdefs.h" |
7258 | ||
7259 | #define _SYSCALL32 | |
7260 | #include <sys/procfs.h> | |
7261 | int main() { | |
97bf5e38 | 7262 | gregset_t avar |
596c9d4b KB |
7263 | ; return 0; } |
7264 | EOF | |
91151a06 | 7265 | if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7266 | rm -rf conftest* |
97bf5e38 | 7267 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7268 | else |
7269 | echo "configure: failed program was:" >&5 | |
7270 | cat conftest.$ac_ext >&5 | |
7271 | rm -rf conftest* | |
97bf5e38 | 7272 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7273 | |
7274 | fi | |
7275 | rm -f conftest* | |
7276 | fi | |
7277 | ||
97bf5e38 | 7278 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7279 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7280 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7281 | EOF |
7282 | ||
7283 | fi | |
97bf5e38 | 7284 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7285 | |
97bf5e38 | 7286 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7287 | echo "configure:7288: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7288 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7289 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7290 | else |
7291 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7292 | #line 7293 "configure" |
d84dd0c5 | 7293 | #include "confdefs.h" |
97bf5e38 MK |
7294 | |
7295 | #define _SYSCALL32 | |
d84dd0c5 | 7296 | #include <sys/procfs.h> |
97bf5e38 MK |
7297 | int main() { |
7298 | fpregset_t avar | |
7299 | ; return 0; } | |
d84dd0c5 | 7300 | EOF |
91151a06 | 7301 | if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7302 | rm -rf conftest* |
7303 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7304 | else |
7305 | echo "configure: failed program was:" >&5 | |
7306 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7307 | rm -rf conftest* |
7308 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7309 | ||
d84dd0c5 | 7310 | fi |
97bf5e38 | 7311 | rm -f conftest* |
d84dd0c5 MK |
7312 | fi |
7313 | ||
97bf5e38 MK |
7314 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7315 | cat >> confdefs.h <<\EOF | |
7316 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7317 | EOF |
7318 | ||
97bf5e38 MK |
7319 | fi |
7320 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7321 | |
97bf5e38 | 7322 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7323 | echo "configure:7324: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7324 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7325 | echo $ac_n "(cached) $ac_c" 1>&6 |
7326 | else | |
7327 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7328 | #line 7329 "configure" |
c906108c | 7329 | #include "confdefs.h" |
c906108c | 7330 | |
97bf5e38 MK |
7331 | #define _SYSCALL32 |
7332 | #include <sys/procfs.h> | |
c906108c | 7333 | int main() { |
97bf5e38 | 7334 | prgregset_t avar |
c906108c SS |
7335 | ; return 0; } |
7336 | EOF | |
91151a06 | 7337 | if { (eval echo configure:7338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7338 | rm -rf conftest* |
97bf5e38 | 7339 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7340 | else |
7341 | echo "configure: failed program was:" >&5 | |
7342 | cat conftest.$ac_ext >&5 | |
7343 | rm -rf conftest* | |
97bf5e38 MK |
7344 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7345 | ||
c906108c SS |
7346 | fi |
7347 | rm -f conftest* | |
7348 | fi | |
7349 | ||
97bf5e38 MK |
7350 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7351 | cat >> confdefs.h <<\EOF | |
7352 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7353 | EOF |
7354 | ||
97bf5e38 MK |
7355 | fi |
7356 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7357 | |
97bf5e38 | 7358 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7359 | echo "configure:7360: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7360 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7361 | echo $ac_n "(cached) $ac_c" 1>&6 |
7362 | else | |
7363 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7364 | #line 7365 "configure" |
d45fe813 | 7365 | #include "confdefs.h" |
97bf5e38 MK |
7366 | |
7367 | #define _SYSCALL32 | |
7368 | #include <sys/procfs.h> | |
d45fe813 | 7369 | int main() { |
97bf5e38 | 7370 | prfpregset_t avar |
d45fe813 KB |
7371 | ; return 0; } |
7372 | EOF | |
91151a06 | 7373 | if { (eval echo configure:7374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7374 | rm -rf conftest* |
97bf5e38 | 7375 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7376 | else |
7377 | echo "configure: failed program was:" >&5 | |
7378 | cat conftest.$ac_ext >&5 | |
7379 | rm -rf conftest* | |
97bf5e38 MK |
7380 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7381 | ||
d45fe813 KB |
7382 | fi |
7383 | rm -f conftest* | |
7384 | fi | |
7385 | ||
97bf5e38 MK |
7386 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7387 | cat >> confdefs.h <<\EOF | |
7388 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7389 | EOF |
7390 | ||
97bf5e38 MK |
7391 | fi |
7392 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7393 | |
97bf5e38 | 7394 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7395 | echo "configure:7396: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7396 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7397 | echo $ac_n "(cached) $ac_c" 1>&6 |
7398 | else | |
7399 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7400 | #line 7401 "configure" |
d45fe813 | 7401 | #include "confdefs.h" |
97bf5e38 MK |
7402 | |
7403 | #define _SYSCALL32 | |
7404 | #include <sys/procfs.h> | |
d45fe813 | 7405 | int main() { |
97bf5e38 | 7406 | prgregset32_t avar |
d45fe813 KB |
7407 | ; return 0; } |
7408 | EOF | |
91151a06 | 7409 | if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7410 | rm -rf conftest* |
97bf5e38 | 7411 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7412 | else |
7413 | echo "configure: failed program was:" >&5 | |
7414 | cat conftest.$ac_ext >&5 | |
7415 | rm -rf conftest* | |
97bf5e38 MK |
7416 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7417 | ||
d45fe813 KB |
7418 | fi |
7419 | rm -f conftest* | |
7420 | fi | |
7421 | ||
97bf5e38 MK |
7422 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7423 | cat >> confdefs.h <<\EOF | |
7424 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7425 | EOF |
7426 | ||
97bf5e38 MK |
7427 | fi |
7428 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7429 | |
97bf5e38 | 7430 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7431 | echo "configure:7432: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7432 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7433 | echo $ac_n "(cached) $ac_c" 1>&6 |
7434 | else | |
7435 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7436 | #line 7437 "configure" |
d45fe813 | 7437 | #include "confdefs.h" |
97bf5e38 MK |
7438 | |
7439 | #define _SYSCALL32 | |
7440 | #include <sys/procfs.h> | |
d45fe813 | 7441 | int main() { |
97bf5e38 | 7442 | prfpregset32_t avar |
d45fe813 KB |
7443 | ; return 0; } |
7444 | EOF | |
91151a06 | 7445 | if { (eval echo configure:7446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7446 | rm -rf conftest* |
97bf5e38 | 7447 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7448 | else |
7449 | echo "configure: failed program was:" >&5 | |
7450 | cat conftest.$ac_ext >&5 | |
7451 | rm -rf conftest* | |
97bf5e38 MK |
7452 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7453 | ||
d45fe813 KB |
7454 | fi |
7455 | rm -f conftest* | |
7456 | fi | |
7457 | ||
97bf5e38 MK |
7458 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7459 | cat >> confdefs.h <<\EOF | |
7460 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7461 | EOF |
7462 | ||
97bf5e38 MK |
7463 | fi |
7464 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7465 | |
97bf5e38 | 7466 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7467 | echo "configure:7468: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7468 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7469 | echo $ac_n "(cached) $ac_c" 1>&6 |
7470 | else | |
7471 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7472 | #line 7473 "configure" |
d45fe813 | 7473 | #include "confdefs.h" |
97bf5e38 | 7474 | |
d45fe813 | 7475 | #define _SYSCALL32 |
97bf5e38 | 7476 | #include <sys/procfs.h> |
d45fe813 | 7477 | int main() { |
97bf5e38 | 7478 | lwpid_t avar |
d45fe813 KB |
7479 | ; return 0; } |
7480 | EOF | |
91151a06 | 7481 | if { (eval echo configure:7482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7482 | rm -rf conftest* |
97bf5e38 | 7483 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7484 | else |
7485 | echo "configure: failed program was:" >&5 | |
7486 | cat conftest.$ac_ext >&5 | |
7487 | rm -rf conftest* | |
97bf5e38 MK |
7488 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7489 | ||
d45fe813 KB |
7490 | fi |
7491 | rm -f conftest* | |
7492 | fi | |
7493 | ||
97bf5e38 MK |
7494 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7495 | cat >> confdefs.h <<\EOF | |
7496 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7497 | EOF |
7498 | ||
97bf5e38 MK |
7499 | fi |
7500 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7501 | |
97bf5e38 | 7502 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7503 | echo "configure:7504: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7504 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7505 | echo $ac_n "(cached) $ac_c" 1>&6 |
7506 | else | |
7507 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7508 | #line 7509 "configure" |
c906108c SS |
7509 | #include "confdefs.h" |
7510 | ||
97bf5e38 MK |
7511 | #define _SYSCALL32 |
7512 | #include <sys/procfs.h> | |
c906108c | 7513 | int main() { |
97bf5e38 | 7514 | psaddr_t avar |
c906108c SS |
7515 | ; return 0; } |
7516 | EOF | |
91151a06 | 7517 | if { (eval echo configure:7518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7518 | rm -rf conftest* |
97bf5e38 | 7519 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7520 | else |
7521 | echo "configure: failed program was:" >&5 | |
7522 | cat conftest.$ac_ext >&5 | |
7523 | rm -rf conftest* | |
97bf5e38 MK |
7524 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7525 | ||
c906108c SS |
7526 | fi |
7527 | rm -f conftest* | |
7528 | fi | |
7529 | ||
97bf5e38 MK |
7530 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7531 | cat >> confdefs.h <<\EOF | |
7532 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7533 | EOF |
7534 | ||
97bf5e38 MK |
7535 | fi |
7536 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7537 | |
97bf5e38 | 7538 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7539 | echo "configure:7540: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7540 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7541 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7542 | else |
7543 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7544 | #line 7545 "configure" |
c906108c SS |
7545 | #include "confdefs.h" |
7546 | ||
97bf5e38 MK |
7547 | #define _SYSCALL32 |
7548 | #include <sys/procfs.h> | |
7549 | int main() { | |
7550 | prsysent_t avar | |
7551 | ; return 0; } | |
c906108c | 7552 | EOF |
91151a06 | 7553 | if { (eval echo configure:7554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7554 | rm -rf conftest* |
7555 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7556 | else |
7557 | echo "configure: failed program was:" >&5 | |
7558 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7559 | rm -rf conftest* |
7560 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7561 | ||
c906108c | 7562 | fi |
97bf5e38 | 7563 | rm -f conftest* |
c906108c SS |
7564 | fi |
7565 | ||
97bf5e38 MK |
7566 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7567 | cat >> confdefs.h <<\EOF | |
7568 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7569 | EOF |
7570 | ||
97bf5e38 MK |
7571 | fi |
7572 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7573 | |
97bf5e38 | 7574 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7575 | echo "configure:7576: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7576 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7577 | echo $ac_n "(cached) $ac_c" 1>&6 |
7578 | else | |
7579 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7580 | #line 7581 "configure" |
c906108c SS |
7581 | #include "confdefs.h" |
7582 | ||
97bf5e38 MK |
7583 | #define _SYSCALL32 |
7584 | #include <sys/procfs.h> | |
c906108c | 7585 | int main() { |
97bf5e38 | 7586 | pr_sigset_t avar |
c906108c SS |
7587 | ; return 0; } |
7588 | EOF | |
91151a06 | 7589 | if { (eval echo configure:7590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7590 | rm -rf conftest* |
97bf5e38 | 7591 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7592 | else |
7593 | echo "configure: failed program was:" >&5 | |
7594 | cat conftest.$ac_ext >&5 | |
7595 | rm -rf conftest* | |
97bf5e38 MK |
7596 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7597 | ||
c906108c SS |
7598 | fi |
7599 | rm -f conftest* | |
7600 | fi | |
7601 | ||
97bf5e38 MK |
7602 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7603 | cat >> confdefs.h <<\EOF | |
7604 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7605 | EOF |
7606 | ||
97bf5e38 MK |
7607 | fi |
7608 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7609 | |
97bf5e38 | 7610 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
91151a06 | 7611 | echo "configure:7612: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7612 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7613 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7614 | else |
7615 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7616 | #line 7617 "configure" |
c906108c SS |
7617 | #include "confdefs.h" |
7618 | ||
97bf5e38 MK |
7619 | #define _SYSCALL32 |
7620 | #include <sys/procfs.h> | |
7621 | int main() { | |
7622 | pr_sigaction64_t avar | |
7623 | ; return 0; } | |
c906108c | 7624 | EOF |
91151a06 | 7625 | if { (eval echo configure:7626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7626 | rm -rf conftest* |
7627 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7628 | else |
7629 | echo "configure: failed program was:" >&5 | |
7630 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7631 | rm -rf conftest* |
7632 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7633 | ||
c906108c | 7634 | fi |
97bf5e38 | 7635 | rm -f conftest* |
c906108c SS |
7636 | fi |
7637 | ||
97bf5e38 MK |
7638 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7639 | cat >> confdefs.h <<\EOF | |
7640 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7641 | EOF |
7642 | ||
97bf5e38 MK |
7643 | fi |
7644 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7645 | ||
7646 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
91151a06 | 7647 | echo "configure:7648: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7648 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7650 | else | |
7651 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7652 | #line 7653 "configure" |
97bf5e38 MK |
7653 | #include "confdefs.h" |
7654 | ||
7655 | #define _SYSCALL32 | |
7656 | #include <sys/procfs.h> | |
7657 | int main() { | |
7658 | pr_siginfo64_t avar | |
7659 | ; return 0; } | |
7660 | EOF | |
91151a06 | 7661 | if { (eval echo configure:7662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7662 | rm -rf conftest* |
7663 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7664 | else | |
7665 | echo "configure: failed program was:" >&5 | |
7666 | cat conftest.$ac_ext >&5 | |
7667 | rm -rf conftest* | |
7668 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7669 | ||
7670 | fi | |
7671 | rm -f conftest* | |
c906108c | 7672 | fi |
c906108c | 7673 | |
97bf5e38 MK |
7674 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7675 | cat >> confdefs.h <<\EOF | |
7676 | #define HAVE_PR_SIGINFO64_T 1 | |
7677 | EOF | |
c906108c | 7678 | |
97bf5e38 MK |
7679 | fi |
7680 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7681 | ||
7682 | ||
7683 | ||
7684 | ||
7685 | ||
7686 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7687 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
91151a06 | 7688 | echo "configure:7689: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7689 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7690 | echo $ac_n "(cached) $ac_c" 1>&6 |
7691 | else | |
7692 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7693 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7694 | else |
7695 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7696 | #line 7697 "configure" |
c906108c | 7697 | #include "confdefs.h" |
97bf5e38 MK |
7698 | #include <sys/procfs.h> |
7699 | int main () | |
7700 | { | |
7701 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7702 | return 1; | |
7703 | return 0; | |
7704 | } | |
c906108c | 7705 | EOF |
91151a06 | 7706 | if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7707 | then |
97bf5e38 | 7708 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7709 | else |
7710 | echo "configure: failed program was:" >&5 | |
7711 | cat conftest.$ac_ext >&5 | |
7712 | rm -fr conftest* | |
97bf5e38 | 7713 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7714 | fi |
7715 | rm -fr conftest* | |
7716 | fi | |
7717 | ||
7718 | fi | |
7719 | ||
97bf5e38 MK |
7720 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7721 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7722 | cat >> confdefs.h <<\EOF | |
7723 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7724 | EOF |
7725 | ||
97bf5e38 MK |
7726 | fi |
7727 | fi | |
c906108c | 7728 | |
97bf5e38 MK |
7729 | |
7730 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
91151a06 | 7731 | echo "configure:7732: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7732 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7733 | echo $ac_n "(cached) $ac_c" 1>&6 |
7734 | else | |
7735 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7736 | #line 7737 "configure" |
c906108c | 7737 | #include "confdefs.h" |
97bf5e38 MK |
7738 | #include <unistd.h> |
7739 | #include <sys/types.h> | |
7740 | #include <sys/procfs.h> | |
7741 | ||
7742 | int main() { | |
7743 | ||
7744 | int dummy;; | |
7745 | dummy = ioctl(0, PIOCSET, &dummy); | |
7746 | ||
7747 | ; return 0; } | |
c906108c | 7748 | EOF |
91151a06 | 7749 | if { (eval echo configure:7750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7750 | rm -rf conftest* |
97bf5e38 | 7751 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7752 | else |
c906108c SS |
7753 | echo "configure: failed program was:" >&5 |
7754 | cat conftest.$ac_ext >&5 | |
7755 | rm -rf conftest* | |
97bf5e38 | 7756 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7757 | fi |
7758 | rm -f conftest* | |
7759 | fi | |
97bf5e38 MK |
7760 | |
7761 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7762 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7763 | cat >> confdefs.h <<\EOF | |
7764 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7765 | EOF |
97bf5e38 MK |
7766 | |
7767 | fi | |
c906108c | 7768 | fi |
c906108c | 7769 | |
97bf5e38 MK |
7770 | if test ${host} = ${target} ; then |
7771 | ||
7772 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
91151a06 | 7773 | echo "configure:7774: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7774 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7775 | echo $ac_n "(cached) $ac_c" 1>&6 |
7776 | else | |
7777 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7778 | #line 7779 "configure" |
c906108c | 7779 | #include "confdefs.h" |
97bf5e38 | 7780 | #include <link.h> |
c906108c | 7781 | int main() { |
97bf5e38 | 7782 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7783 | ; return 0; } |
7784 | EOF | |
91151a06 | 7785 | if { (eval echo configure:7786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7786 | rm -rf conftest* |
97bf5e38 | 7787 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7788 | else |
7789 | echo "configure: failed program was:" >&5 | |
7790 | cat conftest.$ac_ext >&5 | |
7791 | rm -rf conftest* | |
97bf5e38 | 7792 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7793 | fi |
7794 | rm -f conftest* | |
7795 | fi | |
7796 | ||
97bf5e38 MK |
7797 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7798 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7799 | cat >> confdefs.h <<\EOF | |
7800 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7801 | EOF |
97bf5e38 MK |
7802 | |
7803 | fi | |
7804 | ||
7805 | ||
7806 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
91151a06 | 7807 | echo "configure:7808: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
7808 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
7809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 7810 | else |
97bf5e38 | 7811 | cat > conftest.$ac_ext <<EOF |
91151a06 | 7812 | #line 7813 "configure" |
97bf5e38 MK |
7813 | #include "confdefs.h" |
7814 | #include <sys/types.h> | |
7815 | #include <link.h> | |
7816 | int main() { | |
7817 | struct link_map lm; (void) lm.lm_addr; | |
7818 | ; return 0; } | |
7819 | EOF | |
91151a06 | 7820 | if { (eval echo configure:7821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7821 | rm -rf conftest* |
7822 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
7823 | else | |
7824 | echo "configure: failed program was:" >&5 | |
7825 | cat conftest.$ac_ext >&5 | |
7826 | rm -rf conftest* | |
7827 | gdb_cv_have_struct_link_map_with_lm_members=no | |
7828 | fi | |
7829 | rm -f conftest* | |
c906108c | 7830 | fi |
c906108c | 7831 | |
97bf5e38 MK |
7832 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
7833 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
7834 | cat >> confdefs.h <<\EOF | |
7835 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
7836 | EOF | |
7837 | ||
7838 | fi | |
7839 | ||
7840 | ||
7841 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
91151a06 | 7842 | echo "configure:7843: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 7843 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 7844 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7845 | else |
7846 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7847 | #line 7848 "configure" |
c906108c | 7848 | #include "confdefs.h" |
97bf5e38 MK |
7849 | #include <sys/types.h> |
7850 | #ifdef HAVE_NLIST_H | |
7851 | #include <nlist.h> | |
7852 | #endif | |
7853 | #include <link.h> | |
7854 | int main() { | |
7855 | struct so_map lm; (void) lm.som_addr; | |
7856 | ; return 0; } | |
7857 | EOF | |
91151a06 | 7858 | if { (eval echo configure:7859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7859 | rm -rf conftest* |
7860 | gdb_cv_have_struct_so_map_with_som_members=yes | |
7861 | else | |
7862 | echo "configure: failed program was:" >&5 | |
7863 | cat conftest.$ac_ext >&5 | |
7864 | rm -rf conftest* | |
7865 | gdb_cv_have_struct_so_map_with_som_members=no | |
7866 | fi | |
7867 | rm -f conftest* | |
7868 | fi | |
c906108c | 7869 | |
97bf5e38 MK |
7870 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
7871 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
7872 | cat >> confdefs.h <<\EOF | |
7873 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
7874 | EOF | |
c906108c | 7875 | |
97bf5e38 | 7876 | fi |
c906108c | 7877 | |
97bf5e38 MK |
7878 | |
7879 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
91151a06 | 7880 | echo "configure:7881: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
7881 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
7882 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7883 | else | |
7884 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7885 | #line 7886 "configure" |
97bf5e38 MK |
7886 | #include "confdefs.h" |
7887 | #define _SYSCALL32 | |
7888 | #include <sys/link.h> | |
7889 | int main() { | |
7890 | struct link_map32 l; | |
7891 | ; return 0; } | |
7892 | EOF | |
91151a06 | 7893 | if { (eval echo configure:7894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7894 | rm -rf conftest* |
7895 | gdb_cv_have_struct_link_map32=yes | |
7896 | else | |
7897 | echo "configure: failed program was:" >&5 | |
7898 | cat conftest.$ac_ext >&5 | |
7899 | rm -rf conftest* | |
7900 | gdb_cv_have_struct_link_map32=no | |
7901 | fi | |
7902 | rm -f conftest* | |
7903 | fi | |
c906108c | 7904 | |
97bf5e38 MK |
7905 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
7906 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
7907 | cat >> confdefs.h <<\EOF | |
7908 | #define HAVE_STRUCT_LINK_MAP32 1 | |
7909 | EOF | |
c906108c | 7910 | |
97bf5e38 MK |
7911 | cat >> confdefs.h <<\EOF |
7912 | #define _SYSCALL32 1 | |
7913 | EOF | |
c906108c | 7914 | |
97bf5e38 MK |
7915 | fi |
7916 | fi | |
c906108c | 7917 | |
c906108c | 7918 | |
97bf5e38 | 7919 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
91151a06 | 7920 | echo "configure:7921: checking for long long support in compiler" >&5 |
97bf5e38 MK |
7921 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
7922 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7923 | else | |
7924 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7925 | #line 7926 "configure" |
97bf5e38 | 7926 | #include "confdefs.h" |
c906108c | 7927 | |
97bf5e38 | 7928 | int main() { |
c906108c | 7929 | |
97bf5e38 MK |
7930 | extern long long foo; |
7931 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 7932 | |
97bf5e38 MK |
7933 | ; return 0; } |
7934 | EOF | |
91151a06 | 7935 | if { (eval echo configure:7936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7936 | rm -rf conftest* |
7937 | gdb_cv_c_long_long=yes | |
7938 | else | |
7939 | echo "configure: failed program was:" >&5 | |
7940 | cat conftest.$ac_ext >&5 | |
7941 | rm -rf conftest* | |
7942 | gdb_cv_c_long_long=no | |
7943 | fi | |
7944 | rm -f conftest* | |
7945 | fi | |
c906108c | 7946 | |
97bf5e38 MK |
7947 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
7948 | if test $gdb_cv_c_long_long = yes; then | |
7949 | cat >> confdefs.h <<\EOF | |
7950 | #define CC_HAS_LONG_LONG 1 | |
7951 | EOF | |
7952 | ||
7953 | fi | |
7954 | ||
7955 | ||
7956 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
91151a06 | 7957 | echo "configure:7958: checking for long long support in printf" >&5 |
97bf5e38 MK |
7958 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
7959 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7960 | else | |
7961 | if test "$cross_compiling" = yes; then | |
7962 | gdb_cv_printf_has_long_long=no | |
7963 | else | |
7964 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 7965 | #line 7966 "configure" |
97bf5e38 MK |
7966 | #include "confdefs.h" |
7967 | ||
7968 | int main () { | |
7969 | char buf[32]; | |
7970 | long long l = 0; | |
7971 | l = (l << 16) + 0x0123; | |
7972 | l = (l << 16) + 0x4567; | |
7973 | l = (l << 16) + 0x89ab; | |
7974 | l = (l << 16) + 0xcdef; | |
7975 | sprintf (buf, "0x%016llx", l); | |
7976 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 7977 | } |
97bf5e38 | 7978 | EOF |
91151a06 | 7979 | if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
7980 | then |
7981 | gdb_cv_printf_has_long_long=yes | |
7982 | else | |
7983 | echo "configure: failed program was:" >&5 | |
7984 | cat conftest.$ac_ext >&5 | |
7985 | rm -fr conftest* | |
7986 | gdb_cv_printf_has_long_long=no | |
7987 | fi | |
7988 | rm -fr conftest* | |
7989 | fi | |
7990 | ||
7991 | fi | |
7992 | ||
7993 | if test $gdb_cv_printf_has_long_long = yes; then | |
7994 | cat >> confdefs.h <<\EOF | |
7995 | #define PRINTF_HAS_LONG_LONG 1 | |
7996 | EOF | |
7997 | ||
7998 | fi | |
7999 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8000 | ||
8001 | ||
8002 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
91151a06 | 8003 | echo "configure:8004: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8004 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8005 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8006 | else | |
8007 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8008 | #line 8009 "configure" |
97bf5e38 MK |
8009 | #include "confdefs.h" |
8010 | ||
8011 | int main() { | |
8012 | long double foo; | |
8013 | ; return 0; } | |
8014 | EOF | |
91151a06 | 8015 | if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8016 | rm -rf conftest* |
8017 | ac_cv_c_long_double=yes | |
8018 | else | |
8019 | echo "configure: failed program was:" >&5 | |
8020 | cat conftest.$ac_ext >&5 | |
8021 | rm -rf conftest* | |
8022 | ac_cv_c_long_double=no | |
8023 | fi | |
8024 | rm -f conftest* | |
8025 | fi | |
c906108c | 8026 | |
97bf5e38 MK |
8027 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8028 | if test $ac_cv_c_long_double = yes; then | |
8029 | cat >> confdefs.h <<\EOF | |
8030 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8031 | EOF |
97bf5e38 MK |
8032 | |
8033 | fi | |
8034 | ||
8035 | ||
8036 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
91151a06 | 8037 | echo "configure:8038: checking for long double support in printf" >&5 |
97bf5e38 MK |
8038 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8040 | else | |
8041 | if test "$cross_compiling" = yes; then | |
8042 | gdb_cv_printf_has_long_double=no | |
8043 | else | |
8044 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8045 | #line 8046 "configure" |
97bf5e38 MK |
8046 | #include "confdefs.h" |
8047 | ||
8048 | int main () { | |
8049 | char buf[16]; | |
8050 | long double f = 3.141592653; | |
8051 | sprintf (buf, "%Lg", f); | |
8052 | return (strncmp ("3.14159", buf, 7)); | |
8053 | } | |
8054 | EOF | |
91151a06 | 8055 | if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8056 | then |
97bf5e38 | 8057 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8058 | else |
8059 | echo "configure: failed program was:" >&5 | |
8060 | cat conftest.$ac_ext >&5 | |
8061 | rm -fr conftest* | |
97bf5e38 | 8062 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8063 | fi |
8064 | rm -fr conftest* | |
8065 | fi | |
8066 | ||
8067 | fi | |
8068 | ||
97bf5e38 | 8069 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8070 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8071 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8072 | EOF | |
8073 | ||
8074 | fi | |
8075 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8076 | ||
8077 | ||
8078 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
91151a06 | 8079 | echo "configure:8080: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8080 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8082 | else | |
8083 | if test "$cross_compiling" = yes; then | |
8084 | gdb_cv_scanf_has_long_double=no | |
8085 | else | |
8086 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8087 | #line 8088 "configure" |
97bf5e38 MK |
8088 | #include "confdefs.h" |
8089 | ||
8090 | int main () { | |
8091 | char *buf = "3.141592653"; | |
8092 | long double f = 0; | |
8093 | sscanf (buf, "%Lg", &f); | |
8094 | return !(f > 3.14159 && f < 3.14160); | |
8095 | } | |
c906108c | 8096 | EOF |
91151a06 | 8097 | if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8098 | then |
8099 | gdb_cv_scanf_has_long_double=yes | |
8100 | else | |
8101 | echo "configure: failed program was:" >&5 | |
8102 | cat conftest.$ac_ext >&5 | |
8103 | rm -fr conftest* | |
8104 | gdb_cv_scanf_has_long_double=no | |
8105 | fi | |
8106 | rm -fr conftest* | |
8107 | fi | |
c906108c SS |
8108 | |
8109 | fi | |
8110 | ||
97bf5e38 MK |
8111 | if test $gdb_cv_scanf_has_long_double = yes; then |
8112 | cat >> confdefs.h <<\EOF | |
8113 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8114 | EOF | |
8115 | ||
8116 | fi | |
8117 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8118 | |
438013df AO |
8119 | case ${host_os} in |
8120 | aix*) | |
8121 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
91151a06 | 8122 | echo "configure:8123: checking for -bbigtoc option" >&5 |
438013df AO |
8123 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8125 | else | |
8126 | ||
8127 | SAVE_LDFLAGS=$LDFLAGS | |
8128 | ||
8129 | case $GCC in | |
8130 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8131 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8132 | esac | |
8133 | ||
8134 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8135 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8136 | #line 8137 "configure" |
438013df AO |
8137 | #include "confdefs.h" |
8138 | ||
8139 | int main() { | |
8140 | int i; | |
8141 | ; return 0; } | |
8142 | EOF | |
91151a06 | 8143 | if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8144 | : |
8145 | else | |
8146 | echo "configure: failed program was:" >&5 | |
8147 | cat conftest.$ac_ext >&5 | |
8148 | rm -rf conftest* | |
8149 | gdb_cv_bigtoc= | |
8150 | fi | |
8151 | rm -f conftest* | |
8152 | ||
8153 | fi | |
8154 | ||
8155 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8156 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8157 | ;; | |
8158 | esac | |
8159 | ||
c906108c SS |
8160 | |
8161 | ||
8162 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8163 | case ${host_os} in | |
8164 | hpux*) | |
8165 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
91151a06 | 8166 | echo "configure:8167: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8167 | if test -f /usr/include/dce/cma_config.h ; then |
8168 | if test "$GCC" = "yes" ; then | |
8169 | echo "$ac_t""yes" 1>&6 | |
8170 | cat >> confdefs.h <<\EOF | |
8171 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8172 | EOF | |
8173 | ||
66b965bb | 8174 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8175 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8176 | else | |
8177 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8178 | fi | |
8179 | else | |
8180 | echo "$ac_t""no" 1>&6 | |
8181 | fi | |
8182 | ;; | |
8183 | solaris*) | |
d92419e5 JB |
8184 | # See if thread_db library is around for Solaris thread debugging. |
8185 | # Note that we must explicitly test for version 1 of the library | |
8186 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8187 | # the same API. | |
c906108c | 8188 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
91151a06 | 8189 | echo "configure:8190: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8190 | if test -f /usr/lib/libthread_db.so.1 ; then |
8191 | echo "$ac_t""yes" 1>&6 | |
8192 | cat >> confdefs.h <<\EOF | |
8193 | #define HAVE_THREAD_DB_LIB 1 | |
8194 | EOF | |
8195 | ||
66b965bb | 8196 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8197 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8198 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
91151a06 | 8199 | echo "configure:8200: checking for dlopen in -ldl" >&5 |
c906108c SS |
8200 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8201 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8202 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8203 | else | |
8204 | ac_save_LIBS="$LIBS" | |
8205 | LIBS="-ldl $LIBS" | |
8206 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8207 | #line 8208 "configure" |
c906108c SS |
8208 | #include "confdefs.h" |
8209 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8210 | /* We use char because int might match the return type of a gcc2 | |
8211 | builtin and then its argument prototype would still apply. */ | |
8212 | char dlopen(); | |
8213 | ||
8214 | int main() { | |
8215 | dlopen() | |
8216 | ; return 0; } | |
8217 | EOF | |
91151a06 | 8218 | if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8219 | rm -rf conftest* |
8220 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8221 | else | |
8222 | echo "configure: failed program was:" >&5 | |
8223 | cat conftest.$ac_ext >&5 | |
8224 | rm -rf conftest* | |
8225 | eval "ac_cv_lib_$ac_lib_var=no" | |
8226 | fi | |
8227 | rm -f conftest* | |
8228 | LIBS="$ac_save_LIBS" | |
8229 | ||
8230 | fi | |
8231 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8232 | echo "$ac_t""yes" 1>&6 | |
8233 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8234 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8235 | cat >> confdefs.h <<EOF | |
8236 | #define $ac_tr_lib 1 | |
8237 | EOF | |
8238 | ||
8239 | LIBS="-ldl $LIBS" | |
8240 | ||
8241 | else | |
8242 | echo "$ac_t""no" 1>&6 | |
8243 | fi | |
8244 | ||
8245 | if test "$GCC" = "yes" ; then | |
8246 | # The GNU linker requires the -export-dynamic option to make | |
8247 | # all symbols visible in the dynamic symbol table. | |
8248 | hold_ldflags=$LDFLAGS | |
8249 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
91151a06 | 8250 | echo "configure:8251: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8251 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8252 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8253 | #line 8254 "configure" |
c906108c SS |
8254 | #include "confdefs.h" |
8255 | ||
8256 | int main() { | |
8257 | int i; | |
8258 | ; return 0; } | |
8259 | EOF | |
91151a06 | 8260 | if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8261 | rm -rf conftest* |
8262 | found=yes | |
8263 | else | |
8264 | echo "configure: failed program was:" >&5 | |
8265 | cat conftest.$ac_ext >&5 | |
8266 | rm -rf conftest* | |
8267 | found=no | |
8268 | fi | |
8269 | rm -f conftest* | |
8270 | LDFLAGS=$hold_ldflags | |
8271 | echo "$ac_t""$found" 1>&6 | |
8272 | if test $found = yes; then | |
8273 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8274 | fi | |
8275 | fi | |
8276 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8277 | # at one point. | |
8278 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
91151a06 | 8279 | echo "configure:8280: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8280 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8282 | else | |
8283 | ||
8284 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8285 | #line 8286 "configure" |
c906108c SS |
8286 | #include "confdefs.h" |
8287 | ||
8288 | #include <proc_service.h> | |
8289 | ps_err_e ps_pdwrite | |
8290 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8291 | ||
8292 | int main() { | |
8293 | ||
8294 | ; return 0; } | |
8295 | EOF | |
91151a06 | 8296 | if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8297 | rm -rf conftest* |
8298 | gdb_cv_proc_service_is_old=no | |
8299 | else | |
8300 | echo "configure: failed program was:" >&5 | |
8301 | cat conftest.$ac_ext >&5 | |
8302 | rm -rf conftest* | |
8303 | gdb_cv_proc_service_is_old=yes | |
8304 | fi | |
8305 | rm -f conftest* | |
8306 | ||
8307 | fi | |
8308 | ||
8309 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8310 | if test $gdb_cv_proc_service_is_old = yes; then | |
8311 | cat >> confdefs.h <<\EOF | |
8312 | #define PROC_SERVICE_IS_OLD 1 | |
8313 | EOF | |
8314 | ||
8315 | fi | |
8316 | else | |
8317 | echo "$ac_t""no" 1>&6 | |
8318 | fi | |
8319 | ;; | |
d92419e5 JB |
8320 | aix*) |
8321 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
91151a06 | 8322 | echo "configure:8323: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8323 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8325 | else | |
8326 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8327 | #line 8328 "configure" |
d92419e5 JB |
8328 | #include "confdefs.h" |
8329 | #include <sys/pthdebug.h> | |
8330 | int main() { | |
8331 | #ifndef PTHDB_VERSION_3 | |
8332 | #error | |
8333 | #endif | |
8334 | ; return 0; } | |
8335 | EOF | |
91151a06 | 8336 | if { (eval echo configure:8337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8337 | rm -rf conftest* |
8338 | gdb_cv_have_aix_thread_debug=yes | |
8339 | else | |
8340 | echo "configure: failed program was:" >&5 | |
8341 | cat conftest.$ac_ext >&5 | |
8342 | rm -rf conftest* | |
8343 | gdb_cv_have_aix_thread_debug=no | |
8344 | fi | |
8345 | rm -f conftest* | |
8346 | fi | |
8347 | ||
8348 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8349 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8350 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8351 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8352 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8353 | fi | |
8354 | ;; | |
c906108c SS |
8355 | esac |
8356 | ||
8357 | fi | |
8358 | ||
3f47be5c EZ |
8359 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8360 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
91151a06 | 8361 | echo "configure:8362: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8362 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8364 | else | |
8365 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8366 | #line 8367 "configure" |
3f47be5c EZ |
8367 | #include "confdefs.h" |
8368 | #include <thread_db.h> | |
8369 | int main() { | |
8370 | int i = TD_NOTALLOC; | |
8371 | ; return 0; } | |
8372 | EOF | |
91151a06 | 8373 | if { (eval echo configure:8374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8374 | rm -rf conftest* |
8375 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8376 | else | |
8377 | echo "configure: failed program was:" >&5 | |
8378 | cat conftest.$ac_ext >&5 | |
8379 | rm -rf conftest* | |
8380 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8381 | ||
8382 | fi | |
8383 | rm -f conftest* | |
8384 | ||
8385 | fi | |
8386 | ||
8387 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8388 | fi | |
8389 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8390 | cat >> confdefs.h <<\EOF | |
8391 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8392 | EOF | |
8393 | ||
8394 | fi | |
8395 | ||
eb784848 DJ |
8396 | if test $host = $target; then |
8397 | case $target in | |
8398 | *-linux*) | |
8399 | save_CFLAGS=$CFLAGS | |
8400 | CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8401 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8402 | #line 8403 "configure" |
eb784848 DJ |
8403 | #include "confdefs.h" |
8404 | #include <unistd.h> | |
8405 | int main() { | |
8406 | pread64 (0, NULL, 0, 0); | |
8407 | ; return 0; } | |
8408 | EOF | |
91151a06 | 8409 | if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
eb784848 DJ |
8410 | rm -rf conftest* |
8411 | ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" | |
8412 | cat >> confdefs.h <<\EOF | |
8413 | #define HAVE_PREAD64 1 | |
8414 | EOF | |
8415 | ||
8416 | else | |
8417 | echo "configure: failed program was:" >&5 | |
8418 | cat conftest.$ac_ext >&5 | |
8419 | fi | |
8420 | rm -f conftest* | |
8421 | CFLAGS=$save_CFLAGS | |
8422 | ;; | |
8423 | esac | |
8424 | fi | |
8425 | ||
fb40c209 | 8426 | |
3b851bce AC |
8427 | # NOTE: Don't add -Wall or -Wunused, they both include |
8428 | # -Wunused-parameter which reports bogus warnings. | |
8429 | # NOTE: If you add to this list, remember to update | |
8430 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8431 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8432 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8433 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8434 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8435 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8436 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8437 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8438 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8439 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8440 | if test "${enable_build_warnings+set}" = set; then | |
8441 | enableval="$enable_build_warnings" | |
1decb323 | 8442 | case "${enableval}" in |
c906108c SS |
8443 | yes) ;; |
8444 | no) build_warnings="-w";; | |
8445 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8446 | build_warnings="${build_warnings} ${t}";; | |
8447 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8448 | build_warnings="${t} ${build_warnings}";; | |
8449 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8450 | esac | |
d4f3574e | 8451 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8452 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8453 | fi |
1decb323 | 8454 | fi |
3b851bce AC |
8455 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8456 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8457 | enableval="$enable_gdb_build_warnings" | |
8458 | case "${enableval}" in | |
8459 | yes) ;; | |
8460 | no) build_warnings="-w";; | |
8461 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8462 | build_warnings="${build_warnings} ${t}";; | |
8463 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8464 | build_warnings="${t} ${build_warnings}";; | |
8465 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8466 | esac | |
8467 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8468 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8469 | fi | |
8470 | fi | |
104c1213 JM |
8471 | WARN_CFLAGS="" |
8472 | WERROR_CFLAGS="" | |
c906108c SS |
8473 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8474 | then | |
746a987d | 8475 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
91151a06 | 8476 | echo "configure:8477: checking compiler warning flags" >&5 |
746a987d AC |
8477 | # Separate out the -Werror flag as some files just cannot be |
8478 | # compiled with it enabled. | |
8479 | for w in ${build_warnings}; do | |
8480 | case $w in | |
8481 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8482 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8483 | saved_CFLAGS="$CFLAGS" |
8484 | CFLAGS="$CFLAGS $w" | |
8485 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8486 | #line 8487 "configure" |
4536bbc6 AC |
8487 | #include "confdefs.h" |
8488 | ||
8489 | int main() { | |
8490 | ||
8491 | ; return 0; } | |
8492 | EOF | |
91151a06 | 8493 | if { (eval echo configure:8494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8494 | rm -rf conftest* |
8495 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8496 | else | |
8497 | echo "configure: failed program was:" >&5 | |
8498 | cat conftest.$ac_ext >&5 | |
8499 | fi | |
8500 | rm -f conftest* | |
8501 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8502 | esac |
8503 | done | |
8504 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8505 | fi |
8506 | ||
8507 | ||
104c1213 | 8508 | |
c906108c SS |
8509 | MMALLOC_CFLAGS= |
8510 | MMALLOC= | |
8511 | ||
8512 | ||
8513 | ||
8514 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8515 | if test "${with_mmalloc+set}" = set; then | |
8516 | withval="$with_mmalloc" | |
8517 | case "${withval}" in | |
8518 | yes) want_mmalloc=true ;; | |
8519 | no) want_mmalloc=false;; | |
8520 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8521 | esac | |
8522 | else | |
8523 | want_mmalloc=false | |
8524 | fi | |
8525 | ||
8526 | if test x$want_mmalloc = xtrue; then | |
8527 | cat >> confdefs.h <<\EOF | |
8528 | #define USE_MMALLOC 1 | |
8529 | EOF | |
8530 | ||
8531 | cat >> confdefs.h <<\EOF | |
8532 | #define MMCHECK_FORCE 1 | |
8533 | EOF | |
8534 | ||
8535 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8536 | MMALLOC='../mmalloc/libmmalloc.a' | |
8537 | fi | |
8538 | ||
7a292a7a SS |
8539 | # In the Cygwin environment, we need some additional flags. |
8540 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
91151a06 | 8541 | echo "configure:8542: checking for cygwin" >&5 |
7a292a7a SS |
8542 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8543 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8544 | else | |
8545 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8546 | #line 8547 "configure" |
7a292a7a SS |
8547 | #include "confdefs.h" |
8548 | ||
8549 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8550 | lose | |
8551 | #endif | |
8552 | EOF | |
8553 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8554 | egrep "lose" >/dev/null 2>&1; then | |
8555 | rm -rf conftest* | |
8556 | gdb_cv_os_cygwin=yes | |
8557 | else | |
8558 | rm -rf conftest* | |
8559 | gdb_cv_os_cygwin=no | |
8560 | fi | |
8561 | rm -f conftest* | |
8562 | ||
8563 | fi | |
8564 | ||
8565 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8566 | ||
aff38e61 AC |
8567 | |
8568 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8569 | case ${host} in | |
95cbc983 AC |
8570 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8571 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8572 | esac |
8573 | ||
8574 | ||
cd0fc7c3 SS |
8575 | # libreadline needs libuser32.a in a cygwin environment |
8576 | WIN32LIBS= | |
8577 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8578 | WIN32LIBS="-luser32" |
8579 | case "${target}" in | |
8580 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8581 | ;; | |
8582 | esac | |
cd0fc7c3 | 8583 | fi |
c906108c | 8584 | |
7a292a7a | 8585 | |
3fc11d3e JM |
8586 | LIBGUI="../libgui/src/libgui.a" |
8587 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8588 | ||
8589 | ||
7a292a7a | 8590 | |
3fc11d3e JM |
8591 | # Check whether --enable-gdbtk or --disable-gdbtk was given. |
8592 | if test "${enable_gdbtk+set}" = set; then | |
8593 | enableval="$enable_gdbtk" | |
8594 | case "${enableval}" in | |
8595 | yes) | |
8596 | case "$host" in | |
8597 | *go32*) | |
8598 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8599 | enable_gdbtk=no ;; | |
8600 | *windows*) | |
8601 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
8602 | enable_gdbtk=no ;; | |
8603 | *) | |
8604 | enable_gdbtk=yes ;; | |
8605 | esac ;; | |
8606 | no) | |
8607 | enable_gdbtk=no ;; | |
8608 | *) | |
8609 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
8610 | esac | |
8611 | else | |
8612 | ||
8613 | # Default is on for everything but go32 and Cygwin | |
8614 | case "$host" in | |
8615 | *go32* | *windows*) | |
8616 | ;; | |
8617 | *) | |
379d6434 AC |
8618 | if test -d "${srcdir}/gdbtk" ; then |
8619 | enable_gdbtk=yes | |
8620 | fi | |
8621 | ;; | |
8622 | esac | |
3fc11d3e JM |
8623 | |
8624 | fi | |
8625 | ||
8626 | ||
8627 | WIN32LDAPP= | |
8628 | ||
8629 | ||
8630 | ||
8631 | configdir="unix" | |
8632 | ||
8633 | GDBTKLIBS= | |
8634 | if test "${enable_gdbtk}" = "yes"; then | |
8635 | ||
d1c3b63a KS |
8636 | # Gdbtk must have an absolute path to srcdir in order to run |
8637 | # properly when not installed. | |
8638 | here=`pwd` | |
8639 | cd ${srcdir} | |
8640 | GDBTK_SRC_DIR=`pwd` | |
8641 | cd $here | |
8642 | ||
3fc11d3e JM |
8643 | |
8644 | # | |
8645 | # Ok, lets find the tcl configuration | |
8646 | # First, look for one uninstalled. | |
8647 | # the alternative search directory is invoked by --with-tclconfig | |
8648 | # | |
8649 | ||
8650 | if test x"${no_tcl}" = x ; then | |
8651 | # we reset no_tcl in case something fails here | |
8652 | no_tcl=true | |
8653 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8654 | if test "${with_tclconfig+set}" = set; then | |
8655 | withval="$with_tclconfig" | |
8656 | with_tclconfig=${withval} | |
8657 | fi | |
8658 | ||
8659 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
91151a06 | 8660 | echo "configure:8661: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8661 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8663 | else | |
8664 | ||
8665 | ||
8666 | # First check to see if --with-tclconfig was specified. | |
8667 | if test x"${with_tclconfig}" != x ; then | |
8668 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8669 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8670 | else | |
8671 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8672 | fi | |
8673 | fi | |
8674 | ||
8675 | # then check for a private Tcl installation | |
8676 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8677 | for i in \ | |
8678 | ../tcl \ | |
8679 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8680 | ../../tcl \ | |
8681 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8682 | ../../../tcl \ | |
8683 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8684 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8685 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8686 | break | |
8687 | fi | |
8688 | done | |
8689 | fi | |
8690 | # check in a few common install locations | |
8691 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8692 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8693 | if test -f "$i/tclConfig.sh" ; then | |
8694 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8695 | break | |
8696 | fi | |
8697 | done | |
8698 | fi | |
8699 | # check in a few other private locations | |
8700 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8701 | for i in \ | |
8702 | ${srcdir}/../tcl \ | |
8703 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8704 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8705 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8706 | break | |
8707 | fi | |
8708 | done | |
8709 | fi | |
8710 | ||
8711 | fi | |
8712 | ||
8713 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8714 | TCLCONFIG="# no Tcl configs found" | |
8715 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8716 | else | |
8717 | no_tcl= | |
8718 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8719 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8720 | fi | |
8721 | fi | |
8722 | ||
8723 | if test -z "${no_tcl}"; then | |
8724 | ||
8725 | . $TCLCONFIG | |
8726 | ||
8727 | ||
8728 | ||
8729 | ||
8730 | ||
8731 | ||
8732 | ||
8733 | ||
8734 | ||
8735 | ||
8736 | ||
8737 | ||
8738 | ||
8739 | ||
8740 | ||
8741 | ||
8742 | ||
8743 | ||
8744 | ||
8745 | ||
8746 | ||
8747 | ||
8748 | ||
8749 | ||
8750 | ||
8751 | ||
8752 | # | |
8753 | # Ok, lets find the tk configuration | |
8754 | # First, look for one uninstalled. | |
8755 | # the alternative search directory is invoked by --with-tkconfig | |
8756 | # | |
8757 | ||
8758 | if test x"${no_tk}" = x ; then | |
8759 | # we reset no_tk in case something fails here | |
8760 | no_tk=true | |
8761 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8762 | if test "${with_tkconfig+set}" = set; then | |
8763 | withval="$with_tkconfig" | |
8764 | with_tkconfig=${withval} | |
8765 | fi | |
8766 | ||
8767 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
91151a06 | 8768 | echo "configure:8769: checking for Tk configuration" >&5 |
3fc11d3e JM |
8769 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8770 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8771 | else | |
8772 | ||
8773 | ||
8774 | # First check to see if --with-tkconfig was specified. | |
8775 | if test x"${with_tkconfig}" != x ; then | |
8776 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8777 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8778 | else | |
8779 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8780 | fi | |
8781 | fi | |
8782 | ||
8783 | # then check for a private Tk library | |
8784 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8785 | for i in \ | |
8786 | ../tk \ | |
8787 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8788 | ../../tk \ | |
8789 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8790 | ../../../tk \ | |
8791 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8792 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8793 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8794 | break | |
8795 | fi | |
8796 | done | |
8797 | fi | |
8798 | # check in a few common install locations | |
8799 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8800 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8801 | if test -f "$i/tkConfig.sh" ; then | |
8802 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8803 | break | |
8804 | fi | |
8805 | done | |
8806 | fi | |
8807 | # check in a few other private locations | |
8808 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8809 | for i in \ | |
8810 | ${srcdir}/../tk \ | |
8811 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8812 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8813 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8814 | break | |
8815 | fi | |
8816 | done | |
8817 | fi | |
8818 | ||
8819 | fi | |
8820 | ||
8821 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8822 | TKCONFIG="# no Tk configs found" | |
8823 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8824 | else | |
8825 | no_tk= | |
8826 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8827 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8828 | fi | |
8829 | fi | |
8830 | ||
8831 | ||
8832 | ||
dd2504ab JM |
8833 | # now look for Tcl library stuff |
8834 | ||
8835 | case "${host}" in | |
8836 | *-*-cygwin*) | |
8837 | tcldir=../tcl/win/ | |
8838 | ;; | |
8839 | *) | |
8840 | tcldir=../tcl/unix/ | |
8841 | ;; | |
8842 | esac | |
8843 | ||
8844 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
8845 | ||
3fc11d3e JM |
8846 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
8847 | # point to doing Tcl. | |
8848 | if test -z "${no_tk}"; then | |
8849 | ||
8850 | if test -f "$TKCONFIG" ; then | |
8851 | . $TKCONFIG | |
8852 | fi | |
8853 | ||
8854 | ||
8855 | ||
8856 | ||
8857 | ||
8858 | ||
8859 | ||
8860 | ||
8861 | ||
8862 | ||
8863 | ||
8864 | ||
8865 | ||
8866 | ||
8867 | # | |
8868 | # Ok, lets find the tcl source trees so we can use the headers | |
8869 | # Warning: transition of version 9 to 10 will break this algorithm | |
8870 | # because 10 sorts before 9. We also look for just tcl. We have to | |
8871 | # be careful that we don't match stuff like tclX by accident. | |
8872 | # the alternative search directory is involked by --with-tclinclude | |
8873 | # | |
8874 | ||
8875 | no_tcl=true | |
8876 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
91151a06 | 8877 | echo "configure:8878: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
8878 | # Check whether --with-tclinclude or --without-tclinclude was given. |
8879 | if test "${with_tclinclude+set}" = set; then | |
8880 | withval="$with_tclinclude" | |
8881 | with_tclinclude=${withval} | |
8882 | fi | |
8883 | ||
8884 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
8885 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8886 | else | |
8887 | ||
8888 | # first check to see if --with-tclinclude was specified | |
8889 | if test x"${with_tclinclude}" != x ; then | |
8890 | if test -f ${with_tclinclude}/tclInt.h ; then | |
8891 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
8892 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
8893 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
8894 | else | |
8895 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
8896 | fi | |
8897 | fi | |
8898 | ||
8899 | # next check if it came with Tcl configuration file | |
8900 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8901 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
8902 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
8903 | fi | |
8904 | fi | |
8905 | ||
8906 | # next check in private source directory | |
8907 | # | |
8908 | # since ls returns lowest version numbers first, reverse its output | |
8909 | if test x"${ac_cv_c_tclh}" = x ; then | |
8910 | for i in \ | |
8911 | ${srcdir}/../tcl \ | |
8912 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
8913 | ${srcdir}/../../tcl \ | |
8914 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
8915 | ${srcdir}/../../../tcl \ | |
8916 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
8917 | if test -f $i/generic/tclInt.h ; then | |
8918 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8919 | break | |
8920 | fi | |
8921 | done | |
8922 | fi | |
8923 | # finally check in a few common install locations | |
8924 | # | |
8925 | # since ls returns lowest version numbers first, reverse its output | |
8926 | if test x"${ac_cv_c_tclh}" = x ; then | |
8927 | for i in \ | |
8928 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
8929 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
8930 | /usr/local/src/tcl \ | |
8931 | /usr/local/lib/tcl \ | |
8932 | ${prefix}/include ; do | |
8933 | if test -f $i/generic/tclInt.h ; then | |
8934 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
8935 | break | |
8936 | fi | |
8937 | done | |
8938 | fi | |
8939 | # see if one is installed | |
8940 | if test x"${ac_cv_c_tclh}" = x ; then | |
8941 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
8942 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
91151a06 | 8943 | echo "configure:8944: checking for tclInt.h" >&5 |
3fc11d3e JM |
8944 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
8945 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8946 | else | |
8947 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 8948 | #line 8949 "configure" |
3fc11d3e JM |
8949 | #include "confdefs.h" |
8950 | #include <tclInt.h> | |
8951 | EOF | |
8952 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 8953 | { (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
8954 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
8955 | if test -z "$ac_err"; then | |
8956 | rm -rf conftest* | |
8957 | eval "ac_cv_header_$ac_safe=yes" | |
8958 | else | |
8959 | echo "$ac_err" >&5 | |
8960 | echo "configure: failed program was:" >&5 | |
8961 | cat conftest.$ac_ext >&5 | |
8962 | rm -rf conftest* | |
8963 | eval "ac_cv_header_$ac_safe=no" | |
8964 | fi | |
8965 | rm -f conftest* | |
8966 | fi | |
8967 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
8968 | echo "$ac_t""yes" 1>&6 | |
8969 | ac_cv_c_tclh=installed | |
8970 | else | |
8971 | echo "$ac_t""no" 1>&6 | |
8972 | ac_cv_c_tclh="" | |
8973 | fi | |
8974 | ||
8975 | fi | |
8976 | ||
8977 | fi | |
8978 | ||
8979 | if test x"${ac_cv_c_tclh}" = x ; then | |
8980 | TCLHDIR="# no Tcl private headers found" | |
8981 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
8982 | fi | |
8983 | if test x"${ac_cv_c_tclh}" != x ; then | |
8984 | no_tcl="" | |
8985 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
8986 | echo "$ac_t""is installed" 1>&6 | |
8987 | TCLHDIR="" | |
8988 | else | |
8989 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
8990 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
8991 | TCLHDIR="-I${ac_cv_c_tclh}" | |
8992 | fi | |
8993 | fi | |
8994 | ||
8995 | ||
8996 | ||
8997 | ||
8998 | # | |
8999 | # Ok, lets find the tk source trees so we can use the headers | |
9000 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9001 | # in preference to any others. Same logic is used when choosing library | |
9002 | # and again with Tcl. The search order is the best place to look first, then in | |
9003 | # decreasing significance. The loop breaks if the trigger file is found. | |
9004 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9005 | # directory. This converts the path from a relative to an absolute, so | |
9006 | # recursive cache variables for the path will work right. We check all | |
9007 | # the possible paths in one loop rather than many seperate loops to speed | |
9008 | # things up. | |
9009 | # the alternative search directory is involked by --with-tkinclude | |
9010 | # | |
9011 | no_tk=true | |
9012 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
91151a06 | 9013 | echo "configure:9014: checking for Tk private headers" >&5 |
3fc11d3e JM |
9014 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9015 | if test "${with_tkinclude+set}" = set; then | |
9016 | withval="$with_tkinclude" | |
9017 | with_tkinclude=${withval} | |
9018 | fi | |
9019 | ||
9020 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9021 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9022 | else | |
9023 | ||
9024 | # first check to see if --with-tkinclude was specified | |
9025 | if test x"${with_tkinclude}" != x ; then | |
9026 | if test -f ${with_tkinclude}/tk.h ; then | |
9027 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9028 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9029 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9030 | else | |
9031 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9032 | fi | |
9033 | fi | |
9034 | ||
9035 | # next check if it came with Tk configuration file | |
9036 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9037 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9038 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9039 | fi | |
9040 | fi | |
9041 | ||
9042 | # next check in private source directory | |
9043 | # | |
9044 | # since ls returns lowest version numbers first, reverse its output | |
9045 | if test x"${ac_cv_c_tkh}" = x ; then | |
9046 | for i in \ | |
9047 | ${srcdir}/../tk \ | |
9048 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9049 | ${srcdir}/../../tk \ | |
9050 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9051 | ${srcdir}/../../../tk \ | |
9052 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9053 | if test -f $i/generic/tk.h ; then | |
9054 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9055 | break | |
9056 | fi | |
9057 | done | |
9058 | fi | |
9059 | # finally check in a few common install locations | |
9060 | # | |
9061 | # since ls returns lowest version numbers first, reverse its output | |
9062 | if test x"${ac_cv_c_tkh}" = x ; then | |
9063 | for i in \ | |
9064 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9065 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9066 | /usr/local/src/tk \ | |
9067 | /usr/local/lib/tk \ | |
9068 | ${prefix}/include ; do | |
9069 | if test -f $i/generic/tk.h ; then | |
9070 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9071 | break | |
9072 | fi | |
9073 | done | |
9074 | fi | |
9075 | # see if one is installed | |
9076 | if test x"${ac_cv_c_tkh}" = x ; then | |
9077 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9078 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
91151a06 | 9079 | echo "configure:9080: checking for tk.h" >&5 |
3fc11d3e JM |
9080 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9082 | else | |
9083 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 9084 | #line 9085 "configure" |
3fc11d3e JM |
9085 | #include "confdefs.h" |
9086 | #include <tk.h> | |
9087 | EOF | |
9088 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 9089 | { (eval echo configure:9090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9090 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9091 | if test -z "$ac_err"; then | |
9092 | rm -rf conftest* | |
9093 | eval "ac_cv_header_$ac_safe=yes" | |
9094 | else | |
9095 | echo "$ac_err" >&5 | |
9096 | echo "configure: failed program was:" >&5 | |
9097 | cat conftest.$ac_ext >&5 | |
9098 | rm -rf conftest* | |
9099 | eval "ac_cv_header_$ac_safe=no" | |
9100 | fi | |
9101 | rm -f conftest* | |
9102 | fi | |
9103 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9104 | echo "$ac_t""yes" 1>&6 | |
9105 | ac_cv_c_tkh=installed | |
9106 | else | |
9107 | echo "$ac_t""no" 1>&6 | |
9108 | ac_cv_c_tkh="" | |
9109 | fi | |
9110 | ||
9111 | fi | |
9112 | ||
9113 | fi | |
9114 | ||
9115 | if test x"${ac_cv_c_tkh}" != x ; then | |
9116 | no_tk="" | |
9117 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9118 | echo "$ac_t""is installed" 1>&6 | |
9119 | TKHDIR="" | |
9120 | else | |
9121 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9122 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9123 | TKHDIR="-I${ac_cv_c_tkh}" | |
9124 | fi | |
9125 | else | |
9126 | TKHDIR="# no Tk directory found" | |
9127 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9128 | no_tk=true | |
9129 | fi | |
9130 | ||
9131 | ||
9132 | ||
9133 | ||
9134 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
91151a06 | 9135 | echo "configure:9136: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9136 | if test x"${ac_cv_c_itclh}" = x ; then |
9137 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9138 | if test -f $i/generic/itcl.h ; then | |
9139 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9140 | break | |
9141 | fi | |
9142 | done | |
9143 | fi | |
9144 | if test x"${ac_cv_c_itclh}" = x ; then | |
9145 | ITCLHDIR="# no Itcl private headers found" | |
9146 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9147 | fi | |
9148 | if test x"${ac_cv_c_itclh}" != x ; then | |
9149 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9150 | fi | |
9151 | # should always be here | |
9152 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9153 | ||
9154 | #AC_SUBST(ITCLLIB) | |
9155 | ||
9156 | ||
9157 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
91151a06 | 9158 | echo "configure:9159: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9159 | if test x"${ac_cv_c_itkh}" = x ; then |
9160 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9161 | if test -f $i/generic/itk.h ; then | |
9162 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9163 | break | |
9164 | fi | |
9165 | done | |
9166 | fi | |
9167 | if test x"${ac_cv_c_itkh}" = x ; then | |
9168 | ITKHDIR="# no Itk private headers found" | |
9169 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9170 | fi | |
9171 | if test x"${ac_cv_c_itkh}" != x ; then | |
9172 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9173 | fi | |
9174 | # should always be here | |
9175 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9176 | ||
9177 | #AC_SUBST(ITKLIB) | |
9178 | ||
3fc11d3e | 9179 | |
dd2504ab JM |
9180 | |
9181 | # now look for Tk library stuff | |
9182 | ||
9183 | case "${host}" in | |
9184 | *-*-cygwin*) | |
9185 | tkdir=../tk/win/ | |
9186 | ;; | |
9187 | *) | |
9188 | tkdir=../tk/unix/ | |
9189 | ;; | |
9190 | esac | |
9191 | ||
9192 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9193 | ||
3fc11d3e JM |
9194 | # now look for Itcl library stuff |
9195 | ||
9196 | ||
9197 | # | |
9198 | # Ok, lets find the itcl configuration | |
9199 | # First, look for one uninstalled. | |
9200 | # the alternative search directory is invoked by --with-itclconfig | |
9201 | # | |
9202 | ||
9203 | if test x"${no_itcl}" = x ; then | |
9204 | # we reset no_itcl in case something fails here | |
9205 | no_itcl=true | |
9206 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9207 | if test "${with_itclconfig+set}" = set; then | |
9208 | withval="$with_itclconfig" | |
9209 | with_itclconfig=${withval} | |
9210 | fi | |
9211 | ||
9212 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
91151a06 | 9213 | echo "configure:9214: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9214 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9215 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9216 | else | |
9217 | ||
9218 | ||
9219 | # First check to see if --with-itclconfig was specified. | |
9220 | if test x"${with_itclconfig}" != x ; then | |
9221 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9222 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9223 | else | |
9224 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9225 | fi | |
9226 | fi | |
9227 | ||
9228 | # then check for a private Itcl library | |
9229 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9230 | for i in \ | |
9231 | ../itcl/itcl \ | |
9232 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9233 | ../../itcl \ | |
9234 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9235 | ../../../itcl \ | |
9236 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9237 | if test -f "$i/itclConfig.sh" ; then | |
9238 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9239 | break | |
9240 | fi | |
9241 | done | |
9242 | fi | |
9243 | # check in a few common install locations | |
9244 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9245 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9246 | if test -f "$i/itclConfig.sh" ; then | |
9247 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9248 | break | |
9249 | fi | |
9250 | done | |
9251 | fi | |
9252 | # check in a few other private locations | |
9253 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9254 | for i in \ | |
9255 | ${srcdir}/../itcl/itcl \ | |
9256 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9257 | if test -f "$i/itclConfig.sh" ; then | |
9258 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9259 | break | |
9260 | fi | |
9261 | done | |
9262 | fi | |
9263 | ||
9264 | fi | |
9265 | ||
9266 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9267 | ITCLCONFIG="# no Itcl configs found" | |
9268 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9269 | else | |
9270 | no_itcl= | |
9271 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9272 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9273 | fi | |
9274 | fi | |
9275 | ||
9276 | if test -z "${no_itcl}"; then | |
9277 | ||
9278 | if test -f "$ITCLCONFIG" ; then | |
9279 | . $ITCLCONFIG | |
9280 | fi | |
9281 | ||
9282 | ||
9283 | ||
9284 | ||
9285 | ||
9286 | ||
9287 | ||
9288 | ||
9289 | ||
9290 | ||
3fc11d3e JM |
9291 | |
9292 | ||
9293 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9294 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9295 | fi |
9296 | ||
9297 | ||
9298 | # now look for Itk library stuff | |
9299 | ||
9300 | # | |
9301 | # Ok, lets find the itk configuration | |
9302 | # First, look for one uninstalled. | |
9303 | # the alternative search directory is invoked by --with-itkconfig | |
9304 | # | |
9305 | ||
9306 | if test x"${no_itk}" = x ; then | |
9307 | # we reset no_itk in case something fails here | |
9308 | no_itk=true | |
9309 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9310 | if test "${with_itkconfig+set}" = set; then | |
9311 | withval="$with_itkconfig" | |
9312 | with_itkconfig=${withval} | |
9313 | fi | |
9314 | ||
9315 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
91151a06 | 9316 | echo "configure:9317: checking for Itk configuration" >&5 |
3fc11d3e JM |
9317 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9318 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9319 | else | |
9320 | ||
9321 | ||
9322 | # First check to see if --with-itkconfig was specified. | |
9323 | if test x"${with_itkconfig}" != x ; then | |
9324 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9325 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9326 | else | |
9327 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9328 | fi | |
9329 | fi | |
9330 | ||
9331 | # then check for a private Itk library | |
9332 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9333 | for i in \ | |
9334 | ../itcl/itk \ | |
9335 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9336 | ../../itk \ | |
9337 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9338 | ../../../itk \ | |
9339 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9340 | if test -f "$i/itkConfig.sh" ; then | |
9341 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9342 | break | |
9343 | fi | |
9344 | done | |
9345 | fi | |
9346 | # check in a few common install locations | |
9347 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9348 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9349 | if test -f "$i/itkConfig.sh" ; then | |
9350 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9351 | break | |
9352 | fi | |
9353 | done | |
9354 | fi | |
9355 | # check in a few other private locations | |
9356 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9357 | for i in \ | |
9358 | ${srcdir}/../itcl/itk \ | |
9359 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9360 | if test -f "$i/itkConfig.sh" ; then | |
9361 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9362 | break | |
9363 | fi | |
9364 | done | |
9365 | fi | |
9366 | ||
9367 | fi | |
9368 | ||
9369 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9370 | ITKCONFIG="# no Itk configs found" | |
9371 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9372 | else | |
9373 | no_itk= | |
9374 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9375 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9376 | fi | |
9377 | fi | |
9378 | ||
9379 | ||
9380 | if test -z "${no_itcl}"; then | |
9381 | ||
9382 | if test -f "$ITKCONFIG" ; then | |
9383 | . $ITKCONFIG | |
9384 | fi | |
9385 | ||
9386 | ||
9387 | ||
9388 | ||
9389 | ||
9390 | ||
9391 | ||
9392 | ||
9393 | ||
9394 | ||
9395 | ||
9396 | ||
3fc11d3e | 9397 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9398 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9399 | fi |
9400 | ||
4226a5a5 | 9401 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9402 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9403 | # know whether 8.2 will or not, but I bet it will. | |
9404 | # I don't have to worry about 7.x since we don't support it. | |
9405 | GDBTK_CFLAGS="" | |
9406 | if test "$GCC" = "yes"; then | |
9407 | if test "$TCL_VERSION" != "8.0" ; then | |
9408 | GDBTK_CFLAGS="-fwritable-strings" | |
9409 | fi | |
9410 | fi | |
9411 | ||
9412 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9413 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9414 | # Yes, the ordering seems wrong here. But it isn't. |
9415 | # TK_LIBS is the list of libraries that need to be linked | |
9416 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9417 | # were in LIBS then any link tests after this point would | |
9418 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9419 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9420 | |
9421 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9422 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9423 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9424 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9425 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9426 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9427 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9428 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9429 | |
9430 | if test x$gdb_cv_os_cygwin = xyes; then | |
9431 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9432 | WIN32LDAPP="-Wl,--subsystem,console" | |
9433 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9434 | fi | |
9435 | fi | |
9436 | fi | |
ffc6a242 KS |
9437 | |
9438 | SUBDIRS="${SUBDIRS} gdbtk" | |
9439 | configdirs="${configdirs} gdbtk" | |
3fc11d3e JM |
9440 | fi |
9441 | ||
9442 | ||
9443 | ||
9444 | ||
9445 | ||
9446 | ||
9447 | ||
9448 | ||
9449 | ||
9450 | ||
9451 | ||
9452 | ||
9453 | ||
dd2504ab | 9454 | |
c906108c SS |
9455 | # If we find X, set shell vars x_includes and x_libraries to the |
9456 | # paths, otherwise set no_x=yes. | |
9457 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9458 | # --without-x overrides everything else, but does not touch the cache. | |
9459 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
91151a06 | 9460 | echo "configure:9461: checking for X" >&5 |
c906108c SS |
9461 | |
9462 | # Check whether --with-x or --without-x was given. | |
9463 | if test "${with_x+set}" = set; then | |
9464 | withval="$with_x" | |
9465 | : | |
9466 | fi | |
9467 | ||
9468 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9469 | if test "x$with_x" = xno; then | |
9470 | # The user explicitly disabled X. | |
9471 | have_x=disabled | |
9472 | else | |
9473 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9474 | # Both variables are already set. | |
9475 | have_x=yes | |
9476 | else | |
9477 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9478 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9479 | else | |
9480 | # One or both of the vars are not set, and there is no cached value. | |
9481 | ac_x_includes=NO ac_x_libraries=NO | |
9482 | rm -fr conftestdir | |
9483 | if mkdir conftestdir; then | |
9484 | cd conftestdir | |
9485 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9486 | cat > Imakefile <<'EOF' | |
9487 | acfindx: | |
9488 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9489 | EOF | |
9490 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9491 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9492 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9493 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9494 | for ac_extension in a so sl; do | |
9495 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9496 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9497 | ac_im_usrlibdir=$ac_im_libdir; break | |
9498 | fi | |
9499 | done | |
9500 | # Screen out bogus values from the imake configuration. They are | |
9501 | # bogus both because they are the default anyway, and because | |
9502 | # using them would break gcc on systems where it needs fixed includes. | |
9503 | case "$ac_im_incroot" in | |
9504 | /usr/include) ;; | |
9505 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9506 | esac | |
9507 | case "$ac_im_usrlibdir" in | |
9508 | /usr/lib | /lib) ;; | |
9509 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9510 | esac | |
9511 | fi | |
9512 | cd .. | |
9513 | rm -fr conftestdir | |
9514 | fi | |
9515 | ||
9516 | if test "$ac_x_includes" = NO; then | |
9517 | # Guess where to find include files, by looking for this one X11 .h file. | |
9518 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9519 | ||
9520 | # First, try using that file with no special directory specified. | |
9521 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 9522 | #line 9523 "configure" |
c906108c SS |
9523 | #include "confdefs.h" |
9524 | #include <$x_direct_test_include> | |
9525 | EOF | |
9526 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
91151a06 | 9527 | { (eval echo configure:9528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9528 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9529 | if test -z "$ac_err"; then | |
9530 | rm -rf conftest* | |
9531 | # We can compile using X headers with no special include directory. | |
9532 | ac_x_includes= | |
9533 | else | |
9534 | echo "$ac_err" >&5 | |
9535 | echo "configure: failed program was:" >&5 | |
9536 | cat conftest.$ac_ext >&5 | |
9537 | rm -rf conftest* | |
9538 | # Look for the header file in a standard set of common directories. | |
9539 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9540 | for ac_dir in \ | |
9541 | /usr/X11/include \ | |
9542 | /usr/X11R6/include \ | |
9543 | /usr/X11R5/include \ | |
9544 | /usr/X11R4/include \ | |
9545 | \ | |
9546 | /usr/include/X11 \ | |
9547 | /usr/include/X11R6 \ | |
9548 | /usr/include/X11R5 \ | |
9549 | /usr/include/X11R4 \ | |
9550 | \ | |
9551 | /usr/local/X11/include \ | |
9552 | /usr/local/X11R6/include \ | |
9553 | /usr/local/X11R5/include \ | |
9554 | /usr/local/X11R4/include \ | |
9555 | \ | |
9556 | /usr/local/include/X11 \ | |
9557 | /usr/local/include/X11R6 \ | |
9558 | /usr/local/include/X11R5 \ | |
9559 | /usr/local/include/X11R4 \ | |
9560 | \ | |
9561 | /usr/X386/include \ | |
9562 | /usr/x386/include \ | |
9563 | /usr/XFree86/include/X11 \ | |
9564 | \ | |
9565 | /usr/include \ | |
9566 | /usr/local/include \ | |
9567 | /usr/unsupported/include \ | |
9568 | /usr/athena/include \ | |
9569 | /usr/local/x11r5/include \ | |
9570 | /usr/lpp/Xamples/include \ | |
9571 | \ | |
9572 | /usr/openwin/include \ | |
9573 | /usr/openwin/share/include \ | |
9574 | ; \ | |
9575 | do | |
9576 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9577 | ac_x_includes=$ac_dir | |
9578 | break | |
9579 | fi | |
9580 | done | |
9581 | fi | |
9582 | rm -f conftest* | |
9583 | fi # $ac_x_includes = NO | |
9584 | ||
9585 | if test "$ac_x_libraries" = NO; then | |
9586 | # Check for the libraries. | |
9587 | ||
9588 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9589 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9590 | ||
9591 | # See if we find them without any special options. | |
9592 | # Don't add to $LIBS permanently. | |
9593 | ac_save_LIBS="$LIBS" | |
9594 | LIBS="-l$x_direct_test_library $LIBS" | |
9595 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 9596 | #line 9597 "configure" |
c906108c SS |
9597 | #include "confdefs.h" |
9598 | ||
9599 | int main() { | |
9600 | ${x_direct_test_function}() | |
9601 | ; return 0; } | |
9602 | EOF | |
91151a06 | 9603 | if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9604 | rm -rf conftest* |
9605 | LIBS="$ac_save_LIBS" | |
9606 | # We can link X programs with no special library path. | |
9607 | ac_x_libraries= | |
9608 | else | |
9609 | echo "configure: failed program was:" >&5 | |
9610 | cat conftest.$ac_ext >&5 | |
9611 | rm -rf conftest* | |
9612 | LIBS="$ac_save_LIBS" | |
9613 | # First see if replacing the include by lib works. | |
9614 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9615 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9616 | /usr/X11/lib \ | |
9617 | /usr/X11R6/lib \ | |
9618 | /usr/X11R5/lib \ | |
9619 | /usr/X11R4/lib \ | |
9620 | \ | |
9621 | /usr/lib/X11 \ | |
9622 | /usr/lib/X11R6 \ | |
9623 | /usr/lib/X11R5 \ | |
9624 | /usr/lib/X11R4 \ | |
9625 | \ | |
9626 | /usr/local/X11/lib \ | |
9627 | /usr/local/X11R6/lib \ | |
9628 | /usr/local/X11R5/lib \ | |
9629 | /usr/local/X11R4/lib \ | |
9630 | \ | |
9631 | /usr/local/lib/X11 \ | |
9632 | /usr/local/lib/X11R6 \ | |
9633 | /usr/local/lib/X11R5 \ | |
9634 | /usr/local/lib/X11R4 \ | |
9635 | \ | |
9636 | /usr/X386/lib \ | |
9637 | /usr/x386/lib \ | |
9638 | /usr/XFree86/lib/X11 \ | |
9639 | \ | |
9640 | /usr/lib \ | |
9641 | /usr/local/lib \ | |
9642 | /usr/unsupported/lib \ | |
9643 | /usr/athena/lib \ | |
9644 | /usr/local/x11r5/lib \ | |
9645 | /usr/lpp/Xamples/lib \ | |
9646 | /lib/usr/lib/X11 \ | |
9647 | \ | |
9648 | /usr/openwin/lib \ | |
9649 | /usr/openwin/share/lib \ | |
9650 | ; \ | |
9651 | do | |
9652 | for ac_extension in a so sl; do | |
9653 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9654 | ac_x_libraries=$ac_dir | |
9655 | break 2 | |
9656 | fi | |
9657 | done | |
9658 | done | |
9659 | fi | |
9660 | rm -f conftest* | |
9661 | fi # $ac_x_libraries = NO | |
9662 | ||
9663 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9664 | # Didn't find X anywhere. Cache the known absence of X. | |
9665 | ac_cv_have_x="have_x=no" | |
9666 | else | |
9667 | # Record where we found X for the cache. | |
9668 | ac_cv_have_x="have_x=yes \ | |
9669 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9670 | fi | |
9671 | fi | |
9672 | fi | |
9673 | eval "$ac_cv_have_x" | |
9674 | fi # $with_x != no | |
9675 | ||
9676 | if test "$have_x" != yes; then | |
9677 | echo "$ac_t""$have_x" 1>&6 | |
9678 | no_x=yes | |
9679 | else | |
9680 | # If each of the values was on the command line, it overrides each guess. | |
9681 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9682 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9683 | # Update the cache value to reflect the command line values. | |
9684 | ac_cv_have_x="have_x=yes \ | |
9685 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9686 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9687 | fi | |
9688 | ||
9689 | ||
7a292a7a SS |
9690 | |
9691 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9692 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9693 | # This code just checks for a few cases where we'd like to ignore those | |
9694 | # definitions, even when they're present in the '.mt' file. These cases | |
9695 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9696 | # not part of the source tree. |
7a292a7a SS |
9697 | # |
9698 | # Check whether --enable-sim or --disable-sim was given. | |
9699 | if test "${enable_sim+set}" = set; then | |
9700 | enableval="$enable_sim" | |
9701 | echo "enable_sim = $enable_sim"; | |
9702 | echo "enableval = ${enableval}"; | |
9703 | case "${enableval}" in | |
9704 | yes) ignore_sim=false ;; | |
9705 | no) ignore_sim=true ;; | |
9706 | *) ignore_sim=false ;; | |
9707 | esac | |
9708 | else | |
9709 | ignore_sim=false | |
9710 | fi | |
9711 | ||
9712 | ||
9713 | if test ! -d "${srcdir}/../sim"; then | |
9714 | ignore_sim=true | |
9715 | fi | |
9716 | ||
9717 | if test "${ignore_sim}" = "true"; then | |
9718 | IGNORE_SIM="SIM=" | |
9719 | IGNORE_SIM_OBS="SIM_OBS=" | |
9720 | else | |
9721 | IGNORE_SIM="" | |
9722 | IGNORE_SIM_OBS="" | |
9723 | cat >> confdefs.h <<\EOF | |
9724 | #define WITH_SIM 1 | |
9725 | EOF | |
9726 | ||
9727 | fi | |
9728 | ||
9729 | ||
9730 | ||
c906108c SS |
9731 | |
9732 | ||
9733 | ||
9734 | ||
9735 | ||
9736 | ||
dfcd3bfb | 9737 | |
e56ac5c3 AC |
9738 | |
9739 | ||
b3a90332 AC |
9740 | |
9741 | ||
b46cd165 | 9742 | |
c906108c SS |
9743 | # Begin stuff to support --enable-shared |
9744 | # Check whether --enable-shared or --disable-shared was given. | |
9745 | if test "${enable_shared+set}" = set; then | |
9746 | enableval="$enable_shared" | |
9747 | case "${enableval}" in | |
9748 | yes) shared=true ;; | |
9749 | no) shared=false ;; | |
9750 | *) shared=true ;; | |
9751 | esac | |
9752 | fi | |
9753 | ||
9754 | HLDFLAGS= | |
9755 | HLDENV= | |
9756 | # If we have shared libraries, try to set rpath reasonably. | |
9757 | if test "${shared}" = "true"; then | |
9758 | case "${host}" in | |
9759 | *-*-hpux*) | |
9760 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
9761 | ;; | |
9762 | *-*-irix5* | *-*-irix6*) | |
9763 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
9764 | ;; | |
9765 | *-*-linux*aout*) | |
9766 | ;; | |
88987551 | 9767 | *-*-linux* | *-pc-linux-gnu*) |
c906108c SS |
9768 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
9769 | ;; | |
9770 | *-*-solaris*) | |
9771 | HLDFLAGS='-R $(libdir)' | |
9772 | ;; | |
9773 | *-*-sysv4*) | |
9774 | HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' | |
9775 | ;; | |
9776 | esac | |
9777 | fi | |
9778 | ||
9779 | # On SunOS, if the linker supports the -rpath option, use it to | |
9780 | # prevent ../bfd and ../opcodes from being included in the run time | |
9781 | # search path. | |
9782 | case "${host}" in | |
9783 | *-*-sunos*) | |
9784 | echo 'main () { }' > conftest.c | |
9785 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
9786 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
9787 | : | |
9788 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
9789 | : | |
9790 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
9791 | : | |
9792 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
9793 | : | |
9794 | elif test "${shared}" = "true"; then | |
9795 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
9796 | else | |
9797 | HLDFLAGS='-Wl,-rpath=' | |
9798 | fi | |
9799 | rm -f conftest.t conftest.c conftest | |
9800 | ;; | |
9801 | esac | |
9802 | ||
9803 | ||
9804 | # End stuff to support --enable-shared | |
9805 | ||
9806 | # target_subdir is used by the testsuite to find the target libraries. | |
9807 | target_subdir= | |
9808 | if test "${host}" != "${target}"; then | |
9809 | target_subdir="${target_alias}/" | |
9810 | fi | |
9811 | ||
9812 | ||
9813 | frags= | |
9814 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9815 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9816 | # When building a native debuger the .mh file containing things |
9817 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9818 | # since it no longer contains anything useful. | |
9819 | if test "${target}" = "${host}"; then | |
9820 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9821 | else | |
9822 | host_makefile_frag=/dev/null | |
9823 | fi | |
c906108c SS |
9824 | fi |
9825 | frags="$frags $host_makefile_frag" | |
9826 | ||
9827 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9828 | if test ! -f ${target_makefile_frag}; then | |
9829 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9830 | fi | |
9831 | frags="$frags $target_makefile_frag" | |
9832 | ||
9833 | ||
9834 | ||
9835 | ||
9836 | ||
9837 | hostfile=`sed -n ' | |
9838 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9839 | ' ${host_makefile_frag}` | |
9840 | ||
9841 | targetfile=`sed -n ' | |
9842 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9843 | ' ${target_makefile_frag}` | |
9844 | ||
6166d547 AC |
9845 | GDB_MULTI_ARCH=`sed -n ' |
9846 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9847 | ' ${target_makefile_frag}` | |
9848 | ||
c906108c | 9849 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9850 | # We pick this up from the host configuration file (.mh) because we |
9851 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9852 | nativefile=`sed -n ' |
9853 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9854 | ' ${host_makefile_frag}` | |
c906108c SS |
9855 | fi |
9856 | ||
9857 | ||
6166d547 AC |
9858 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9859 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9860 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9861 | # will be the default. | |
9862 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9863 | case "${gdb_multi_arch}" in | |
9864 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9865 | no ) GDB_MULTI_ARCH=0 ;; | |
9866 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9867 | esac | |
9868 | fi | |
9869 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9870 | cat >> confdefs.h <<EOF | |
9871 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9872 | EOF | |
9873 | ||
9874 | fi | |
6c5cfe5b | 9875 | # Warn the user when they use an old practice |
6166d547 AC |
9876 | case "${GDB_MULTI_ARCH}" in |
9877 | "" ) ;; | |
9878 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
9879 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
9880 | GDB_MULTI_ARCH_PURE ) | |
9881 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 9882 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 9883 | targetfile="" |
6166d547 AC |
9884 | fi ;; |
9885 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
9886 | esac | |
9887 | ||
96baa820 JM |
9888 | if test "${enable_multi_ice}" = "yes"; then |
9889 | SUBDIRS="${SUBDIRS} multi-ice" | |
9890 | fi | |
9891 | ||
a85f51e7 DJ |
9892 | # ``gdbserver'' can only be built in a native configuration. |
9893 | if test x"${target}" = x"${host}"; then | |
9894 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
91151a06 | 9895 | echo "configure:9896: checking whether gdbserver is supported on this host" >&5 |
a85f51e7 DJ |
9896 | if test x"${build_gdbserver}" = xyes ; then |
9897 | configdirs="${configdirs} gdbserver" | |
9898 | SUBDIRS="${SUBDIRS} gdbserver" | |
9899 | echo "$ac_t""yes" 1>&6 | |
9900 | else | |
9901 | echo "$ac_t""no" 1>&6 | |
9902 | fi | |
9903 | fi | |
9904 | ||
96baa820 JM |
9905 | |
9906 | ||
c906108c | 9907 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
9908 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
9909 | # version. | |
c906108c SS |
9910 | |
9911 | files= | |
9912 | links= | |
5a2402b8 | 9913 | |
c906108c | 9914 | rm -f xm.h |
5a2402b8 | 9915 | xm_h="" |
c906108c | 9916 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
9917 | xm_h=xm.h |
9918 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
9919 | files="${files} ${GDB_XM_FILE}" | |
9920 | links="${links} xm.h" | |
9921 | cat >> confdefs.h <<EOF | |
9922 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
9923 | EOF | |
9924 | ||
c906108c | 9925 | fi |
5a2402b8 AC |
9926 | |
9927 | ||
c906108c | 9928 | rm -f tm.h |
5a2402b8 | 9929 | tm_h="" |
c906108c | 9930 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
9931 | tm_h=tm.h |
9932 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
9933 | files="${files} ${GDB_TM_FILE}" | |
9934 | links="${links} tm.h" | |
9935 | cat >> confdefs.h <<EOF | |
9936 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
9937 | EOF | |
9938 | ||
c906108c | 9939 | fi |
5a2402b8 AC |
9940 | |
9941 | ||
c906108c | 9942 | rm -f nm.h |
5a2402b8 | 9943 | nm_h="" |
c906108c | 9944 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
9945 | nm_h=nm.h |
9946 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
9947 | files="${files} ${GDB_NM_FILE}" | |
9948 | links="${links} nm.h" | |
9949 | cat >> confdefs.h <<EOF | |
9950 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
9951 | EOF | |
9952 | ||
c906108c | 9953 | fi |
5a2402b8 AC |
9954 | |
9955 | ||
c906108c SS |
9956 | |
9957 | ||
9958 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
91151a06 | 9959 | echo "configure:9960: checking for Cygwin environment" >&5 |
c906108c SS |
9960 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
9961 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9962 | else | |
9963 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 9964 | #line 9965 "configure" |
c906108c SS |
9965 | #include "confdefs.h" |
9966 | ||
9967 | int main() { | |
9968 | ||
9969 | #ifndef __CYGWIN__ | |
9970 | #define __CYGWIN__ __CYGWIN32__ | |
9971 | #endif | |
9972 | return __CYGWIN__; | |
9973 | ; return 0; } | |
9974 | EOF | |
91151a06 | 9975 | if { (eval echo configure:9976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
9976 | rm -rf conftest* |
9977 | ac_cv_cygwin=yes | |
9978 | else | |
9979 | echo "configure: failed program was:" >&5 | |
9980 | cat conftest.$ac_ext >&5 | |
9981 | rm -rf conftest* | |
9982 | ac_cv_cygwin=no | |
9983 | fi | |
9984 | rm -f conftest* | |
9985 | rm -f conftest* | |
9986 | fi | |
9987 | ||
9988 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
9989 | CYGWIN= | |
9990 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
9991 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
91151a06 | 9992 | echo "configure:9993: checking for mingw32 environment" >&5 |
c906108c SS |
9993 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
9994 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9995 | else | |
9996 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 9997 | #line 9998 "configure" |
c906108c SS |
9998 | #include "confdefs.h" |
9999 | ||
10000 | int main() { | |
10001 | return __MINGW32__; | |
10002 | ; return 0; } | |
10003 | EOF | |
91151a06 | 10004 | if { (eval echo configure:10005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10005 | rm -rf conftest* |
10006 | ac_cv_mingw32=yes | |
10007 | else | |
10008 | echo "configure: failed program was:" >&5 | |
10009 | cat conftest.$ac_ext >&5 | |
10010 | rm -rf conftest* | |
10011 | ac_cv_mingw32=no | |
10012 | fi | |
10013 | rm -f conftest* | |
10014 | rm -f conftest* | |
10015 | fi | |
10016 | ||
10017 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10018 | MINGW32= | |
10019 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10020 | ||
10021 | ||
10022 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
91151a06 | 10023 | echo "configure:10024: checking for executable suffix" >&5 |
c906108c SS |
10024 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10025 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10026 | else | |
10027 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10028 | ac_cv_exeext=.exe | |
10029 | else | |
10030 | rm -f conftest* | |
10031 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10032 | ac_cv_exeext= | |
91151a06 | 10033 | if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10034 | for file in conftest.*; do |
10035 | case $file in | |
9608ab8b | 10036 | *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10037 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10038 | esac | |
10039 | done | |
10040 | else | |
10041 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10042 | fi | |
10043 | rm -f conftest* | |
10044 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10045 | fi | |
10046 | fi | |
10047 | ||
10048 | EXEEXT="" | |
10049 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10050 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10051 | ac_exeext=$EXEEXT | |
10052 | ||
10053 | ||
234b45d4 KB |
10054 | |
10055 | cat >> confdefs.h <<\EOF | |
10056 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10057 | EOF | |
10058 | ||
10059 | ||
10060 | ||
10061 | ||
10062 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10063 | if test "${with_libiconv_prefix+set}" = set; then | |
10064 | withval="$with_libiconv_prefix" | |
10065 | ||
10066 | for dir in `echo "$withval" | tr : ' '`; do | |
10067 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10068 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10069 | done | |
10070 | ||
10071 | fi | |
10072 | ||
10073 | ||
10074 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
91151a06 | 10075 | echo "configure:10076: checking for iconv" >&5 |
234b45d4 KB |
10076 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10077 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10078 | else | |
10079 | ||
10080 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10081 | am_cv_lib_iconv=no | |
10082 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 10083 | #line 10084 "configure" |
234b45d4 KB |
10084 | #include "confdefs.h" |
10085 | #include <stdlib.h> | |
10086 | #include <iconv.h> | |
10087 | int main() { | |
10088 | iconv_t cd = iconv_open("",""); | |
10089 | iconv(cd,NULL,NULL,NULL,NULL); | |
10090 | iconv_close(cd); | |
10091 | ; return 0; } | |
10092 | EOF | |
91151a06 | 10093 | if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10094 | rm -rf conftest* |
10095 | am_cv_func_iconv=yes | |
10096 | else | |
10097 | echo "configure: failed program was:" >&5 | |
10098 | cat conftest.$ac_ext >&5 | |
10099 | fi | |
10100 | rm -f conftest* | |
10101 | if test "$am_cv_func_iconv" != yes; then | |
10102 | am_save_LIBS="$LIBS" | |
10103 | LIBS="$LIBS -liconv" | |
10104 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 10105 | #line 10106 "configure" |
234b45d4 KB |
10106 | #include "confdefs.h" |
10107 | #include <stdlib.h> | |
10108 | #include <iconv.h> | |
10109 | int main() { | |
10110 | iconv_t cd = iconv_open("",""); | |
10111 | iconv(cd,NULL,NULL,NULL,NULL); | |
10112 | iconv_close(cd); | |
10113 | ; return 0; } | |
10114 | EOF | |
91151a06 | 10115 | if { (eval echo configure:10116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10116 | rm -rf conftest* |
10117 | am_cv_lib_iconv=yes | |
10118 | am_cv_func_iconv=yes | |
10119 | else | |
10120 | echo "configure: failed program was:" >&5 | |
10121 | cat conftest.$ac_ext >&5 | |
10122 | fi | |
10123 | rm -f conftest* | |
10124 | LIBS="$am_save_LIBS" | |
10125 | fi | |
10126 | ||
10127 | fi | |
10128 | ||
10129 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10130 | if test "$am_cv_func_iconv" = yes; then | |
10131 | cat >> confdefs.h <<\EOF | |
10132 | #define HAVE_ICONV 1 | |
10133 | EOF | |
10134 | ||
10135 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
91151a06 | 10136 | echo "configure:10137: checking for iconv declaration" >&5 |
234b45d4 KB |
10137 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10138 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10139 | else | |
10140 | ||
10141 | cat > conftest.$ac_ext <<EOF | |
91151a06 | 10142 | #line 10143 "configure" |
234b45d4 KB |
10143 | #include "confdefs.h" |
10144 | ||
10145 | #include <stdlib.h> | |
10146 | #include <iconv.h> | |
10147 | extern | |
10148 | #ifdef __cplusplus | |
10149 | "C" | |
10150 | #endif | |
10151 | #if defined(__STDC__) || defined(__cplusplus) | |
10152 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10153 | #else | |
10154 | size_t iconv(); | |
10155 | #endif | |
10156 | ||
10157 | int main() { | |
10158 | ||
10159 | ; return 0; } | |
10160 | EOF | |
91151a06 | 10161 | if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10162 | rm -rf conftest* |
10163 | am_cv_proto_iconv_arg1="" | |
10164 | else | |
10165 | echo "configure: failed program was:" >&5 | |
10166 | cat conftest.$ac_ext >&5 | |
10167 | rm -rf conftest* | |
10168 | am_cv_proto_iconv_arg1="const" | |
10169 | fi | |
10170 | rm -f conftest* | |
10171 | 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);" | |
10172 | fi | |
10173 | ||
10174 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10175 | echo "$ac_t""${ac_t:- | |
10176 | }$am_cv_proto_iconv" 1>&6 | |
10177 | cat >> confdefs.h <<EOF | |
10178 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10179 | EOF | |
10180 | ||
10181 | fi | |
10182 | LIBICONV= | |
10183 | if test "$am_cv_lib_iconv" = yes; then | |
10184 | LIBICONV="-liconv" | |
10185 | fi | |
10186 | ||
10187 | ||
10188 | ||
c906108c SS |
10189 | subdirs="$configdirs" |
10190 | ||
10191 | trap '' 1 2 15 | |
10192 | cat > confcache <<\EOF | |
10193 | # This file is a shell script that caches the results of configure | |
10194 | # tests run on this system so they can be shared between configure | |
10195 | # scripts and configure runs. It is not useful on other systems. | |
10196 | # If it contains results you don't want to keep, you may remove or edit it. | |
10197 | # | |
10198 | # By default, configure uses ./config.cache as the cache file, | |
10199 | # creating it if it does not exist already. You can give configure | |
10200 | # the --cache-file=FILE option to use a different cache file; that is | |
10201 | # what configure does when it calls configure scripts in | |
10202 | # subdirectories, so they share the cache. | |
10203 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10204 | # config.status only pays attention to the cache file if you give it the | |
10205 | # --recheck option to rerun configure. | |
10206 | # | |
10207 | EOF | |
10208 | # The following way of writing the cache mishandles newlines in values, | |
10209 | # but we know of no workaround that is simple, portable, and efficient. | |
10210 | # So, don't put newlines in cache variables' values. | |
10211 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10212 | # and sets the high bit in the cache file unless we assign to the vars. | |
10213 | (set) 2>&1 | | |
10214 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10215 | *ac_space=\ *) | |
10216 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10217 | # turns \\\\ into \\, and sed turns \\ into \). | |
10218 | sed -n \ | |
10219 | -e "s/'/'\\\\''/g" \ | |
10220 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10221 | ;; | |
10222 | *) | |
10223 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10224 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10225 | ;; | |
10226 | esac >> confcache | |
10227 | if cmp -s $cache_file confcache; then | |
10228 | : | |
10229 | else | |
10230 | if test -w $cache_file; then | |
10231 | echo "updating cache $cache_file" | |
10232 | cat confcache > $cache_file | |
10233 | else | |
10234 | echo "not updating unwritable cache $cache_file" | |
10235 | fi | |
10236 | fi | |
10237 | rm -f confcache | |
10238 | ||
10239 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10240 | ||
10241 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10242 | # Let make expand exec_prefix. | |
10243 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10244 | ||
10245 | # Any assignment to VPATH causes Sun make to only execute | |
10246 | # the first set of double-colon rules, so remove it if not needed. | |
10247 | # If there is a colon in the path, we need to keep it. | |
10248 | if test "x$srcdir" = x.; then | |
10249 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10250 | fi | |
10251 | ||
10252 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10253 | ||
10254 | DEFS=-DHAVE_CONFIG_H | |
10255 | ||
10256 | # Without the "./", some shells look in PATH for config.status. | |
10257 | : ${CONFIG_STATUS=./config.status} | |
10258 | ||
10259 | echo creating $CONFIG_STATUS | |
10260 | rm -f $CONFIG_STATUS | |
10261 | cat > $CONFIG_STATUS <<EOF | |
10262 | #! /bin/sh | |
10263 | # Generated automatically by configure. | |
10264 | # Run this file to recreate the current configuration. | |
10265 | # This directory was configured as follows, | |
10266 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10267 | # | |
10268 | # $0 $ac_configure_args | |
10269 | # | |
10270 | # Compiler output produced by configure, useful for debugging | |
10271 | # configure, is in ./config.log if it exists. | |
10272 | ||
10273 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10274 | for ac_option | |
10275 | do | |
10276 | case "\$ac_option" in | |
10277 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10278 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10279 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10280 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10281 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10282 | exit 0 ;; | |
10283 | -help | --help | --hel | --he | --h) | |
10284 | echo "\$ac_cs_usage"; exit 0 ;; | |
10285 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10286 | esac | |
10287 | done | |
10288 | ||
10289 | ac_given_srcdir=$srcdir | |
10290 | ac_given_INSTALL="$INSTALL" | |
10291 | ||
ed952ac5 | 10292 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10293 | EOF |
10294 | cat >> $CONFIG_STATUS <<EOF | |
10295 | ||
10296 | # Protect against being on the right side of a sed subst in config.status. | |
10297 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10298 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10299 | $ac_vpsub | |
10300 | $extrasub | |
10301 | s%@SHELL@%$SHELL%g | |
10302 | s%@CFLAGS@%$CFLAGS%g | |
10303 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10304 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10305 | s%@FFLAGS@%$FFLAGS%g | |
10306 | s%@DEFS@%$DEFS%g | |
10307 | s%@LDFLAGS@%$LDFLAGS%g | |
10308 | s%@LIBS@%$LIBS%g | |
10309 | s%@exec_prefix@%$exec_prefix%g | |
10310 | s%@prefix@%$prefix%g | |
10311 | s%@program_transform_name@%$program_transform_name%g | |
10312 | s%@bindir@%$bindir%g | |
10313 | s%@sbindir@%$sbindir%g | |
10314 | s%@libexecdir@%$libexecdir%g | |
10315 | s%@datadir@%$datadir%g | |
10316 | s%@sysconfdir@%$sysconfdir%g | |
10317 | s%@sharedstatedir@%$sharedstatedir%g | |
10318 | s%@localstatedir@%$localstatedir%g | |
10319 | s%@libdir@%$libdir%g | |
10320 | s%@includedir@%$includedir%g | |
10321 | s%@oldincludedir@%$oldincludedir%g | |
10322 | s%@infodir@%$infodir%g | |
10323 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10324 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10325 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10326 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10327 | s%@CC@%$CC%g |
10328 | s%@CPP@%$CPP%g | |
10329 | s%@host@%$host%g | |
10330 | s%@host_alias@%$host_alias%g | |
10331 | s%@host_cpu@%$host_cpu%g | |
10332 | s%@host_vendor@%$host_vendor%g | |
10333 | s%@host_os@%$host_os%g | |
10334 | s%@target@%$target%g | |
10335 | s%@target_alias@%$target_alias%g | |
10336 | s%@target_cpu@%$target_cpu%g | |
10337 | s%@target_vendor@%$target_vendor%g | |
10338 | s%@target_os@%$target_os%g | |
10339 | s%@build@%$build%g | |
10340 | s%@build_alias@%$build_alias%g | |
10341 | s%@build_cpu@%$build_cpu%g | |
10342 | s%@build_vendor@%$build_vendor%g | |
10343 | s%@build_os@%$build_os%g | |
c906108c | 10344 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10345 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10346 | s%@ALLOCA@%$ALLOCA%g |
10347 | s%@USE_NLS@%$USE_NLS%g | |
10348 | s%@MSGFMT@%$MSGFMT%g | |
10349 | s%@GMSGFMT@%$GMSGFMT%g | |
10350 | s%@XGETTEXT@%$XGETTEXT%g | |
10351 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10352 | s%@CATALOGS@%$CATALOGS%g | |
10353 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10354 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10355 | s%@GMOFILES@%$GMOFILES%g | |
10356 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10357 | s%@INTLDEPS@%$INTLDEPS%g | |
10358 | s%@INTLLIBS@%$INTLLIBS%g | |
10359 | s%@INTLOBJS@%$INTLOBJS%g | |
10360 | s%@POFILES@%$POFILES%g | |
10361 | s%@POSUB@%$POSUB%g | |
10362 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10363 | s%@GT_NO@%$GT_NO%g | |
10364 | s%@GT_YES@%$GT_YES%g | |
10365 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10366 | s%@l@%$l%g | |
7a292a7a | 10367 | s%@AWK@%$AWK%g |
c906108c SS |
10368 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10369 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10370 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10371 | s%@LN_S@%$LN_S%g |
10372 | s%@YACC@%$YACC%g | |
c906108c | 10373 | s%@AR@%$AR%g |
95ca63c4 CF |
10374 | s%@DLLTOOL@%$DLLTOOL%g |
10375 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10376 | s%@MIG@%$MIG%g |
c906108c | 10377 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
c906108c | 10378 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10379 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10380 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10381 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10382 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10383 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10384 | s%@LIBGUI@%$LIBGUI%g |
10385 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10386 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10387 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10388 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10389 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10390 | s%@TCL_CC@%$TCL_CC%g | |
10391 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10392 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10393 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10394 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10395 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10396 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10397 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10398 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10399 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10400 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10401 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10402 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10403 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10404 | s%@TK_VERSION@%$TK_VERSION%g | |
10405 | s%@TK_DEFS@%$TK_DEFS%g | |
10406 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10407 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10408 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10409 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10410 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10411 | s%@TCLHDIR@%$TCLHDIR%g | |
10412 | s%@TKHDIR@%$TKHDIR%g | |
10413 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10414 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10415 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10416 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10417 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10418 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10419 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10420 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10421 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10422 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10423 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10424 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10425 | s%@X_CFLAGS@%$X_CFLAGS%g |
10426 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10427 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10428 | s%@TCL_DEPS@%$TCL_DEPS%g |
10429 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10430 | s%@ITCLLIB@%$ITCLLIB%g |
10431 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10432 | s%@ITKLIB@%$ITKLIB%g | |
10433 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10434 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10435 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10436 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10437 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10438 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c SS |
10439 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
10440 | s%@CONFIG_OBS@%$CONFIG_OBS%g | |
66b965bb | 10441 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10442 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10443 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10444 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10445 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10446 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10447 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10448 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10449 | s%@HLDFLAGS@%$HLDFLAGS%g |
10450 | s%@HLDENV@%$HLDENV%g | |
10451 | s%@target_subdir@%$target_subdir%g | |
10452 | /@host_makefile_frag@/r $host_makefile_frag | |
10453 | s%@host_makefile_frag@%%g | |
10454 | /@target_makefile_frag@/r $target_makefile_frag | |
10455 | s%@target_makefile_frag@%%g | |
10456 | s%@frags@%$frags%g | |
96baa820 | 10457 | s%@SUBDIRS@%$SUBDIRS%g |
5a2402b8 AC |
10458 | s%@xm_h@%$xm_h%g |
10459 | s%@tm_h@%$tm_h%g | |
10460 | s%@nm_h@%$nm_h%g | |
c906108c | 10461 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10462 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10463 | s%@subdirs@%$subdirs%g |
10464 | ||
10465 | CEOF | |
10466 | EOF | |
10467 | ||
10468 | cat >> $CONFIG_STATUS <<\EOF | |
10469 | ||
10470 | # Split the substitutions into bite-sized pieces for seds with | |
10471 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10472 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10473 | ac_file=1 # Number of current file. |
10474 | ac_beg=1 # First line for current file. | |
10475 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10476 | ac_more_lines=: | |
10477 | ac_sed_cmds="" | |
10478 | while $ac_more_lines; do | |
10479 | if test $ac_beg -gt 1; then | |
10480 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10481 | else | |
10482 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10483 | fi | |
10484 | if test ! -s conftest.s$ac_file; then | |
10485 | ac_more_lines=false | |
10486 | rm -f conftest.s$ac_file | |
10487 | else | |
10488 | if test -z "$ac_sed_cmds"; then | |
10489 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10490 | else | |
10491 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10492 | fi | |
10493 | ac_file=`expr $ac_file + 1` | |
10494 | ac_beg=$ac_end | |
10495 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10496 | fi | |
10497 | done | |
10498 | if test -z "$ac_sed_cmds"; then | |
10499 | ac_sed_cmds=cat | |
10500 | fi | |
10501 | EOF | |
10502 | ||
10503 | cat >> $CONFIG_STATUS <<EOF | |
10504 | ||
ed952ac5 | 10505 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10506 | EOF |
10507 | cat >> $CONFIG_STATUS <<\EOF | |
10508 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10509 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10510 | case "$ac_file" in | |
10511 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10512 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10513 | *) ac_file_in="${ac_file}.in" ;; | |
10514 | esac | |
10515 | ||
10516 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10517 | ||
10518 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10519 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10520 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10521 | # The file is in a subdirectory. | |
10522 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10523 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10524 | # A "../" for each directory in $ac_dir_suffix. | |
10525 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10526 | else | |
10527 | ac_dir_suffix= ac_dots= | |
10528 | fi | |
10529 | ||
10530 | case "$ac_given_srcdir" in | |
10531 | .) srcdir=. | |
10532 | if test -z "$ac_dots"; then top_srcdir=. | |
10533 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10534 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10535 | *) # Relative path. | |
10536 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10537 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10538 | esac | |
10539 | ||
10540 | case "$ac_given_INSTALL" in | |
10541 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10542 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10543 | esac | |
10544 | ||
10545 | echo creating "$ac_file" | |
10546 | rm -f "$ac_file" | |
10547 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10548 | case "$ac_file" in | |
10549 | *Makefile*) ac_comsub="1i\\ | |
10550 | # $configure_input" ;; | |
10551 | *) ac_comsub= ;; | |
10552 | esac | |
10553 | ||
10554 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10555 | sed -e "$ac_comsub | |
10556 | s%@configure_input@%$configure_input%g | |
10557 | s%@srcdir@%$srcdir%g | |
10558 | s%@top_srcdir@%$top_srcdir%g | |
10559 | s%@INSTALL@%$INSTALL%g | |
10560 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10561 | fi; done | |
10562 | rm -f conftest.s* | |
10563 | ||
10564 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10565 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10566 | # | |
10567 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10568 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10569 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10570 | ac_dC='\3' | |
10571 | ac_dD='%g' | |
10572 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10573 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10574 | ac_uB='\([ ]\)%\1#\2define\3' | |
10575 | ac_uC=' ' | |
10576 | ac_uD='\4%g' | |
10577 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10578 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10579 | ac_eB='$%\1#\2define\3' | |
10580 | ac_eC=' ' | |
10581 | ac_eD='%g' | |
10582 | ||
10583 | if test "${CONFIG_HEADERS+set}" != set; then | |
10584 | EOF | |
10585 | cat >> $CONFIG_STATUS <<EOF | |
10586 | CONFIG_HEADERS="config.h:config.in" | |
10587 | EOF | |
10588 | cat >> $CONFIG_STATUS <<\EOF | |
10589 | fi | |
10590 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10591 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10592 | case "$ac_file" in | |
10593 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10594 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10595 | *) ac_file_in="${ac_file}.in" ;; | |
10596 | esac | |
10597 | ||
10598 | echo creating $ac_file | |
10599 | ||
10600 | rm -f conftest.frag conftest.in conftest.out | |
10601 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10602 | cat $ac_file_inputs > conftest.in | |
10603 | ||
10604 | EOF | |
10605 | ||
10606 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10607 | # the proper values into config.h.in to produce config.h. And first: | |
10608 | # Protect against being on the right side of a sed subst in config.status. | |
10609 | # Protect against being in an unquoted here document in config.status. | |
10610 | rm -f conftest.vals | |
10611 | cat > conftest.hdr <<\EOF | |
10612 | s/[\\&%]/\\&/g | |
10613 | s%[\\$`]%\\&%g | |
10614 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10615 | s%ac_d%ac_u%gp | |
10616 | s%ac_u%ac_e%gp | |
10617 | EOF | |
10618 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10619 | rm -f conftest.hdr | |
10620 | ||
10621 | # This sed command replaces #undef with comments. This is necessary, for | |
10622 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10623 | # on some systems where configure will not decide to define it. | |
10624 | cat >> conftest.vals <<\EOF | |
10625 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10626 | EOF | |
10627 | ||
10628 | # Break up conftest.vals because some shells have a limit on | |
10629 | # the size of here documents, and old seds have small limits too. | |
10630 | ||
10631 | rm -f conftest.tail | |
10632 | while : | |
10633 | do | |
10634 | ac_lines=`grep -c . conftest.vals` | |
10635 | # grep -c gives empty output for an empty file on some AIX systems. | |
10636 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10637 | # Write a limited-size here document to conftest.frag. | |
10638 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10639 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10640 | echo 'CEOF | |
10641 | sed -f conftest.frag conftest.in > conftest.out | |
10642 | rm -f conftest.in | |
10643 | mv conftest.out conftest.in | |
10644 | ' >> $CONFIG_STATUS | |
10645 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10646 | rm -f conftest.vals | |
10647 | mv conftest.tail conftest.vals | |
10648 | done | |
10649 | rm -f conftest.vals | |
10650 | ||
10651 | cat >> $CONFIG_STATUS <<\EOF | |
10652 | rm -f conftest.frag conftest.h | |
10653 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10654 | cat conftest.in >> conftest.h | |
10655 | rm -f conftest.in | |
10656 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10657 | echo "$ac_file is unchanged" | |
10658 | rm -f conftest.h | |
10659 | else | |
10660 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10661 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10662 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10663 | # The file is in a subdirectory. | |
10664 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10665 | fi | |
10666 | rm -f $ac_file | |
10667 | mv conftest.h $ac_file | |
10668 | fi | |
10669 | fi; done | |
10670 | ||
10671 | EOF | |
10672 | ||
10673 | cat >> $CONFIG_STATUS <<EOF | |
10674 | ac_sources="$files" | |
10675 | ac_dests="$links" | |
10676 | EOF | |
10677 | ||
10678 | cat >> $CONFIG_STATUS <<\EOF | |
10679 | srcdir=$ac_given_srcdir | |
10680 | while test -n "$ac_sources"; do | |
10681 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10682 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10683 | ||
10684 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10685 | ||
10686 | if test ! -r $srcdir/$ac_source; then | |
10687 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10688 | fi | |
10689 | rm -f $ac_dest | |
10690 | ||
10691 | # Make relative symlinks. | |
10692 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10693 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10694 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10695 | # The dest file is in a subdirectory. | |
10696 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10697 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10698 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10699 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10700 | else | |
10701 | ac_dest_dir_suffix= ac_dots= | |
10702 | fi | |
10703 | ||
10704 | case "$srcdir" in | |
10705 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10706 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10707 | esac | |
10708 | ||
10709 | # Make a symlink if possible; otherwise try a hard link. | |
10710 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10711 | ln $srcdir/$ac_source $ac_dest; then : | |
10712 | else | |
10713 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10714 | fi | |
10715 | done | |
10716 | EOF | |
10717 | cat >> $CONFIG_STATUS <<EOF | |
10718 | ||
10719 | gdb_host_cpu=$gdb_host_cpu | |
10720 | gdb_target_cpu=$gdb_target_cpu | |
10721 | nativefile=$nativefile | |
10722 | ||
10723 | EOF | |
10724 | cat >> $CONFIG_STATUS <<\EOF | |
10725 | ||
10726 | if test "${nativefile}" = ""; then | |
c4620205 | 10727 | < Makefile \ |
e27da16d JT |
10728 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10729 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10730 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10731 | > Makefile.tem | |
c906108c SS |
10732 | mv -f Makefile.tem Makefile |
10733 | fi | |
10734 | ||
10735 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10736 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10737 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10738 | mv -f Makefile.tmp Makefile | |
10739 | ||
2acceee2 | 10740 | |
c906108c SS |
10741 | case x$CONFIG_HEADERS in |
10742 | xconfig.h:config.in) | |
10743 | echo > stamp-h ;; | |
10744 | esac | |
10745 | ||
10746 | exit 0 | |
10747 | EOF | |
10748 | chmod +x $CONFIG_STATUS | |
10749 | rm -fr confdefs* $ac_clean_files | |
10750 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10751 | ||
10752 | if test "$no_recursion" != yes; then | |
10753 | ||
10754 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10755 | ac_sub_configure_args= | |
10756 | ac_prev= | |
10757 | for ac_arg in $ac_configure_args; do | |
10758 | if test -n "$ac_prev"; then | |
10759 | ac_prev= | |
10760 | continue | |
10761 | fi | |
10762 | case "$ac_arg" in | |
10763 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10764 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10765 | ac_prev=cache_file ;; | |
10766 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10767 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10768 | ;; | |
10769 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10770 | ac_prev=srcdir ;; | |
10771 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10772 | ;; | |
10773 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10774 | esac | |
10775 | done | |
10776 | ||
10777 | for ac_config_dir in $configdirs; do | |
10778 | ||
10779 | # Do not complain, so a configure script can configure whichever | |
10780 | # parts of a large source tree are present. | |
10781 | if test ! -d $srcdir/$ac_config_dir; then | |
10782 | continue | |
10783 | fi | |
10784 | ||
10785 | echo configuring in $ac_config_dir | |
10786 | ||
10787 | case "$srcdir" in | |
10788 | .) ;; | |
10789 | *) | |
10790 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10791 | else | |
10792 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10793 | fi | |
10794 | ;; | |
10795 | esac | |
10796 | ||
10797 | ac_popdir=`pwd` | |
10798 | cd $ac_config_dir | |
10799 | ||
10800 | # A "../" for each directory in /$ac_config_dir. | |
10801 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10802 | ||
10803 | case "$srcdir" in | |
10804 | .) # No --srcdir option. We are building in place. | |
10805 | ac_sub_srcdir=$srcdir ;; | |
10806 | /*) # Absolute path. | |
10807 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10808 | *) # Relative path. | |
10809 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10810 | esac | |
10811 | ||
10812 | # Check for guested configure; otherwise get Cygnus style configure. | |
10813 | if test -f $ac_sub_srcdir/configure; then | |
10814 | ac_sub_configure=$ac_sub_srcdir/configure | |
10815 | elif test -f $ac_sub_srcdir/configure.in; then | |
10816 | ac_sub_configure=$ac_configure | |
10817 | else | |
10818 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10819 | ac_sub_configure= | |
10820 | fi | |
10821 | ||
10822 | # The recursion is here. | |
10823 | if test -n "$ac_sub_configure"; then | |
10824 | ||
10825 | # Make the cache file name correct relative to the subdirectory. | |
10826 | case "$cache_file" in | |
10827 | /*) ac_sub_cache_file=$cache_file ;; | |
10828 | *) # Relative path. | |
10829 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10830 | esac | |
10831 | case "$ac_given_INSTALL" in | |
10832 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10833 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10834 | esac | |
10835 | ||
10836 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10837 | # The eval makes quoting arguments work. | |
10838 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10839 | then : | |
10840 | else | |
10841 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10842 | fi | |
10843 | fi | |
10844 | ||
10845 | cd $ac_popdir | |
10846 | done | |
10847 | fi | |
10848 | ||
10849 | ||
10850 | exit 0 |