Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
413ccac7 AC |
14 | ac_help="$ac_help |
15 | --enable-maintainer-mode enable make rules and dependencies not useful | |
16 | (and sometimes confusing) to the casual installer" | |
c906108c SS |
17 | ac_help="$ac_help |
18 | --disable-nls do not use Native Language Support" | |
19 | ac_help="$ac_help | |
20 | --with-included-gettext use the GNU gettext library included here" | |
627af7ea MK |
21 | ac_help="$ac_help |
22 | --disable-gdbcli disable command-line interface (CLI)" | |
23 | ac_help="$ac_help | |
24 | --disable-gdbmi disable machine-interface (MI)" | |
06825bd1 MK |
25 | ac_help="$ac_help |
26 | --enable-tui enable full-screen terminal user interface (TUI)" | |
8ee53726 | 27 | ac_help="$ac_help |
d28f9cdf DJ |
28 | --enable-gdbtk enable gdbtk graphical user interface (GUI)" |
29 | ac_help="$ac_help | |
30 | --enable-profiling enable profiling of GDB" | |
06825bd1 MK |
31 | ac_help="$ac_help |
32 | --without-included-regex don't use included regex; this is the default | |
33 | on systems with version 2 of the GNU C library | |
34 | (use with caution on other system)" | |
030292b7 DJ |
35 | ac_help="$ac_help |
36 | --with-sysroot[=DIR] Search for usr/lib et al within DIR." | |
c906108c SS |
37 | ac_help="$ac_help |
38 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
3b851bce AC |
39 | ac_help="$ac_help |
40 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" | |
c906108c SS |
41 | ac_help="$ac_help |
42 | --with-mmalloc Use memory mapped malloc package" | |
7a292a7a SS |
43 | ac_help="$ac_help |
44 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" | |
45 | ac_help="$ac_help | |
46 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" | |
47 | ac_help="$ac_help | |
48 | --with-tclinclude=DIR Directory where tcl private headers are" | |
49 | ac_help="$ac_help | |
50 | --with-tkinclude=DIR Directory where tk private headers are" | |
51 | ac_help="$ac_help | |
52 | --with-itclconfig Directory containing itcl configuration (itclConfig.sh)" | |
53 | ac_help="$ac_help | |
54 | --with-itkconfig Directory containing itk configuration (itkConfig.sh)" | |
c906108c SS |
55 | ac_help="$ac_help |
56 | --with-x use the X Window System" | |
7a292a7a SS |
57 | ac_help="$ac_help |
58 | --enable-sim Link gdb with simulator" | |
8dcde887 MK |
59 | ac_help="$ac_help |
60 | --enable-multi-ice build the multi-ice-gdb-server" | |
234b45d4 KB |
61 | ac_help="$ac_help |
62 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
c906108c SS |
63 | |
64 | # Initialize some variables set by options. | |
65 | # The variables have the same names as the options, with | |
66 | # dashes changed to underlines. | |
67 | build=NONE | |
68 | cache_file=./config.cache | |
69 | exec_prefix=NONE | |
70 | host=NONE | |
71 | no_create= | |
72 | nonopt=NONE | |
73 | no_recursion= | |
74 | prefix=NONE | |
75 | program_prefix=NONE | |
76 | program_suffix=NONE | |
77 | program_transform_name=s,x,x, | |
78 | silent= | |
79 | site= | |
c41b7eb1 | 80 | sitefile= |
c906108c SS |
81 | srcdir= |
82 | target=NONE | |
83 | verbose= | |
84 | x_includes=NONE | |
85 | x_libraries=NONE | |
86 | bindir='${exec_prefix}/bin' | |
87 | sbindir='${exec_prefix}/sbin' | |
88 | libexecdir='${exec_prefix}/libexec' | |
89 | datadir='${prefix}/share' | |
90 | sysconfdir='${prefix}/etc' | |
91 | sharedstatedir='${prefix}/com' | |
92 | localstatedir='${prefix}/var' | |
93 | libdir='${exec_prefix}/lib' | |
94 | includedir='${prefix}/include' | |
95 | oldincludedir='/usr/include' | |
96 | infodir='${prefix}/info' | |
97 | mandir='${prefix}/man' | |
98 | ||
99 | # Initialize some other variables. | |
100 | subdirs= | |
101 | MFLAGS= MAKEFLAGS= | |
102 | SHELL=${CONFIG_SHELL-/bin/sh} | |
103 | # Maximum number of lines to put in a shell here document. | |
104 | ac_max_here_lines=12 | |
105 | ||
106 | ac_prev= | |
107 | for ac_option | |
108 | do | |
109 | ||
110 | # If the previous option needs an argument, assign it. | |
111 | if test -n "$ac_prev"; then | |
112 | eval "$ac_prev=\$ac_option" | |
113 | ac_prev= | |
114 | continue | |
115 | fi | |
116 | ||
117 | case "$ac_option" in | |
118 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
119 | *) ac_optarg= ;; | |
120 | esac | |
121 | ||
122 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
123 | ||
124 | case "$ac_option" in | |
125 | ||
126 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
127 | ac_prev=bindir ;; | |
128 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
129 | bindir="$ac_optarg" ;; | |
130 | ||
131 | -build | --build | --buil | --bui | --bu) | |
132 | ac_prev=build ;; | |
133 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
134 | build="$ac_optarg" ;; | |
135 | ||
136 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
137 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
138 | ac_prev=cache_file ;; | |
139 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
140 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
141 | cache_file="$ac_optarg" ;; | |
142 | ||
143 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
144 | ac_prev=datadir ;; | |
145 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
146 | | --da=*) | |
147 | datadir="$ac_optarg" ;; | |
148 | ||
149 | -disable-* | --disable-*) | |
150 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
151 | # Reject names that are not valid shell variable names. | |
152 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
153 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
154 | fi | |
155 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
156 | eval "enable_${ac_feature}=no" ;; | |
157 | ||
158 | -enable-* | --enable-*) | |
159 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
160 | # Reject names that are not valid shell variable names. | |
161 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
162 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
163 | fi | |
164 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
165 | case "$ac_option" in | |
166 | *=*) ;; | |
167 | *) ac_optarg=yes ;; | |
168 | esac | |
169 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
170 | ||
171 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
172 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
173 | | --exec | --exe | --ex) | |
174 | ac_prev=exec_prefix ;; | |
175 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
176 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
177 | | --exec=* | --exe=* | --ex=*) | |
178 | exec_prefix="$ac_optarg" ;; | |
179 | ||
180 | -gas | --gas | --ga | --g) | |
181 | # Obsolete; use --with-gas. | |
182 | with_gas=yes ;; | |
183 | ||
184 | -help | --help | --hel | --he) | |
185 | # Omit some internal or obsolete options to make the list less imposing. | |
186 | # This message is too long to be a string in the A/UX 3.1 sh. | |
187 | cat << EOF | |
188 | Usage: configure [options] [host] | |
189 | Options: [defaults in brackets after descriptions] | |
190 | Configuration: | |
191 | --cache-file=FILE cache test results in FILE | |
192 | --help print this message | |
193 | --no-create do not create output files | |
194 | --quiet, --silent do not print \`checking...' messages | |
c41b7eb1 | 195 | --site-file=FILE use FILE as the site file |
c906108c SS |
196 | --version print the version of autoconf that created configure |
197 | Directory and file names: | |
198 | --prefix=PREFIX install architecture-independent files in PREFIX | |
199 | [$ac_default_prefix] | |
200 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
201 | [same as prefix] | |
202 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
203 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
204 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
205 | --datadir=DIR read-only architecture-independent data in DIR | |
206 | [PREFIX/share] | |
207 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
208 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
209 | [PREFIX/com] | |
210 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
211 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
212 | --includedir=DIR C header files in DIR [PREFIX/include] | |
213 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
214 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
215 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
216 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
217 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
218 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
219 | --program-transform-name=PROGRAM | |
220 | run sed PROGRAM on installed program names | |
221 | EOF | |
222 | cat << EOF | |
223 | Host type: | |
224 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
225 | --host=HOST configure for HOST [guessed] | |
226 | --target=TARGET configure for TARGET [TARGET=HOST] | |
227 | Features and packages: | |
228 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
229 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
230 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
231 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
232 | --x-includes=DIR X include files are in DIR | |
233 | --x-libraries=DIR X library files are in DIR | |
234 | EOF | |
235 | if test -n "$ac_help"; then | |
236 | echo "--enable and --with options recognized:$ac_help" | |
237 | fi | |
238 | exit 0 ;; | |
239 | ||
240 | -host | --host | --hos | --ho) | |
241 | ac_prev=host ;; | |
242 | -host=* | --host=* | --hos=* | --ho=*) | |
243 | host="$ac_optarg" ;; | |
244 | ||
245 | -includedir | --includedir | --includedi | --included | --include \ | |
246 | | --includ | --inclu | --incl | --inc) | |
247 | ac_prev=includedir ;; | |
248 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
249 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
250 | includedir="$ac_optarg" ;; | |
251 | ||
252 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
253 | ac_prev=infodir ;; | |
254 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
255 | infodir="$ac_optarg" ;; | |
256 | ||
257 | -libdir | --libdir | --libdi | --libd) | |
258 | ac_prev=libdir ;; | |
259 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
260 | libdir="$ac_optarg" ;; | |
261 | ||
262 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
263 | | --libexe | --libex | --libe) | |
264 | ac_prev=libexecdir ;; | |
265 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
266 | | --libexe=* | --libex=* | --libe=*) | |
267 | libexecdir="$ac_optarg" ;; | |
268 | ||
269 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
270 | | --localstate | --localstat | --localsta | --localst \ | |
271 | | --locals | --local | --loca | --loc | --lo) | |
272 | ac_prev=localstatedir ;; | |
273 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
274 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
275 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
276 | localstatedir="$ac_optarg" ;; | |
277 | ||
278 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
279 | ac_prev=mandir ;; | |
280 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
281 | mandir="$ac_optarg" ;; | |
282 | ||
283 | -nfp | --nfp | --nf) | |
284 | # Obsolete; use --without-fp. | |
285 | with_fp=no ;; | |
286 | ||
287 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
288 | | --no-cr | --no-c) | |
289 | no_create=yes ;; | |
290 | ||
291 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
292 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
293 | no_recursion=yes ;; | |
294 | ||
295 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
296 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
297 | | --oldin | --oldi | --old | --ol | --o) | |
298 | ac_prev=oldincludedir ;; | |
299 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
300 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
301 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
302 | oldincludedir="$ac_optarg" ;; | |
303 | ||
304 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
305 | ac_prev=prefix ;; | |
306 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
307 | prefix="$ac_optarg" ;; | |
308 | ||
309 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
310 | | --program-pre | --program-pr | --program-p) | |
311 | ac_prev=program_prefix ;; | |
312 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
313 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
314 | program_prefix="$ac_optarg" ;; | |
315 | ||
316 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
317 | | --program-suf | --program-su | --program-s) | |
318 | ac_prev=program_suffix ;; | |
319 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
320 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
321 | program_suffix="$ac_optarg" ;; | |
322 | ||
323 | -program-transform-name | --program-transform-name \ | |
324 | | --program-transform-nam | --program-transform-na \ | |
325 | | --program-transform-n | --program-transform- \ | |
326 | | --program-transform | --program-transfor \ | |
327 | | --program-transfo | --program-transf \ | |
328 | | --program-trans | --program-tran \ | |
329 | | --progr-tra | --program-tr | --program-t) | |
330 | ac_prev=program_transform_name ;; | |
331 | -program-transform-name=* | --program-transform-name=* \ | |
332 | | --program-transform-nam=* | --program-transform-na=* \ | |
333 | | --program-transform-n=* | --program-transform-=* \ | |
334 | | --program-transform=* | --program-transfor=* \ | |
335 | | --program-transfo=* | --program-transf=* \ | |
336 | | --program-trans=* | --program-tran=* \ | |
337 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
338 | program_transform_name="$ac_optarg" ;; | |
339 | ||
340 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
341 | | -silent | --silent | --silen | --sile | --sil) | |
342 | silent=yes ;; | |
343 | ||
344 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
345 | ac_prev=sbindir ;; | |
346 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
347 | | --sbi=* | --sb=*) | |
348 | sbindir="$ac_optarg" ;; | |
349 | ||
350 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
351 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
352 | | --sharedst | --shareds | --shared | --share | --shar \ | |
353 | | --sha | --sh) | |
354 | ac_prev=sharedstatedir ;; | |
355 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
356 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
357 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
358 | | --sha=* | --sh=*) | |
359 | sharedstatedir="$ac_optarg" ;; | |
360 | ||
361 | -site | --site | --sit) | |
362 | ac_prev=site ;; | |
363 | -site=* | --site=* | --sit=*) | |
364 | site="$ac_optarg" ;; | |
365 | ||
c41b7eb1 JB |
366 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
367 | ac_prev=sitefile ;; | |
368 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
369 | sitefile="$ac_optarg" ;; | |
370 | ||
c906108c SS |
371 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
372 | ac_prev=srcdir ;; | |
373 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
374 | srcdir="$ac_optarg" ;; | |
375 | ||
376 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
377 | | --syscon | --sysco | --sysc | --sys | --sy) | |
378 | ac_prev=sysconfdir ;; | |
379 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
380 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
381 | sysconfdir="$ac_optarg" ;; | |
382 | ||
383 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
384 | ac_prev=target ;; | |
385 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
386 | target="$ac_optarg" ;; | |
387 | ||
388 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
389 | verbose=yes ;; | |
390 | ||
391 | -version | --version | --versio | --versi | --vers) | |
392 | echo "configure generated by autoconf version 2.13" | |
393 | exit 0 ;; | |
394 | ||
395 | -with-* | --with-*) | |
396 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
397 | # Reject names that are not valid shell variable names. | |
398 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
399 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
400 | fi | |
401 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
402 | case "$ac_option" in | |
403 | *=*) ;; | |
404 | *) ac_optarg=yes ;; | |
405 | esac | |
406 | eval "with_${ac_package}='$ac_optarg'" ;; | |
407 | ||
408 | -without-* | --without-*) | |
409 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
410 | # Reject names that are not valid shell variable names. | |
411 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
412 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
413 | fi | |
414 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
415 | eval "with_${ac_package}=no" ;; | |
416 | ||
417 | --x) | |
418 | # Obsolete; use --with-x. | |
419 | with_x=yes ;; | |
420 | ||
421 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
422 | | --x-incl | --x-inc | --x-in | --x-i) | |
423 | ac_prev=x_includes ;; | |
424 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
425 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
426 | x_includes="$ac_optarg" ;; | |
427 | ||
428 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
429 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
430 | ac_prev=x_libraries ;; | |
431 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
432 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
433 | x_libraries="$ac_optarg" ;; | |
434 | ||
435 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
436 | ;; | |
437 | ||
438 | *) | |
439 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
440 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
441 | fi | |
442 | if test "x$nonopt" != xNONE; then | |
443 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
444 | fi | |
445 | nonopt="$ac_option" | |
446 | ;; | |
447 | ||
448 | esac | |
449 | done | |
450 | ||
451 | if test -n "$ac_prev"; then | |
452 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
453 | fi | |
454 | ||
455 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
456 | ||
457 | # File descriptor usage: | |
458 | # 0 standard input | |
459 | # 1 file creation | |
460 | # 2 errors and warnings | |
461 | # 3 some systems may open it to /dev/tty | |
462 | # 4 used on the Kubota Titan | |
463 | # 6 checking for... messages and results | |
464 | # 5 compiler messages saved in config.log | |
465 | if test "$silent" = yes; then | |
466 | exec 6>/dev/null | |
467 | else | |
468 | exec 6>&1 | |
469 | fi | |
470 | exec 5>./config.log | |
471 | ||
472 | echo "\ | |
473 | This file contains any messages produced by compilers while | |
474 | running configure, to aid debugging if configure makes a mistake. | |
475 | " 1>&5 | |
476 | ||
477 | # Strip out --no-create and --no-recursion so they do not pile up. | |
478 | # Also quote any args containing shell metacharacters. | |
479 | ac_configure_args= | |
480 | for ac_arg | |
481 | do | |
482 | case "$ac_arg" in | |
483 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
484 | | --no-cr | --no-c) ;; | |
485 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
486 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
487 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
488 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
489 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
490 | esac | |
491 | done | |
492 | ||
493 | # NLS nuisances. | |
494 | # Only set these to C if already set. These must not be set unconditionally | |
495 | # because not all systems understand e.g. LANG=C (notably SCO). | |
496 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
497 | # Non-C LC_CTYPE values break the ctype check. | |
498 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
499 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
500 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
501 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
502 | ||
503 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
504 | rm -rf conftest* confdefs.h | |
505 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
506 | echo > confdefs.h | |
507 | ||
508 | # A filename unique to this package, relative to the directory that | |
509 | # configure is in, which we can look for to find out if srcdir is correct. | |
510 | ac_unique_file=main.c | |
511 | ||
512 | # Find the source files, if location was not specified. | |
513 | if test -z "$srcdir"; then | |
514 | ac_srcdir_defaulted=yes | |
515 | # Try the directory containing this script, then its parent. | |
516 | ac_prog=$0 | |
517 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
518 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
519 | srcdir=$ac_confdir | |
520 | if test ! -r $srcdir/$ac_unique_file; then | |
521 | srcdir=.. | |
522 | fi | |
523 | else | |
524 | ac_srcdir_defaulted=no | |
525 | fi | |
526 | if test ! -r $srcdir/$ac_unique_file; then | |
527 | if test "$ac_srcdir_defaulted" = yes; then | |
528 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
529 | else | |
530 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
531 | fi | |
532 | fi | |
533 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
534 | ||
535 | # Prefer explicitly selected file to automatically selected ones. | |
c41b7eb1 JB |
536 | if test -z "$sitefile"; then |
537 | if test -z "$CONFIG_SITE"; then | |
538 | if test "x$prefix" != xNONE; then | |
539 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
540 | else | |
541 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
542 | fi | |
c906108c | 543 | fi |
c41b7eb1 JB |
544 | else |
545 | CONFIG_SITE="$sitefile" | |
c906108c SS |
546 | fi |
547 | for ac_site_file in $CONFIG_SITE; do | |
548 | if test -r "$ac_site_file"; then | |
549 | echo "loading site script $ac_site_file" | |
550 | . "$ac_site_file" | |
551 | fi | |
552 | done | |
553 | ||
554 | if test -r "$cache_file"; then | |
555 | echo "loading cache $cache_file" | |
556 | . $cache_file | |
557 | else | |
558 | echo "creating cache $cache_file" | |
559 | > $cache_file | |
560 | fi | |
561 | ||
562 | ac_ext=c | |
563 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
564 | ac_cpp='$CPP $CPPFLAGS' | |
565 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
566 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
567 | cross_compiling=$ac_cv_prog_cc_cross | |
568 | ||
569 | ac_exeext= | |
570 | ac_objext=o | |
571 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
572 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
573 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
574 | ac_n= ac_c=' | |
575 | ' ac_t=' ' | |
576 | else | |
577 | ac_n=-n ac_c= ac_t= | |
578 | fi | |
579 | else | |
580 | ac_n= ac_c='\c' ac_t= | |
581 | fi | |
582 | ||
583 | ||
584 | ||
413ccac7 | 585 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
d28f9cdf | 586 | echo "configure:587: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
413ccac7 AC |
587 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
588 | if test "${enable_maintainer_mode+set}" = set; then | |
589 | enableval="$enable_maintainer_mode" | |
590 | USE_MAINTAINER_MODE=$enableval | |
591 | else | |
592 | USE_MAINTAINER_MODE=no | |
593 | fi | |
594 | ||
595 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
596 | ||
597 | ||
598 | if test $USE_MAINTAINER_MODE = yes; then | |
599 | MAINTAINER_MODE_TRUE= | |
600 | MAINTAINER_MODE_FALSE='#' | |
601 | else | |
602 | MAINTAINER_MODE_TRUE='#' | |
603 | MAINTAINER_MODE_FALSE= | |
604 | fi | |
605 | MAINT=$MAINTAINER_MODE_TRUE | |
606 | ||
607 | ||
c906108c SS |
608 | |
609 | # Extract the first word of "gcc", so it can be a program name with args. | |
610 | set dummy gcc; ac_word=$2 | |
611 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 612 | echo "configure:613: checking for $ac_word" >&5 |
c906108c SS |
613 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
615 | else | |
616 | if test -n "$CC"; then | |
617 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
618 | else | |
619 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
620 | ac_dummy="$PATH" | |
621 | for ac_dir in $ac_dummy; do | |
622 | test -z "$ac_dir" && ac_dir=. | |
623 | if test -f $ac_dir/$ac_word; then | |
624 | ac_cv_prog_CC="gcc" | |
625 | break | |
626 | fi | |
627 | done | |
628 | IFS="$ac_save_ifs" | |
629 | fi | |
630 | fi | |
631 | CC="$ac_cv_prog_CC" | |
632 | if test -n "$CC"; then | |
633 | echo "$ac_t""$CC" 1>&6 | |
634 | else | |
635 | echo "$ac_t""no" 1>&6 | |
636 | fi | |
637 | ||
638 | if test -z "$CC"; then | |
639 | # Extract the first word of "cc", so it can be a program name with args. | |
640 | set dummy cc; ac_word=$2 | |
641 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 642 | echo "configure:643: checking for $ac_word" >&5 |
c906108c SS |
643 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
644 | echo $ac_n "(cached) $ac_c" 1>&6 | |
645 | else | |
646 | if test -n "$CC"; then | |
647 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
648 | else | |
649 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
650 | ac_prog_rejected=no | |
651 | ac_dummy="$PATH" | |
652 | for ac_dir in $ac_dummy; do | |
653 | test -z "$ac_dir" && ac_dir=. | |
654 | if test -f $ac_dir/$ac_word; then | |
655 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
656 | ac_prog_rejected=yes | |
657 | continue | |
658 | fi | |
659 | ac_cv_prog_CC="cc" | |
660 | break | |
661 | fi | |
662 | done | |
663 | IFS="$ac_save_ifs" | |
664 | if test $ac_prog_rejected = yes; then | |
665 | # We found a bogon in the path, so make sure we never use it. | |
666 | set dummy $ac_cv_prog_CC | |
667 | shift | |
668 | if test $# -gt 0; then | |
669 | # We chose a different compiler from the bogus one. | |
670 | # However, it has the same basename, so the bogon will be chosen | |
671 | # first if we set CC to just the basename; use the full file name. | |
672 | shift | |
673 | set dummy "$ac_dir/$ac_word" "$@" | |
674 | shift | |
675 | ac_cv_prog_CC="$@" | |
676 | fi | |
677 | fi | |
678 | fi | |
679 | fi | |
680 | CC="$ac_cv_prog_CC" | |
681 | if test -n "$CC"; then | |
682 | echo "$ac_t""$CC" 1>&6 | |
683 | else | |
684 | echo "$ac_t""no" 1>&6 | |
685 | fi | |
686 | ||
687 | if test -z "$CC"; then | |
688 | case "`uname -s`" in | |
689 | *win32* | *WIN32*) | |
690 | # Extract the first word of "cl", so it can be a program name with args. | |
691 | set dummy cl; ac_word=$2 | |
692 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 693 | echo "configure:694: checking for $ac_word" >&5 |
c906108c SS |
694 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
695 | echo $ac_n "(cached) $ac_c" 1>&6 | |
696 | else | |
697 | if test -n "$CC"; then | |
698 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
699 | else | |
700 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
701 | ac_dummy="$PATH" | |
702 | for ac_dir in $ac_dummy; do | |
703 | test -z "$ac_dir" && ac_dir=. | |
704 | if test -f $ac_dir/$ac_word; then | |
705 | ac_cv_prog_CC="cl" | |
706 | break | |
707 | fi | |
708 | done | |
709 | IFS="$ac_save_ifs" | |
710 | fi | |
711 | fi | |
712 | CC="$ac_cv_prog_CC" | |
713 | if test -n "$CC"; then | |
714 | echo "$ac_t""$CC" 1>&6 | |
715 | else | |
716 | echo "$ac_t""no" 1>&6 | |
717 | fi | |
718 | ;; | |
719 | esac | |
720 | fi | |
721 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
722 | fi | |
723 | ||
724 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
d28f9cdf | 725 | echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c906108c SS |
726 | |
727 | ac_ext=c | |
728 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
729 | ac_cpp='$CPP $CPPFLAGS' | |
730 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
731 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
732 | cross_compiling=$ac_cv_prog_cc_cross | |
733 | ||
734 | cat > conftest.$ac_ext << EOF | |
735 | ||
d28f9cdf | 736 | #line 737 "configure" |
c906108c SS |
737 | #include "confdefs.h" |
738 | ||
739 | main(){return(0);} | |
740 | EOF | |
d28f9cdf | 741 | if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
742 | ac_cv_prog_cc_works=yes |
743 | # If we can't run a trivial program, we are probably using a cross compiler. | |
744 | if (./conftest; exit) 2>/dev/null; then | |
745 | ac_cv_prog_cc_cross=no | |
746 | else | |
747 | ac_cv_prog_cc_cross=yes | |
748 | fi | |
749 | else | |
750 | echo "configure: failed program was:" >&5 | |
751 | cat conftest.$ac_ext >&5 | |
752 | ac_cv_prog_cc_works=no | |
753 | fi | |
754 | rm -fr conftest* | |
755 | ac_ext=c | |
756 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
757 | ac_cpp='$CPP $CPPFLAGS' | |
758 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
759 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
760 | cross_compiling=$ac_cv_prog_cc_cross | |
761 | ||
762 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
763 | if test $ac_cv_prog_cc_works = no; then | |
764 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
765 | fi | |
766 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
d28f9cdf | 767 | echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c906108c SS |
768 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
769 | cross_compiling=$ac_cv_prog_cc_cross | |
770 | ||
771 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
d28f9cdf | 772 | echo "configure:773: checking whether we are using GNU C" >&5 |
c906108c SS |
773 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
774 | echo $ac_n "(cached) $ac_c" 1>&6 | |
775 | else | |
776 | cat > conftest.c <<EOF | |
777 | #ifdef __GNUC__ | |
778 | yes; | |
779 | #endif | |
780 | EOF | |
d28f9cdf | 781 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c906108c SS |
782 | ac_cv_prog_gcc=yes |
783 | else | |
784 | ac_cv_prog_gcc=no | |
785 | fi | |
786 | fi | |
787 | ||
788 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
789 | ||
790 | if test $ac_cv_prog_gcc = yes; then | |
791 | GCC=yes | |
792 | else | |
793 | GCC= | |
794 | fi | |
795 | ||
796 | ac_test_CFLAGS="${CFLAGS+set}" | |
797 | ac_save_CFLAGS="$CFLAGS" | |
798 | CFLAGS= | |
799 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
d28f9cdf | 800 | echo "configure:801: checking whether ${CC-cc} accepts -g" >&5 |
c906108c SS |
801 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
803 | else | |
804 | echo 'void f(){}' > conftest.c | |
805 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
806 | ac_cv_prog_cc_g=yes | |
807 | else | |
808 | ac_cv_prog_cc_g=no | |
809 | fi | |
810 | rm -f conftest* | |
811 | ||
812 | fi | |
813 | ||
814 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
815 | if test "$ac_test_CFLAGS" = set; then | |
816 | CFLAGS="$ac_save_CFLAGS" | |
817 | elif test $ac_cv_prog_cc_g = yes; then | |
818 | if test "$GCC" = yes; then | |
819 | CFLAGS="-g -O2" | |
820 | else | |
821 | CFLAGS="-g" | |
822 | fi | |
823 | else | |
824 | if test "$GCC" = yes; then | |
825 | CFLAGS="-O2" | |
826 | else | |
827 | CFLAGS= | |
828 | fi | |
829 | fi | |
830 | ||
14abd0fb MK |
831 | cat >> confdefs.h <<\EOF |
832 | #define _GNU_SOURCE 1 | |
833 | EOF | |
834 | ||
835 | ||
c906108c | 836 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
d28f9cdf | 837 | echo "configure:838: checking how to run the C preprocessor" >&5 |
c906108c SS |
838 | # On Suns, sometimes $CPP names a directory. |
839 | if test -n "$CPP" && test -d "$CPP"; then | |
840 | CPP= | |
841 | fi | |
842 | if test -z "$CPP"; then | |
843 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
845 | else | |
846 | # This must be in double quotes, not single quotes, because CPP may get | |
847 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
848 | CPP="${CC-cc} -E" | |
849 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
850 | # not just through cpp. | |
851 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 852 | #line 853 "configure" |
c906108c SS |
853 | #include "confdefs.h" |
854 | #include <assert.h> | |
855 | Syntax Error | |
856 | EOF | |
857 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 858 | { (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
859 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
860 | if test -z "$ac_err"; then | |
861 | : | |
862 | else | |
863 | echo "$ac_err" >&5 | |
864 | echo "configure: failed program was:" >&5 | |
865 | cat conftest.$ac_ext >&5 | |
866 | rm -rf conftest* | |
867 | CPP="${CC-cc} -E -traditional-cpp" | |
868 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 869 | #line 870 "configure" |
c906108c SS |
870 | #include "confdefs.h" |
871 | #include <assert.h> | |
872 | Syntax Error | |
873 | EOF | |
874 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 875 | { (eval echo configure:876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
876 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
877 | if test -z "$ac_err"; then | |
878 | : | |
879 | else | |
880 | echo "$ac_err" >&5 | |
881 | echo "configure: failed program was:" >&5 | |
882 | cat conftest.$ac_ext >&5 | |
883 | rm -rf conftest* | |
884 | CPP="${CC-cc} -nologo -E" | |
885 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 886 | #line 887 "configure" |
c906108c SS |
887 | #include "confdefs.h" |
888 | #include <assert.h> | |
889 | Syntax Error | |
890 | EOF | |
891 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 892 | { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
893 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
894 | if test -z "$ac_err"; then | |
895 | : | |
896 | else | |
897 | echo "$ac_err" >&5 | |
898 | echo "configure: failed program was:" >&5 | |
899 | cat conftest.$ac_ext >&5 | |
900 | rm -rf conftest* | |
901 | CPP=/lib/cpp | |
902 | fi | |
903 | rm -f conftest* | |
904 | fi | |
905 | rm -f conftest* | |
906 | fi | |
907 | rm -f conftest* | |
908 | ac_cv_prog_CPP="$CPP" | |
909 | fi | |
910 | CPP="$ac_cv_prog_CPP" | |
911 | else | |
912 | ac_cv_prog_CPP="$CPP" | |
913 | fi | |
914 | echo "$ac_t""$CPP" 1>&6 | |
915 | ||
916 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
d28f9cdf | 917 | echo "configure:918: checking for AIX" >&5 |
c906108c | 918 | cat > conftest.$ac_ext <<EOF |
d28f9cdf | 919 | #line 920 "configure" |
c906108c SS |
920 | #include "confdefs.h" |
921 | #ifdef _AIX | |
922 | yes | |
923 | #endif | |
924 | ||
925 | EOF | |
926 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
927 | egrep "yes" >/dev/null 2>&1; then | |
928 | rm -rf conftest* | |
929 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
930 | #define _ALL_SOURCE 1 | |
931 | EOF | |
932 | ||
933 | else | |
934 | rm -rf conftest* | |
935 | echo "$ac_t""no" 1>&6 | |
936 | fi | |
937 | rm -f conftest* | |
938 | ||
939 | ||
56157b4a | 940 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
d28f9cdf | 941 | echo "configure:942: checking for POSIXized ISC" >&5 |
56157b4a AC |
942 | if test -d /etc/conf/kconfig.d && |
943 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
944 | then | |
945 | echo "$ac_t""yes" 1>&6 | |
946 | ISC=yes # If later tests want to check for ISC. | |
947 | cat >> confdefs.h <<\EOF | |
948 | #define _POSIX_SOURCE 1 | |
c906108c SS |
949 | EOF |
950 | ||
56157b4a AC |
951 | if test "$GCC" = yes; then |
952 | CC="$CC -posix" | |
953 | else | |
954 | CC="$CC -Xp" | |
955 | fi | |
c906108c SS |
956 | else |
957 | echo "$ac_t""no" 1>&6 | |
56157b4a | 958 | ISC= |
c906108c SS |
959 | fi |
960 | ||
961 | ||
962 | ||
963 | ||
964 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 | |
d28f9cdf | 965 | echo "configure:966: checking for ${CC-cc} option to accept ANSI C" >&5 |
c906108c SS |
966 | if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then |
967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
968 | else | |
969 | am_cv_prog_cc_stdc=no | |
970 | ac_save_CC="$CC" | |
971 | # Don't try gcc -ansi; that turns off useful extensions and | |
972 | # breaks some systems' header files. | |
973 | # AIX -qlanglvl=ansi | |
974 | # Ultrix and OSF/1 -std1 | |
56157b4a AC |
975 | # HP-UX 10.20 and later -Ae |
976 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
c906108c | 977 | # SVR4 -Xc -D__EXTENSIONS__ |
56157b4a | 978 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
c906108c SS |
979 | do |
980 | CC="$ac_save_CC $ac_arg" | |
981 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 982 | #line 983 "configure" |
c906108c SS |
983 | #include "confdefs.h" |
984 | #include <stdarg.h> | |
985 | #include <stdio.h> | |
986 | #include <sys/types.h> | |
987 | #include <sys/stat.h> | |
988 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
989 | struct buf { int x; }; | |
990 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
991 | static char *e (p, i) | |
992 | char **p; | |
993 | int i; | |
994 | { | |
995 | return p[i]; | |
996 | } | |
997 | static char *f (char * (*g) (char **, int), char **p, ...) | |
998 | { | |
999 | char *s; | |
1000 | va_list v; | |
1001 | va_start (v,p); | |
1002 | s = g (p, va_arg (v,int)); | |
1003 | va_end (v); | |
1004 | return s; | |
1005 | } | |
1006 | int test (int i, double x); | |
1007 | struct s1 {int (*f) (int a);}; | |
1008 | struct s2 {int (*f) (double a);}; | |
1009 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
1010 | int argc; | |
1011 | char **argv; | |
1012 | ||
1013 | int main() { | |
1014 | ||
1015 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
1016 | ||
1017 | ; return 0; } | |
1018 | EOF | |
d28f9cdf | 1019 | if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1020 | rm -rf conftest* |
1021 | am_cv_prog_cc_stdc="$ac_arg"; break | |
1022 | else | |
1023 | echo "configure: failed program was:" >&5 | |
1024 | cat conftest.$ac_ext >&5 | |
1025 | fi | |
1026 | rm -f conftest* | |
1027 | done | |
1028 | CC="$ac_save_CC" | |
1029 | ||
1030 | fi | |
1031 | ||
1032 | if test -z "$am_cv_prog_cc_stdc"; then | |
1033 | echo "$ac_t""none needed" 1>&6 | |
1034 | else | |
1035 | echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 | |
1036 | fi | |
1037 | case "x$am_cv_prog_cc_stdc" in | |
1038 | x|xno) ;; | |
1039 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
1040 | esac | |
1041 | ||
1042 | ||
1043 | ac_aux_dir= | |
1044 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1045 | if test -f $ac_dir/install-sh; then | |
1046 | ac_aux_dir=$ac_dir | |
1047 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1048 | break | |
1049 | elif test -f $ac_dir/install.sh; then | |
1050 | ac_aux_dir=$ac_dir | |
1051 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1052 | break | |
1053 | fi | |
1054 | done | |
1055 | if test -z "$ac_aux_dir"; then | |
1056 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1057 | fi | |
1058 | ac_config_guess=$ac_aux_dir/config.guess | |
1059 | ac_config_sub=$ac_aux_dir/config.sub | |
1060 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1061 | ||
1062 | ||
1063 | # Do some error checking and defaulting for the host and target type. | |
1064 | # The inputs are: | |
1065 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1066 | # | |
1067 | # The rules are: | |
1068 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1069 | # same time. | |
1070 | # 2. Host defaults to nonopt. | |
1071 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1072 | # as determined by config.guess. | |
1073 | # 4. Target and build default to nonopt. | |
1074 | # 5. If nonopt is not specified, then target and build default to host. | |
1075 | ||
1076 | # The aliases save the names the user supplied, while $host etc. | |
1077 | # will get canonicalized. | |
1078 | case $host---$target---$nonopt in | |
1079 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1080 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1081 | esac | |
1082 | ||
1083 | ||
1084 | # Make sure we can run config.sub. | |
1085 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1086 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1087 | fi | |
1088 | ||
1089 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
d28f9cdf | 1090 | echo "configure:1091: checking host system type" >&5 |
c906108c SS |
1091 | |
1092 | host_alias=$host | |
1093 | case "$host_alias" in | |
1094 | NONE) | |
1095 | case $nonopt in | |
1096 | NONE) | |
1097 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1098 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1099 | fi ;; | |
1100 | *) host_alias=$nonopt ;; | |
1101 | esac ;; | |
1102 | esac | |
1103 | ||
1104 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1105 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1106 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1107 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1108 | echo "$ac_t""$host" 1>&6 | |
1109 | ||
1110 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
d28f9cdf | 1111 | echo "configure:1112: checking target system type" >&5 |
c906108c SS |
1112 | |
1113 | target_alias=$target | |
1114 | case "$target_alias" in | |
1115 | NONE) | |
1116 | case $nonopt in | |
1117 | NONE) target_alias=$host_alias ;; | |
1118 | *) target_alias=$nonopt ;; | |
1119 | esac ;; | |
1120 | esac | |
1121 | ||
1122 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1123 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1124 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1125 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1126 | echo "$ac_t""$target" 1>&6 | |
1127 | ||
1128 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
d28f9cdf | 1129 | echo "configure:1130: checking build system type" >&5 |
c906108c SS |
1130 | |
1131 | build_alias=$build | |
1132 | case "$build_alias" in | |
1133 | NONE) | |
1134 | case $nonopt in | |
1135 | NONE) build_alias=$host_alias ;; | |
1136 | *) build_alias=$nonopt ;; | |
1137 | esac ;; | |
1138 | esac | |
1139 | ||
1140 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1141 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1142 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1143 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1144 | echo "$ac_t""$build" 1>&6 | |
1145 | ||
1146 | test "$host_alias" != "$target_alias" && | |
1147 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1148 | NONENONEs,x,x, && | |
1149 | program_prefix=${target_alias}- | |
1150 | ||
1151 | ||
8bb2c122 MK |
1152 | # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13 |
1153 | # doesn't support cross-compilation, but the one from Autoconf 2.5x | |
1154 | # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to | |
1155 | # deal with the lossage. Note that CY_GNU_GETTEXT currently calls | |
1156 | # AC_PROG_RANLIB. This can be removed when we switch to # Autoconf | |
1157 | # 2.5x. | |
1158 | if test $host != $build; then | |
1159 | ac_tool_prefix=${host_alias}- | |
1160 | else | |
1161 | ac_tool_prefix= | |
1162 | fi | |
1163 | ||
1164 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1165 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1166 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 1167 | echo "configure:1168: checking for $ac_word" >&5 |
8bb2c122 MK |
1168 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1170 | else | |
1171 | if test -n "$RANLIB"; then | |
1172 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1173 | else | |
1174 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1175 | ac_dummy="$PATH" | |
1176 | for ac_dir in $ac_dummy; do | |
1177 | test -z "$ac_dir" && ac_dir=. | |
1178 | if test -f $ac_dir/$ac_word; then | |
1179 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1180 | break | |
1181 | fi | |
1182 | done | |
1183 | IFS="$ac_save_ifs" | |
1184 | fi | |
1185 | fi | |
1186 | RANLIB="$ac_cv_prog_RANLIB" | |
1187 | if test -n "$RANLIB"; then | |
1188 | echo "$ac_t""$RANLIB" 1>&6 | |
1189 | else | |
1190 | echo "$ac_t""no" 1>&6 | |
1191 | fi | |
1192 | ||
1193 | ||
1194 | if test -z "$ac_cv_prog_RANLIB"; then | |
1195 | if test -n "$ac_tool_prefix"; then | |
1196 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1197 | set dummy ranlib; ac_word=$2 | |
1198 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 1199 | echo "configure:1200: checking for $ac_word" >&5 |
8bb2c122 MK |
1200 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1201 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1202 | else | |
1203 | if test -n "$RANLIB"; then | |
1204 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1205 | else | |
1206 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1207 | ac_dummy="$PATH" | |
1208 | for ac_dir in $ac_dummy; do | |
1209 | test -z "$ac_dir" && ac_dir=. | |
1210 | if test -f $ac_dir/$ac_word; then | |
1211 | ac_cv_prog_RANLIB="ranlib" | |
1212 | break | |
1213 | fi | |
1214 | done | |
1215 | IFS="$ac_save_ifs" | |
1216 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1217 | fi | |
1218 | fi | |
1219 | RANLIB="$ac_cv_prog_RANLIB" | |
1220 | if test -n "$RANLIB"; then | |
1221 | echo "$ac_t""$RANLIB" 1>&6 | |
1222 | else | |
1223 | echo "$ac_t""no" 1>&6 | |
1224 | fi | |
1225 | ||
1226 | else | |
1227 | RANLIB=":" | |
1228 | fi | |
1229 | fi | |
1230 | ||
1231 | ||
c906108c SS |
1232 | ALL_LINGUAS= |
1233 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
d28f9cdf | 1234 | echo "configure:1235: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
c906108c SS |
1235 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1236 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1237 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1238 | else | |
1239 | cat > conftestmake <<\EOF | |
1240 | all: | |
1241 | @echo 'ac_maketemp="${MAKE}"' | |
1242 | EOF | |
1243 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1244 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1245 | if test -n "$ac_maketemp"; then | |
1246 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1247 | else | |
1248 | eval ac_cv_prog_make_${ac_make}_set=no | |
1249 | fi | |
1250 | rm -f conftestmake | |
1251 | fi | |
1252 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1253 | echo "$ac_t""yes" 1>&6 | |
1254 | SET_MAKE= | |
1255 | else | |
1256 | echo "$ac_t""no" 1>&6 | |
1257 | SET_MAKE="MAKE=${MAKE-make}" | |
1258 | fi | |
1259 | ||
1260 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1261 | set dummy ranlib; ac_word=$2 | |
1262 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 1263 | echo "configure:1264: checking for $ac_word" >&5 |
c906108c SS |
1264 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1265 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1266 | else | |
1267 | if test -n "$RANLIB"; then | |
1268 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1269 | else | |
1270 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1271 | ac_dummy="$PATH" | |
1272 | for ac_dir in $ac_dummy; do | |
1273 | test -z "$ac_dir" && ac_dir=. | |
1274 | if test -f $ac_dir/$ac_word; then | |
1275 | ac_cv_prog_RANLIB="ranlib" | |
1276 | break | |
1277 | fi | |
1278 | done | |
1279 | IFS="$ac_save_ifs" | |
1280 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1281 | fi | |
1282 | fi | |
1283 | RANLIB="$ac_cv_prog_RANLIB" | |
1284 | if test -n "$RANLIB"; then | |
1285 | echo "$ac_t""$RANLIB" 1>&6 | |
1286 | else | |
1287 | echo "$ac_t""no" 1>&6 | |
1288 | fi | |
1289 | ||
1290 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
d28f9cdf | 1291 | echo "configure:1292: checking for ANSI C header files" >&5 |
c906108c SS |
1292 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1294 | else | |
1295 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1296 | #line 1297 "configure" |
c906108c SS |
1297 | #include "confdefs.h" |
1298 | #include <stdlib.h> | |
1299 | #include <stdarg.h> | |
1300 | #include <string.h> | |
1301 | #include <float.h> | |
1302 | EOF | |
1303 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 1304 | { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1305 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1306 | if test -z "$ac_err"; then | |
1307 | rm -rf conftest* | |
1308 | ac_cv_header_stdc=yes | |
1309 | else | |
1310 | echo "$ac_err" >&5 | |
1311 | echo "configure: failed program was:" >&5 | |
1312 | cat conftest.$ac_ext >&5 | |
1313 | rm -rf conftest* | |
1314 | ac_cv_header_stdc=no | |
1315 | fi | |
1316 | rm -f conftest* | |
1317 | ||
1318 | if test $ac_cv_header_stdc = yes; then | |
1319 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1320 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1321 | #line 1322 "configure" |
c906108c SS |
1322 | #include "confdefs.h" |
1323 | #include <string.h> | |
1324 | EOF | |
1325 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1326 | egrep "memchr" >/dev/null 2>&1; then | |
1327 | : | |
1328 | else | |
1329 | rm -rf conftest* | |
1330 | ac_cv_header_stdc=no | |
1331 | fi | |
1332 | rm -f conftest* | |
1333 | ||
1334 | fi | |
1335 | ||
1336 | if test $ac_cv_header_stdc = yes; then | |
1337 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1338 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1339 | #line 1340 "configure" |
c906108c SS |
1340 | #include "confdefs.h" |
1341 | #include <stdlib.h> | |
1342 | EOF | |
1343 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1344 | egrep "free" >/dev/null 2>&1; then | |
1345 | : | |
1346 | else | |
1347 | rm -rf conftest* | |
1348 | ac_cv_header_stdc=no | |
1349 | fi | |
1350 | rm -f conftest* | |
1351 | ||
1352 | fi | |
1353 | ||
1354 | if test $ac_cv_header_stdc = yes; then | |
1355 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1356 | if test "$cross_compiling" = yes; then | |
1357 | : | |
1358 | else | |
1359 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1360 | #line 1361 "configure" |
c906108c SS |
1361 | #include "confdefs.h" |
1362 | #include <ctype.h> | |
1363 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1364 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1365 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1366 | int main () { int i; for (i = 0; i < 256; i++) | |
1367 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1368 | exit (0); } | |
1369 | ||
1370 | EOF | |
d28f9cdf | 1371 | if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1372 | then |
1373 | : | |
1374 | else | |
1375 | echo "configure: failed program was:" >&5 | |
1376 | cat conftest.$ac_ext >&5 | |
1377 | rm -fr conftest* | |
1378 | ac_cv_header_stdc=no | |
1379 | fi | |
1380 | rm -fr conftest* | |
1381 | fi | |
1382 | ||
1383 | fi | |
1384 | fi | |
1385 | ||
1386 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1387 | if test $ac_cv_header_stdc = yes; then | |
1388 | cat >> confdefs.h <<\EOF | |
1389 | #define STDC_HEADERS 1 | |
1390 | EOF | |
1391 | ||
1392 | fi | |
1393 | ||
1394 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
d28f9cdf | 1395 | echo "configure:1396: checking for working const" >&5 |
c906108c SS |
1396 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1398 | else | |
1399 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1400 | #line 1401 "configure" |
c906108c SS |
1401 | #include "confdefs.h" |
1402 | ||
1403 | int main() { | |
1404 | ||
1405 | /* Ultrix mips cc rejects this. */ | |
1406 | typedef int charset[2]; const charset x; | |
1407 | /* SunOS 4.1.1 cc rejects this. */ | |
1408 | char const *const *ccp; | |
1409 | char **p; | |
1410 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1411 | struct point {int x, y;}; | |
1412 | static struct point const zero = {0,0}; | |
1413 | /* AIX XL C 1.02.0.0 rejects this. | |
1414 | It does not let you subtract one const X* pointer from another in an arm | |
1415 | of an if-expression whose if-part is not a constant expression */ | |
1416 | const char *g = "string"; | |
1417 | ccp = &g + (g ? g-g : 0); | |
1418 | /* HPUX 7.0 cc rejects these. */ | |
1419 | ++ccp; | |
1420 | p = (char**) ccp; | |
1421 | ccp = (char const *const *) p; | |
1422 | { /* SCO 3.2v4 cc rejects this. */ | |
1423 | char *t; | |
1424 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1425 | ||
1426 | *t++ = 0; | |
1427 | } | |
1428 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1429 | int x[] = {25, 17}; | |
1430 | const int *foo = &x[0]; | |
1431 | ++foo; | |
1432 | } | |
1433 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1434 | typedef const int *iptr; | |
1435 | iptr p = 0; | |
1436 | ++p; | |
1437 | } | |
1438 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1439 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1440 | struct s { int j; const int *ap[3]; }; | |
1441 | struct s *b; b->j = 5; | |
1442 | } | |
1443 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1444 | const int foo = 10; | |
1445 | } | |
1446 | ||
1447 | ; return 0; } | |
1448 | EOF | |
d28f9cdf | 1449 | if { (eval echo configure:1450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1450 | rm -rf conftest* |
1451 | ac_cv_c_const=yes | |
1452 | else | |
1453 | echo "configure: failed program was:" >&5 | |
1454 | cat conftest.$ac_ext >&5 | |
1455 | rm -rf conftest* | |
1456 | ac_cv_c_const=no | |
1457 | fi | |
1458 | rm -f conftest* | |
1459 | fi | |
1460 | ||
1461 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1462 | if test $ac_cv_c_const = no; then | |
1463 | cat >> confdefs.h <<\EOF | |
1464 | #define const | |
1465 | EOF | |
1466 | ||
1467 | fi | |
1468 | ||
1469 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
d28f9cdf | 1470 | echo "configure:1471: checking for inline" >&5 |
c906108c SS |
1471 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1472 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1473 | else | |
1474 | ac_cv_c_inline=no | |
1475 | for ac_kw in inline __inline__ __inline; do | |
1476 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1477 | #line 1478 "configure" |
c906108c SS |
1478 | #include "confdefs.h" |
1479 | ||
1480 | int main() { | |
1481 | } $ac_kw foo() { | |
1482 | ; return 0; } | |
1483 | EOF | |
d28f9cdf | 1484 | if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
1485 | rm -rf conftest* |
1486 | ac_cv_c_inline=$ac_kw; break | |
1487 | else | |
1488 | echo "configure: failed program was:" >&5 | |
1489 | cat conftest.$ac_ext >&5 | |
1490 | fi | |
1491 | rm -f conftest* | |
1492 | done | |
1493 | ||
1494 | fi | |
1495 | ||
1496 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1497 | case "$ac_cv_c_inline" in | |
1498 | inline | yes) ;; | |
1499 | no) cat >> confdefs.h <<\EOF | |
1500 | #define inline | |
1501 | EOF | |
1502 | ;; | |
1503 | *) cat >> confdefs.h <<EOF | |
1504 | #define inline $ac_cv_c_inline | |
1505 | EOF | |
1506 | ;; | |
1507 | esac | |
1508 | ||
1509 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
d28f9cdf | 1510 | echo "configure:1511: checking for off_t" >&5 |
c906108c SS |
1511 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1513 | else | |
1514 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1515 | #line 1516 "configure" |
c906108c SS |
1516 | #include "confdefs.h" |
1517 | #include <sys/types.h> | |
1518 | #if STDC_HEADERS | |
1519 | #include <stdlib.h> | |
1520 | #include <stddef.h> | |
1521 | #endif | |
1522 | EOF | |
1523 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1524 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1525 | rm -rf conftest* | |
1526 | ac_cv_type_off_t=yes | |
1527 | else | |
1528 | rm -rf conftest* | |
1529 | ac_cv_type_off_t=no | |
1530 | fi | |
1531 | rm -f conftest* | |
1532 | ||
1533 | fi | |
1534 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1535 | if test $ac_cv_type_off_t = no; then | |
1536 | cat >> confdefs.h <<\EOF | |
1537 | #define off_t long | |
1538 | EOF | |
1539 | ||
1540 | fi | |
1541 | ||
1542 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
d28f9cdf | 1543 | echo "configure:1544: checking for size_t" >&5 |
c906108c SS |
1544 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1546 | else | |
1547 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1548 | #line 1549 "configure" |
c906108c SS |
1549 | #include "confdefs.h" |
1550 | #include <sys/types.h> | |
1551 | #if STDC_HEADERS | |
1552 | #include <stdlib.h> | |
1553 | #include <stddef.h> | |
1554 | #endif | |
1555 | EOF | |
1556 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1557 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1558 | rm -rf conftest* | |
1559 | ac_cv_type_size_t=yes | |
1560 | else | |
1561 | rm -rf conftest* | |
1562 | ac_cv_type_size_t=no | |
1563 | fi | |
1564 | rm -f conftest* | |
1565 | ||
1566 | fi | |
1567 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1568 | if test $ac_cv_type_size_t = no; then | |
1569 | cat >> confdefs.h <<\EOF | |
1570 | #define size_t unsigned | |
1571 | EOF | |
1572 | ||
1573 | fi | |
1574 | ||
1575 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1576 | # for constant arguments. Useless! | |
1577 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
d28f9cdf | 1578 | echo "configure:1579: checking for working alloca.h" >&5 |
c906108c SS |
1579 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1581 | else | |
1582 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1583 | #line 1584 "configure" |
c906108c SS |
1584 | #include "confdefs.h" |
1585 | #include <alloca.h> | |
1586 | int main() { | |
1587 | char *p = alloca(2 * sizeof(int)); | |
1588 | ; return 0; } | |
1589 | EOF | |
d28f9cdf | 1590 | if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1591 | rm -rf conftest* |
1592 | ac_cv_header_alloca_h=yes | |
1593 | else | |
1594 | echo "configure: failed program was:" >&5 | |
1595 | cat conftest.$ac_ext >&5 | |
1596 | rm -rf conftest* | |
1597 | ac_cv_header_alloca_h=no | |
1598 | fi | |
1599 | rm -f conftest* | |
1600 | fi | |
1601 | ||
1602 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1603 | if test $ac_cv_header_alloca_h = yes; then | |
1604 | cat >> confdefs.h <<\EOF | |
1605 | #define HAVE_ALLOCA_H 1 | |
1606 | EOF | |
1607 | ||
1608 | fi | |
1609 | ||
1610 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
d28f9cdf | 1611 | echo "configure:1612: checking for alloca" >&5 |
c906108c SS |
1612 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1613 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1614 | else | |
1615 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1616 | #line 1617 "configure" |
c906108c SS |
1617 | #include "confdefs.h" |
1618 | ||
1619 | #ifdef __GNUC__ | |
1620 | # define alloca __builtin_alloca | |
1621 | #else | |
1622 | # ifdef _MSC_VER | |
1623 | # include <malloc.h> | |
1624 | # define alloca _alloca | |
1625 | # else | |
1626 | # if HAVE_ALLOCA_H | |
1627 | # include <alloca.h> | |
1628 | # else | |
1629 | # ifdef _AIX | |
1630 | #pragma alloca | |
1631 | # else | |
1632 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1633 | char *alloca (); | |
1634 | # endif | |
1635 | # endif | |
1636 | # endif | |
1637 | # endif | |
1638 | #endif | |
1639 | ||
1640 | int main() { | |
1641 | char *p = (char *) alloca(1); | |
1642 | ; return 0; } | |
1643 | EOF | |
d28f9cdf | 1644 | if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1645 | rm -rf conftest* |
1646 | ac_cv_func_alloca_works=yes | |
1647 | else | |
1648 | echo "configure: failed program was:" >&5 | |
1649 | cat conftest.$ac_ext >&5 | |
1650 | rm -rf conftest* | |
1651 | ac_cv_func_alloca_works=no | |
1652 | fi | |
1653 | rm -f conftest* | |
1654 | fi | |
1655 | ||
1656 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1657 | if test $ac_cv_func_alloca_works = yes; then | |
1658 | cat >> confdefs.h <<\EOF | |
1659 | #define HAVE_ALLOCA 1 | |
1660 | EOF | |
1661 | ||
1662 | fi | |
1663 | ||
1664 | if test $ac_cv_func_alloca_works = no; then | |
1665 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1666 | # that cause trouble. Some versions do not even contain alloca or | |
1667 | # contain a buggy version. If you still want to use their alloca, | |
1668 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1669 | ALLOCA=alloca.${ac_objext} | |
1670 | cat >> confdefs.h <<\EOF | |
1671 | #define C_ALLOCA 1 | |
1672 | EOF | |
1673 | ||
1674 | ||
1675 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
d28f9cdf | 1676 | echo "configure:1677: checking whether alloca needs Cray hooks" >&5 |
c906108c SS |
1677 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1678 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1679 | else | |
1680 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1681 | #line 1682 "configure" |
c906108c SS |
1682 | #include "confdefs.h" |
1683 | #if defined(CRAY) && ! defined(CRAY2) | |
1684 | webecray | |
1685 | #else | |
1686 | wenotbecray | |
1687 | #endif | |
1688 | ||
1689 | EOF | |
1690 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1691 | egrep "webecray" >/dev/null 2>&1; then | |
1692 | rm -rf conftest* | |
1693 | ac_cv_os_cray=yes | |
1694 | else | |
1695 | rm -rf conftest* | |
1696 | ac_cv_os_cray=no | |
1697 | fi | |
1698 | rm -f conftest* | |
1699 | ||
1700 | fi | |
1701 | ||
1702 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1703 | if test $ac_cv_os_cray = yes; then | |
1704 | for ac_func in _getb67 GETB67 getb67; do | |
1705 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 1706 | echo "configure:1707: checking for $ac_func" >&5 |
c906108c SS |
1707 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1709 | else | |
1710 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1711 | #line 1712 "configure" |
c906108c SS |
1712 | #include "confdefs.h" |
1713 | /* System header to define __stub macros and hopefully few prototypes, | |
1714 | which can conflict with char $ac_func(); below. */ | |
1715 | #include <assert.h> | |
1716 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1717 | /* We use char because int might match the return type of a gcc2 | |
1718 | builtin and then its argument prototype would still apply. */ | |
1719 | char $ac_func(); | |
1720 | ||
1721 | int main() { | |
1722 | ||
1723 | /* The GNU C library defines this for functions which it implements | |
1724 | to always fail with ENOSYS. Some functions are actually named | |
1725 | something starting with __ and the normal name is an alias. */ | |
1726 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1727 | choke me | |
1728 | #else | |
1729 | $ac_func(); | |
1730 | #endif | |
1731 | ||
1732 | ; return 0; } | |
1733 | EOF | |
d28f9cdf | 1734 | if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1735 | rm -rf conftest* |
1736 | eval "ac_cv_func_$ac_func=yes" | |
1737 | else | |
1738 | echo "configure: failed program was:" >&5 | |
1739 | cat conftest.$ac_ext >&5 | |
1740 | rm -rf conftest* | |
1741 | eval "ac_cv_func_$ac_func=no" | |
1742 | fi | |
1743 | rm -f conftest* | |
1744 | fi | |
1745 | ||
1746 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1747 | echo "$ac_t""yes" 1>&6 | |
1748 | cat >> confdefs.h <<EOF | |
1749 | #define CRAY_STACKSEG_END $ac_func | |
1750 | EOF | |
1751 | ||
1752 | break | |
1753 | else | |
1754 | echo "$ac_t""no" 1>&6 | |
1755 | fi | |
1756 | ||
1757 | done | |
1758 | fi | |
1759 | ||
1760 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
d28f9cdf | 1761 | echo "configure:1762: checking stack direction for C alloca" >&5 |
c906108c SS |
1762 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1764 | else | |
1765 | if test "$cross_compiling" = yes; then | |
1766 | ac_cv_c_stack_direction=0 | |
1767 | else | |
1768 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1769 | #line 1770 "configure" |
c906108c SS |
1770 | #include "confdefs.h" |
1771 | find_stack_direction () | |
1772 | { | |
1773 | static char *addr = 0; | |
1774 | auto char dummy; | |
1775 | if (addr == 0) | |
1776 | { | |
1777 | addr = &dummy; | |
1778 | return find_stack_direction (); | |
1779 | } | |
1780 | else | |
1781 | return (&dummy > addr) ? 1 : -1; | |
1782 | } | |
1783 | main () | |
1784 | { | |
1785 | exit (find_stack_direction() < 0); | |
1786 | } | |
1787 | EOF | |
d28f9cdf | 1788 | if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
1789 | then |
1790 | ac_cv_c_stack_direction=1 | |
1791 | else | |
1792 | echo "configure: failed program was:" >&5 | |
1793 | cat conftest.$ac_ext >&5 | |
1794 | rm -fr conftest* | |
1795 | ac_cv_c_stack_direction=-1 | |
1796 | fi | |
1797 | rm -fr conftest* | |
1798 | fi | |
1799 | ||
1800 | fi | |
1801 | ||
1802 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1803 | cat >> confdefs.h <<EOF | |
1804 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1805 | EOF | |
1806 | ||
1807 | fi | |
1808 | ||
c41b7eb1 | 1809 | for ac_hdr in unistd.h |
c906108c SS |
1810 | do |
1811 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1812 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 1813 | echo "configure:1814: checking for $ac_hdr" >&5 |
c906108c SS |
1814 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1815 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1816 | else | |
1817 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1818 | #line 1819 "configure" |
c906108c SS |
1819 | #include "confdefs.h" |
1820 | #include <$ac_hdr> | |
1821 | EOF | |
1822 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 1823 | { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
1824 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1825 | if test -z "$ac_err"; then | |
1826 | rm -rf conftest* | |
1827 | eval "ac_cv_header_$ac_safe=yes" | |
1828 | else | |
1829 | echo "$ac_err" >&5 | |
1830 | echo "configure: failed program was:" >&5 | |
1831 | cat conftest.$ac_ext >&5 | |
1832 | rm -rf conftest* | |
1833 | eval "ac_cv_header_$ac_safe=no" | |
1834 | fi | |
1835 | rm -f conftest* | |
1836 | fi | |
1837 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1838 | echo "$ac_t""yes" 1>&6 | |
1839 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1840 | cat >> confdefs.h <<EOF | |
1841 | #define $ac_tr_hdr 1 | |
1842 | EOF | |
1843 | ||
1844 | else | |
1845 | echo "$ac_t""no" 1>&6 | |
1846 | fi | |
1847 | done | |
1848 | ||
1849 | for ac_func in getpagesize | |
1850 | do | |
1851 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 1852 | echo "configure:1853: checking for $ac_func" >&5 |
c906108c SS |
1853 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1854 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1855 | else | |
1856 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1857 | #line 1858 "configure" |
c906108c SS |
1858 | #include "confdefs.h" |
1859 | /* System header to define __stub macros and hopefully few prototypes, | |
1860 | which can conflict with char $ac_func(); below. */ | |
1861 | #include <assert.h> | |
1862 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1863 | /* We use char because int might match the return type of a gcc2 | |
1864 | builtin and then its argument prototype would still apply. */ | |
1865 | char $ac_func(); | |
1866 | ||
1867 | int main() { | |
1868 | ||
1869 | /* The GNU C library defines this for functions which it implements | |
1870 | to always fail with ENOSYS. Some functions are actually named | |
1871 | something starting with __ and the normal name is an alias. */ | |
1872 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1873 | choke me | |
1874 | #else | |
1875 | $ac_func(); | |
1876 | #endif | |
1877 | ||
1878 | ; return 0; } | |
1879 | EOF | |
d28f9cdf | 1880 | if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
1881 | rm -rf conftest* |
1882 | eval "ac_cv_func_$ac_func=yes" | |
1883 | else | |
1884 | echo "configure: failed program was:" >&5 | |
1885 | cat conftest.$ac_ext >&5 | |
1886 | rm -rf conftest* | |
1887 | eval "ac_cv_func_$ac_func=no" | |
1888 | fi | |
1889 | rm -f conftest* | |
1890 | fi | |
1891 | ||
1892 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1893 | echo "$ac_t""yes" 1>&6 | |
1894 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1895 | cat >> confdefs.h <<EOF | |
1896 | #define $ac_tr_func 1 | |
1897 | EOF | |
1898 | ||
1899 | else | |
1900 | echo "$ac_t""no" 1>&6 | |
1901 | fi | |
1902 | done | |
1903 | ||
1904 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
d28f9cdf | 1905 | echo "configure:1906: checking for working mmap" >&5 |
c906108c SS |
1906 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1907 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1908 | else | |
1909 | if test "$cross_compiling" = yes; then | |
1910 | ac_cv_func_mmap_fixed_mapped=no | |
1911 | else | |
1912 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 1913 | #line 1914 "configure" |
c906108c SS |
1914 | #include "confdefs.h" |
1915 | ||
1916 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1917 | Here is a matrix of mmap possibilities: | |
1918 | mmap private not fixed | |
1919 | mmap private fixed at somewhere currently unmapped | |
1920 | mmap private fixed at somewhere already mapped | |
1921 | mmap shared not fixed | |
1922 | mmap shared fixed at somewhere currently unmapped | |
1923 | mmap shared fixed at somewhere already mapped | |
1924 | For private mappings, we should verify that changes cannot be read() | |
1925 | back from the file, nor mmap's back from the file at a different | |
1926 | address. (There have been systems where private was not correctly | |
1927 | implemented like the infamous i386 svr4.0, and systems where the | |
1928 | VM page cache was not coherent with the filesystem buffer cache | |
1929 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1930 | For shared mappings, we should conversely verify that changes get | |
1931 | propogated back to all the places they're supposed to be. | |
1932 | ||
1933 | Grep wants private fixed already mapped. | |
1934 | The main things grep needs to know about mmap are: | |
1935 | * does it exist and is it safe to write into the mmap'd area | |
1936 | * how to use it (BSD variants) */ | |
1937 | #include <sys/types.h> | |
1938 | #include <fcntl.h> | |
1939 | #include <sys/mman.h> | |
1940 | ||
1941 | /* This mess was copied from the GNU getpagesize.h. */ | |
1942 | #ifndef HAVE_GETPAGESIZE | |
c41b7eb1 JB |
1943 | # ifdef HAVE_UNISTD_H |
1944 | # include <unistd.h> | |
1945 | # endif | |
c906108c SS |
1946 | |
1947 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1948 | # ifndef HAVE_SYS_PARAM_H | |
1949 | # define HAVE_SYS_PARAM_H 1 | |
1950 | # endif | |
1951 | ||
1952 | # ifdef _SC_PAGESIZE | |
1953 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1954 | # else /* no _SC_PAGESIZE */ | |
1955 | # ifdef HAVE_SYS_PARAM_H | |
1956 | # include <sys/param.h> | |
1957 | # ifdef EXEC_PAGESIZE | |
1958 | # define getpagesize() EXEC_PAGESIZE | |
1959 | # else /* no EXEC_PAGESIZE */ | |
1960 | # ifdef NBPG | |
1961 | # define getpagesize() NBPG * CLSIZE | |
1962 | # ifndef CLSIZE | |
1963 | # define CLSIZE 1 | |
1964 | # endif /* no CLSIZE */ | |
1965 | # else /* no NBPG */ | |
1966 | # ifdef NBPC | |
1967 | # define getpagesize() NBPC | |
1968 | # else /* no NBPC */ | |
1969 | # ifdef PAGESIZE | |
1970 | # define getpagesize() PAGESIZE | |
1971 | # endif /* PAGESIZE */ | |
1972 | # endif /* no NBPC */ | |
1973 | # endif /* no NBPG */ | |
1974 | # endif /* no EXEC_PAGESIZE */ | |
1975 | # else /* no HAVE_SYS_PARAM_H */ | |
1976 | # define getpagesize() 8192 /* punt totally */ | |
1977 | # endif /* no HAVE_SYS_PARAM_H */ | |
1978 | # endif /* no _SC_PAGESIZE */ | |
1979 | ||
1980 | #endif /* no HAVE_GETPAGESIZE */ | |
1981 | ||
1982 | #ifdef __cplusplus | |
1983 | extern "C" { void *malloc(unsigned); } | |
1984 | #else | |
1985 | char *malloc(); | |
1986 | #endif | |
1987 | ||
1988 | int | |
1989 | main() | |
1990 | { | |
1991 | char *data, *data2, *data3; | |
1992 | int i, pagesize; | |
1993 | int fd; | |
1994 | ||
1995 | pagesize = getpagesize(); | |
1996 | ||
1997 | /* | |
1998 | * First, make a file with some known garbage in it. | |
1999 | */ | |
2000 | data = malloc(pagesize); | |
2001 | if (!data) | |
2002 | exit(1); | |
2003 | for (i = 0; i < pagesize; ++i) | |
2004 | *(data + i) = rand(); | |
2005 | umask(0); | |
2006 | fd = creat("conftestmmap", 0600); | |
2007 | if (fd < 0) | |
2008 | exit(1); | |
2009 | if (write(fd, data, pagesize) != pagesize) | |
2010 | exit(1); | |
2011 | close(fd); | |
2012 | ||
2013 | /* | |
2014 | * Next, try to mmap the file at a fixed address which | |
2015 | * already has something else allocated at it. If we can, | |
2016 | * also make sure that we see the same garbage. | |
2017 | */ | |
2018 | fd = open("conftestmmap", O_RDWR); | |
2019 | if (fd < 0) | |
2020 | exit(1); | |
2021 | data2 = malloc(2 * pagesize); | |
2022 | if (!data2) | |
2023 | exit(1); | |
2024 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2025 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2026 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2027 | exit(1); | |
2028 | for (i = 0; i < pagesize; ++i) | |
2029 | if (*(data + i) != *(data2 + i)) | |
2030 | exit(1); | |
2031 | ||
2032 | /* | |
2033 | * Finally, make sure that changes to the mapped area | |
2034 | * do not percolate back to the file as seen by read(). | |
2035 | * (This is a bug on some variants of i386 svr4.0.) | |
2036 | */ | |
2037 | for (i = 0; i < pagesize; ++i) | |
2038 | *(data2 + i) = *(data2 + i) + 1; | |
2039 | data3 = malloc(pagesize); | |
2040 | if (!data3) | |
2041 | exit(1); | |
2042 | if (read(fd, data3, pagesize) != pagesize) | |
2043 | exit(1); | |
2044 | for (i = 0; i < pagesize; ++i) | |
2045 | if (*(data + i) != *(data3 + i)) | |
2046 | exit(1); | |
2047 | close(fd); | |
2048 | unlink("conftestmmap"); | |
2049 | exit(0); | |
2050 | } | |
2051 | ||
2052 | EOF | |
d28f9cdf | 2053 | if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c SS |
2054 | then |
2055 | ac_cv_func_mmap_fixed_mapped=yes | |
2056 | else | |
2057 | echo "configure: failed program was:" >&5 | |
2058 | cat conftest.$ac_ext >&5 | |
2059 | rm -fr conftest* | |
2060 | ac_cv_func_mmap_fixed_mapped=no | |
2061 | fi | |
2062 | rm -fr conftest* | |
2063 | fi | |
2064 | ||
2065 | fi | |
2066 | ||
2067 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2068 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2069 | cat >> confdefs.h <<\EOF | |
2070 | #define HAVE_MMAP 1 | |
2071 | EOF | |
2072 | ||
2073 | fi | |
2074 | ||
2075 | ||
2076 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2077 | unistd.h values.h sys/param.h | |
2078 | do | |
2079 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2080 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 2081 | echo "configure:2082: checking for $ac_hdr" >&5 |
c906108c SS |
2082 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2084 | else | |
2085 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2086 | #line 2087 "configure" |
c906108c SS |
2087 | #include "confdefs.h" |
2088 | #include <$ac_hdr> | |
2089 | EOF | |
2090 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 2091 | { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2092 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2093 | if test -z "$ac_err"; then | |
2094 | rm -rf conftest* | |
2095 | eval "ac_cv_header_$ac_safe=yes" | |
2096 | else | |
2097 | echo "$ac_err" >&5 | |
2098 | echo "configure: failed program was:" >&5 | |
2099 | cat conftest.$ac_ext >&5 | |
2100 | rm -rf conftest* | |
2101 | eval "ac_cv_header_$ac_safe=no" | |
2102 | fi | |
2103 | rm -f conftest* | |
2104 | fi | |
2105 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2106 | echo "$ac_t""yes" 1>&6 | |
2107 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2108 | cat >> confdefs.h <<EOF | |
2109 | #define $ac_tr_hdr 1 | |
2110 | EOF | |
2111 | ||
2112 | else | |
2113 | echo "$ac_t""no" 1>&6 | |
2114 | fi | |
2115 | done | |
2116 | ||
2117 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2118 | __argz_count __argz_stringify __argz_next | |
2119 | do | |
2120 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 2121 | echo "configure:2122: checking for $ac_func" >&5 |
c906108c SS |
2122 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2124 | else | |
2125 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2126 | #line 2127 "configure" |
c906108c SS |
2127 | #include "confdefs.h" |
2128 | /* System header to define __stub macros and hopefully few prototypes, | |
2129 | which can conflict with char $ac_func(); below. */ | |
2130 | #include <assert.h> | |
2131 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2132 | /* We use char because int might match the return type of a gcc2 | |
2133 | builtin and then its argument prototype would still apply. */ | |
2134 | char $ac_func(); | |
2135 | ||
2136 | int main() { | |
2137 | ||
2138 | /* The GNU C library defines this for functions which it implements | |
2139 | to always fail with ENOSYS. Some functions are actually named | |
2140 | something starting with __ and the normal name is an alias. */ | |
2141 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2142 | choke me | |
2143 | #else | |
2144 | $ac_func(); | |
2145 | #endif | |
2146 | ||
2147 | ; return 0; } | |
2148 | EOF | |
d28f9cdf | 2149 | if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2150 | rm -rf conftest* |
2151 | eval "ac_cv_func_$ac_func=yes" | |
2152 | else | |
2153 | echo "configure: failed program was:" >&5 | |
2154 | cat conftest.$ac_ext >&5 | |
2155 | rm -rf conftest* | |
2156 | eval "ac_cv_func_$ac_func=no" | |
2157 | fi | |
2158 | rm -f conftest* | |
2159 | fi | |
2160 | ||
2161 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2162 | echo "$ac_t""yes" 1>&6 | |
2163 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2164 | cat >> confdefs.h <<EOF | |
2165 | #define $ac_tr_func 1 | |
2166 | EOF | |
2167 | ||
2168 | else | |
2169 | echo "$ac_t""no" 1>&6 | |
2170 | fi | |
2171 | done | |
2172 | ||
2173 | ||
2174 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2175 | for ac_func in stpcpy | |
2176 | do | |
2177 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 2178 | echo "configure:2179: checking for $ac_func" >&5 |
c906108c SS |
2179 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2180 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2181 | else | |
2182 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2183 | #line 2184 "configure" |
c906108c SS |
2184 | #include "confdefs.h" |
2185 | /* System header to define __stub macros and hopefully few prototypes, | |
2186 | which can conflict with char $ac_func(); below. */ | |
2187 | #include <assert.h> | |
2188 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2189 | /* We use char because int might match the return type of a gcc2 | |
2190 | builtin and then its argument prototype would still apply. */ | |
2191 | char $ac_func(); | |
2192 | ||
2193 | int main() { | |
2194 | ||
2195 | /* The GNU C library defines this for functions which it implements | |
2196 | to always fail with ENOSYS. Some functions are actually named | |
2197 | something starting with __ and the normal name is an alias. */ | |
2198 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2199 | choke me | |
2200 | #else | |
2201 | $ac_func(); | |
2202 | #endif | |
2203 | ||
2204 | ; return 0; } | |
2205 | EOF | |
d28f9cdf | 2206 | if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2207 | rm -rf conftest* |
2208 | eval "ac_cv_func_$ac_func=yes" | |
2209 | else | |
2210 | echo "configure: failed program was:" >&5 | |
2211 | cat conftest.$ac_ext >&5 | |
2212 | rm -rf conftest* | |
2213 | eval "ac_cv_func_$ac_func=no" | |
2214 | fi | |
2215 | rm -f conftest* | |
2216 | fi | |
2217 | ||
2218 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2219 | echo "$ac_t""yes" 1>&6 | |
2220 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2221 | cat >> confdefs.h <<EOF | |
2222 | #define $ac_tr_func 1 | |
2223 | EOF | |
2224 | ||
2225 | else | |
2226 | echo "$ac_t""no" 1>&6 | |
2227 | fi | |
2228 | done | |
2229 | ||
2230 | fi | |
2231 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2232 | cat >> confdefs.h <<\EOF | |
2233 | #define HAVE_STPCPY 1 | |
2234 | EOF | |
2235 | ||
2236 | fi | |
2237 | ||
2238 | if test $ac_cv_header_locale_h = yes; then | |
2239 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
d28f9cdf | 2240 | echo "configure:2241: checking for LC_MESSAGES" >&5 |
c906108c SS |
2241 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2242 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2243 | else | |
2244 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2245 | #line 2246 "configure" |
c906108c SS |
2246 | #include "confdefs.h" |
2247 | #include <locale.h> | |
2248 | int main() { | |
2249 | return LC_MESSAGES | |
2250 | ; return 0; } | |
2251 | EOF | |
d28f9cdf | 2252 | if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2253 | rm -rf conftest* |
2254 | am_cv_val_LC_MESSAGES=yes | |
2255 | else | |
2256 | echo "configure: failed program was:" >&5 | |
2257 | cat conftest.$ac_ext >&5 | |
2258 | rm -rf conftest* | |
2259 | am_cv_val_LC_MESSAGES=no | |
2260 | fi | |
2261 | rm -f conftest* | |
2262 | fi | |
2263 | ||
2264 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2265 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2266 | cat >> confdefs.h <<\EOF | |
2267 | #define HAVE_LC_MESSAGES 1 | |
2268 | EOF | |
2269 | ||
2270 | fi | |
2271 | fi | |
2272 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
d28f9cdf | 2273 | echo "configure:2274: checking whether NLS is requested" >&5 |
c906108c SS |
2274 | # Check whether --enable-nls or --disable-nls was given. |
2275 | if test "${enable_nls+set}" = set; then | |
2276 | enableval="$enable_nls" | |
2277 | USE_NLS=$enableval | |
2278 | else | |
2279 | USE_NLS=yes | |
2280 | fi | |
2281 | ||
2282 | echo "$ac_t""$USE_NLS" 1>&6 | |
2283 | ||
2284 | ||
2285 | USE_INCLUDED_LIBINTL=no | |
2286 | ||
2287 | if test "$USE_NLS" = "yes"; then | |
2288 | cat >> confdefs.h <<\EOF | |
2289 | #define ENABLE_NLS 1 | |
2290 | EOF | |
2291 | ||
2292 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
d28f9cdf | 2293 | echo "configure:2294: checking whether included gettext is requested" >&5 |
c906108c SS |
2294 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2295 | if test "${with_included_gettext+set}" = set; then | |
2296 | withval="$with_included_gettext" | |
2297 | nls_cv_force_use_gnu_gettext=$withval | |
2298 | else | |
2299 | nls_cv_force_use_gnu_gettext=no | |
2300 | fi | |
2301 | ||
2302 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2303 | ||
2304 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2305 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2306 | nls_cv_header_intl= | |
2307 | nls_cv_header_libgt= | |
2308 | CATOBJEXT=NONE | |
2309 | ||
2310 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2311 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
d28f9cdf | 2312 | echo "configure:2313: checking for libintl.h" >&5 |
c906108c SS |
2313 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2314 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2315 | else | |
2316 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2317 | #line 2318 "configure" |
c906108c SS |
2318 | #include "confdefs.h" |
2319 | #include <libintl.h> | |
2320 | EOF | |
2321 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 2322 | { (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2323 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2324 | if test -z "$ac_err"; then | |
2325 | rm -rf conftest* | |
2326 | eval "ac_cv_header_$ac_safe=yes" | |
2327 | else | |
2328 | echo "$ac_err" >&5 | |
2329 | echo "configure: failed program was:" >&5 | |
2330 | cat conftest.$ac_ext >&5 | |
2331 | rm -rf conftest* | |
2332 | eval "ac_cv_header_$ac_safe=no" | |
2333 | fi | |
2334 | rm -f conftest* | |
2335 | fi | |
2336 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2337 | echo "$ac_t""yes" 1>&6 | |
2338 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
d28f9cdf | 2339 | echo "configure:2340: checking for gettext in libc" >&5 |
c906108c SS |
2340 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2341 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2342 | else | |
2343 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2344 | #line 2345 "configure" |
c906108c SS |
2345 | #include "confdefs.h" |
2346 | #include <libintl.h> | |
2347 | int main() { | |
2348 | return (int) gettext ("") | |
2349 | ; return 0; } | |
2350 | EOF | |
d28f9cdf | 2351 | if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2352 | rm -rf conftest* |
2353 | gt_cv_func_gettext_libc=yes | |
2354 | else | |
2355 | echo "configure: failed program was:" >&5 | |
2356 | cat conftest.$ac_ext >&5 | |
2357 | rm -rf conftest* | |
2358 | gt_cv_func_gettext_libc=no | |
2359 | fi | |
2360 | rm -f conftest* | |
2361 | fi | |
2362 | ||
2363 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2364 | ||
2365 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2366 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
d28f9cdf | 2367 | echo "configure:2368: checking for bindtextdomain in -lintl" >&5 |
c906108c SS |
2368 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2369 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2370 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2371 | else | |
2372 | ac_save_LIBS="$LIBS" | |
2373 | LIBS="-lintl $LIBS" | |
2374 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2375 | #line 2376 "configure" |
c906108c SS |
2376 | #include "confdefs.h" |
2377 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2378 | /* We use char because int might match the return type of a gcc2 | |
2379 | builtin and then its argument prototype would still apply. */ | |
2380 | char bindtextdomain(); | |
2381 | ||
2382 | int main() { | |
2383 | bindtextdomain() | |
2384 | ; return 0; } | |
2385 | EOF | |
d28f9cdf | 2386 | if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2387 | rm -rf conftest* |
2388 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2389 | else | |
2390 | echo "configure: failed program was:" >&5 | |
2391 | cat conftest.$ac_ext >&5 | |
2392 | rm -rf conftest* | |
2393 | eval "ac_cv_lib_$ac_lib_var=no" | |
2394 | fi | |
2395 | rm -f conftest* | |
2396 | LIBS="$ac_save_LIBS" | |
2397 | ||
2398 | fi | |
2399 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2400 | echo "$ac_t""yes" 1>&6 | |
2401 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
d28f9cdf | 2402 | echo "configure:2403: checking for gettext in libintl" >&5 |
c906108c SS |
2403 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2404 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2405 | else | |
2406 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2407 | #line 2408 "configure" |
c906108c SS |
2408 | #include "confdefs.h" |
2409 | ||
2410 | int main() { | |
2411 | return (int) gettext ("") | |
2412 | ; return 0; } | |
2413 | EOF | |
d28f9cdf | 2414 | if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2415 | rm -rf conftest* |
2416 | gt_cv_func_gettext_libintl=yes | |
2417 | else | |
2418 | echo "configure: failed program was:" >&5 | |
2419 | cat conftest.$ac_ext >&5 | |
2420 | rm -rf conftest* | |
2421 | gt_cv_func_gettext_libintl=no | |
2422 | fi | |
2423 | rm -f conftest* | |
2424 | fi | |
2425 | ||
2426 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2427 | else | |
2428 | echo "$ac_t""no" 1>&6 | |
2429 | fi | |
2430 | ||
2431 | fi | |
2432 | ||
2433 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2434 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2435 | cat >> confdefs.h <<\EOF | |
2436 | #define HAVE_GETTEXT 1 | |
2437 | EOF | |
2438 | ||
2439 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2440 | set dummy msgfmt; ac_word=$2 | |
2441 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2442 | echo "configure:2443: checking for $ac_word" >&5 |
c906108c SS |
2443 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2445 | else | |
2446 | case "$MSGFMT" in | |
2447 | /*) | |
2448 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2449 | ;; | |
2450 | *) | |
2451 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2452 | for ac_dir in $PATH; do | |
2453 | test -z "$ac_dir" && ac_dir=. | |
2454 | if test -f $ac_dir/$ac_word; then | |
2455 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2456 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2457 | break | |
2458 | fi | |
2459 | fi | |
2460 | done | |
2461 | IFS="$ac_save_ifs" | |
2462 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2463 | ;; | |
2464 | esac | |
2465 | fi | |
2466 | MSGFMT="$ac_cv_path_MSGFMT" | |
2467 | if test -n "$MSGFMT"; then | |
2468 | echo "$ac_t""$MSGFMT" 1>&6 | |
2469 | else | |
2470 | echo "$ac_t""no" 1>&6 | |
2471 | fi | |
2472 | if test "$MSGFMT" != "no"; then | |
2473 | for ac_func in dcgettext | |
2474 | do | |
2475 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 2476 | echo "configure:2477: checking for $ac_func" >&5 |
c906108c SS |
2477 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2478 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2479 | else | |
2480 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2481 | #line 2482 "configure" |
c906108c SS |
2482 | #include "confdefs.h" |
2483 | /* System header to define __stub macros and hopefully few prototypes, | |
2484 | which can conflict with char $ac_func(); below. */ | |
2485 | #include <assert.h> | |
2486 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2487 | /* We use char because int might match the return type of a gcc2 | |
2488 | builtin and then its argument prototype would still apply. */ | |
2489 | char $ac_func(); | |
2490 | ||
2491 | int main() { | |
2492 | ||
2493 | /* The GNU C library defines this for functions which it implements | |
2494 | to always fail with ENOSYS. Some functions are actually named | |
2495 | something starting with __ and the normal name is an alias. */ | |
2496 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2497 | choke me | |
2498 | #else | |
2499 | $ac_func(); | |
2500 | #endif | |
2501 | ||
2502 | ; return 0; } | |
2503 | EOF | |
d28f9cdf | 2504 | if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2505 | rm -rf conftest* |
2506 | eval "ac_cv_func_$ac_func=yes" | |
2507 | else | |
2508 | echo "configure: failed program was:" >&5 | |
2509 | cat conftest.$ac_ext >&5 | |
2510 | rm -rf conftest* | |
2511 | eval "ac_cv_func_$ac_func=no" | |
2512 | fi | |
2513 | rm -f conftest* | |
2514 | fi | |
2515 | ||
2516 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2517 | echo "$ac_t""yes" 1>&6 | |
2518 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2519 | cat >> confdefs.h <<EOF | |
2520 | #define $ac_tr_func 1 | |
2521 | EOF | |
2522 | ||
2523 | else | |
2524 | echo "$ac_t""no" 1>&6 | |
2525 | fi | |
2526 | done | |
2527 | ||
2528 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2529 | set dummy gmsgfmt; ac_word=$2 | |
2530 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2531 | echo "configure:2532: checking for $ac_word" >&5 |
c906108c SS |
2532 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2534 | else | |
2535 | case "$GMSGFMT" in | |
2536 | /*) | |
2537 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2538 | ;; | |
2539 | ?:/*) | |
2540 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2541 | ;; | |
2542 | *) | |
2543 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2544 | ac_dummy="$PATH" | |
2545 | for ac_dir in $ac_dummy; do | |
2546 | test -z "$ac_dir" && ac_dir=. | |
2547 | if test -f $ac_dir/$ac_word; then | |
2548 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2549 | break | |
2550 | fi | |
2551 | done | |
2552 | IFS="$ac_save_ifs" | |
2553 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2554 | ;; | |
2555 | esac | |
2556 | fi | |
2557 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2558 | if test -n "$GMSGFMT"; then | |
2559 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2560 | else | |
2561 | echo "$ac_t""no" 1>&6 | |
2562 | fi | |
2563 | ||
2564 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2565 | set dummy xgettext; ac_word=$2 | |
2566 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2567 | echo "configure:2568: checking for $ac_word" >&5 |
c906108c SS |
2568 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2569 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2570 | else | |
2571 | case "$XGETTEXT" in | |
2572 | /*) | |
2573 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2574 | ;; | |
2575 | *) | |
2576 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2577 | for ac_dir in $PATH; do | |
2578 | test -z "$ac_dir" && ac_dir=. | |
2579 | if test -f $ac_dir/$ac_word; then | |
2580 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2581 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2582 | break | |
2583 | fi | |
2584 | fi | |
2585 | done | |
2586 | IFS="$ac_save_ifs" | |
2587 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2588 | ;; | |
2589 | esac | |
2590 | fi | |
2591 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2592 | if test -n "$XGETTEXT"; then | |
2593 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2594 | else | |
2595 | echo "$ac_t""no" 1>&6 | |
2596 | fi | |
2597 | ||
2598 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2599 | #line 2600 "configure" |
c906108c SS |
2600 | #include "confdefs.h" |
2601 | ||
2602 | int main() { | |
2603 | extern int _nl_msg_cat_cntr; | |
2604 | return _nl_msg_cat_cntr | |
2605 | ; return 0; } | |
2606 | EOF | |
d28f9cdf | 2607 | if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
2608 | rm -rf conftest* |
2609 | CATOBJEXT=.gmo | |
2610 | DATADIRNAME=share | |
2611 | else | |
2612 | echo "configure: failed program was:" >&5 | |
2613 | cat conftest.$ac_ext >&5 | |
2614 | rm -rf conftest* | |
2615 | CATOBJEXT=.mo | |
2616 | DATADIRNAME=lib | |
2617 | fi | |
2618 | rm -f conftest* | |
2619 | INSTOBJEXT=.mo | |
2620 | fi | |
2621 | fi | |
2622 | ||
2623 | else | |
2624 | echo "$ac_t""no" 1>&6 | |
2625 | fi | |
2626 | ||
2627 | ||
2628 | ||
2629 | if test "$CATOBJEXT" = "NONE"; then | |
2630 | nls_cv_use_gnu_gettext=yes | |
2631 | fi | |
2632 | fi | |
2633 | ||
2634 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2635 | INTLOBJS="\$(GETTOBJS)" | |
2636 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2637 | set dummy msgfmt; ac_word=$2 | |
2638 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2639 | echo "configure:2640: checking for $ac_word" >&5 |
c906108c SS |
2640 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2642 | else | |
2643 | case "$MSGFMT" in | |
2644 | /*) | |
2645 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2646 | ;; | |
2647 | *) | |
2648 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2649 | for ac_dir in $PATH; do | |
2650 | test -z "$ac_dir" && ac_dir=. | |
2651 | if test -f $ac_dir/$ac_word; then | |
2652 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2653 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2654 | break | |
2655 | fi | |
2656 | fi | |
2657 | done | |
2658 | IFS="$ac_save_ifs" | |
2659 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2660 | ;; | |
2661 | esac | |
2662 | fi | |
2663 | MSGFMT="$ac_cv_path_MSGFMT" | |
2664 | if test -n "$MSGFMT"; then | |
2665 | echo "$ac_t""$MSGFMT" 1>&6 | |
2666 | else | |
2667 | echo "$ac_t""no" 1>&6 | |
2668 | fi | |
2669 | ||
2670 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2671 | set dummy gmsgfmt; ac_word=$2 | |
2672 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2673 | echo "configure:2674: checking for $ac_word" >&5 |
c906108c SS |
2674 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2676 | else | |
2677 | case "$GMSGFMT" in | |
2678 | /*) | |
2679 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2680 | ;; | |
2681 | ?:/*) | |
2682 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2683 | ;; | |
2684 | *) | |
2685 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2686 | ac_dummy="$PATH" | |
2687 | for ac_dir in $ac_dummy; do | |
2688 | test -z "$ac_dir" && ac_dir=. | |
2689 | if test -f $ac_dir/$ac_word; then | |
2690 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2691 | break | |
2692 | fi | |
2693 | done | |
2694 | IFS="$ac_save_ifs" | |
2695 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2696 | ;; | |
2697 | esac | |
2698 | fi | |
2699 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2700 | if test -n "$GMSGFMT"; then | |
2701 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2702 | else | |
2703 | echo "$ac_t""no" 1>&6 | |
2704 | fi | |
2705 | ||
2706 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2707 | set dummy xgettext; ac_word=$2 | |
2708 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 2709 | echo "configure:2710: checking for $ac_word" >&5 |
c906108c SS |
2710 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2712 | else | |
2713 | case "$XGETTEXT" in | |
2714 | /*) | |
2715 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2716 | ;; | |
2717 | *) | |
2718 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2719 | for ac_dir in $PATH; do | |
2720 | test -z "$ac_dir" && ac_dir=. | |
2721 | if test -f $ac_dir/$ac_word; then | |
2722 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2723 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2724 | break | |
2725 | fi | |
2726 | fi | |
2727 | done | |
2728 | IFS="$ac_save_ifs" | |
2729 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2730 | ;; | |
2731 | esac | |
2732 | fi | |
2733 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2734 | if test -n "$XGETTEXT"; then | |
2735 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2736 | else | |
2737 | echo "$ac_t""no" 1>&6 | |
2738 | fi | |
2739 | ||
2740 | ||
2741 | USE_INCLUDED_LIBINTL=yes | |
2742 | CATOBJEXT=.gmo | |
2743 | INSTOBJEXT=.mo | |
2744 | DATADIRNAME=share | |
2745 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2746 | INTLLIBS=$INTLDEPS | |
2747 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2748 | nls_cv_header_intl=libintl.h | |
2749 | nls_cv_header_libgt=libgettext.h | |
2750 | fi | |
2751 | ||
2752 | if test "$XGETTEXT" != ":"; then | |
2753 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2754 | : ; | |
2755 | else | |
2756 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2757 | XGETTEXT=":" | |
2758 | fi | |
2759 | fi | |
2760 | ||
2761 | # We need to process the po/ directory. | |
2762 | POSUB=po | |
2763 | else | |
2764 | DATADIRNAME=share | |
2765 | nls_cv_header_intl=libintl.h | |
2766 | nls_cv_header_libgt=libgettext.h | |
2767 | fi | |
2768 | ||
2769 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2770 | # because some of the sources are only built for this goal. | |
2771 | if test "$PACKAGE" = gettext; then | |
2772 | USE_NLS=yes | |
2773 | USE_INCLUDED_LIBINTL=yes | |
2774 | fi | |
2775 | ||
2776 | for lang in $ALL_LINGUAS; do | |
2777 | GMOFILES="$GMOFILES $lang.gmo" | |
2778 | POFILES="$POFILES $lang.po" | |
2779 | done | |
2780 | ||
2781 | ||
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | ||
2790 | ||
2791 | ||
2792 | ||
2793 | ||
2794 | if test "x$CATOBJEXT" != "x"; then | |
2795 | if test "x$ALL_LINGUAS" = "x"; then | |
2796 | LINGUAS= | |
2797 | else | |
2798 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
d28f9cdf | 2799 | echo "configure:2800: checking for catalogs to be installed" >&5 |
c906108c SS |
2800 | NEW_LINGUAS= |
2801 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2802 | case "$ALL_LINGUAS" in | |
2803 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2804 | esac | |
2805 | done | |
2806 | LINGUAS=$NEW_LINGUAS | |
2807 | echo "$ac_t""$LINGUAS" 1>&6 | |
2808 | fi | |
2809 | ||
2810 | if test -n "$LINGUAS"; then | |
2811 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2812 | fi | |
2813 | fi | |
2814 | ||
2815 | if test $ac_cv_header_locale_h = yes; then | |
2816 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2817 | else | |
2818 | INCLUDE_LOCALE_H="\ | |
2819 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2820 | fi | |
2821 | ||
2822 | ||
2823 | if test -f $srcdir/po2tbl.sed.in; then | |
2824 | if test "$CATOBJEXT" = ".cat"; then | |
2825 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2826 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
d28f9cdf | 2827 | echo "configure:2828: checking for linux/version.h" >&5 |
c906108c SS |
2828 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2829 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2830 | else | |
2831 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 2832 | #line 2833 "configure" |
c906108c SS |
2833 | #include "confdefs.h" |
2834 | #include <linux/version.h> | |
2835 | EOF | |
2836 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 2837 | { (eval echo configure:2838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
2838 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2839 | if test -z "$ac_err"; then | |
2840 | rm -rf conftest* | |
2841 | eval "ac_cv_header_$ac_safe=yes" | |
2842 | else | |
2843 | echo "$ac_err" >&5 | |
2844 | echo "configure: failed program was:" >&5 | |
2845 | cat conftest.$ac_ext >&5 | |
2846 | rm -rf conftest* | |
2847 | eval "ac_cv_header_$ac_safe=no" | |
2848 | fi | |
2849 | rm -f conftest* | |
2850 | fi | |
2851 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2852 | echo "$ac_t""yes" 1>&6 | |
2853 | msgformat=linux | |
2854 | else | |
2855 | echo "$ac_t""no" 1>&6 | |
2856 | msgformat=xopen | |
2857 | fi | |
2858 | ||
2859 | ||
2860 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2861 | fi | |
2862 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2863 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2864 | fi | |
2865 | ||
2866 | if test "$PACKAGE" = "gettext"; then | |
2867 | GT_NO="#NO#" | |
2868 | GT_YES= | |
2869 | else | |
2870 | GT_NO= | |
2871 | GT_YES="#YES#" | |
2872 | fi | |
2873 | ||
2874 | ||
2875 | ||
2876 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2877 | ||
2878 | ||
2879 | l= | |
2880 | ||
2881 | ||
4536bbc6 | 2882 | if test -f $srcdir/po/POTFILES.in; then |
c906108c SS |
2883 | test -d po || mkdir po |
2884 | if test "x$srcdir" != "x."; then | |
2885 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2886 | posrcprefix="$srcdir/" | |
2887 | else | |
2888 | posrcprefix="../$srcdir/" | |
2889 | fi | |
2890 | else | |
2891 | posrcprefix="../" | |
2892 | fi | |
2893 | rm -f po/POTFILES | |
2894 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2895 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2896 | fi | |
2897 | ||
0fbb3da7 TT |
2898 | cat >> confdefs.h <<\EOF |
2899 | #define PACKAGE "gdb" | |
2900 | EOF | |
2901 | ||
2902 | ||
c906108c SS |
2903 | |
2904 | ||
2905 | CONFIG_OBS= | |
66b965bb | 2906 | CONFIG_LIB_OBS= |
c906108c SS |
2907 | CONFIG_DEPS= |
2908 | CONFIG_SRCS= | |
fb40c209 AC |
2909 | CONFIG_INITS= |
2910 | ENABLE_CFLAGS= | |
b3a90332 AC |
2911 | CONFIG_ALL= |
2912 | CONFIG_CLEAN= | |
e56ac5c3 AC |
2913 | CONFIG_INSTALL= |
2914 | CONFIG_UNINSTALL= | |
c906108c | 2915 | |
8dcde887 | 2916 | subdirs="doc testsuite" |
96baa820 | 2917 | |
8dcde887 | 2918 | configdirs= |
96baa820 | 2919 | |
27e9bf90 | 2920 | . $srcdir/configure.host |
c906108c | 2921 | |
27e9bf90 | 2922 | . $srcdir/configure.tgt |
c906108c | 2923 | |
27e9bf90 MK |
2924 | # Fetch the default architecture and default target vector from BFD. |
2925 | targ=$target; . $srcdir/../bfd/config.bfd | |
c906108c | 2926 | |
27e9bf90 MK |
2927 | # We only want the first architecture, so strip off the others if |
2928 | # there is more than one. | |
2929 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
1ba607ad | 2930 | |
27e9bf90 MK |
2931 | if test "x$targ_archs" != x; then |
2932 | cat >> confdefs.h <<EOF | |
2933 | #define DEFAULT_BFD_ARCH $targ_archs | |
1ba607ad AC |
2934 | EOF |
2935 | ||
2936 | fi | |
27e9bf90 MK |
2937 | if test "x$targ_defvec" != x; then |
2938 | cat >> confdefs.h <<EOF | |
2939 | #define DEFAULT_BFD_VEC $targ_defvec | |
1ba607ad AC |
2940 | EOF |
2941 | ||
2942 | fi | |
c906108c | 2943 | |
8bb2c122 MK |
2944 | if test "$program_transform_name" = s,x,x,; then |
2945 | program_transform_name= | |
2946 | else | |
2947 | # Double any \ or $. echo might interpret backslashes. | |
2948 | cat <<\EOF_SED > conftestsed | |
2949 | s,\\,\\\\,g; s,\$,$$,g | |
2950 | EOF_SED | |
2951 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2952 | rm -f conftestsed | |
2953 | fi | |
2954 | test "$program_prefix" != NONE && | |
2955 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2956 | # Use a double $ so make ignores it. | |
2957 | test "$program_suffix" != NONE && | |
2958 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2959 | ||
2960 | # sed with no file args requires a program. | |
2961 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2962 | ||
2963 | ||
627af7ea MK |
2964 | # The CLI cannot be disabled yet, but may be in the future. |
2965 | ||
2966 | # Enable CLI. | |
2967 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
2968 | if test "${enable_gdbcli+set}" = set; then | |
2969 | enableval="$enable_gdbcli" | |
2970 | case $enableval in | |
2971 | yes) | |
2972 | ;; | |
2973 | no) | |
2974 | { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;; | |
2975 | *) | |
2976 | { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;; | |
2977 | esac | |
2978 | else | |
2979 | enable_gdbcli=yes | |
2980 | fi | |
2981 | ||
2982 | if test x"$enable_gdbcli" = xyes; then | |
2983 | if test -d $srcdir/cli; then | |
2984 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
2985 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
2986 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
2987 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)" | |
2988 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
2989 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)" | |
2990 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)" | |
2991 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)" | |
2992 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)" | |
2993 | fi | |
2994 | fi | |
2995 | ||
2996 | # Enable MI. | |
2997 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
2998 | if test "${enable_gdbmi+set}" = set; then | |
2999 | enableval="$enable_gdbmi" | |
3000 | case $enableval in | |
3001 | yes | no) | |
3002 | ;; | |
3003 | *) | |
3004 | { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;; | |
3005 | esac | |
3006 | else | |
3007 | enable_gdbmi=yes | |
3008 | fi | |
3009 | ||
3010 | if test x"$enable_gdbmi" = xyes; then | |
3011 | if test -d $srcdir/mi; then | |
3012 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
3013 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
3014 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
3015 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)" | |
3016 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
3017 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)" | |
3018 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)" | |
3019 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)" | |
3020 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)" | |
3021 | fi | |
3022 | fi | |
3023 | ||
06825bd1 MK |
3024 | # Enable TUI. |
3025 | # Check whether --enable-tui or --disable-tui was given. | |
3026 | if test "${enable_tui+set}" = set; then | |
3027 | enableval="$enable_tui" | |
3028 | case $enableval in | |
3029 | yes | no) | |
3030 | ;; | |
3031 | *) | |
3032 | { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;; | |
3033 | esac | |
3034 | fi | |
3035 | ||
3036 | if test x"$enable_tui" = xyes; then | |
3037 | if test -d $srcdir/tui; then | |
3038 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" | |
3039 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
3040 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
3041 | CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" | |
3042 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
3043 | CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)" | |
3044 | CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)" | |
3045 | CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)" | |
3046 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)" | |
3047 | need_curses=yes | |
3048 | fi | |
3049 | fi | |
3050 | ||
8ee53726 MK |
3051 | # Enable gdbtk. |
3052 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
3053 | if test "${enable_gdbtk+set}" = set; then | |
3054 | enableval="$enable_gdbtk" | |
3055 | case $enableval in | |
3056 | yes | no) | |
3057 | ;; | |
3058 | *) | |
3059 | { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;; | |
3060 | esac | |
3061 | else | |
3062 | if test -d $srcdir/gdbtk; then | |
3063 | enable_gdbtk=yes | |
3064 | else | |
3065 | enable_gdbtk=no | |
3066 | fi | |
3067 | fi | |
3068 | ||
3069 | # We unconditionally disable gdbtk tests on selected platforms. | |
3070 | case $host_os in | |
3071 | go32* | windows*) | |
3072 | echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2 | |
3073 | enable_gdbtk=no ;; | |
3074 | esac | |
3075 | ||
d28f9cdf DJ |
3076 | # Profiling support. |
3077 | # Check whether --enable-profiling or --disable-profiling was given. | |
3078 | if test "${enable_profiling+set}" = set; then | |
3079 | enableval="$enable_profiling" | |
3080 | case $enableval in | |
3081 | yes | no) | |
3082 | ;; | |
3083 | *) | |
3084 | { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;; | |
3085 | esac | |
3086 | else | |
3087 | enable_profiling=no | |
3088 | fi | |
3089 | ||
3090 | ||
3091 | if test "$enable_profiling" = yes ; then | |
3092 | PROFILE_CFLAGS=-pg | |
3093 | OLD_CFLAGS="$CFLAGS" | |
3094 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
3095 | ||
3096 | echo $ac_n "checking for monstartup""... $ac_c" 1>&6 | |
3097 | echo "configure:3098: checking for monstartup" >&5 | |
3098 | if eval "test \"`echo '$''{'ac_cv_func_monstartup'+set}'`\" = set"; then | |
3099 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3100 | else | |
3101 | cat > conftest.$ac_ext <<EOF | |
3102 | #line 3103 "configure" | |
3103 | #include "confdefs.h" | |
3104 | /* System header to define __stub macros and hopefully few prototypes, | |
3105 | which can conflict with char monstartup(); below. */ | |
3106 | #include <assert.h> | |
3107 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3108 | /* We use char because int might match the return type of a gcc2 | |
3109 | builtin and then its argument prototype would still apply. */ | |
3110 | char monstartup(); | |
3111 | ||
3112 | int main() { | |
3113 | ||
3114 | /* The GNU C library defines this for functions which it implements | |
3115 | to always fail with ENOSYS. Some functions are actually named | |
3116 | something starting with __ and the normal name is an alias. */ | |
3117 | #if defined (__stub_monstartup) || defined (__stub___monstartup) | |
3118 | choke me | |
3119 | #else | |
3120 | monstartup(); | |
3121 | #endif | |
3122 | ||
3123 | ; return 0; } | |
3124 | EOF | |
3125 | if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3126 | rm -rf conftest* | |
3127 | eval "ac_cv_func_monstartup=yes" | |
3128 | else | |
3129 | echo "configure: failed program was:" >&5 | |
3130 | cat conftest.$ac_ext >&5 | |
3131 | rm -rf conftest* | |
3132 | eval "ac_cv_func_monstartup=no" | |
3133 | fi | |
3134 | rm -f conftest* | |
3135 | fi | |
3136 | ||
3137 | if eval "test \"`echo '$ac_cv_func_'monstartup`\" = yes"; then | |
3138 | echo "$ac_t""yes" 1>&6 | |
3139 | : | |
3140 | else | |
3141 | echo "$ac_t""no" 1>&6 | |
3142 | { echo "configure: error: monstartup necessary to use --enable-profiling." 1>&2; exit 1; } | |
3143 | fi | |
3144 | ||
3145 | ||
3146 | echo $ac_n "checking for _mcleanup""... $ac_c" 1>&6 | |
3147 | echo "configure:3148: checking for _mcleanup" >&5 | |
3148 | if eval "test \"`echo '$''{'ac_cv_func__mcleanup'+set}'`\" = set"; then | |
3149 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3150 | else | |
3151 | cat > conftest.$ac_ext <<EOF | |
3152 | #line 3153 "configure" | |
3153 | #include "confdefs.h" | |
3154 | /* System header to define __stub macros and hopefully few prototypes, | |
3155 | which can conflict with char _mcleanup(); below. */ | |
3156 | #include <assert.h> | |
3157 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3158 | /* We use char because int might match the return type of a gcc2 | |
3159 | builtin and then its argument prototype would still apply. */ | |
3160 | char _mcleanup(); | |
3161 | ||
3162 | int main() { | |
3163 | ||
3164 | /* The GNU C library defines this for functions which it implements | |
3165 | to always fail with ENOSYS. Some functions are actually named | |
3166 | something starting with __ and the normal name is an alias. */ | |
3167 | #if defined (__stub__mcleanup) || defined (__stub____mcleanup) | |
3168 | choke me | |
3169 | #else | |
3170 | _mcleanup(); | |
3171 | #endif | |
3172 | ||
3173 | ; return 0; } | |
3174 | EOF | |
3175 | if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3176 | rm -rf conftest* | |
3177 | eval "ac_cv_func__mcleanup=yes" | |
3178 | else | |
3179 | echo "configure: failed program was:" >&5 | |
3180 | cat conftest.$ac_ext >&5 | |
3181 | rm -rf conftest* | |
3182 | eval "ac_cv_func__mcleanup=no" | |
3183 | fi | |
3184 | rm -f conftest* | |
3185 | fi | |
3186 | ||
3187 | if eval "test \"`echo '$ac_cv_func_'_mcleanup`\" = yes"; then | |
3188 | echo "$ac_t""yes" 1>&6 | |
3189 | : | |
3190 | else | |
3191 | echo "$ac_t""no" 1>&6 | |
3192 | { echo "configure: error: _mcleanup necessary to use --enable-profiling." 1>&2; exit 1; } | |
3193 | fi | |
3194 | ||
3195 | ||
3196 | CFLAGS="$OLD_CFLAGS" | |
3197 | fi | |
3198 | ||
8bb2c122 MK |
3199 | # --------------------- # |
3200 | # Checks for programs. # | |
3201 | # --------------------- # | |
3202 | ||
c41b7eb1 | 3203 | for ac_prog in mawk gawk nawk awk |
7a292a7a SS |
3204 | do |
3205 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3206 | set dummy $ac_prog; ac_word=$2 | |
3207 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 3208 | echo "configure:3209: checking for $ac_word" >&5 |
7a292a7a SS |
3209 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
3210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3211 | else | |
3212 | if test -n "$AWK"; then | |
3213 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3214 | else | |
3215 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3216 | ac_dummy="$PATH" | |
3217 | for ac_dir in $ac_dummy; do | |
3218 | test -z "$ac_dir" && ac_dir=. | |
3219 | if test -f $ac_dir/$ac_word; then | |
3220 | ac_cv_prog_AWK="$ac_prog" | |
3221 | break | |
3222 | fi | |
3223 | done | |
3224 | IFS="$ac_save_ifs" | |
3225 | fi | |
3226 | fi | |
3227 | AWK="$ac_cv_prog_AWK" | |
3228 | if test -n "$AWK"; then | |
3229 | echo "$ac_t""$AWK" 1>&6 | |
3230 | else | |
3231 | echo "$ac_t""no" 1>&6 | |
3232 | fi | |
3233 | ||
3234 | test -n "$AWK" && break | |
3235 | done | |
3236 | ||
c906108c SS |
3237 | # Find a good install program. We prefer a C program (faster), |
3238 | # so one script is as good as another. But avoid the broken or | |
3239 | # incompatible versions: | |
3240 | # SysV /etc/install, /usr/sbin/install | |
3241 | # SunOS /usr/etc/install | |
3242 | # IRIX /sbin/install | |
3243 | # AIX /bin/install | |
3244 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3245 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3246 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3247 | # ./install, which can be erroneously created by make from ./install.sh. | |
3248 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
d28f9cdf | 3249 | echo "configure:3250: checking for a BSD compatible install" >&5 |
c906108c SS |
3250 | if test -z "$INSTALL"; then |
3251 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3252 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3253 | else | |
3254 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3255 | for ac_dir in $PATH; do | |
3256 | # Account for people who put trailing slashes in PATH elements. | |
3257 | case "$ac_dir/" in | |
3258 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3259 | *) | |
3260 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3261 | # Don't use installbsd from OSF since it installs stuff as root | |
3262 | # by default. | |
3263 | for ac_prog in ginstall scoinst install; do | |
3264 | if test -f $ac_dir/$ac_prog; then | |
3265 | if test $ac_prog = install && | |
3266 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3267 | # AIX install. It has an incompatible calling convention. | |
3268 | : | |
3269 | else | |
3270 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3271 | break 2 | |
3272 | fi | |
3273 | fi | |
3274 | done | |
3275 | ;; | |
3276 | esac | |
3277 | done | |
3278 | IFS="$ac_save_IFS" | |
3279 | ||
3280 | fi | |
3281 | if test "${ac_cv_path_install+set}" = set; then | |
3282 | INSTALL="$ac_cv_path_install" | |
3283 | else | |
3284 | # As a last resort, use the slow shell script. We don't cache a | |
3285 | # path for INSTALL within a source directory, because that will | |
3286 | # break other packages using the cache if that directory is | |
3287 | # removed, or if the path is relative. | |
3288 | INSTALL="$ac_install_sh" | |
3289 | fi | |
3290 | fi | |
3291 | echo "$ac_t""$INSTALL" 1>&6 | |
3292 | ||
3293 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3294 | # It thinks the first close brace ends the variable substitution. | |
3295 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3296 | ||
3297 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3298 | ||
3299 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3300 | ||
8bb2c122 | 3301 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
d28f9cdf | 3302 | echo "configure:3303: checking whether ln -s works" >&5 |
8bb2c122 MK |
3303 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
3304 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 3305 | else |
8bb2c122 MK |
3306 | rm -f conftestdata |
3307 | if ln -s X conftestdata 2>/dev/null | |
3308 | then | |
3309 | rm -f conftestdata | |
3310 | ac_cv_prog_LN_S="ln -s" | |
3311 | else | |
3312 | ac_cv_prog_LN_S=ln | |
3313 | fi | |
3314 | fi | |
3315 | LN_S="$ac_cv_prog_LN_S" | |
3316 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
3317 | echo "$ac_t""yes" 1>&6 | |
3318 | else | |
3319 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
3320 | fi |
3321 | ||
8bb2c122 MK |
3322 | # Extract the first word of "ranlib", so it can be a program name with args. |
3323 | set dummy ranlib; ac_word=$2 | |
c906108c | 3324 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d28f9cdf | 3325 | echo "configure:3326: checking for $ac_word" >&5 |
8bb2c122 | 3326 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
c906108c SS |
3327 | echo $ac_n "(cached) $ac_c" 1>&6 |
3328 | else | |
8bb2c122 MK |
3329 | if test -n "$RANLIB"; then |
3330 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
c906108c SS |
3331 | else |
3332 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3333 | ac_dummy="$PATH" | |
3334 | for ac_dir in $ac_dummy; do | |
3335 | test -z "$ac_dir" && ac_dir=. | |
3336 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3337 | ac_cv_prog_RANLIB="ranlib" |
c906108c SS |
3338 | break |
3339 | fi | |
3340 | done | |
3341 | IFS="$ac_save_ifs" | |
8bb2c122 | 3342 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
c906108c SS |
3343 | fi |
3344 | fi | |
8bb2c122 MK |
3345 | RANLIB="$ac_cv_prog_RANLIB" |
3346 | if test -n "$RANLIB"; then | |
3347 | echo "$ac_t""$RANLIB" 1>&6 | |
c906108c SS |
3348 | else |
3349 | echo "$ac_t""no" 1>&6 | |
3350 | fi | |
3351 | ||
8bb2c122 MK |
3352 | for ac_prog in 'bison -y' byacc |
3353 | do | |
3354 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3355 | set dummy $ac_prog; ac_word=$2 | |
c906108c | 3356 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d28f9cdf | 3357 | echo "configure:3358: checking for $ac_word" >&5 |
8bb2c122 | 3358 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
c906108c SS |
3359 | echo $ac_n "(cached) $ac_c" 1>&6 |
3360 | else | |
8bb2c122 MK |
3361 | if test -n "$YACC"; then |
3362 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
c906108c SS |
3363 | else |
3364 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3365 | ac_dummy="$PATH" | |
3366 | for ac_dir in $ac_dummy; do | |
3367 | test -z "$ac_dir" && ac_dir=. | |
3368 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3369 | ac_cv_prog_YACC="$ac_prog" |
c906108c SS |
3370 | break |
3371 | fi | |
3372 | done | |
3373 | IFS="$ac_save_ifs" | |
3374 | fi | |
3375 | fi | |
8bb2c122 MK |
3376 | YACC="$ac_cv_prog_YACC" |
3377 | if test -n "$YACC"; then | |
3378 | echo "$ac_t""$YACC" 1>&6 | |
c906108c SS |
3379 | else |
3380 | echo "$ac_t""no" 1>&6 | |
3381 | fi | |
3382 | ||
8bb2c122 MK |
3383 | test -n "$YACC" && break |
3384 | done | |
3385 | test -n "$YACC" || YACC="yacc" | |
c906108c | 3386 | |
8bb2c122 MK |
3387 | |
3388 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3389 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
c906108c | 3390 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
d28f9cdf | 3391 | echo "configure:3392: checking for $ac_word" >&5 |
8bb2c122 | 3392 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
c906108c SS |
3393 | echo $ac_n "(cached) $ac_c" 1>&6 |
3394 | else | |
8bb2c122 MK |
3395 | if test -n "$AR"; then |
3396 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
c906108c SS |
3397 | else |
3398 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3399 | ac_dummy="$PATH" | |
3400 | for ac_dir in $ac_dummy; do | |
3401 | test -z "$ac_dir" && ac_dir=. | |
3402 | if test -f $ac_dir/$ac_word; then | |
8bb2c122 | 3403 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
c906108c SS |
3404 | break |
3405 | fi | |
3406 | done | |
3407 | IFS="$ac_save_ifs" | |
8bb2c122 | 3408 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" |
c906108c SS |
3409 | fi |
3410 | fi | |
8bb2c122 MK |
3411 | AR="$ac_cv_prog_AR" |
3412 | if test -n "$AR"; then | |
3413 | echo "$ac_t""$AR" 1>&6 | |
c906108c SS |
3414 | else |
3415 | echo "$ac_t""no" 1>&6 | |
3416 | fi | |
3417 | ||
8bb2c122 | 3418 | |
c906108c | 3419 | |
95ca63c4 CF |
3420 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
3421 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
3422 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 3423 | echo "configure:3424: checking for $ac_word" >&5 |
95ca63c4 CF |
3424 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
3425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3426 | else | |
3427 | if test -n "$DLLTOOL"; then | |
3428 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
3429 | else | |
3430 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3431 | ac_dummy="$PATH" | |
3432 | for ac_dir in $ac_dummy; do | |
3433 | test -z "$ac_dir" && ac_dir=. | |
3434 | if test -f $ac_dir/$ac_word; then | |
3435 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
3436 | break | |
3437 | fi | |
3438 | done | |
3439 | IFS="$ac_save_ifs" | |
3440 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" | |
3441 | fi | |
3442 | fi | |
3443 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
3444 | if test -n "$DLLTOOL"; then | |
3445 | echo "$ac_t""$DLLTOOL" 1>&6 | |
3446 | else | |
3447 | echo "$ac_t""no" 1>&6 | |
3448 | fi | |
3449 | ||
3450 | ||
3451 | ||
3452 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
3453 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
3454 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 3455 | echo "configure:3456: checking for $ac_word" >&5 |
95ca63c4 CF |
3456 | if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then |
3457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3458 | else | |
3459 | if test -n "$WINDRES"; then | |
3460 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
3461 | else | |
3462 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3463 | ac_dummy="$PATH" | |
3464 | for ac_dir in $ac_dummy; do | |
3465 | test -z "$ac_dir" && ac_dir=. | |
3466 | if test -f $ac_dir/$ac_word; then | |
3467 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
3468 | break | |
3469 | fi | |
3470 | done | |
3471 | IFS="$ac_save_ifs" | |
3472 | test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" | |
3473 | fi | |
3474 | fi | |
3475 | WINDRES="$ac_cv_prog_WINDRES" | |
3476 | if test -n "$WINDRES"; then | |
3477 | echo "$ac_t""$WINDRES" 1>&6 | |
3478 | else | |
3479 | echo "$ac_t""no" 1>&6 | |
3480 | fi | |
3481 | ||
3482 | ||
3483 | ||
c906108c | 3484 | |
8bb2c122 | 3485 | # Needed for GNU/Hurd. |
75c6e08a MK |
3486 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
3487 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
3488 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
d28f9cdf | 3489 | echo "configure:3490: checking for $ac_word" >&5 |
75c6e08a MK |
3490 | if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then |
3491 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3492 | else | |
3493 | if test -n "$MIG"; then | |
3494 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
3495 | else | |
3496 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3497 | ac_dummy="$PATH" | |
3498 | for ac_dir in $ac_dummy; do | |
3499 | test -z "$ac_dir" && ac_dir=. | |
3500 | if test -f $ac_dir/$ac_word; then | |
3501 | ac_cv_prog_MIG="${ac_tool_prefix}mig" | |
3502 | break | |
3503 | fi | |
3504 | done | |
3505 | IFS="$ac_save_ifs" | |
3506 | test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" | |
3507 | fi | |
3508 | fi | |
3509 | MIG="$ac_cv_prog_MIG" | |
3510 | if test -n "$MIG"; then | |
3511 | echo "$ac_t""$MIG" 1>&6 | |
3512 | else | |
3513 | echo "$ac_t""no" 1>&6 | |
3514 | fi | |
3515 | ||
3516 | ||
3517 | ||
3518 | ||
9a156167 MK |
3519 | # ---------------------- # |
3520 | # Checks for libraries. # | |
3521 | # ---------------------- # | |
3522 | ||
3523 | # We might need to link with -lm; most simulators need it. | |
3524 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 | |
d28f9cdf | 3525 | echo "configure:3526: checking for main in -lm" >&5 |
9a156167 MK |
3526 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
3527 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3528 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3529 | else | |
3530 | ac_save_LIBS="$LIBS" | |
3531 | LIBS="-lm $LIBS" | |
3532 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3533 | #line 3534 "configure" |
9a156167 MK |
3534 | #include "confdefs.h" |
3535 | ||
3536 | int main() { | |
3537 | main() | |
3538 | ; return 0; } | |
3539 | EOF | |
d28f9cdf | 3540 | if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3541 | rm -rf conftest* |
3542 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3543 | else | |
3544 | echo "configure: failed program was:" >&5 | |
3545 | cat conftest.$ac_ext >&5 | |
3546 | rm -rf conftest* | |
3547 | eval "ac_cv_lib_$ac_lib_var=no" | |
3548 | fi | |
3549 | rm -f conftest* | |
3550 | LIBS="$ac_save_LIBS" | |
3551 | ||
3552 | fi | |
3553 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3554 | echo "$ac_t""yes" 1>&6 | |
3555 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3556 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3557 | cat >> confdefs.h <<EOF | |
3558 | #define $ac_tr_lib 1 | |
3559 | EOF | |
3560 | ||
3561 | LIBS="-lm $LIBS" | |
3562 | ||
3563 | else | |
3564 | echo "$ac_t""no" 1>&6 | |
3565 | fi | |
3566 | ||
3567 | ||
3568 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
3569 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
3570 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
3571 | # is known to have this problem). Therefore we avoid libw if we can. | |
3572 | echo $ac_n "checking for wctype""... $ac_c" 1>&6 | |
d28f9cdf | 3573 | echo "configure:3574: checking for wctype" >&5 |
9a156167 MK |
3574 | if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then |
3575 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3576 | else | |
3577 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3578 | #line 3579 "configure" |
9a156167 MK |
3579 | #include "confdefs.h" |
3580 | /* System header to define __stub macros and hopefully few prototypes, | |
3581 | which can conflict with char wctype(); below. */ | |
3582 | #include <assert.h> | |
3583 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3584 | /* We use char because int might match the return type of a gcc2 | |
3585 | builtin and then its argument prototype would still apply. */ | |
3586 | char wctype(); | |
3587 | ||
3588 | int main() { | |
3589 | ||
3590 | /* The GNU C library defines this for functions which it implements | |
3591 | to always fail with ENOSYS. Some functions are actually named | |
3592 | something starting with __ and the normal name is an alias. */ | |
3593 | #if defined (__stub_wctype) || defined (__stub___wctype) | |
3594 | choke me | |
3595 | #else | |
3596 | wctype(); | |
3597 | #endif | |
3598 | ||
3599 | ; return 0; } | |
3600 | EOF | |
d28f9cdf | 3601 | if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3602 | rm -rf conftest* |
3603 | eval "ac_cv_func_wctype=yes" | |
3604 | else | |
3605 | echo "configure: failed program was:" >&5 | |
3606 | cat conftest.$ac_ext >&5 | |
3607 | rm -rf conftest* | |
3608 | eval "ac_cv_func_wctype=no" | |
3609 | fi | |
3610 | rm -f conftest* | |
3611 | fi | |
3612 | ||
3613 | if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then | |
3614 | echo "$ac_t""yes" 1>&6 | |
3615 | : | |
3616 | else | |
3617 | echo "$ac_t""no" 1>&6 | |
3618 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
d28f9cdf | 3619 | echo "configure:3620: checking for wctype in -lw" >&5 |
9a156167 MK |
3620 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
3621 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3622 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3623 | else | |
3624 | ac_save_LIBS="$LIBS" | |
3625 | LIBS="-lw $LIBS" | |
3626 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3627 | #line 3628 "configure" |
9a156167 MK |
3628 | #include "confdefs.h" |
3629 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3630 | /* We use char because int might match the return type of a gcc2 | |
3631 | builtin and then its argument prototype would still apply. */ | |
3632 | char wctype(); | |
3633 | ||
3634 | int main() { | |
3635 | wctype() | |
3636 | ; return 0; } | |
3637 | EOF | |
d28f9cdf | 3638 | if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3639 | rm -rf conftest* |
3640 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3641 | else | |
3642 | echo "configure: failed program was:" >&5 | |
3643 | cat conftest.$ac_ext >&5 | |
3644 | rm -rf conftest* | |
3645 | eval "ac_cv_lib_$ac_lib_var=no" | |
3646 | fi | |
3647 | rm -f conftest* | |
3648 | LIBS="$ac_save_LIBS" | |
3649 | ||
3650 | fi | |
3651 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3652 | echo "$ac_t""yes" 1>&6 | |
3653 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
3654 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
3655 | cat >> confdefs.h <<EOF | |
3656 | #define $ac_tr_lib 1 | |
3657 | EOF | |
3658 | ||
3659 | LIBS="-lw $LIBS" | |
3660 | ||
3661 | else | |
3662 | echo "$ac_t""no" 1>&6 | |
3663 | fi | |
3664 | ||
3665 | fi | |
3666 | ||
3667 | ||
3668 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. | |
3669 | ||
3670 | echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6 | |
d28f9cdf | 3671 | echo "configure:3672: checking for library containing socketpair" >&5 |
9a156167 MK |
3672 | if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then |
3673 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3674 | else | |
3675 | ac_func_search_save_LIBS="$LIBS" | |
3676 | ac_cv_search_socketpair="no" | |
3677 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3678 | #line 3679 "configure" |
9a156167 MK |
3679 | #include "confdefs.h" |
3680 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3681 | /* We use char because int might match the return type of a gcc2 | |
3682 | builtin and then its argument prototype would still apply. */ | |
3683 | char socketpair(); | |
3684 | ||
3685 | int main() { | |
3686 | socketpair() | |
3687 | ; return 0; } | |
3688 | EOF | |
d28f9cdf | 3689 | if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3690 | rm -rf conftest* |
3691 | ac_cv_search_socketpair="none required" | |
3692 | else | |
3693 | echo "configure: failed program was:" >&5 | |
3694 | cat conftest.$ac_ext >&5 | |
3695 | fi | |
3696 | rm -f conftest* | |
3697 | test "$ac_cv_search_socketpair" = "no" && for i in socket; do | |
3698 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3699 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3700 | #line 3701 "configure" |
9a156167 MK |
3701 | #include "confdefs.h" |
3702 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3703 | /* We use char because int might match the return type of a gcc2 | |
3704 | builtin and then its argument prototype would still apply. */ | |
3705 | char socketpair(); | |
3706 | ||
3707 | int main() { | |
3708 | socketpair() | |
3709 | ; return 0; } | |
3710 | EOF | |
d28f9cdf | 3711 | if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
9a156167 MK |
3712 | rm -rf conftest* |
3713 | ac_cv_search_socketpair="-l$i" | |
3714 | break | |
3715 | else | |
3716 | echo "configure: failed program was:" >&5 | |
3717 | cat conftest.$ac_ext >&5 | |
3718 | fi | |
3719 | rm -f conftest* | |
3720 | done | |
3721 | LIBS="$ac_func_search_save_LIBS" | |
3722 | fi | |
3723 | ||
3724 | echo "$ac_t""$ac_cv_search_socketpair" 1>&6 | |
3725 | if test "$ac_cv_search_socketpair" != "no"; then | |
3726 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
3727 | ||
3728 | else : | |
3729 | ||
3730 | fi | |
3731 | ||
06825bd1 MK |
3732 | # Since GDB uses Readline, we need termcap functionality, so we need |
3733 | # to find a library that provides that. When GDB is configured with | |
3734 | # --enable-tui, we need full curses functionality. | |
3735 | # | |
3736 | # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over | |
3737 | # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host | |
3738 | # Makefile fragments. That's why we need to have `Hcurses' before | |
3739 | # `curses'. I don't see why we should use HP curses if a more | |
3740 | # standard curses is available, except that according to HP's | |
3741 | # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on | |
3742 | # HP-UX 10.10 and 10.20. | |
3743 | ||
3744 | if test "$need_curses" = yes; then | |
3745 | ||
3746 | echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6 | |
d28f9cdf | 3747 | echo "configure:3748: checking for library containing initscr" >&5 |
06825bd1 MK |
3748 | if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then |
3749 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3750 | else | |
3751 | ac_func_search_save_LIBS="$LIBS" | |
3752 | ac_cv_search_initscr="no" | |
3753 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3754 | #line 3755 "configure" |
06825bd1 MK |
3755 | #include "confdefs.h" |
3756 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3757 | /* We use char because int might match the return type of a gcc2 | |
3758 | builtin and then its argument prototype would still apply. */ | |
3759 | char initscr(); | |
3760 | ||
3761 | int main() { | |
3762 | initscr() | |
3763 | ; return 0; } | |
3764 | EOF | |
d28f9cdf | 3765 | if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3766 | rm -rf conftest* |
3767 | ac_cv_search_initscr="none required" | |
3768 | else | |
3769 | echo "configure: failed program was:" >&5 | |
3770 | cat conftest.$ac_ext >&5 | |
3771 | fi | |
3772 | rm -f conftest* | |
3773 | test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do | |
3774 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3775 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3776 | #line 3777 "configure" |
06825bd1 MK |
3777 | #include "confdefs.h" |
3778 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3779 | /* We use char because int might match the return type of a gcc2 | |
3780 | builtin and then its argument prototype would still apply. */ | |
3781 | char initscr(); | |
3782 | ||
3783 | int main() { | |
3784 | initscr() | |
3785 | ; return 0; } | |
3786 | EOF | |
d28f9cdf | 3787 | if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3788 | rm -rf conftest* |
3789 | ac_cv_search_initscr="-l$i" | |
3790 | break | |
3791 | else | |
3792 | echo "configure: failed program was:" >&5 | |
3793 | cat conftest.$ac_ext >&5 | |
3794 | fi | |
3795 | rm -f conftest* | |
3796 | done | |
3797 | LIBS="$ac_func_search_save_LIBS" | |
3798 | fi | |
3799 | ||
3800 | echo "$ac_t""$ac_cv_search_initscr" 1>&6 | |
3801 | if test "$ac_cv_search_initscr" != "no"; then | |
3802 | test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS" | |
3803 | ||
3804 | else : | |
3805 | { echo "configure: error: no curses library found" 1>&2; exit 1; } | |
3806 | fi | |
3807 | fi | |
3808 | ||
3809 | case $host_os in | |
3810 | cygwin*) | |
3811 | if test -d $srcdir/libtermcap; then | |
3812 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
3813 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
3814 | fi ;; | |
3815 | go32*) | |
3816 | # ??? Is this really true? | |
3817 | ac_cv_search_tgetent="none required" | |
3818 | ;; | |
3819 | aix*) | |
3820 | # Readline prefers curses over termcap on AIX. | |
3821 | # ??? Why? | |
3822 | ||
3823 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
d28f9cdf | 3824 | echo "configure:3825: checking for library containing tgetent" >&5 |
06825bd1 MK |
3825 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3827 | else | |
3828 | ac_func_search_save_LIBS="$LIBS" | |
3829 | ac_cv_search_tgetent="no" | |
3830 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3831 | #line 3832 "configure" |
06825bd1 MK |
3832 | #include "confdefs.h" |
3833 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3834 | /* We use char because int might match the return type of a gcc2 | |
3835 | builtin and then its argument prototype would still apply. */ | |
3836 | char tgetent(); | |
3837 | ||
3838 | int main() { | |
3839 | tgetent() | |
3840 | ; return 0; } | |
3841 | EOF | |
d28f9cdf | 3842 | if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3843 | rm -rf conftest* |
3844 | ac_cv_search_tgetent="none required" | |
3845 | else | |
3846 | echo "configure: failed program was:" >&5 | |
3847 | cat conftest.$ac_ext >&5 | |
3848 | fi | |
3849 | rm -f conftest* | |
3850 | test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do | |
3851 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3852 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3853 | #line 3854 "configure" |
06825bd1 MK |
3854 | #include "confdefs.h" |
3855 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3856 | /* We use char because int might match the return type of a gcc2 | |
3857 | builtin and then its argument prototype would still apply. */ | |
3858 | char tgetent(); | |
3859 | ||
3860 | int main() { | |
3861 | tgetent() | |
3862 | ; return 0; } | |
3863 | EOF | |
d28f9cdf | 3864 | if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3865 | rm -rf conftest* |
3866 | ac_cv_search_tgetent="-l$i" | |
3867 | break | |
3868 | else | |
3869 | echo "configure: failed program was:" >&5 | |
3870 | cat conftest.$ac_ext >&5 | |
3871 | fi | |
3872 | rm -f conftest* | |
3873 | done | |
3874 | LIBS="$ac_func_search_save_LIBS" | |
3875 | fi | |
3876 | ||
3877 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3878 | if test "$ac_cv_search_tgetent" != "no"; then | |
3879 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3880 | ||
3881 | else : | |
3882 | ||
3883 | fi | |
3884 | ;; | |
3885 | esac | |
3886 | ||
3887 | # Note: We used to check for libtermlib and libterminfo too, but | |
3888 | # Readline doesn't, so I think we're safe with leaving them out. | |
3889 | ||
3890 | echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 | |
d28f9cdf | 3891 | echo "configure:3892: checking for library containing tgetent" >&5 |
06825bd1 MK |
3892 | if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then |
3893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3894 | else | |
3895 | ac_func_search_save_LIBS="$LIBS" | |
3896 | ac_cv_search_tgetent="no" | |
3897 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3898 | #line 3899 "configure" |
06825bd1 MK |
3899 | #include "confdefs.h" |
3900 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3901 | /* We use char because int might match the return type of a gcc2 | |
3902 | builtin and then its argument prototype would still apply. */ | |
3903 | char tgetent(); | |
3904 | ||
3905 | int main() { | |
3906 | tgetent() | |
3907 | ; return 0; } | |
3908 | EOF | |
d28f9cdf | 3909 | if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3910 | rm -rf conftest* |
3911 | ac_cv_search_tgetent="none required" | |
3912 | else | |
3913 | echo "configure: failed program was:" >&5 | |
3914 | cat conftest.$ac_ext >&5 | |
3915 | fi | |
3916 | rm -f conftest* | |
3917 | test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do | |
3918 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3919 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3920 | #line 3921 "configure" |
06825bd1 MK |
3921 | #include "confdefs.h" |
3922 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3923 | /* We use char because int might match the return type of a gcc2 | |
3924 | builtin and then its argument prototype would still apply. */ | |
3925 | char tgetent(); | |
3926 | ||
3927 | int main() { | |
3928 | tgetent() | |
3929 | ; return 0; } | |
3930 | EOF | |
d28f9cdf | 3931 | if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
06825bd1 MK |
3932 | rm -rf conftest* |
3933 | ac_cv_search_tgetent="-l$i" | |
3934 | break | |
3935 | else | |
3936 | echo "configure: failed program was:" >&5 | |
3937 | cat conftest.$ac_ext >&5 | |
3938 | fi | |
3939 | rm -f conftest* | |
3940 | done | |
3941 | LIBS="$ac_func_search_save_LIBS" | |
3942 | fi | |
3943 | ||
3944 | echo "$ac_t""$ac_cv_search_tgetent" 1>&6 | |
3945 | if test "$ac_cv_search_tgetent" != "no"; then | |
3946 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
3947 | ||
3948 | else : | |
3949 | ||
3950 | fi | |
3951 | ||
3952 | if test "$ac_cv_search_tgetent" = no; then | |
3953 | { echo "configure: error: no termcap library found" 1>&2; exit 1; } | |
3954 | fi | |
3955 | ||
5ee754fc MK |
3956 | # ------------------------- # |
3957 | # Checks for header files. # | |
3958 | # ------------------------- # | |
3959 | ||
3960 | ac_header_dirent=no | |
3961 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
3962 | do | |
3963 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3964 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
d28f9cdf | 3965 | echo "configure:3966: checking for $ac_hdr that defines DIR" >&5 |
5ee754fc | 3966 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
3967 | echo $ac_n "(cached) $ac_c" 1>&6 |
3968 | else | |
3969 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 3970 | #line 3971 "configure" |
c906108c SS |
3971 | #include "confdefs.h" |
3972 | #include <sys/types.h> | |
5ee754fc MK |
3973 | #include <$ac_hdr> |
3974 | int main() { | |
3975 | DIR *dirp = 0; | |
3976 | ; return 0; } | |
3977 | EOF | |
d28f9cdf | 3978 | if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5ee754fc MK |
3979 | rm -rf conftest* |
3980 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
3981 | else | |
3982 | echo "configure: failed program was:" >&5 | |
3983 | cat conftest.$ac_ext >&5 | |
3984 | rm -rf conftest* | |
3985 | eval "ac_cv_header_dirent_$ac_safe=no" | |
3986 | fi | |
3987 | rm -f conftest* | |
3988 | fi | |
3989 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
3990 | echo "$ac_t""yes" 1>&6 | |
3991 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3992 | cat >> confdefs.h <<EOF | |
3993 | #define $ac_tr_hdr 1 | |
3994 | EOF | |
3995 | ac_header_dirent=$ac_hdr; break | |
3996 | else | |
3997 | echo "$ac_t""no" 1>&6 | |
3998 | fi | |
3999 | done | |
4000 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4001 | if test $ac_header_dirent = dirent.h; then | |
4002 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
d28f9cdf | 4003 | echo "configure:4004: checking for opendir in -ldir" >&5 |
5ee754fc MK |
4004 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4005 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4007 | else | |
4008 | ac_save_LIBS="$LIBS" | |
4009 | LIBS="-ldir $LIBS" | |
4010 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4011 | #line 4012 "configure" |
5ee754fc MK |
4012 | #include "confdefs.h" |
4013 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4014 | /* We use char because int might match the return type of a gcc2 | |
4015 | builtin and then its argument prototype would still apply. */ | |
4016 | char opendir(); | |
c906108c SS |
4017 | |
4018 | int main() { | |
5ee754fc | 4019 | opendir() |
c906108c SS |
4020 | ; return 0; } |
4021 | EOF | |
d28f9cdf | 4022 | if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 4023 | rm -rf conftest* |
5ee754fc | 4024 | eval "ac_cv_lib_$ac_lib_var=yes" |
c906108c SS |
4025 | else |
4026 | echo "configure: failed program was:" >&5 | |
4027 | cat conftest.$ac_ext >&5 | |
4028 | rm -rf conftest* | |
5ee754fc | 4029 | eval "ac_cv_lib_$ac_lib_var=no" |
c906108c SS |
4030 | fi |
4031 | rm -f conftest* | |
5ee754fc MK |
4032 | LIBS="$ac_save_LIBS" |
4033 | ||
4034 | fi | |
4035 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4036 | echo "$ac_t""yes" 1>&6 | |
4037 | LIBS="$LIBS -ldir" | |
4038 | else | |
4039 | echo "$ac_t""no" 1>&6 | |
c906108c SS |
4040 | fi |
4041 | ||
5ee754fc MK |
4042 | else |
4043 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
d28f9cdf | 4044 | echo "configure:4045: checking for opendir in -lx" >&5 |
5ee754fc MK |
4045 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4046 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4047 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4048 | else | |
4049 | ac_save_LIBS="$LIBS" | |
4050 | LIBS="-lx $LIBS" | |
4051 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4052 | #line 4053 "configure" |
5ee754fc MK |
4053 | #include "confdefs.h" |
4054 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4055 | /* We use char because int might match the return type of a gcc2 | |
4056 | builtin and then its argument prototype would still apply. */ | |
4057 | char opendir(); | |
4058 | ||
4059 | int main() { | |
4060 | opendir() | |
4061 | ; return 0; } | |
c906108c | 4062 | EOF |
d28f9cdf | 4063 | if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5ee754fc MK |
4064 | rm -rf conftest* |
4065 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4066 | else | |
4067 | echo "configure: failed program was:" >&5 | |
4068 | cat conftest.$ac_ext >&5 | |
4069 | rm -rf conftest* | |
4070 | eval "ac_cv_lib_$ac_lib_var=no" | |
4071 | fi | |
4072 | rm -f conftest* | |
4073 | LIBS="$ac_save_LIBS" | |
c906108c | 4074 | |
5ee754fc MK |
4075 | fi |
4076 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4077 | echo "$ac_t""yes" 1>&6 | |
4078 | LIBS="$LIBS -lx" | |
4079 | else | |
4080 | echo "$ac_t""no" 1>&6 | |
4081 | fi | |
c906108c | 4082 | |
5ee754fc | 4083 | fi |
c906108c | 4084 | |
5ee754fc | 4085 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
d28f9cdf | 4086 | echo "configure:4087: checking whether stat file-mode macros are broken" >&5 |
5ee754fc | 4087 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
9608ab8b MK |
4088 | echo $ac_n "(cached) $ac_c" 1>&6 |
4089 | else | |
4090 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4091 | #line 4092 "configure" |
9608ab8b MK |
4092 | #include "confdefs.h" |
4093 | #include <sys/types.h> | |
5ee754fc MK |
4094 | #include <sys/stat.h> |
4095 | ||
4096 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
4097 | # if S_ISBLK (S_IFDIR) | |
4098 | You lose. | |
4099 | # endif | |
4100 | #endif | |
4101 | ||
4102 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
4103 | # if S_ISBLK (S_IFCHR) | |
4104 | You lose. | |
4105 | # endif | |
4106 | #endif | |
4107 | ||
4108 | #if defined(S_ISLNK) && defined(S_IFREG) | |
4109 | # if S_ISLNK (S_IFREG) | |
4110 | You lose. | |
4111 | # endif | |
4112 | #endif | |
4113 | ||
4114 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
4115 | # if S_ISSOCK (S_IFREG) | |
4116 | You lose. | |
4117 | # endif | |
4118 | #endif | |
4119 | ||
9608ab8b | 4120 | EOF |
5ee754fc MK |
4121 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
4122 | egrep "You lose" >/dev/null 2>&1; then | |
9608ab8b | 4123 | rm -rf conftest* |
5ee754fc MK |
4124 | ac_cv_header_stat_broken=yes |
4125 | else | |
4126 | rm -rf conftest* | |
4127 | ac_cv_header_stat_broken=no | |
4128 | fi | |
4129 | rm -f conftest* | |
4130 | ||
4131 | fi | |
4132 | ||
4133 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
4134 | if test $ac_cv_header_stat_broken = yes; then | |
4135 | cat >> confdefs.h <<\EOF | |
4136 | #define STAT_MACROS_BROKEN 1 | |
4137 | EOF | |
4138 | ||
4139 | fi | |
4140 | ||
4141 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
d28f9cdf | 4142 | echo "configure:4143: checking for ANSI C header files" >&5 |
5ee754fc MK |
4143 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
4144 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4145 | else | |
4146 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4147 | #line 4148 "configure" |
5ee754fc MK |
4148 | #include "confdefs.h" |
4149 | #include <stdlib.h> | |
4150 | #include <stdarg.h> | |
4151 | #include <string.h> | |
4152 | #include <float.h> | |
4153 | EOF | |
4154 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4155 | { (eval echo configure:4156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4156 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4157 | if test -z "$ac_err"; then | |
4158 | rm -rf conftest* | |
4159 | ac_cv_header_stdc=yes | |
4160 | else | |
4161 | echo "$ac_err" >&5 | |
4162 | echo "configure: failed program was:" >&5 | |
4163 | cat conftest.$ac_ext >&5 | |
4164 | rm -rf conftest* | |
4165 | ac_cv_header_stdc=no | |
4166 | fi | |
4167 | rm -f conftest* | |
4168 | ||
4169 | if test $ac_cv_header_stdc = yes; then | |
4170 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4171 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4172 | #line 4173 "configure" |
5ee754fc MK |
4173 | #include "confdefs.h" |
4174 | #include <string.h> | |
4175 | EOF | |
4176 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4177 | egrep "memchr" >/dev/null 2>&1; then | |
4178 | : | |
4179 | else | |
4180 | rm -rf conftest* | |
4181 | ac_cv_header_stdc=no | |
4182 | fi | |
4183 | rm -f conftest* | |
4184 | ||
4185 | fi | |
4186 | ||
4187 | if test $ac_cv_header_stdc = yes; then | |
4188 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4189 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4190 | #line 4191 "configure" |
5ee754fc MK |
4191 | #include "confdefs.h" |
4192 | #include <stdlib.h> | |
4193 | EOF | |
4194 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4195 | egrep "free" >/dev/null 2>&1; then | |
4196 | : | |
4197 | else | |
4198 | rm -rf conftest* | |
4199 | ac_cv_header_stdc=no | |
4200 | fi | |
4201 | rm -f conftest* | |
4202 | ||
4203 | fi | |
4204 | ||
4205 | if test $ac_cv_header_stdc = yes; then | |
4206 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4207 | if test "$cross_compiling" = yes; then | |
4208 | : | |
4209 | else | |
4210 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4211 | #line 4212 "configure" |
5ee754fc MK |
4212 | #include "confdefs.h" |
4213 | #include <ctype.h> | |
4214 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4215 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4216 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4217 | int main () { int i; for (i = 0; i < 256; i++) | |
4218 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
4219 | exit (0); } | |
4220 | ||
4221 | EOF | |
d28f9cdf | 4222 | if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
5ee754fc MK |
4223 | then |
4224 | : | |
9608ab8b | 4225 | else |
5ee754fc MK |
4226 | echo "configure: failed program was:" >&5 |
4227 | cat conftest.$ac_ext >&5 | |
4228 | rm -fr conftest* | |
4229 | ac_cv_header_stdc=no | |
4230 | fi | |
4231 | rm -fr conftest* | |
4232 | fi | |
4233 | ||
4234 | fi | |
4235 | fi | |
4236 | ||
4237 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
4238 | if test $ac_cv_header_stdc = yes; then | |
4239 | cat >> confdefs.h <<\EOF | |
4240 | #define STDC_HEADERS 1 | |
4241 | EOF | |
4242 | ||
4243 | fi | |
4244 | ||
4245 | for ac_hdr in link.h | |
4246 | do | |
4247 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4248 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4249 | echo "configure:4250: checking for $ac_hdr" >&5 |
5ee754fc MK |
4250 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4252 | else | |
4253 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4254 | #line 4255 "configure" |
5ee754fc MK |
4255 | #include "confdefs.h" |
4256 | #include <$ac_hdr> | |
4257 | EOF | |
4258 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4259 | { (eval echo configure:4260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4260 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4261 | if test -z "$ac_err"; then | |
4262 | rm -rf conftest* | |
4263 | eval "ac_cv_header_$ac_safe=yes" | |
4264 | else | |
4265 | echo "$ac_err" >&5 | |
4266 | echo "configure: failed program was:" >&5 | |
4267 | cat conftest.$ac_ext >&5 | |
4268 | rm -rf conftest* | |
4269 | eval "ac_cv_header_$ac_safe=no" | |
4270 | fi | |
4271 | rm -f conftest* | |
4272 | fi | |
4273 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4274 | echo "$ac_t""yes" 1>&6 | |
4275 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4276 | cat >> confdefs.h <<EOF | |
4277 | #define $ac_tr_hdr 1 | |
4278 | EOF | |
4279 | ||
4280 | else | |
4281 | echo "$ac_t""no" 1>&6 | |
4282 | fi | |
4283 | done | |
4284 | ||
4285 | for ac_hdr in nlist.h | |
4286 | do | |
4287 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4288 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4289 | echo "configure:4290: checking for $ac_hdr" >&5 |
5ee754fc MK |
4290 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4292 | else | |
4293 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4294 | #line 4295 "configure" |
5ee754fc MK |
4295 | #include "confdefs.h" |
4296 | #include <$ac_hdr> | |
4297 | EOF | |
4298 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4299 | { (eval echo configure:4300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4300 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4301 | if test -z "$ac_err"; then | |
4302 | rm -rf conftest* | |
4303 | eval "ac_cv_header_$ac_safe=yes" | |
4304 | else | |
4305 | echo "$ac_err" >&5 | |
4306 | echo "configure: failed program was:" >&5 | |
4307 | cat conftest.$ac_ext >&5 | |
4308 | rm -rf conftest* | |
4309 | eval "ac_cv_header_$ac_safe=no" | |
4310 | fi | |
4311 | rm -f conftest* | |
4312 | fi | |
4313 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4314 | echo "$ac_t""yes" 1>&6 | |
4315 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4316 | cat >> confdefs.h <<EOF | |
4317 | #define $ac_tr_hdr 1 | |
4318 | EOF | |
4319 | ||
4320 | else | |
4321 | echo "$ac_t""no" 1>&6 | |
4322 | fi | |
4323 | done | |
4324 | ||
4325 | for ac_hdr in poll.h sys/poll.h | |
4326 | do | |
4327 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4328 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4329 | echo "configure:4330: checking for $ac_hdr" >&5 |
5ee754fc MK |
4330 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4331 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4332 | else | |
4333 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4334 | #line 4335 "configure" |
5ee754fc MK |
4335 | #include "confdefs.h" |
4336 | #include <$ac_hdr> | |
4337 | EOF | |
4338 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4339 | { (eval echo configure:4340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4340 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4341 | if test -z "$ac_err"; then | |
4342 | rm -rf conftest* | |
4343 | eval "ac_cv_header_$ac_safe=yes" | |
4344 | else | |
4345 | echo "$ac_err" >&5 | |
4346 | echo "configure: failed program was:" >&5 | |
4347 | cat conftest.$ac_ext >&5 | |
4348 | rm -rf conftest* | |
4349 | eval "ac_cv_header_$ac_safe=no" | |
4350 | fi | |
4351 | rm -f conftest* | |
4352 | fi | |
4353 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4354 | echo "$ac_t""yes" 1>&6 | |
4355 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4356 | cat >> confdefs.h <<EOF | |
4357 | #define $ac_tr_hdr 1 | |
4358 | EOF | |
4359 | ||
4360 | else | |
4361 | echo "$ac_t""no" 1>&6 | |
4362 | fi | |
4363 | done | |
4364 | ||
4365 | for ac_hdr in proc_service.h thread_db.h | |
4366 | do | |
4367 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4368 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4369 | echo "configure:4370: checking for $ac_hdr" >&5 |
5ee754fc MK |
4370 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4372 | else | |
4373 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4374 | #line 4375 "configure" |
5ee754fc MK |
4375 | #include "confdefs.h" |
4376 | #include <$ac_hdr> | |
4377 | EOF | |
4378 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4379 | { (eval echo configure:4380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4380 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4381 | if test -z "$ac_err"; then | |
4382 | rm -rf conftest* | |
4383 | eval "ac_cv_header_$ac_safe=yes" | |
4384 | else | |
4385 | echo "$ac_err" >&5 | |
4386 | echo "configure: failed program was:" >&5 | |
4387 | cat conftest.$ac_ext >&5 | |
4388 | rm -rf conftest* | |
4389 | eval "ac_cv_header_$ac_safe=no" | |
4390 | fi | |
4391 | rm -f conftest* | |
4392 | fi | |
4393 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4394 | echo "$ac_t""yes" 1>&6 | |
4395 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4396 | cat >> confdefs.h <<EOF | |
4397 | #define $ac_tr_hdr 1 | |
4398 | EOF | |
4399 | ||
4400 | else | |
4401 | echo "$ac_t""no" 1>&6 | |
4402 | fi | |
4403 | done | |
4404 | ||
4405 | for ac_hdr in stddef.h | |
4406 | do | |
4407 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4408 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4409 | echo "configure:4410: checking for $ac_hdr" >&5 |
5ee754fc MK |
4410 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4411 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4412 | else | |
4413 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4414 | #line 4415 "configure" |
5ee754fc MK |
4415 | #include "confdefs.h" |
4416 | #include <$ac_hdr> | |
4417 | EOF | |
4418 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4419 | { (eval echo configure:4420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4420 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4421 | if test -z "$ac_err"; then | |
4422 | rm -rf conftest* | |
4423 | eval "ac_cv_header_$ac_safe=yes" | |
4424 | else | |
4425 | echo "$ac_err" >&5 | |
4426 | echo "configure: failed program was:" >&5 | |
4427 | cat conftest.$ac_ext >&5 | |
4428 | rm -rf conftest* | |
4429 | eval "ac_cv_header_$ac_safe=no" | |
4430 | fi | |
4431 | rm -f conftest* | |
4432 | fi | |
4433 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4434 | echo "$ac_t""yes" 1>&6 | |
4435 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4436 | cat >> confdefs.h <<EOF | |
4437 | #define $ac_tr_hdr 1 | |
4438 | EOF | |
4439 | ||
4440 | else | |
4441 | echo "$ac_t""no" 1>&6 | |
4442 | fi | |
4443 | done | |
4444 | ||
4445 | for ac_hdr in stdlib.h | |
4446 | do | |
4447 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4448 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4449 | echo "configure:4450: checking for $ac_hdr" >&5 |
5ee754fc MK |
4450 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4452 | else | |
4453 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4454 | #line 4455 "configure" |
5ee754fc MK |
4455 | #include "confdefs.h" |
4456 | #include <$ac_hdr> | |
4457 | EOF | |
4458 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4459 | { (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4460 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4461 | if test -z "$ac_err"; then | |
4462 | rm -rf conftest* | |
4463 | eval "ac_cv_header_$ac_safe=yes" | |
4464 | else | |
4465 | echo "$ac_err" >&5 | |
4466 | echo "configure: failed program was:" >&5 | |
4467 | cat conftest.$ac_ext >&5 | |
4468 | rm -rf conftest* | |
4469 | eval "ac_cv_header_$ac_safe=no" | |
4470 | fi | |
4471 | rm -f conftest* | |
4472 | fi | |
4473 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4474 | echo "$ac_t""yes" 1>&6 | |
4475 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4476 | cat >> confdefs.h <<EOF | |
4477 | #define $ac_tr_hdr 1 | |
4478 | EOF | |
4479 | ||
4480 | else | |
4481 | echo "$ac_t""no" 1>&6 | |
4482 | fi | |
4483 | done | |
4484 | ||
4485 | for ac_hdr in stdint.h | |
4486 | do | |
4487 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4488 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4489 | echo "configure:4490: checking for $ac_hdr" >&5 |
5ee754fc MK |
4490 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4491 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4492 | else | |
4493 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4494 | #line 4495 "configure" |
5ee754fc MK |
4495 | #include "confdefs.h" |
4496 | #include <$ac_hdr> | |
4497 | EOF | |
4498 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4499 | { (eval echo configure:4500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4500 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4501 | if test -z "$ac_err"; then | |
4502 | rm -rf conftest* | |
4503 | eval "ac_cv_header_$ac_safe=yes" | |
4504 | else | |
4505 | echo "$ac_err" >&5 | |
4506 | echo "configure: failed program was:" >&5 | |
4507 | cat conftest.$ac_ext >&5 | |
4508 | rm -rf conftest* | |
4509 | eval "ac_cv_header_$ac_safe=no" | |
4510 | fi | |
4511 | rm -f conftest* | |
4512 | fi | |
4513 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4514 | echo "$ac_t""yes" 1>&6 | |
4515 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4516 | cat >> confdefs.h <<EOF | |
4517 | #define $ac_tr_hdr 1 | |
4518 | EOF | |
4519 | ||
4520 | else | |
4521 | echo "$ac_t""no" 1>&6 | |
4522 | fi | |
4523 | done | |
4524 | ||
4525 | for ac_hdr in string.h memory.h strings.h | |
4526 | do | |
4527 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4528 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4529 | echo "configure:4530: checking for $ac_hdr" >&5 |
5ee754fc MK |
4530 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4531 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4532 | else | |
4533 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4534 | #line 4535 "configure" |
5ee754fc MK |
4535 | #include "confdefs.h" |
4536 | #include <$ac_hdr> | |
4537 | EOF | |
4538 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4539 | { (eval echo configure:4540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4540 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4541 | if test -z "$ac_err"; then | |
4542 | rm -rf conftest* | |
4543 | eval "ac_cv_header_$ac_safe=yes" | |
4544 | else | |
4545 | echo "$ac_err" >&5 | |
4546 | echo "configure: failed program was:" >&5 | |
4547 | cat conftest.$ac_ext >&5 | |
4548 | rm -rf conftest* | |
4549 | eval "ac_cv_header_$ac_safe=no" | |
4550 | fi | |
4551 | rm -f conftest* | |
4552 | fi | |
4553 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4554 | echo "$ac_t""yes" 1>&6 | |
4555 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4556 | cat >> confdefs.h <<EOF | |
4557 | #define $ac_tr_hdr 1 | |
4558 | EOF | |
4559 | ||
4560 | else | |
4561 | echo "$ac_t""no" 1>&6 | |
4562 | fi | |
4563 | done | |
4564 | ||
4565 | for ac_hdr in sys/fault.h | |
4566 | do | |
4567 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4568 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4569 | echo "configure:4570: checking for $ac_hdr" >&5 |
5ee754fc MK |
4570 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4572 | else | |
4573 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4574 | #line 4575 "configure" |
5ee754fc MK |
4575 | #include "confdefs.h" |
4576 | #include <$ac_hdr> | |
4577 | EOF | |
4578 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4579 | { (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4580 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4581 | if test -z "$ac_err"; then | |
4582 | rm -rf conftest* | |
4583 | eval "ac_cv_header_$ac_safe=yes" | |
4584 | else | |
4585 | echo "$ac_err" >&5 | |
4586 | echo "configure: failed program was:" >&5 | |
4587 | cat conftest.$ac_ext >&5 | |
4588 | rm -rf conftest* | |
4589 | eval "ac_cv_header_$ac_safe=no" | |
4590 | fi | |
4591 | rm -f conftest* | |
4592 | fi | |
4593 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4594 | echo "$ac_t""yes" 1>&6 | |
4595 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4596 | cat >> confdefs.h <<EOF | |
4597 | #define $ac_tr_hdr 1 | |
4598 | EOF | |
4599 | ||
4600 | else | |
4601 | echo "$ac_t""no" 1>&6 | |
4602 | fi | |
4603 | done | |
4604 | ||
4605 | for ac_hdr in sys/file.h | |
4606 | do | |
4607 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4608 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4609 | echo "configure:4610: checking for $ac_hdr" >&5 |
5ee754fc MK |
4610 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4611 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4612 | else | |
4613 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4614 | #line 4615 "configure" |
5ee754fc MK |
4615 | #include "confdefs.h" |
4616 | #include <$ac_hdr> | |
4617 | EOF | |
4618 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4619 | { (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4620 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4621 | if test -z "$ac_err"; then | |
4622 | rm -rf conftest* | |
4623 | eval "ac_cv_header_$ac_safe=yes" | |
4624 | else | |
4625 | echo "$ac_err" >&5 | |
4626 | echo "configure: failed program was:" >&5 | |
4627 | cat conftest.$ac_ext >&5 | |
4628 | rm -rf conftest* | |
4629 | eval "ac_cv_header_$ac_safe=no" | |
4630 | fi | |
4631 | rm -f conftest* | |
4632 | fi | |
4633 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4634 | echo "$ac_t""yes" 1>&6 | |
4635 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4636 | cat >> confdefs.h <<EOF | |
4637 | #define $ac_tr_hdr 1 | |
4638 | EOF | |
4639 | ||
4640 | else | |
4641 | echo "$ac_t""no" 1>&6 | |
4642 | fi | |
4643 | done | |
4644 | ||
4645 | for ac_hdr in sys/filio.h | |
4646 | do | |
4647 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4648 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4649 | echo "configure:4650: checking for $ac_hdr" >&5 |
5ee754fc MK |
4650 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4651 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4652 | else | |
4653 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4654 | #line 4655 "configure" |
5ee754fc MK |
4655 | #include "confdefs.h" |
4656 | #include <$ac_hdr> | |
4657 | EOF | |
4658 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4659 | { (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4660 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4661 | if test -z "$ac_err"; then | |
4662 | rm -rf conftest* | |
4663 | eval "ac_cv_header_$ac_safe=yes" | |
4664 | else | |
4665 | echo "$ac_err" >&5 | |
4666 | echo "configure: failed program was:" >&5 | |
4667 | cat conftest.$ac_ext >&5 | |
4668 | rm -rf conftest* | |
4669 | eval "ac_cv_header_$ac_safe=no" | |
4670 | fi | |
4671 | rm -f conftest* | |
4672 | fi | |
4673 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4674 | echo "$ac_t""yes" 1>&6 | |
4675 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4676 | cat >> confdefs.h <<EOF | |
4677 | #define $ac_tr_hdr 1 | |
4678 | EOF | |
4679 | ||
4680 | else | |
4681 | echo "$ac_t""no" 1>&6 | |
4682 | fi | |
4683 | done | |
4684 | ||
4685 | for ac_hdr in sys/ioctl.h | |
4686 | do | |
4687 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4688 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4689 | echo "configure:4690: checking for $ac_hdr" >&5 |
5ee754fc MK |
4690 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4692 | else | |
4693 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4694 | #line 4695 "configure" |
5ee754fc MK |
4695 | #include "confdefs.h" |
4696 | #include <$ac_hdr> | |
4697 | EOF | |
4698 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4699 | { (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4700 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4701 | if test -z "$ac_err"; then | |
4702 | rm -rf conftest* | |
4703 | eval "ac_cv_header_$ac_safe=yes" | |
4704 | else | |
4705 | echo "$ac_err" >&5 | |
4706 | echo "configure: failed program was:" >&5 | |
4707 | cat conftest.$ac_ext >&5 | |
4708 | rm -rf conftest* | |
4709 | eval "ac_cv_header_$ac_safe=no" | |
4710 | fi | |
4711 | rm -f conftest* | |
4712 | fi | |
4713 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4714 | echo "$ac_t""yes" 1>&6 | |
4715 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4716 | cat >> confdefs.h <<EOF | |
4717 | #define $ac_tr_hdr 1 | |
4718 | EOF | |
4719 | ||
4720 | else | |
4721 | echo "$ac_t""no" 1>&6 | |
4722 | fi | |
4723 | done | |
4724 | ||
4725 | for ac_hdr in sys/param.h | |
4726 | do | |
4727 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4728 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4729 | echo "configure:4730: checking for $ac_hdr" >&5 |
5ee754fc MK |
4730 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4732 | else | |
4733 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4734 | #line 4735 "configure" |
5ee754fc MK |
4735 | #include "confdefs.h" |
4736 | #include <$ac_hdr> | |
4737 | EOF | |
4738 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4739 | { (eval echo configure:4740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4740 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4741 | if test -z "$ac_err"; then | |
4742 | rm -rf conftest* | |
4743 | eval "ac_cv_header_$ac_safe=yes" | |
4744 | else | |
4745 | echo "$ac_err" >&5 | |
4746 | echo "configure: failed program was:" >&5 | |
4747 | cat conftest.$ac_ext >&5 | |
4748 | rm -rf conftest* | |
4749 | eval "ac_cv_header_$ac_safe=no" | |
4750 | fi | |
4751 | rm -f conftest* | |
4752 | fi | |
4753 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4754 | echo "$ac_t""yes" 1>&6 | |
4755 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4756 | cat >> confdefs.h <<EOF | |
4757 | #define $ac_tr_hdr 1 | |
4758 | EOF | |
4759 | ||
4760 | else | |
4761 | echo "$ac_t""no" 1>&6 | |
4762 | fi | |
4763 | done | |
4764 | ||
4765 | for ac_hdr in sys/proc.h | |
4766 | do | |
4767 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4768 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4769 | echo "configure:4770: checking for $ac_hdr" >&5 |
5ee754fc MK |
4770 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4771 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4772 | else | |
4773 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4774 | #line 4775 "configure" |
5ee754fc MK |
4775 | #include "confdefs.h" |
4776 | #include <$ac_hdr> | |
4777 | EOF | |
4778 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4779 | { (eval echo configure:4780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4780 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4781 | if test -z "$ac_err"; then | |
4782 | rm -rf conftest* | |
4783 | eval "ac_cv_header_$ac_safe=yes" | |
4784 | else | |
4785 | echo "$ac_err" >&5 | |
4786 | echo "configure: failed program was:" >&5 | |
4787 | cat conftest.$ac_ext >&5 | |
4788 | rm -rf conftest* | |
4789 | eval "ac_cv_header_$ac_safe=no" | |
4790 | fi | |
4791 | rm -f conftest* | |
4792 | fi | |
4793 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4794 | echo "$ac_t""yes" 1>&6 | |
4795 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4796 | cat >> confdefs.h <<EOF | |
4797 | #define $ac_tr_hdr 1 | |
4798 | EOF | |
4799 | ||
4800 | else | |
4801 | echo "$ac_t""no" 1>&6 | |
4802 | fi | |
4803 | done | |
4804 | ||
4805 | for ac_hdr in sys/procfs.h | |
4806 | do | |
4807 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4808 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4809 | echo "configure:4810: checking for $ac_hdr" >&5 |
5ee754fc MK |
4810 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4811 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4812 | else | |
4813 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4814 | #line 4815 "configure" |
5ee754fc MK |
4815 | #include "confdefs.h" |
4816 | #include <$ac_hdr> | |
4817 | EOF | |
4818 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4819 | { (eval echo configure:4820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4820 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4821 | if test -z "$ac_err"; then | |
4822 | rm -rf conftest* | |
4823 | eval "ac_cv_header_$ac_safe=yes" | |
4824 | else | |
4825 | echo "$ac_err" >&5 | |
4826 | echo "configure: failed program was:" >&5 | |
4827 | cat conftest.$ac_ext >&5 | |
4828 | rm -rf conftest* | |
4829 | eval "ac_cv_header_$ac_safe=no" | |
4830 | fi | |
4831 | rm -f conftest* | |
4832 | fi | |
4833 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4834 | echo "$ac_t""yes" 1>&6 | |
4835 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4836 | cat >> confdefs.h <<EOF | |
4837 | #define $ac_tr_hdr 1 | |
4838 | EOF | |
4839 | ||
4840 | else | |
4841 | echo "$ac_t""no" 1>&6 | |
4842 | fi | |
4843 | done | |
4844 | ||
4845 | for ac_hdr in sys/ptrace.h ptrace.h | |
4846 | do | |
4847 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4848 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4849 | echo "configure:4850: checking for $ac_hdr" >&5 |
5ee754fc MK |
4850 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4852 | else | |
4853 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4854 | #line 4855 "configure" |
5ee754fc MK |
4855 | #include "confdefs.h" |
4856 | #include <$ac_hdr> | |
4857 | EOF | |
4858 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4859 | { (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4860 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4861 | if test -z "$ac_err"; then | |
4862 | rm -rf conftest* | |
4863 | eval "ac_cv_header_$ac_safe=yes" | |
4864 | else | |
4865 | echo "$ac_err" >&5 | |
4866 | echo "configure: failed program was:" >&5 | |
4867 | cat conftest.$ac_ext >&5 | |
4868 | rm -rf conftest* | |
4869 | eval "ac_cv_header_$ac_safe=no" | |
4870 | fi | |
4871 | rm -f conftest* | |
4872 | fi | |
4873 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4874 | echo "$ac_t""yes" 1>&6 | |
4875 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4876 | cat >> confdefs.h <<EOF | |
4877 | #define $ac_tr_hdr 1 | |
4878 | EOF | |
4879 | ||
4880 | else | |
4881 | echo "$ac_t""no" 1>&6 | |
4882 | fi | |
4883 | done | |
4884 | ||
4885 | for ac_hdr in sys/reg.h sys/debugreg.h | |
4886 | do | |
4887 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4888 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4889 | echo "configure:4890: checking for $ac_hdr" >&5 |
5ee754fc MK |
4890 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4892 | else | |
4893 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4894 | #line 4895 "configure" |
5ee754fc MK |
4895 | #include "confdefs.h" |
4896 | #include <$ac_hdr> | |
4897 | EOF | |
4898 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4899 | { (eval echo configure:4900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4900 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4901 | if test -z "$ac_err"; then | |
4902 | rm -rf conftest* | |
4903 | eval "ac_cv_header_$ac_safe=yes" | |
4904 | else | |
4905 | echo "$ac_err" >&5 | |
4906 | echo "configure: failed program was:" >&5 | |
4907 | cat conftest.$ac_ext >&5 | |
4908 | rm -rf conftest* | |
4909 | eval "ac_cv_header_$ac_safe=no" | |
4910 | fi | |
4911 | rm -f conftest* | |
4912 | fi | |
4913 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4914 | echo "$ac_t""yes" 1>&6 | |
4915 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4916 | cat >> confdefs.h <<EOF | |
4917 | #define $ac_tr_hdr 1 | |
4918 | EOF | |
4919 | ||
4920 | else | |
4921 | echo "$ac_t""no" 1>&6 | |
4922 | fi | |
4923 | done | |
4924 | ||
4925 | for ac_hdr in sys/select.h | |
4926 | do | |
4927 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4928 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4929 | echo "configure:4930: checking for $ac_hdr" >&5 |
5ee754fc MK |
4930 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4932 | else | |
4933 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4934 | #line 4935 "configure" |
5ee754fc MK |
4935 | #include "confdefs.h" |
4936 | #include <$ac_hdr> | |
4937 | EOF | |
4938 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4939 | { (eval echo configure:4940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4940 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4941 | if test -z "$ac_err"; then | |
4942 | rm -rf conftest* | |
4943 | eval "ac_cv_header_$ac_safe=yes" | |
4944 | else | |
4945 | echo "$ac_err" >&5 | |
4946 | echo "configure: failed program was:" >&5 | |
4947 | cat conftest.$ac_ext >&5 | |
4948 | rm -rf conftest* | |
4949 | eval "ac_cv_header_$ac_safe=no" | |
4950 | fi | |
4951 | rm -f conftest* | |
4952 | fi | |
4953 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4954 | echo "$ac_t""yes" 1>&6 | |
4955 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4956 | cat >> confdefs.h <<EOF | |
4957 | #define $ac_tr_hdr 1 | |
4958 | EOF | |
4959 | ||
4960 | else | |
4961 | echo "$ac_t""no" 1>&6 | |
4962 | fi | |
4963 | done | |
4964 | ||
4965 | for ac_hdr in sys/syscall.h | |
4966 | do | |
4967 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4968 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 4969 | echo "configure:4970: checking for $ac_hdr" >&5 |
5ee754fc MK |
4970 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4971 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4972 | else | |
4973 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 4974 | #line 4975 "configure" |
5ee754fc MK |
4975 | #include "confdefs.h" |
4976 | #include <$ac_hdr> | |
4977 | EOF | |
4978 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 4979 | { (eval echo configure:4980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
4980 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4981 | if test -z "$ac_err"; then | |
4982 | rm -rf conftest* | |
4983 | eval "ac_cv_header_$ac_safe=yes" | |
4984 | else | |
4985 | echo "$ac_err" >&5 | |
4986 | echo "configure: failed program was:" >&5 | |
4987 | cat conftest.$ac_ext >&5 | |
4988 | rm -rf conftest* | |
4989 | eval "ac_cv_header_$ac_safe=no" | |
4990 | fi | |
4991 | rm -f conftest* | |
4992 | fi | |
4993 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4994 | echo "$ac_t""yes" 1>&6 | |
4995 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4996 | cat >> confdefs.h <<EOF | |
4997 | #define $ac_tr_hdr 1 | |
4998 | EOF | |
4999 | ||
5000 | else | |
5001 | echo "$ac_t""no" 1>&6 | |
5002 | fi | |
5003 | done | |
5004 | ||
5005 | for ac_hdr in sys/user.h | |
5006 | do | |
5007 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5008 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5009 | echo "configure:5010: checking for $ac_hdr" >&5 |
5ee754fc MK |
5010 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5011 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5012 | else | |
5013 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5014 | #line 5015 "configure" |
5ee754fc MK |
5015 | #include "confdefs.h" |
5016 | #include <$ac_hdr> | |
5017 | EOF | |
5018 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 5019 | { (eval echo configure:5020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5020 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5021 | if test -z "$ac_err"; then | |
5022 | rm -rf conftest* | |
5023 | eval "ac_cv_header_$ac_safe=yes" | |
5024 | else | |
5025 | echo "$ac_err" >&5 | |
5026 | echo "configure: failed program was:" >&5 | |
5027 | cat conftest.$ac_ext >&5 | |
5028 | rm -rf conftest* | |
5029 | eval "ac_cv_header_$ac_safe=no" | |
5030 | fi | |
5031 | rm -f conftest* | |
5032 | fi | |
5033 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5034 | echo "$ac_t""yes" 1>&6 | |
5035 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5036 | cat >> confdefs.h <<EOF | |
5037 | #define $ac_tr_hdr 1 | |
5038 | EOF | |
5039 | ||
5040 | else | |
5041 | echo "$ac_t""no" 1>&6 | |
5042 | fi | |
5043 | done | |
5044 | ||
5045 | for ac_hdr in sys/wait.h wait.h | |
5046 | do | |
5047 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5048 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5049 | echo "configure:5050: checking for $ac_hdr" >&5 |
5ee754fc MK |
5050 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5052 | else | |
5053 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5054 | #line 5055 "configure" |
5ee754fc MK |
5055 | #include "confdefs.h" |
5056 | #include <$ac_hdr> | |
5057 | EOF | |
5058 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 5059 | { (eval echo configure:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5060 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5061 | if test -z "$ac_err"; then | |
5062 | rm -rf conftest* | |
5063 | eval "ac_cv_header_$ac_safe=yes" | |
5064 | else | |
5065 | echo "$ac_err" >&5 | |
9608ab8b MK |
5066 | echo "configure: failed program was:" >&5 |
5067 | cat conftest.$ac_ext >&5 | |
5068 | rm -rf conftest* | |
5ee754fc | 5069 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5070 | fi |
5071 | rm -f conftest* | |
5072 | fi | |
5ee754fc | 5073 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b MK |
5074 | echo "$ac_t""yes" 1>&6 |
5075 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5076 | cat >> confdefs.h <<EOF | |
5077 | #define $ac_tr_hdr 1 | |
5078 | EOF | |
5ee754fc | 5079 | |
9608ab8b MK |
5080 | else |
5081 | echo "$ac_t""no" 1>&6 | |
5082 | fi | |
5083 | done | |
5ee754fc MK |
5084 | |
5085 | for ac_hdr in termios.h termio.h sgtty.h | |
5086 | do | |
5087 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5088 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5089 | echo "configure:5090: checking for $ac_hdr" >&5 |
5ee754fc | 5090 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5091 | echo $ac_n "(cached) $ac_c" 1>&6 |
5092 | else | |
5ee754fc | 5093 | cat > conftest.$ac_ext <<EOF |
d28f9cdf | 5094 | #line 5095 "configure" |
9608ab8b | 5095 | #include "confdefs.h" |
5ee754fc | 5096 | #include <$ac_hdr> |
9608ab8b | 5097 | EOF |
5ee754fc | 5098 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
d28f9cdf | 5099 | { (eval echo configure:5100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5100 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5101 | if test -z "$ac_err"; then | |
9608ab8b | 5102 | rm -rf conftest* |
5ee754fc | 5103 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5104 | else |
5ee754fc | 5105 | echo "$ac_err" >&5 |
9608ab8b MK |
5106 | echo "configure: failed program was:" >&5 |
5107 | cat conftest.$ac_ext >&5 | |
5108 | rm -rf conftest* | |
5ee754fc | 5109 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5110 | fi |
5111 | rm -f conftest* | |
9608ab8b | 5112 | fi |
5ee754fc | 5113 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5114 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5115 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5116 | cat >> confdefs.h <<EOF | |
5117 | #define $ac_tr_hdr 1 | |
5118 | EOF | |
5119 | ||
9608ab8b MK |
5120 | else |
5121 | echo "$ac_t""no" 1>&6 | |
5122 | fi | |
5ee754fc | 5123 | done |
9608ab8b | 5124 | |
5ee754fc MK |
5125 | for ac_hdr in unistd.h |
5126 | do | |
5127 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5128 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5129 | echo "configure:5130: checking for $ac_hdr" >&5 |
5ee754fc | 5130 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9608ab8b MK |
5131 | echo $ac_n "(cached) $ac_c" 1>&6 |
5132 | else | |
5ee754fc | 5133 | cat > conftest.$ac_ext <<EOF |
d28f9cdf | 5134 | #line 5135 "configure" |
9608ab8b | 5135 | #include "confdefs.h" |
5ee754fc | 5136 | #include <$ac_hdr> |
9608ab8b | 5137 | EOF |
5ee754fc | 5138 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
d28f9cdf | 5139 | { (eval echo configure:5140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5ee754fc MK |
5140 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5141 | if test -z "$ac_err"; then | |
9608ab8b | 5142 | rm -rf conftest* |
5ee754fc | 5143 | eval "ac_cv_header_$ac_safe=yes" |
9608ab8b | 5144 | else |
5ee754fc | 5145 | echo "$ac_err" >&5 |
9608ab8b MK |
5146 | echo "configure: failed program was:" >&5 |
5147 | cat conftest.$ac_ext >&5 | |
5148 | rm -rf conftest* | |
5ee754fc | 5149 | eval "ac_cv_header_$ac_safe=no" |
9608ab8b MK |
5150 | fi |
5151 | rm -f conftest* | |
9608ab8b | 5152 | fi |
5ee754fc | 5153 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
9608ab8b | 5154 | echo "$ac_t""yes" 1>&6 |
5ee754fc MK |
5155 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5156 | cat >> confdefs.h <<EOF | |
5157 | #define $ac_tr_hdr 1 | |
5158 | EOF | |
5159 | ||
9608ab8b MK |
5160 | else |
5161 | echo "$ac_t""no" 1>&6 | |
5162 | fi | |
5ee754fc | 5163 | done |
9608ab8b | 5164 | |
9608ab8b | 5165 | |
5ee754fc MK |
5166 | # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash |
5167 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
5168 | # think that we don't have <curses.h> if we're using GCC. | |
5169 | case $host_os in | |
5170 | solaris2.[78]) | |
5171 | if test "$GCC" = yes; then | |
5172 | cat >> confdefs.h <<\EOF | |
5173 | #define _MSE_INT_H 1 | |
5174 | EOF | |
5175 | ||
5176 | fi ;; | |
5177 | esac | |
5178 | for ac_hdr in curses.h ncurses.h term.h | |
5179 | do | |
5180 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5181 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5182 | echo "configure:5183: checking for $ac_hdr" >&5 |
5ee754fc | 5183 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
c906108c SS |
5184 | echo $ac_n "(cached) $ac_c" 1>&6 |
5185 | else | |
5186 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5187 | #line 5188 "configure" |
c906108c | 5188 | #include "confdefs.h" |
5ee754fc | 5189 | #include <$ac_hdr> |
c906108c SS |
5190 | EOF |
5191 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 5192 | { (eval echo configure:5193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5193 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5194 | if test -z "$ac_err"; then | |
5195 | rm -rf conftest* | |
5ee754fc | 5196 | eval "ac_cv_header_$ac_safe=yes" |
c906108c SS |
5197 | else |
5198 | echo "$ac_err" >&5 | |
5199 | echo "configure: failed program was:" >&5 | |
5200 | cat conftest.$ac_ext >&5 | |
5201 | rm -rf conftest* | |
5ee754fc | 5202 | eval "ac_cv_header_$ac_safe=no" |
c906108c SS |
5203 | fi |
5204 | rm -f conftest* | |
c906108c | 5205 | fi |
5ee754fc MK |
5206 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5207 | echo "$ac_t""yes" 1>&6 | |
5208 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5209 | cat >> confdefs.h <<EOF | |
5210 | #define $ac_tr_hdr 1 | |
c906108c | 5211 | EOF |
5ee754fc | 5212 | |
c906108c | 5213 | else |
5ee754fc | 5214 | echo "$ac_t""no" 1>&6 |
c906108c | 5215 | fi |
5ee754fc | 5216 | done |
c906108c SS |
5217 | |
5218 | ||
5ee754fc MK |
5219 | # FIXME: kettenis/20030102: In most cases we include these |
5220 | # unconditionally, so what's the point in checking these? | |
5221 | for ac_hdr in ctype.h time.h | |
c906108c SS |
5222 | do |
5223 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5224 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5225 | echo "configure:5226: checking for $ac_hdr" >&5 |
c906108c SS |
5226 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5227 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5228 | else | |
5229 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5230 | #line 5231 "configure" |
c906108c SS |
5231 | #include "confdefs.h" |
5232 | #include <$ac_hdr> | |
5233 | EOF | |
5234 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 5235 | { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
5236 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5237 | if test -z "$ac_err"; then | |
5238 | rm -rf conftest* | |
5239 | eval "ac_cv_header_$ac_safe=yes" | |
5240 | else | |
5241 | echo "$ac_err" >&5 | |
5242 | echo "configure: failed program was:" >&5 | |
5243 | cat conftest.$ac_ext >&5 | |
5244 | rm -rf conftest* | |
5245 | eval "ac_cv_header_$ac_safe=no" | |
5246 | fi | |
5247 | rm -f conftest* | |
5248 | fi | |
5249 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5250 | echo "$ac_t""yes" 1>&6 | |
5251 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5252 | cat >> confdefs.h <<EOF | |
5253 | #define $ac_tr_hdr 1 | |
5254 | EOF | |
5255 | ||
5256 | else | |
5257 | echo "$ac_t""no" 1>&6 | |
5258 | fi | |
5259 | done | |
5260 | ||
5ee754fc MK |
5261 | |
5262 | # ------------------ # | |
5263 | # Checks for types. # | |
5264 | # ------------------ # | |
5265 | ||
5266 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
d28f9cdf | 5267 | echo "configure:5268: checking return type of signal handlers" >&5 |
5ee754fc | 5268 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
c906108c SS |
5269 | echo $ac_n "(cached) $ac_c" 1>&6 |
5270 | else | |
5271 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5272 | #line 5273 "configure" |
c906108c SS |
5273 | #include "confdefs.h" |
5274 | #include <sys/types.h> | |
5ee754fc MK |
5275 | #include <signal.h> |
5276 | #ifdef signal | |
5277 | #undef signal | |
c906108c | 5278 | #endif |
5ee754fc MK |
5279 | #ifdef __cplusplus |
5280 | extern "C" void (*signal (int, void (*)(int)))(int); | |
5281 | #else | |
5282 | void (*signal ()) (); | |
c906108c SS |
5283 | #endif |
5284 | ||
5ee754fc MK |
5285 | int main() { |
5286 | int i; | |
5287 | ; return 0; } | |
c906108c | 5288 | EOF |
d28f9cdf | 5289 | if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 5290 | rm -rf conftest* |
5ee754fc | 5291 | ac_cv_type_signal=void |
c906108c | 5292 | else |
5ee754fc MK |
5293 | echo "configure: failed program was:" >&5 |
5294 | cat conftest.$ac_ext >&5 | |
c906108c | 5295 | rm -rf conftest* |
5ee754fc | 5296 | ac_cv_type_signal=int |
c906108c SS |
5297 | fi |
5298 | rm -f conftest* | |
c906108c SS |
5299 | fi |
5300 | ||
5ee754fc MK |
5301 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
5302 | cat >> confdefs.h <<EOF | |
5303 | #define RETSIGTYPE $ac_cv_type_signal | |
c906108c SS |
5304 | EOF |
5305 | ||
c906108c SS |
5306 | |
5307 | ||
5ee754fc MK |
5308 | # ------------------------------------- # |
5309 | # Checks for compiler characteristics. # | |
5310 | # ------------------------------------- # | |
5311 | ||
c906108c | 5312 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
d28f9cdf | 5313 | echo "configure:5314: checking for working const" >&5 |
c906108c SS |
5314 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5316 | else | |
5317 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5318 | #line 5319 "configure" |
c906108c SS |
5319 | #include "confdefs.h" |
5320 | ||
5321 | int main() { | |
5322 | ||
5323 | /* Ultrix mips cc rejects this. */ | |
5324 | typedef int charset[2]; const charset x; | |
5325 | /* SunOS 4.1.1 cc rejects this. */ | |
5326 | char const *const *ccp; | |
5327 | char **p; | |
5328 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5329 | struct point {int x, y;}; | |
5330 | static struct point const zero = {0,0}; | |
5331 | /* AIX XL C 1.02.0.0 rejects this. | |
5332 | It does not let you subtract one const X* pointer from another in an arm | |
5333 | of an if-expression whose if-part is not a constant expression */ | |
5334 | const char *g = "string"; | |
5335 | ccp = &g + (g ? g-g : 0); | |
5336 | /* HPUX 7.0 cc rejects these. */ | |
5337 | ++ccp; | |
5338 | p = (char**) ccp; | |
5339 | ccp = (char const *const *) p; | |
5340 | { /* SCO 3.2v4 cc rejects this. */ | |
5341 | char *t; | |
5342 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5343 | ||
5344 | *t++ = 0; | |
5345 | } | |
5346 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5347 | int x[] = {25, 17}; | |
5348 | const int *foo = &x[0]; | |
5349 | ++foo; | |
5350 | } | |
5351 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5352 | typedef const int *iptr; | |
5353 | iptr p = 0; | |
5354 | ++p; | |
5355 | } | |
5356 | { /* AIX XL C 1.02.0.0 rejects this saying | |
5357 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5358 | struct s { int j; const int *ap[3]; }; | |
5359 | struct s *b; b->j = 5; | |
5360 | } | |
5361 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5362 | const int foo = 10; | |
5363 | } | |
5364 | ||
5365 | ; return 0; } | |
5366 | EOF | |
d28f9cdf | 5367 | if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
5368 | rm -rf conftest* |
5369 | ac_cv_c_const=yes | |
5370 | else | |
5371 | echo "configure: failed program was:" >&5 | |
5372 | cat conftest.$ac_ext >&5 | |
5373 | rm -rf conftest* | |
5374 | ac_cv_c_const=no | |
5375 | fi | |
5376 | rm -f conftest* | |
5377 | fi | |
5378 | ||
5379 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
5380 | if test $ac_cv_c_const = no; then | |
5381 | cat >> confdefs.h <<\EOF | |
5382 | #define const | |
5383 | EOF | |
5384 | ||
5385 | fi | |
5386 | ||
bce58c09 | 5387 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
d28f9cdf | 5388 | echo "configure:5389: checking for inline" >&5 |
bce58c09 JB |
5389 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
5390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5391 | else | |
5392 | ac_cv_c_inline=no | |
5393 | for ac_kw in inline __inline__ __inline; do | |
5394 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5395 | #line 5396 "configure" |
bce58c09 JB |
5396 | #include "confdefs.h" |
5397 | ||
5398 | int main() { | |
5399 | } $ac_kw foo() { | |
5400 | ; return 0; } | |
5401 | EOF | |
d28f9cdf | 5402 | if { (eval echo configure:5403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
bce58c09 JB |
5403 | rm -rf conftest* |
5404 | ac_cv_c_inline=$ac_kw; break | |
5405 | else | |
5406 | echo "configure: failed program was:" >&5 | |
5407 | cat conftest.$ac_ext >&5 | |
5408 | fi | |
5409 | rm -f conftest* | |
5410 | done | |
5411 | ||
5412 | fi | |
5413 | ||
5414 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
5415 | case "$ac_cv_c_inline" in | |
5416 | inline | yes) ;; | |
5417 | no) cat >> confdefs.h <<\EOF | |
5418 | #define inline | |
5419 | EOF | |
5420 | ;; | |
5421 | *) cat >> confdefs.h <<EOF | |
5422 | #define inline $ac_cv_c_inline | |
5423 | EOF | |
5424 | ;; | |
5425 | esac | |
5426 | ||
c906108c | 5427 | |
5ee754fc MK |
5428 | # ------------------------------ # |
5429 | # Checks for library functions. # | |
5430 | # ------------------------------ # | |
5431 | ||
46711df8 MK |
5432 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5433 | # for constant arguments. Useless! | |
5434 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
d28f9cdf | 5435 | echo "configure:5436: checking for working alloca.h" >&5 |
46711df8 MK |
5436 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5437 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5438 | else | |
5439 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5440 | #line 5441 "configure" |
46711df8 MK |
5441 | #include "confdefs.h" |
5442 | #include <alloca.h> | |
5443 | int main() { | |
5444 | char *p = alloca(2 * sizeof(int)); | |
5445 | ; return 0; } | |
5446 | EOF | |
d28f9cdf | 5447 | if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5448 | rm -rf conftest* |
5449 | ac_cv_header_alloca_h=yes | |
5450 | else | |
5451 | echo "configure: failed program was:" >&5 | |
5452 | cat conftest.$ac_ext >&5 | |
5453 | rm -rf conftest* | |
5454 | ac_cv_header_alloca_h=no | |
5455 | fi | |
5456 | rm -f conftest* | |
5457 | fi | |
5458 | ||
5459 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5460 | if test $ac_cv_header_alloca_h = yes; then | |
5461 | cat >> confdefs.h <<\EOF | |
5462 | #define HAVE_ALLOCA_H 1 | |
5463 | EOF | |
5464 | ||
5465 | fi | |
5466 | ||
5467 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
d28f9cdf | 5468 | echo "configure:5469: checking for alloca" >&5 |
46711df8 MK |
5469 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5470 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5471 | else | |
5472 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5473 | #line 5474 "configure" |
46711df8 MK |
5474 | #include "confdefs.h" |
5475 | ||
5476 | #ifdef __GNUC__ | |
5477 | # define alloca __builtin_alloca | |
5478 | #else | |
5479 | # ifdef _MSC_VER | |
5480 | # include <malloc.h> | |
5481 | # define alloca _alloca | |
5482 | # else | |
5483 | # if HAVE_ALLOCA_H | |
5484 | # include <alloca.h> | |
5485 | # else | |
5486 | # ifdef _AIX | |
5487 | #pragma alloca | |
5488 | # else | |
5489 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5490 | char *alloca (); | |
5491 | # endif | |
5492 | # endif | |
5493 | # endif | |
5494 | # endif | |
5495 | #endif | |
5496 | ||
5497 | int main() { | |
5498 | char *p = (char *) alloca(1); | |
5499 | ; return 0; } | |
5500 | EOF | |
d28f9cdf | 5501 | if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5502 | rm -rf conftest* |
5503 | ac_cv_func_alloca_works=yes | |
5504 | else | |
5505 | echo "configure: failed program was:" >&5 | |
5506 | cat conftest.$ac_ext >&5 | |
5507 | rm -rf conftest* | |
5508 | ac_cv_func_alloca_works=no | |
5509 | fi | |
5510 | rm -f conftest* | |
5511 | fi | |
5512 | ||
5513 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
5514 | if test $ac_cv_func_alloca_works = yes; then | |
5515 | cat >> confdefs.h <<\EOF | |
5516 | #define HAVE_ALLOCA 1 | |
5517 | EOF | |
5518 | ||
5519 | fi | |
5520 | ||
5521 | if test $ac_cv_func_alloca_works = no; then | |
5522 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5523 | # that cause trouble. Some versions do not even contain alloca or | |
5524 | # contain a buggy version. If you still want to use their alloca, | |
5525 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5526 | ALLOCA=alloca.${ac_objext} | |
5527 | cat >> confdefs.h <<\EOF | |
5528 | #define C_ALLOCA 1 | |
5529 | EOF | |
5530 | ||
5531 | ||
5532 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
d28f9cdf | 5533 | echo "configure:5534: checking whether alloca needs Cray hooks" >&5 |
46711df8 MK |
5534 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5536 | else | |
5537 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5538 | #line 5539 "configure" |
46711df8 MK |
5539 | #include "confdefs.h" |
5540 | #if defined(CRAY) && ! defined(CRAY2) | |
5541 | webecray | |
5542 | #else | |
5543 | wenotbecray | |
5544 | #endif | |
5545 | ||
5546 | EOF | |
5547 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5548 | egrep "webecray" >/dev/null 2>&1; then | |
5549 | rm -rf conftest* | |
5550 | ac_cv_os_cray=yes | |
5551 | else | |
5552 | rm -rf conftest* | |
5553 | ac_cv_os_cray=no | |
5554 | fi | |
5555 | rm -f conftest* | |
5556 | ||
5557 | fi | |
5558 | ||
5559 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
5560 | if test $ac_cv_os_cray = yes; then | |
5561 | for ac_func in _getb67 GETB67 getb67; do | |
5562 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 5563 | echo "configure:5564: checking for $ac_func" >&5 |
46711df8 MK |
5564 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5565 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5566 | else | |
5567 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5568 | #line 5569 "configure" |
46711df8 MK |
5569 | #include "confdefs.h" |
5570 | /* System header to define __stub macros and hopefully few prototypes, | |
5571 | which can conflict with char $ac_func(); below. */ | |
5572 | #include <assert.h> | |
5573 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5574 | /* We use char because int might match the return type of a gcc2 | |
5575 | builtin and then its argument prototype would still apply. */ | |
5576 | char $ac_func(); | |
5577 | ||
5578 | int main() { | |
5579 | ||
5580 | /* The GNU C library defines this for functions which it implements | |
5581 | to always fail with ENOSYS. Some functions are actually named | |
5582 | something starting with __ and the normal name is an alias. */ | |
5583 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5584 | choke me | |
5585 | #else | |
5586 | $ac_func(); | |
5587 | #endif | |
5588 | ||
5589 | ; return 0; } | |
5590 | EOF | |
d28f9cdf | 5591 | if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
46711df8 MK |
5592 | rm -rf conftest* |
5593 | eval "ac_cv_func_$ac_func=yes" | |
5594 | else | |
5595 | echo "configure: failed program was:" >&5 | |
5596 | cat conftest.$ac_ext >&5 | |
5597 | rm -rf conftest* | |
5598 | eval "ac_cv_func_$ac_func=no" | |
5599 | fi | |
5600 | rm -f conftest* | |
5601 | fi | |
5602 | ||
5603 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5604 | echo "$ac_t""yes" 1>&6 | |
5605 | cat >> confdefs.h <<EOF | |
5606 | #define CRAY_STACKSEG_END $ac_func | |
5607 | EOF | |
5608 | ||
5609 | break | |
5610 | else | |
5611 | echo "$ac_t""no" 1>&6 | |
5612 | fi | |
5613 | ||
5614 | done | |
5615 | fi | |
5616 | ||
5617 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
d28f9cdf | 5618 | echo "configure:5619: checking stack direction for C alloca" >&5 |
46711df8 MK |
5619 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5621 | else | |
5622 | if test "$cross_compiling" = yes; then | |
5623 | ac_cv_c_stack_direction=0 | |
5624 | else | |
5625 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5626 | #line 5627 "configure" |
46711df8 MK |
5627 | #include "confdefs.h" |
5628 | find_stack_direction () | |
5629 | { | |
5630 | static char *addr = 0; | |
5631 | auto char dummy; | |
5632 | if (addr == 0) | |
5633 | { | |
5634 | addr = &dummy; | |
5635 | return find_stack_direction (); | |
5636 | } | |
5637 | else | |
5638 | return (&dummy > addr) ? 1 : -1; | |
5639 | } | |
5640 | main () | |
5641 | { | |
5642 | exit (find_stack_direction() < 0); | |
5643 | } | |
5644 | EOF | |
d28f9cdf | 5645 | if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
46711df8 MK |
5646 | then |
5647 | ac_cv_c_stack_direction=1 | |
5648 | else | |
5649 | echo "configure: failed program was:" >&5 | |
5650 | cat conftest.$ac_ext >&5 | |
5651 | rm -fr conftest* | |
5652 | ac_cv_c_stack_direction=-1 | |
5653 | fi | |
5654 | rm -fr conftest* | |
5655 | fi | |
5656 | ||
5657 | fi | |
5658 | ||
5659 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
5660 | cat >> confdefs.h <<EOF | |
5661 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
5662 | EOF | |
5663 | ||
5664 | fi | |
5665 | ||
97bf5e38 MK |
5666 | for ac_hdr in unistd.h |
5667 | do | |
5668 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5669 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
d28f9cdf | 5670 | echo "configure:5671: checking for $ac_hdr" >&5 |
74c1b268 AC |
5671 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5672 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5673 | else | |
5674 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5675 | #line 5676 "configure" |
74c1b268 | 5676 | #include "confdefs.h" |
97bf5e38 | 5677 | #include <$ac_hdr> |
74c1b268 AC |
5678 | EOF |
5679 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 5680 | { (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
74c1b268 AC |
5681 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5682 | if test -z "$ac_err"; then | |
5683 | rm -rf conftest* | |
5684 | eval "ac_cv_header_$ac_safe=yes" | |
5685 | else | |
5686 | echo "$ac_err" >&5 | |
5687 | echo "configure: failed program was:" >&5 | |
5688 | cat conftest.$ac_ext >&5 | |
5689 | rm -rf conftest* | |
5690 | eval "ac_cv_header_$ac_safe=no" | |
5691 | fi | |
5692 | rm -f conftest* | |
5693 | fi | |
5694 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5695 | echo "$ac_t""yes" 1>&6 | |
97bf5e38 MK |
5696 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
5697 | cat >> confdefs.h <<EOF | |
5698 | #define $ac_tr_hdr 1 | |
74c1b268 | 5699 | EOF |
97bf5e38 | 5700 | |
74c1b268 AC |
5701 | else |
5702 | echo "$ac_t""no" 1>&6 | |
5703 | fi | |
97bf5e38 | 5704 | done |
74c1b268 | 5705 | |
97bf5e38 MK |
5706 | for ac_func in getpagesize |
5707 | do | |
5708 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 5709 | echo "configure:5710: checking for $ac_func" >&5 |
97bf5e38 | 5710 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
74c1b268 AC |
5711 | echo $ac_n "(cached) $ac_c" 1>&6 |
5712 | else | |
5713 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5714 | #line 5715 "configure" |
74c1b268 AC |
5715 | #include "confdefs.h" |
5716 | /* System header to define __stub macros and hopefully few prototypes, | |
97bf5e38 | 5717 | which can conflict with char $ac_func(); below. */ |
74c1b268 AC |
5718 | #include <assert.h> |
5719 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5720 | /* We use char because int might match the return type of a gcc2 | |
5721 | builtin and then its argument prototype would still apply. */ | |
97bf5e38 | 5722 | char $ac_func(); |
74c1b268 AC |
5723 | |
5724 | int main() { | |
5725 | ||
5726 | /* The GNU C library defines this for functions which it implements | |
5727 | to always fail with ENOSYS. Some functions are actually named | |
5728 | something starting with __ and the normal name is an alias. */ | |
97bf5e38 | 5729 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
74c1b268 AC |
5730 | choke me |
5731 | #else | |
97bf5e38 | 5732 | $ac_func(); |
74c1b268 AC |
5733 | #endif |
5734 | ||
5735 | ; return 0; } | |
5736 | EOF | |
d28f9cdf | 5737 | if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
74c1b268 | 5738 | rm -rf conftest* |
97bf5e38 | 5739 | eval "ac_cv_func_$ac_func=yes" |
74c1b268 AC |
5740 | else |
5741 | echo "configure: failed program was:" >&5 | |
5742 | cat conftest.$ac_ext >&5 | |
5743 | rm -rf conftest* | |
97bf5e38 | 5744 | eval "ac_cv_func_$ac_func=no" |
74c1b268 AC |
5745 | fi |
5746 | rm -f conftest* | |
5747 | fi | |
5748 | ||
97bf5e38 | 5749 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
74c1b268 | 5750 | echo "$ac_t""yes" 1>&6 |
97bf5e38 MK |
5751 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
5752 | cat >> confdefs.h <<EOF | |
5753 | #define $ac_tr_func 1 | |
5754 | EOF | |
5755 | ||
74c1b268 AC |
5756 | else |
5757 | echo "$ac_t""no" 1>&6 | |
5758 | fi | |
97bf5e38 | 5759 | done |
74c1b268 | 5760 | |
97bf5e38 | 5761 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
d28f9cdf | 5762 | echo "configure:5763: checking for working mmap" >&5 |
97bf5e38 MK |
5763 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5764 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5765 | else | |
5766 | if test "$cross_compiling" = yes; then | |
5767 | ac_cv_func_mmap_fixed_mapped=no | |
74c1b268 AC |
5768 | else |
5769 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5770 | #line 5771 "configure" |
74c1b268 | 5771 | #include "confdefs.h" |
97bf5e38 MK |
5772 | |
5773 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5774 | Here is a matrix of mmap possibilities: | |
5775 | mmap private not fixed | |
5776 | mmap private fixed at somewhere currently unmapped | |
5777 | mmap private fixed at somewhere already mapped | |
5778 | mmap shared not fixed | |
5779 | mmap shared fixed at somewhere currently unmapped | |
5780 | mmap shared fixed at somewhere already mapped | |
5781 | For private mappings, we should verify that changes cannot be read() | |
5782 | back from the file, nor mmap's back from the file at a different | |
5783 | address. (There have been systems where private was not correctly | |
5784 | implemented like the infamous i386 svr4.0, and systems where the | |
5785 | VM page cache was not coherent with the filesystem buffer cache | |
5786 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5787 | For shared mappings, we should conversely verify that changes get | |
5788 | propogated back to all the places they're supposed to be. | |
5789 | ||
5790 | Grep wants private fixed already mapped. | |
5791 | The main things grep needs to know about mmap are: | |
5792 | * does it exist and is it safe to write into the mmap'd area | |
5793 | * how to use it (BSD variants) */ | |
74c1b268 | 5794 | #include <sys/types.h> |
97bf5e38 MK |
5795 | #include <fcntl.h> |
5796 | #include <sys/mman.h> | |
5797 | ||
5798 | /* This mess was copied from the GNU getpagesize.h. */ | |
5799 | #ifndef HAVE_GETPAGESIZE | |
5800 | # ifdef HAVE_UNISTD_H | |
5801 | # include <unistd.h> | |
5802 | # endif | |
5803 | ||
5804 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5805 | # ifndef HAVE_SYS_PARAM_H | |
5806 | # define HAVE_SYS_PARAM_H 1 | |
5807 | # endif | |
5808 | ||
5809 | # ifdef _SC_PAGESIZE | |
5810 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5811 | # else /* no _SC_PAGESIZE */ | |
5812 | # ifdef HAVE_SYS_PARAM_H | |
5813 | # include <sys/param.h> | |
5814 | # ifdef EXEC_PAGESIZE | |
5815 | # define getpagesize() EXEC_PAGESIZE | |
5816 | # else /* no EXEC_PAGESIZE */ | |
5817 | # ifdef NBPG | |
5818 | # define getpagesize() NBPG * CLSIZE | |
5819 | # ifndef CLSIZE | |
5820 | # define CLSIZE 1 | |
5821 | # endif /* no CLSIZE */ | |
5822 | # else /* no NBPG */ | |
5823 | # ifdef NBPC | |
5824 | # define getpagesize() NBPC | |
5825 | # else /* no NBPC */ | |
5826 | # ifdef PAGESIZE | |
5827 | # define getpagesize() PAGESIZE | |
5828 | # endif /* PAGESIZE */ | |
5829 | # endif /* no NBPC */ | |
5830 | # endif /* no NBPG */ | |
5831 | # endif /* no EXEC_PAGESIZE */ | |
5832 | # else /* no HAVE_SYS_PARAM_H */ | |
5833 | # define getpagesize() 8192 /* punt totally */ | |
5834 | # endif /* no HAVE_SYS_PARAM_H */ | |
5835 | # endif /* no _SC_PAGESIZE */ | |
5836 | ||
5837 | #endif /* no HAVE_GETPAGESIZE */ | |
5838 | ||
74c1b268 | 5839 | #ifdef __cplusplus |
97bf5e38 | 5840 | extern "C" { void *malloc(unsigned); } |
74c1b268 | 5841 | #else |
97bf5e38 | 5842 | char *malloc(); |
74c1b268 | 5843 | #endif |
74c1b268 | 5844 | |
97bf5e38 MK |
5845 | int |
5846 | main() | |
5847 | { | |
5848 | char *data, *data2, *data3; | |
5849 | int i, pagesize; | |
5850 | int fd; | |
74c1b268 | 5851 | |
97bf5e38 | 5852 | pagesize = getpagesize(); |
74c1b268 | 5853 | |
97bf5e38 MK |
5854 | /* |
5855 | * First, make a file with some known garbage in it. | |
5856 | */ | |
5857 | data = malloc(pagesize); | |
5858 | if (!data) | |
5859 | exit(1); | |
5860 | for (i = 0; i < pagesize; ++i) | |
5861 | *(data + i) = rand(); | |
5862 | umask(0); | |
5863 | fd = creat("conftestmmap", 0600); | |
5864 | if (fd < 0) | |
5865 | exit(1); | |
5866 | if (write(fd, data, pagesize) != pagesize) | |
5867 | exit(1); | |
5868 | close(fd); | |
74c1b268 | 5869 | |
97bf5e38 MK |
5870 | /* |
5871 | * Next, try to mmap the file at a fixed address which | |
5872 | * already has something else allocated at it. If we can, | |
5873 | * also make sure that we see the same garbage. | |
5874 | */ | |
5875 | fd = open("conftestmmap", O_RDWR); | |
5876 | if (fd < 0) | |
5877 | exit(1); | |
5878 | data2 = malloc(2 * pagesize); | |
5879 | if (!data2) | |
5880 | exit(1); | |
5881 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5882 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5883 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5884 | exit(1); | |
5885 | for (i = 0; i < pagesize; ++i) | |
5886 | if (*(data + i) != *(data2 + i)) | |
5887 | exit(1); | |
74c1b268 | 5888 | |
97bf5e38 MK |
5889 | /* |
5890 | * Finally, make sure that changes to the mapped area | |
5891 | * do not percolate back to the file as seen by read(). | |
5892 | * (This is a bug on some variants of i386 svr4.0.) | |
5893 | */ | |
5894 | for (i = 0; i < pagesize; ++i) | |
5895 | *(data2 + i) = *(data2 + i) + 1; | |
5896 | data3 = malloc(pagesize); | |
5897 | if (!data3) | |
5898 | exit(1); | |
5899 | if (read(fd, data3, pagesize) != pagesize) | |
5900 | exit(1); | |
5901 | for (i = 0; i < pagesize; ++i) | |
5902 | if (*(data + i) != *(data3 + i)) | |
5903 | exit(1); | |
5904 | close(fd); | |
5905 | unlink("conftestmmap"); | |
5906 | exit(0); | |
74c1b268 | 5907 | } |
97bf5e38 | 5908 | |
74c1b268 | 5909 | EOF |
d28f9cdf | 5910 | if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
74c1b268 | 5911 | then |
97bf5e38 | 5912 | ac_cv_func_mmap_fixed_mapped=yes |
74c1b268 AC |
5913 | else |
5914 | echo "configure: failed program was:" >&5 | |
5915 | cat conftest.$ac_ext >&5 | |
5916 | rm -fr conftest* | |
97bf5e38 | 5917 | ac_cv_func_mmap_fixed_mapped=no |
74c1b268 AC |
5918 | fi |
5919 | rm -fr conftest* | |
5920 | fi | |
5921 | ||
5922 | fi | |
5923 | ||
97bf5e38 MK |
5924 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
5925 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
74c1b268 | 5926 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5927 | #define HAVE_MMAP 1 |
74c1b268 AC |
5928 | EOF |
5929 | ||
5930 | fi | |
5931 | ||
97bf5e38 | 5932 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
d28f9cdf | 5933 | echo "configure:5934: checking for pid_t" >&5 |
97bf5e38 | 5934 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
0200359f | 5935 | echo $ac_n "(cached) $ac_c" 1>&6 |
0200359f MK |
5936 | else |
5937 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5938 | #line 5939 "configure" |
0200359f | 5939 | #include "confdefs.h" |
97bf5e38 MK |
5940 | #include <sys/types.h> |
5941 | #if STDC_HEADERS | |
5942 | #include <stdlib.h> | |
5943 | #include <stddef.h> | |
0200359f | 5944 | #endif |
0200359f | 5945 | EOF |
97bf5e38 MK |
5946 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5947 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5948 | rm -rf conftest* | |
5949 | ac_cv_type_pid_t=yes | |
0200359f | 5950 | else |
97bf5e38 MK |
5951 | rm -rf conftest* |
5952 | ac_cv_type_pid_t=no | |
0200359f | 5953 | fi |
97bf5e38 | 5954 | rm -f conftest* |
0200359f MK |
5955 | |
5956 | fi | |
97bf5e38 MK |
5957 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
5958 | if test $ac_cv_type_pid_t = no; then | |
0200359f | 5959 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5960 | #define pid_t int |
0200359f MK |
5961 | EOF |
5962 | ||
5963 | fi | |
5964 | ||
97bf5e38 MK |
5965 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
5966 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
d28f9cdf | 5967 | echo "configure:5968: checking for vfork.h" >&5 |
97bf5e38 | 5968 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
72473524 DJ |
5969 | echo $ac_n "(cached) $ac_c" 1>&6 |
5970 | else | |
5971 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 5972 | #line 5973 "configure" |
72473524 | 5973 | #include "confdefs.h" |
97bf5e38 | 5974 | #include <vfork.h> |
72473524 | 5975 | EOF |
97bf5e38 | 5976 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
d28f9cdf | 5977 | { (eval echo configure:5978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
97bf5e38 MK |
5978 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5979 | if test -z "$ac_err"; then | |
72473524 | 5980 | rm -rf conftest* |
97bf5e38 | 5981 | eval "ac_cv_header_$ac_safe=yes" |
72473524 | 5982 | else |
97bf5e38 | 5983 | echo "$ac_err" >&5 |
72473524 DJ |
5984 | echo "configure: failed program was:" >&5 |
5985 | cat conftest.$ac_ext >&5 | |
5986 | rm -rf conftest* | |
97bf5e38 | 5987 | eval "ac_cv_header_$ac_safe=no" |
72473524 DJ |
5988 | fi |
5989 | rm -f conftest* | |
5990 | fi | |
97bf5e38 MK |
5991 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5992 | echo "$ac_t""yes" 1>&6 | |
72473524 | 5993 | cat >> confdefs.h <<\EOF |
97bf5e38 | 5994 | #define HAVE_VFORK_H 1 |
72473524 DJ |
5995 | EOF |
5996 | ||
97bf5e38 MK |
5997 | else |
5998 | echo "$ac_t""no" 1>&6 | |
72473524 | 5999 | fi |
c906108c | 6000 | |
97bf5e38 | 6001 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
d28f9cdf | 6002 | echo "configure:6003: checking for working vfork" >&5 |
97bf5e38 MK |
6003 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
6004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6005 | else | |
6006 | if test "$cross_compiling" = yes; then | |
6007 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
d28f9cdf | 6008 | echo "configure:6009: checking for vfork" >&5 |
97bf5e38 | 6009 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2b2d558c MK |
6010 | echo $ac_n "(cached) $ac_c" 1>&6 |
6011 | else | |
6012 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6013 | #line 6014 "configure" |
2b2d558c | 6014 | #include "confdefs.h" |
97bf5e38 MK |
6015 | /* System header to define __stub macros and hopefully few prototypes, |
6016 | which can conflict with char vfork(); below. */ | |
6017 | #include <assert.h> | |
6018 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6019 | /* We use char because int might match the return type of a gcc2 | |
6020 | builtin and then its argument prototype would still apply. */ | |
6021 | char vfork(); | |
2b2d558c MK |
6022 | |
6023 | int main() { | |
97bf5e38 MK |
6024 | |
6025 | /* The GNU C library defines this for functions which it implements | |
6026 | to always fail with ENOSYS. Some functions are actually named | |
6027 | something starting with __ and the normal name is an alias. */ | |
6028 | #if defined (__stub_vfork) || defined (__stub___vfork) | |
6029 | choke me | |
6030 | #else | |
6031 | vfork(); | |
6032 | #endif | |
6033 | ||
2b2d558c MK |
6034 | ; return 0; } |
6035 | EOF | |
d28f9cdf | 6036 | if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2b2d558c | 6037 | rm -rf conftest* |
97bf5e38 | 6038 | eval "ac_cv_func_vfork=yes" |
2b2d558c MK |
6039 | else |
6040 | echo "configure: failed program was:" >&5 | |
6041 | cat conftest.$ac_ext >&5 | |
6042 | rm -rf conftest* | |
97bf5e38 | 6043 | eval "ac_cv_func_vfork=no" |
2b2d558c MK |
6044 | fi |
6045 | rm -f conftest* | |
6046 | fi | |
6047 | ||
97bf5e38 MK |
6048 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
6049 | echo "$ac_t""yes" 1>&6 | |
6050 | : | |
6051 | else | |
6052 | echo "$ac_t""no" 1>&6 | |
2b2d558c MK |
6053 | fi |
6054 | ||
97bf5e38 | 6055 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
7dfa765c MK |
6056 | else |
6057 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6058 | #line 6059 "configure" |
7dfa765c | 6059 | #include "confdefs.h" |
97bf5e38 MK |
6060 | /* Thanks to Paul Eggert for this test. */ |
6061 | #include <stdio.h> | |
6062 | #include <sys/types.h> | |
6063 | #include <sys/stat.h> | |
6064 | #ifdef HAVE_UNISTD_H | |
6065 | #include <unistd.h> | |
6066 | #endif | |
6067 | #ifdef HAVE_VFORK_H | |
6068 | #include <vfork.h> | |
6069 | #endif | |
6070 | /* On some sparc systems, changes by the child to local and incoming | |
6071 | argument registers are propagated back to the parent. | |
6072 | The compiler is told about this with #include <vfork.h>, | |
6073 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
6074 | Test for this by using a static variable whose address | |
6075 | is put into a register that is clobbered by the vfork. */ | |
6076 | static | |
6077 | #ifdef __cplusplus | |
6078 | sparc_address_test (int arg) | |
6079 | #else | |
6080 | sparc_address_test (arg) int arg; | |
6081 | #endif | |
6082 | { | |
6083 | static pid_t child; | |
6084 | if (!child) { | |
6085 | child = vfork (); | |
6086 | if (child < 0) { | |
6087 | perror ("vfork"); | |
6088 | _exit(2); | |
6089 | } | |
6090 | if (!child) { | |
6091 | arg = getpid(); | |
6092 | write(-1, "", 0); | |
6093 | _exit (arg); | |
6094 | } | |
6095 | } | |
6096 | } | |
6097 | main() { | |
6098 | pid_t parent = getpid (); | |
6099 | pid_t child; | |
7dfa765c | 6100 | |
97bf5e38 | 6101 | sparc_address_test (); |
7dfa765c | 6102 | |
97bf5e38 | 6103 | child = vfork (); |
7dfa765c | 6104 | |
97bf5e38 MK |
6105 | if (child == 0) { |
6106 | /* Here is another test for sparc vfork register problems. | |
6107 | This test uses lots of local variables, at least | |
6108 | as many local variables as main has allocated so far | |
6109 | including compiler temporaries. 4 locals are enough for | |
6110 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
6111 | A buggy compiler should reuse the register of parent | |
6112 | for one of the local variables, since it will think that | |
6113 | parent can't possibly be used any more in this routine. | |
6114 | Assigning to the local variable will thus munge parent | |
6115 | in the parent process. */ | |
6116 | pid_t | |
6117 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6118 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6119 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6120 | use the same hardware register for all 8 local variables. */ | |
6121 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6122 | || p != p5 || p != p6 || p != p7) | |
6123 | _exit(1); | |
7dfa765c | 6124 | |
97bf5e38 MK |
6125 | /* On some systems (e.g. IRIX 3.3), |
6126 | vfork doesn't separate parent from child file descriptors. | |
6127 | If the child closes a descriptor before it execs or exits, | |
6128 | this munges the parent's descriptor as well. | |
6129 | Test for this by closing stdout in the child. */ | |
6130 | _exit(close(fileno(stdout)) != 0); | |
6131 | } else { | |
6132 | int status; | |
6133 | struct stat st; | |
64bb1671 | 6134 | |
97bf5e38 MK |
6135 | while (wait(&status) != child) |
6136 | ; | |
6137 | exit( | |
6138 | /* Was there some problem with vforking? */ | |
6139 | child < 0 | |
64bb1671 | 6140 | |
97bf5e38 MK |
6141 | /* Did the child fail? (This shouldn't happen.) */ |
6142 | || status | |
64bb1671 | 6143 | |
97bf5e38 MK |
6144 | /* Did the vfork/compiler bug occur? */ |
6145 | || parent != getpid() | |
6146 | ||
6147 | /* Did the file descriptor bug occur? */ | |
6148 | || fstat(fileno(stdout), &st) != 0 | |
6149 | ); | |
6150 | } | |
6151 | } | |
5c44784c | 6152 | EOF |
d28f9cdf | 6153 | if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6154 | then |
6155 | ac_cv_func_vfork_works=yes | |
5c44784c JM |
6156 | else |
6157 | echo "configure: failed program was:" >&5 | |
6158 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6159 | rm -fr conftest* |
6160 | ac_cv_func_vfork_works=no | |
5c44784c | 6161 | fi |
97bf5e38 | 6162 | rm -fr conftest* |
5c44784c JM |
6163 | fi |
6164 | ||
0afdd437 MK |
6165 | fi |
6166 | ||
97bf5e38 MK |
6167 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
6168 | if test $ac_cv_func_vfork_works = no; then | |
0afdd437 | 6169 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6170 | #define vfork fork |
0afdd437 MK |
6171 | EOF |
6172 | ||
6173 | fi | |
6174 | ||
97bf5e38 MK |
6175 | for ac_func in canonicalize_file_name realpath |
6176 | do | |
6177 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6178 | echo "configure:6179: checking for $ac_func" >&5 |
97bf5e38 | 6179 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
7e89e357 JT |
6180 | echo $ac_n "(cached) $ac_c" 1>&6 |
6181 | else | |
6182 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6183 | #line 6184 "configure" |
7e89e357 | 6184 | #include "confdefs.h" |
97bf5e38 MK |
6185 | /* System header to define __stub macros and hopefully few prototypes, |
6186 | which can conflict with char $ac_func(); below. */ | |
6187 | #include <assert.h> | |
6188 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6189 | /* We use char because int might match the return type of a gcc2 | |
6190 | builtin and then its argument prototype would still apply. */ | |
6191 | char $ac_func(); | |
6192 | ||
7e89e357 | 6193 | int main() { |
97bf5e38 MK |
6194 | |
6195 | /* The GNU C library defines this for functions which it implements | |
6196 | to always fail with ENOSYS. Some functions are actually named | |
6197 | something starting with __ and the normal name is an alias. */ | |
6198 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6199 | choke me | |
6200 | #else | |
6201 | $ac_func(); | |
6202 | #endif | |
6203 | ||
7e89e357 JT |
6204 | ; return 0; } |
6205 | EOF | |
d28f9cdf | 6206 | if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7e89e357 | 6207 | rm -rf conftest* |
97bf5e38 | 6208 | eval "ac_cv_func_$ac_func=yes" |
7e89e357 JT |
6209 | else |
6210 | echo "configure: failed program was:" >&5 | |
6211 | cat conftest.$ac_ext >&5 | |
6212 | rm -rf conftest* | |
97bf5e38 | 6213 | eval "ac_cv_func_$ac_func=no" |
7e89e357 JT |
6214 | fi |
6215 | rm -f conftest* | |
6216 | fi | |
6217 | ||
97bf5e38 MK |
6218 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6219 | echo "$ac_t""yes" 1>&6 | |
6220 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6221 | cat >> confdefs.h <<EOF | |
6222 | #define $ac_tr_func 1 | |
7e89e357 | 6223 | EOF |
97bf5e38 MK |
6224 | |
6225 | else | |
6226 | echo "$ac_t""no" 1>&6 | |
7e89e357 | 6227 | fi |
97bf5e38 | 6228 | done |
7e89e357 | 6229 | |
97bf5e38 | 6230 | for ac_func in poll |
7be570e7 JM |
6231 | do |
6232 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6233 | echo "configure:6234: checking for $ac_func" >&5 |
7be570e7 JM |
6234 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6236 | else | |
6237 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6238 | #line 6239 "configure" |
7be570e7 JM |
6239 | #include "confdefs.h" |
6240 | /* System header to define __stub macros and hopefully few prototypes, | |
6241 | which can conflict with char $ac_func(); below. */ | |
6242 | #include <assert.h> | |
6243 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6244 | /* We use char because int might match the return type of a gcc2 | |
6245 | builtin and then its argument prototype would still apply. */ | |
6246 | char $ac_func(); | |
6247 | ||
6248 | int main() { | |
6249 | ||
6250 | /* The GNU C library defines this for functions which it implements | |
6251 | to always fail with ENOSYS. Some functions are actually named | |
6252 | something starting with __ and the normal name is an alias. */ | |
6253 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6254 | choke me | |
6255 | #else | |
6256 | $ac_func(); | |
6257 | #endif | |
6258 | ||
6259 | ; return 0; } | |
6260 | EOF | |
d28f9cdf | 6261 | if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
14abd0fb MK |
6262 | rm -rf conftest* |
6263 | eval "ac_cv_func_$ac_func=yes" | |
6264 | else | |
6265 | echo "configure: failed program was:" >&5 | |
6266 | cat conftest.$ac_ext >&5 | |
6267 | rm -rf conftest* | |
6268 | eval "ac_cv_func_$ac_func=no" | |
6269 | fi | |
6270 | rm -f conftest* | |
6271 | fi | |
6272 | ||
6273 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6274 | echo "$ac_t""yes" 1>&6 | |
6275 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6276 | cat >> confdefs.h <<EOF | |
6277 | #define $ac_tr_func 1 | |
6278 | EOF | |
6279 | ||
6280 | else | |
6281 | echo "$ac_t""no" 1>&6 | |
6282 | fi | |
6283 | done | |
6284 | ||
6285 | for ac_func in pread64 | |
6286 | do | |
6287 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6288 | echo "configure:6289: checking for $ac_func" >&5 |
14abd0fb MK |
6289 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6291 | else | |
6292 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6293 | #line 6294 "configure" |
14abd0fb MK |
6294 | #include "confdefs.h" |
6295 | /* System header to define __stub macros and hopefully few prototypes, | |
6296 | which can conflict with char $ac_func(); below. */ | |
6297 | #include <assert.h> | |
6298 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6299 | /* We use char because int might match the return type of a gcc2 | |
6300 | builtin and then its argument prototype would still apply. */ | |
6301 | char $ac_func(); | |
6302 | ||
6303 | int main() { | |
6304 | ||
6305 | /* The GNU C library defines this for functions which it implements | |
6306 | to always fail with ENOSYS. Some functions are actually named | |
6307 | something starting with __ and the normal name is an alias. */ | |
6308 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6309 | choke me | |
6310 | #else | |
6311 | $ac_func(); | |
6312 | #endif | |
6313 | ||
6314 | ; return 0; } | |
6315 | EOF | |
d28f9cdf | 6316 | if { (eval echo configure:6317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
7be570e7 JM |
6317 | rm -rf conftest* |
6318 | eval "ac_cv_func_$ac_func=yes" | |
6319 | else | |
6320 | echo "configure: failed program was:" >&5 | |
6321 | cat conftest.$ac_ext >&5 | |
6322 | rm -rf conftest* | |
6323 | eval "ac_cv_func_$ac_func=no" | |
6324 | fi | |
6325 | rm -f conftest* | |
6326 | fi | |
6327 | ||
6328 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6329 | echo "$ac_t""yes" 1>&6 | |
6330 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6331 | cat >> confdefs.h <<EOF | |
6332 | #define $ac_tr_func 1 | |
6333 | EOF | |
6334 | ||
6335 | else | |
6336 | echo "$ac_t""no" 1>&6 | |
6337 | fi | |
6338 | done | |
6339 | ||
97bf5e38 MK |
6340 | for ac_func in sbrk |
6341 | do | |
6342 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6343 | echo "configure:6344: checking for $ac_func" >&5 |
97bf5e38 | 6344 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6345 | echo $ac_n "(cached) $ac_c" 1>&6 |
6346 | else | |
6347 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6348 | #line 6349 "configure" |
c906108c | 6349 | #include "confdefs.h" |
97bf5e38 MK |
6350 | /* System header to define __stub macros and hopefully few prototypes, |
6351 | which can conflict with char $ac_func(); below. */ | |
6352 | #include <assert.h> | |
6353 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6354 | /* We use char because int might match the return type of a gcc2 | |
6355 | builtin and then its argument prototype would still apply. */ | |
6356 | char $ac_func(); | |
c906108c | 6357 | |
97bf5e38 MK |
6358 | int main() { |
6359 | ||
6360 | /* The GNU C library defines this for functions which it implements | |
6361 | to always fail with ENOSYS. Some functions are actually named | |
6362 | something starting with __ and the normal name is an alias. */ | |
6363 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6364 | choke me | |
c906108c | 6365 | #else |
97bf5e38 | 6366 | $ac_func(); |
c906108c | 6367 | #endif |
97bf5e38 | 6368 | |
c906108c SS |
6369 | ; return 0; } |
6370 | EOF | |
d28f9cdf | 6371 | if { (eval echo configure:6372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6372 | rm -rf conftest* |
97bf5e38 | 6373 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6374 | else |
6375 | echo "configure: failed program was:" >&5 | |
6376 | cat conftest.$ac_ext >&5 | |
6377 | rm -rf conftest* | |
97bf5e38 | 6378 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6379 | fi |
6380 | rm -f conftest* | |
6381 | fi | |
6382 | ||
97bf5e38 MK |
6383 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6384 | echo "$ac_t""yes" 1>&6 | |
6385 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6386 | cat >> confdefs.h <<EOF | |
6387 | #define $ac_tr_func 1 | |
c906108c | 6388 | EOF |
97bf5e38 MK |
6389 | |
6390 | else | |
6391 | echo "$ac_t""no" 1>&6 | |
c906108c | 6392 | fi |
97bf5e38 | 6393 | done |
c906108c | 6394 | |
97bf5e38 MK |
6395 | for ac_func in setpgid setpgrp |
6396 | do | |
6397 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6398 | echo "configure:6399: checking for $ac_func" >&5 |
97bf5e38 | 6399 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6400 | echo $ac_n "(cached) $ac_c" 1>&6 |
6401 | else | |
6402 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6403 | #line 6404 "configure" |
c906108c | 6404 | #include "confdefs.h" |
97bf5e38 MK |
6405 | /* System header to define __stub macros and hopefully few prototypes, |
6406 | which can conflict with char $ac_func(); below. */ | |
6407 | #include <assert.h> | |
6408 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6409 | /* We use char because int might match the return type of a gcc2 | |
6410 | builtin and then its argument prototype would still apply. */ | |
6411 | char $ac_func(); | |
c906108c | 6412 | |
97bf5e38 MK |
6413 | int main() { |
6414 | ||
6415 | /* The GNU C library defines this for functions which it implements | |
6416 | to always fail with ENOSYS. Some functions are actually named | |
6417 | something starting with __ and the normal name is an alias. */ | |
6418 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6419 | choke me | |
c906108c | 6420 | #else |
97bf5e38 | 6421 | $ac_func(); |
c906108c | 6422 | #endif |
97bf5e38 | 6423 | |
c906108c SS |
6424 | ; return 0; } |
6425 | EOF | |
d28f9cdf | 6426 | if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6427 | rm -rf conftest* |
97bf5e38 | 6428 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6429 | else |
6430 | echo "configure: failed program was:" >&5 | |
6431 | cat conftest.$ac_ext >&5 | |
6432 | rm -rf conftest* | |
97bf5e38 | 6433 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6434 | fi |
6435 | rm -f conftest* | |
6436 | fi | |
6437 | ||
97bf5e38 MK |
6438 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6439 | echo "$ac_t""yes" 1>&6 | |
6440 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6441 | cat >> confdefs.h <<EOF | |
6442 | #define $ac_tr_func 1 | |
c906108c | 6443 | EOF |
97bf5e38 MK |
6444 | |
6445 | else | |
6446 | echo "$ac_t""no" 1>&6 | |
c906108c | 6447 | fi |
97bf5e38 | 6448 | done |
c906108c | 6449 | |
e1ea1d75 | 6450 | for ac_func in sigaction sigprocmask sigsetmask |
97bf5e38 MK |
6451 | do |
6452 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6453 | echo "configure:6454: checking for $ac_func" >&5 |
97bf5e38 | 6454 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6455 | echo $ac_n "(cached) $ac_c" 1>&6 |
6456 | else | |
6457 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6458 | #line 6459 "configure" |
c906108c | 6459 | #include "confdefs.h" |
97bf5e38 MK |
6460 | /* System header to define __stub macros and hopefully few prototypes, |
6461 | which can conflict with char $ac_func(); below. */ | |
6462 | #include <assert.h> | |
6463 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6464 | /* We use char because int might match the return type of a gcc2 | |
6465 | builtin and then its argument prototype would still apply. */ | |
6466 | char $ac_func(); | |
c906108c | 6467 | |
97bf5e38 MK |
6468 | int main() { |
6469 | ||
6470 | /* The GNU C library defines this for functions which it implements | |
6471 | to always fail with ENOSYS. Some functions are actually named | |
6472 | something starting with __ and the normal name is an alias. */ | |
6473 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6474 | choke me | |
c906108c | 6475 | #else |
97bf5e38 | 6476 | $ac_func(); |
c906108c | 6477 | #endif |
97bf5e38 | 6478 | |
c906108c SS |
6479 | ; return 0; } |
6480 | EOF | |
d28f9cdf | 6481 | if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6482 | rm -rf conftest* |
97bf5e38 | 6483 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6484 | else |
6485 | echo "configure: failed program was:" >&5 | |
6486 | cat conftest.$ac_ext >&5 | |
6487 | rm -rf conftest* | |
97bf5e38 | 6488 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6489 | fi |
6490 | rm -f conftest* | |
6491 | fi | |
6492 | ||
97bf5e38 MK |
6493 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6494 | echo "$ac_t""yes" 1>&6 | |
6495 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6496 | cat >> confdefs.h <<EOF | |
6497 | #define $ac_tr_func 1 | |
c906108c | 6498 | EOF |
e1ea1d75 | 6499 | |
97bf5e38 MK |
6500 | else |
6501 | echo "$ac_t""no" 1>&6 | |
c906108c | 6502 | fi |
97bf5e38 | 6503 | done |
c906108c | 6504 | |
97bf5e38 MK |
6505 | for ac_func in socketpair |
6506 | do | |
6507 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
d28f9cdf | 6508 | echo "configure:6509: checking for $ac_func" >&5 |
97bf5e38 | 6509 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
c906108c SS |
6510 | echo $ac_n "(cached) $ac_c" 1>&6 |
6511 | else | |
6512 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6513 | #line 6514 "configure" |
c906108c | 6514 | #include "confdefs.h" |
97bf5e38 MK |
6515 | /* System header to define __stub macros and hopefully few prototypes, |
6516 | which can conflict with char $ac_func(); below. */ | |
6517 | #include <assert.h> | |
6518 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6519 | /* We use char because int might match the return type of a gcc2 | |
6520 | builtin and then its argument prototype would still apply. */ | |
6521 | char $ac_func(); | |
c906108c | 6522 | |
97bf5e38 MK |
6523 | int main() { |
6524 | ||
6525 | /* The GNU C library defines this for functions which it implements | |
6526 | to always fail with ENOSYS. Some functions are actually named | |
6527 | something starting with __ and the normal name is an alias. */ | |
6528 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6529 | choke me | |
c906108c | 6530 | #else |
97bf5e38 | 6531 | $ac_func(); |
c906108c | 6532 | #endif |
97bf5e38 | 6533 | |
c906108c SS |
6534 | ; return 0; } |
6535 | EOF | |
d28f9cdf | 6536 | if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c | 6537 | rm -rf conftest* |
97bf5e38 | 6538 | eval "ac_cv_func_$ac_func=yes" |
c906108c SS |
6539 | else |
6540 | echo "configure: failed program was:" >&5 | |
6541 | cat conftest.$ac_ext >&5 | |
6542 | rm -rf conftest* | |
97bf5e38 | 6543 | eval "ac_cv_func_$ac_func=no" |
c906108c SS |
6544 | fi |
6545 | rm -f conftest* | |
6546 | fi | |
6547 | ||
97bf5e38 MK |
6548 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6549 | echo "$ac_t""yes" 1>&6 | |
6550 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6551 | cat >> confdefs.h <<EOF | |
6552 | #define $ac_tr_func 1 | |
c906108c | 6553 | EOF |
97bf5e38 MK |
6554 | |
6555 | else | |
6556 | echo "$ac_t""no" 1>&6 | |
c906108c | 6557 | fi |
97bf5e38 | 6558 | done |
c906108c | 6559 | |
97bf5e38 MK |
6560 | |
6561 | if test "$cross_compiling" = no; then | |
6562 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
d28f9cdf | 6563 | echo "configure:6564: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6564 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
c906108c | 6565 | echo $ac_n "(cached) $ac_c" 1>&6 |
97bf5e38 MK |
6566 | else |
6567 | if test "$cross_compiling" = yes; then | |
6568 | { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } | |
c906108c SS |
6569 | else |
6570 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6571 | #line 6572 "configure" |
c906108c SS |
6572 | #include "confdefs.h" |
6573 | ||
c906108c SS |
6574 | #ifdef HAVE_UNISTD_H |
6575 | #include <unistd.h> | |
6576 | #endif | |
97bf5e38 MK |
6577 | |
6578 | /* | |
6579 | * If this system has a BSD-style setpgrp, which takes arguments, exit | |
6580 | * successfully. | |
6581 | */ | |
6582 | main() | |
6583 | { | |
6584 | if (setpgrp(1,1) == -1) | |
6585 | exit(0); | |
6586 | else | |
6587 | exit(1); | |
6588 | } | |
6589 | ||
c906108c | 6590 | EOF |
d28f9cdf | 6591 | if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
6592 | then |
6593 | ac_cv_func_setpgrp_void=no | |
c906108c SS |
6594 | else |
6595 | echo "configure: failed program was:" >&5 | |
6596 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
6597 | rm -fr conftest* |
6598 | ac_cv_func_setpgrp_void=yes | |
c906108c | 6599 | fi |
97bf5e38 | 6600 | rm -fr conftest* |
c906108c SS |
6601 | fi |
6602 | ||
97bf5e38 MK |
6603 | |
6604 | fi | |
6605 | ||
6606 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 | |
6607 | if test $ac_cv_func_setpgrp_void = yes; then | |
6608 | cat >> confdefs.h <<\EOF | |
6609 | #define SETPGRP_VOID 1 | |
c906108c SS |
6610 | EOF |
6611 | ||
6612 | fi | |
6613 | ||
97bf5e38 MK |
6614 | else |
6615 | echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 | |
d28f9cdf | 6616 | echo "configure:6617: checking whether setpgrp takes no argument" >&5 |
97bf5e38 | 6617 | if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then |
b83266a0 SS |
6618 | echo $ac_n "(cached) $ac_c" 1>&6 |
6619 | else | |
6620 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6621 | #line 6622 "configure" |
b83266a0 SS |
6622 | #include "confdefs.h" |
6623 | ||
b83266a0 | 6624 | #include <unistd.h> |
97bf5e38 | 6625 | |
b83266a0 | 6626 | int main() { |
97bf5e38 MK |
6627 | |
6628 | if (setpgrp(1,1) == -1) | |
6629 | exit (0); | |
6630 | else | |
6631 | exit (1); | |
6632 | ||
b83266a0 SS |
6633 | ; return 0; } |
6634 | EOF | |
d28f9cdf | 6635 | if { (eval echo configure:6636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b83266a0 | 6636 | rm -rf conftest* |
97bf5e38 | 6637 | ac_cv_func_setpgrp_void=no |
b83266a0 SS |
6638 | else |
6639 | echo "configure: failed program was:" >&5 | |
6640 | cat conftest.$ac_ext >&5 | |
6641 | rm -rf conftest* | |
97bf5e38 | 6642 | ac_cv_func_setpgrp_void=yes |
b83266a0 SS |
6643 | fi |
6644 | rm -f conftest* | |
6645 | fi | |
6646 | ||
97bf5e38 MK |
6647 | echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 |
6648 | if test $ac_cv_func_setpgrp_void = yes; then | |
b83266a0 | 6649 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6650 | #define SETPGRP_VOID 1 |
b83266a0 SS |
6651 | EOF |
6652 | ||
97bf5e38 | 6653 | fi |
b83266a0 SS |
6654 | fi |
6655 | ||
97bf5e38 MK |
6656 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
6657 | # since sigsetjmp might only be defined as a macro. | |
6658 | echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 | |
d28f9cdf | 6659 | echo "configure:6660: checking for sigsetjmp" >&5 |
97bf5e38 | 6660 | if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then |
a4db0f07 RH |
6661 | echo $ac_n "(cached) $ac_c" 1>&6 |
6662 | else | |
6663 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6664 | #line 6665 "configure" |
a4db0f07 RH |
6665 | #include "confdefs.h" |
6666 | ||
97bf5e38 MK |
6667 | #include <setjmp.h> |
6668 | ||
a4db0f07 | 6669 | int main() { |
97bf5e38 | 6670 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
a4db0f07 RH |
6671 | ; return 0; } |
6672 | EOF | |
d28f9cdf | 6673 | if { (eval echo configure:6674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a4db0f07 | 6674 | rm -rf conftest* |
97bf5e38 | 6675 | gdb_cv_func_sigsetjmp=yes |
a4db0f07 RH |
6676 | else |
6677 | echo "configure: failed program was:" >&5 | |
6678 | cat conftest.$ac_ext >&5 | |
6679 | rm -rf conftest* | |
97bf5e38 | 6680 | gdb_cv_func_sigsetjmp=no |
a4db0f07 RH |
6681 | fi |
6682 | rm -f conftest* | |
6683 | fi | |
6684 | ||
97bf5e38 MK |
6685 | echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 |
6686 | if test $gdb_cv_func_sigsetjmp = yes; then | |
a4db0f07 | 6687 | cat >> confdefs.h <<\EOF |
97bf5e38 | 6688 | #define HAVE_SIGSETJMP 1 |
a4db0f07 RH |
6689 | EOF |
6690 | ||
6691 | fi | |
c906108c | 6692 | |
06825bd1 MK |
6693 | # Assume we'll default to using the included libiberty regex. |
6694 | gdb_use_included_regex=yes | |
6695 | ||
6696 | # However, if the system regex is GNU regex, then default to *not* | |
6697 | # using the included regex. | |
6698 | echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 | |
d28f9cdf | 6699 | echo "configure:6700: checking for GNU regex" >&5 |
06825bd1 MK |
6700 | if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then |
6701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6702 | else | |
6703 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6704 | #line 6705 "configure" |
06825bd1 MK |
6705 | #include "confdefs.h" |
6706 | #include <gnu-versions.h> | |
6707 | int main() { | |
6708 | #define REGEX_INTERFACE_VERSION 1 | |
6709 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
6710 | # error "Version mismatch" | |
6711 | #endif | |
6712 | ; return 0; } | |
6713 | EOF | |
d28f9cdf | 6714 | if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
06825bd1 MK |
6715 | rm -rf conftest* |
6716 | gdb_cv_have_gnu_regex=yes | |
6717 | else | |
6718 | echo "configure: failed program was:" >&5 | |
6719 | cat conftest.$ac_ext >&5 | |
6720 | rm -rf conftest* | |
6721 | gdb_cv_have_gnu_regex=no | |
6722 | fi | |
6723 | rm -f conftest* | |
6724 | fi | |
6725 | ||
6726 | echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 | |
6727 | if test $gdb_cv_have_gnu_regex = yes; then | |
6728 | gdb_use_included_regex=no | |
6729 | fi | |
6730 | ||
6731 | # Check whether --with-included-regex or --without-included-regex was given. | |
6732 | if test "${with_included_regex+set}" = set; then | |
6733 | withval="$with_included_regex" | |
6734 | gdb_with_regex=$withval | |
6735 | else | |
6736 | gdb_with_regex=$gdb_use_included_regex | |
6737 | fi | |
6738 | ||
6739 | if test "$gdb_with_regex" = yes; then | |
6740 | cat >> confdefs.h <<\EOF | |
6741 | #define USE_INCLUDED_REGEX 1 | |
6742 | EOF | |
6743 | ||
6744 | fi | |
6745 | ||
97bf5e38 MK |
6746 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
6747 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
6748 | echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 | |
d28f9cdf | 6749 | echo "configure:6750: checking for r_fs in struct reg" >&5 |
97bf5e38 MK |
6750 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then |
6751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6752 | else | |
6753 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6754 | #line 6755 "configure" |
c906108c | 6755 | #include "confdefs.h" |
97bf5e38 MK |
6756 | #include <machine/reg.h> |
6757 | int main() { | |
6758 | struct reg r; r.r_fs; | |
6759 | ; return 0; } | |
c906108c | 6760 | EOF |
d28f9cdf | 6761 | if { (eval echo configure:6762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6762 | rm -rf conftest* |
97bf5e38 | 6763 | gdb_cv_struct_reg_r_fs=yes |
c906108c | 6764 | else |
97bf5e38 MK |
6765 | echo "configure: failed program was:" >&5 |
6766 | cat conftest.$ac_ext >&5 | |
c906108c | 6767 | rm -rf conftest* |
97bf5e38 | 6768 | gdb_cv_struct_reg_r_fs=no |
c906108c SS |
6769 | fi |
6770 | rm -f conftest* | |
97bf5e38 | 6771 | fi |
c906108c | 6772 | |
97bf5e38 MK |
6773 | echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 |
6774 | if test $gdb_cv_struct_reg_r_fs = yes; then | |
6775 | cat >> confdefs.h <<\EOF | |
6776 | #define HAVE_STRUCT_REG_R_FS 1 | |
6777 | EOF | |
6778 | ||
6779 | fi | |
6780 | echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 | |
d28f9cdf | 6781 | echo "configure:6782: checking for r_gs in struct reg" >&5 |
97bf5e38 MK |
6782 | if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then |
6783 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6784 | else | |
6785 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6786 | #line 6787 "configure" |
c906108c | 6787 | #include "confdefs.h" |
97bf5e38 MK |
6788 | #include <machine/reg.h> |
6789 | int main() { | |
6790 | struct reg r; r.r_gs; | |
6791 | ; return 0; } | |
c906108c | 6792 | EOF |
d28f9cdf | 6793 | if { (eval echo configure:6794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6794 | rm -rf conftest* |
97bf5e38 | 6795 | gdb_cv_struct_reg_r_gs=yes |
c906108c | 6796 | else |
97bf5e38 MK |
6797 | echo "configure: failed program was:" >&5 |
6798 | cat conftest.$ac_ext >&5 | |
c906108c | 6799 | rm -rf conftest* |
97bf5e38 | 6800 | gdb_cv_struct_reg_r_gs=no |
c906108c SS |
6801 | fi |
6802 | rm -f conftest* | |
c906108c | 6803 | fi |
c906108c | 6804 | |
97bf5e38 MK |
6805 | echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 |
6806 | if test $gdb_cv_struct_reg_r_gs = yes; then | |
6807 | cat >> confdefs.h <<\EOF | |
6808 | #define HAVE_STRUCT_REG_R_GS 1 | |
c3f6f71d JM |
6809 | EOF |
6810 | ||
c906108c SS |
6811 | fi |
6812 | ||
97bf5e38 MK |
6813 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
6814 | echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 | |
d28f9cdf | 6815 | echo "configure:6816: checking for PTRACE_GETREGS" >&5 |
97bf5e38 | 6816 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then |
c906108c SS |
6817 | echo $ac_n "(cached) $ac_c" 1>&6 |
6818 | else | |
6819 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6820 | #line 6821 "configure" |
c906108c | 6821 | #include "confdefs.h" |
97bf5e38 | 6822 | #include <sys/ptrace.h> |
c906108c | 6823 | int main() { |
97bf5e38 | 6824 | PTRACE_GETREGS; |
c906108c SS |
6825 | ; return 0; } |
6826 | EOF | |
d28f9cdf | 6827 | if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6828 | rm -rf conftest* |
97bf5e38 | 6829 | gdb_cv_have_ptrace_getregs=yes |
c906108c SS |
6830 | else |
6831 | echo "configure: failed program was:" >&5 | |
6832 | cat conftest.$ac_ext >&5 | |
6833 | rm -rf conftest* | |
97bf5e38 | 6834 | gdb_cv_have_ptrace_getregs=no |
c906108c SS |
6835 | fi |
6836 | rm -f conftest* | |
6837 | fi | |
6838 | ||
97bf5e38 MK |
6839 | echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 |
6840 | if test $gdb_cv_have_ptrace_getregs = yes; then | |
6841 | cat >> confdefs.h <<\EOF | |
6842 | #define HAVE_PTRACE_GETREGS 1 | |
c906108c SS |
6843 | EOF |
6844 | ||
97bf5e38 | 6845 | fi |
c906108c | 6846 | |
97bf5e38 MK |
6847 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
6848 | echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 | |
d28f9cdf | 6849 | echo "configure:6850: checking for PTRACE_GETFPXREGS" >&5 |
97bf5e38 | 6850 | if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then |
c906108c SS |
6851 | echo $ac_n "(cached) $ac_c" 1>&6 |
6852 | else | |
6853 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6854 | #line 6855 "configure" |
c906108c | 6855 | #include "confdefs.h" |
97bf5e38 | 6856 | #include <sys/ptrace.h> |
c906108c | 6857 | int main() { |
97bf5e38 | 6858 | PTRACE_GETFPXREGS; |
c906108c SS |
6859 | ; return 0; } |
6860 | EOF | |
d28f9cdf | 6861 | if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6862 | rm -rf conftest* |
97bf5e38 | 6863 | gdb_cv_have_ptrace_getfpxregs=yes |
c906108c SS |
6864 | else |
6865 | echo "configure: failed program was:" >&5 | |
6866 | cat conftest.$ac_ext >&5 | |
6867 | rm -rf conftest* | |
97bf5e38 | 6868 | gdb_cv_have_ptrace_getfpxregs=no |
c906108c SS |
6869 | fi |
6870 | rm -f conftest* | |
6871 | fi | |
6872 | ||
97bf5e38 MK |
6873 | echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 |
6874 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then | |
6875 | cat >> confdefs.h <<\EOF | |
6876 | #define HAVE_PTRACE_GETFPXREGS 1 | |
c906108c SS |
6877 | EOF |
6878 | ||
97bf5e38 | 6879 | fi |
c906108c | 6880 | |
97bf5e38 MK |
6881 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
6882 | echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 | |
d28f9cdf | 6883 | echo "configure:6884: checking for PT_GETDBREGS" >&5 |
97bf5e38 | 6884 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then |
c906108c SS |
6885 | echo $ac_n "(cached) $ac_c" 1>&6 |
6886 | else | |
6887 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6888 | #line 6889 "configure" |
c906108c | 6889 | #include "confdefs.h" |
97bf5e38 MK |
6890 | #include <sys/types.h> |
6891 | #include <sys/ptrace.h> | |
c906108c | 6892 | int main() { |
97bf5e38 | 6893 | PT_GETDBREGS; |
c906108c SS |
6894 | ; return 0; } |
6895 | EOF | |
d28f9cdf | 6896 | if { (eval echo configure:6897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6897 | rm -rf conftest* |
97bf5e38 | 6898 | gdb_cv_have_pt_getdbregs=yes |
c906108c SS |
6899 | else |
6900 | echo "configure: failed program was:" >&5 | |
6901 | cat conftest.$ac_ext >&5 | |
6902 | rm -rf conftest* | |
97bf5e38 | 6903 | gdb_cv_have_pt_getdbregs=no |
c906108c SS |
6904 | fi |
6905 | rm -f conftest* | |
6906 | fi | |
6907 | ||
97bf5e38 MK |
6908 | echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 |
6909 | if test $gdb_cv_have_pt_getdbregs = yes; then | |
6910 | cat >> confdefs.h <<\EOF | |
6911 | #define HAVE_PT_GETDBREGS 1 | |
c906108c SS |
6912 | EOF |
6913 | ||
97bf5e38 | 6914 | fi |
c906108c | 6915 | |
97bf5e38 MK |
6916 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
6917 | echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6 | |
d28f9cdf | 6918 | echo "configure:6919: checking for PT_GETXMMREGS" >&5 |
97bf5e38 | 6919 | if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then |
c906108c SS |
6920 | echo $ac_n "(cached) $ac_c" 1>&6 |
6921 | else | |
6922 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6923 | #line 6924 "configure" |
c906108c | 6924 | #include "confdefs.h" |
97bf5e38 MK |
6925 | #include <sys/types.h> |
6926 | #include <sys/ptrace.h> | |
c906108c | 6927 | int main() { |
97bf5e38 | 6928 | PT_GETXMMREGS; |
c906108c SS |
6929 | ; return 0; } |
6930 | EOF | |
d28f9cdf | 6931 | if { (eval echo configure:6932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 6932 | rm -rf conftest* |
97bf5e38 | 6933 | gdb_cv_have_pt_getxmmregs=yes |
c906108c SS |
6934 | else |
6935 | echo "configure: failed program was:" >&5 | |
6936 | cat conftest.$ac_ext >&5 | |
6937 | rm -rf conftest* | |
97bf5e38 | 6938 | gdb_cv_have_pt_getxmmregs=no |
c906108c SS |
6939 | fi |
6940 | rm -f conftest* | |
6941 | fi | |
6942 | ||
97bf5e38 MK |
6943 | echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6 |
6944 | if test $gdb_cv_have_pt_getxmmregs = yes; then | |
6945 | cat >> confdefs.h <<\EOF | |
6946 | #define HAVE_PT_GETXMMREGS 1 | |
c906108c SS |
6947 | EOF |
6948 | ||
97bf5e38 | 6949 | fi |
c906108c | 6950 | |
97bf5e38 MK |
6951 | |
6952 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
d28f9cdf | 6953 | echo "configure:6954: checking whether malloc must be declared" >&5 |
97bf5e38 | 6954 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
3862412b MK |
6955 | echo $ac_n "(cached) $ac_c" 1>&6 |
6956 | else | |
6957 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 6958 | #line 6959 "configure" |
3862412b | 6959 | #include "confdefs.h" |
e17bf198 | 6960 | |
97bf5e38 MK |
6961 | #include <stdio.h> |
6962 | #ifdef HAVE_STRING_H | |
6963 | #include <string.h> | |
6964 | #else | |
6965 | #ifdef HAVE_STRINGS_H | |
6966 | #include <strings.h> | |
6967 | #endif | |
6968 | #endif | |
6969 | #ifdef HAVE_STDLIB_H | |
6970 | #include <stdlib.h> | |
6971 | #endif | |
6972 | #ifdef HAVE_UNISTD_H | |
6973 | #include <unistd.h> | |
6974 | #endif | |
3862412b | 6975 | int main() { |
97bf5e38 | 6976 | char *(*pfn) = (char *(*)) malloc |
3862412b MK |
6977 | ; return 0; } |
6978 | EOF | |
d28f9cdf | 6979 | if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 6980 | rm -rf conftest* |
97bf5e38 | 6981 | bfd_cv_decl_needed_malloc=no |
3862412b MK |
6982 | else |
6983 | echo "configure: failed program was:" >&5 | |
6984 | cat conftest.$ac_ext >&5 | |
6985 | rm -rf conftest* | |
97bf5e38 | 6986 | bfd_cv_decl_needed_malloc=yes |
3862412b MK |
6987 | fi |
6988 | rm -f conftest* | |
6989 | fi | |
6990 | ||
97bf5e38 MK |
6991 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
6992 | if test $bfd_cv_decl_needed_malloc = yes; then | |
6993 | cat >> confdefs.h <<\EOF | |
6994 | #define NEED_DECLARATION_MALLOC 1 | |
3862412b MK |
6995 | EOF |
6996 | ||
97bf5e38 | 6997 | fi |
3862412b | 6998 | |
97bf5e38 | 6999 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7000 | echo "configure:7001: checking whether realloc must be declared" >&5 |
97bf5e38 | 7001 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
3862412b MK |
7002 | echo $ac_n "(cached) $ac_c" 1>&6 |
7003 | else | |
7004 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7005 | #line 7006 "configure" |
3862412b | 7006 | #include "confdefs.h" |
e17bf198 | 7007 | |
97bf5e38 MK |
7008 | #include <stdio.h> |
7009 | #ifdef HAVE_STRING_H | |
7010 | #include <string.h> | |
7011 | #else | |
7012 | #ifdef HAVE_STRINGS_H | |
7013 | #include <strings.h> | |
7014 | #endif | |
7015 | #endif | |
7016 | #ifdef HAVE_STDLIB_H | |
7017 | #include <stdlib.h> | |
7018 | #endif | |
7019 | #ifdef HAVE_UNISTD_H | |
7020 | #include <unistd.h> | |
7021 | #endif | |
3862412b | 7022 | int main() { |
97bf5e38 | 7023 | char *(*pfn) = (char *(*)) realloc |
3862412b MK |
7024 | ; return 0; } |
7025 | EOF | |
d28f9cdf | 7026 | if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7027 | rm -rf conftest* |
97bf5e38 | 7028 | bfd_cv_decl_needed_realloc=no |
3862412b MK |
7029 | else |
7030 | echo "configure: failed program was:" >&5 | |
7031 | cat conftest.$ac_ext >&5 | |
7032 | rm -rf conftest* | |
97bf5e38 | 7033 | bfd_cv_decl_needed_realloc=yes |
3862412b MK |
7034 | fi |
7035 | rm -f conftest* | |
7036 | fi | |
7037 | ||
97bf5e38 MK |
7038 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
7039 | if test $bfd_cv_decl_needed_realloc = yes; then | |
7040 | cat >> confdefs.h <<\EOF | |
7041 | #define NEED_DECLARATION_REALLOC 1 | |
3862412b MK |
7042 | EOF |
7043 | ||
97bf5e38 | 7044 | fi |
3862412b | 7045 | |
97bf5e38 | 7046 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7047 | echo "configure:7048: checking whether free must be declared" >&5 |
97bf5e38 | 7048 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
451928c5 AC |
7049 | echo $ac_n "(cached) $ac_c" 1>&6 |
7050 | else | |
7051 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7052 | #line 7053 "configure" |
451928c5 | 7053 | #include "confdefs.h" |
e17bf198 | 7054 | |
97bf5e38 MK |
7055 | #include <stdio.h> |
7056 | #ifdef HAVE_STRING_H | |
7057 | #include <string.h> | |
7058 | #else | |
7059 | #ifdef HAVE_STRINGS_H | |
7060 | #include <strings.h> | |
7061 | #endif | |
7062 | #endif | |
7063 | #ifdef HAVE_STDLIB_H | |
7064 | #include <stdlib.h> | |
7065 | #endif | |
7066 | #ifdef HAVE_UNISTD_H | |
7067 | #include <unistd.h> | |
7068 | #endif | |
451928c5 | 7069 | int main() { |
97bf5e38 | 7070 | char *(*pfn) = (char *(*)) free |
451928c5 AC |
7071 | ; return 0; } |
7072 | EOF | |
d28f9cdf | 7073 | if { (eval echo configure:7074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7074 | rm -rf conftest* |
97bf5e38 | 7075 | bfd_cv_decl_needed_free=no |
451928c5 AC |
7076 | else |
7077 | echo "configure: failed program was:" >&5 | |
7078 | cat conftest.$ac_ext >&5 | |
7079 | rm -rf conftest* | |
97bf5e38 | 7080 | bfd_cv_decl_needed_free=yes |
451928c5 AC |
7081 | fi |
7082 | rm -f conftest* | |
7083 | fi | |
7084 | ||
97bf5e38 MK |
7085 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
7086 | if test $bfd_cv_decl_needed_free = yes; then | |
7087 | cat >> confdefs.h <<\EOF | |
7088 | #define NEED_DECLARATION_FREE 1 | |
451928c5 AC |
7089 | EOF |
7090 | ||
97bf5e38 | 7091 | fi |
451928c5 | 7092 | |
97bf5e38 | 7093 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7094 | echo "configure:7095: checking whether strerror must be declared" >&5 |
97bf5e38 | 7095 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
451928c5 AC |
7096 | echo $ac_n "(cached) $ac_c" 1>&6 |
7097 | else | |
7098 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7099 | #line 7100 "configure" |
451928c5 | 7100 | #include "confdefs.h" |
e17bf198 | 7101 | |
97bf5e38 MK |
7102 | #include <stdio.h> |
7103 | #ifdef HAVE_STRING_H | |
7104 | #include <string.h> | |
7105 | #else | |
7106 | #ifdef HAVE_STRINGS_H | |
7107 | #include <strings.h> | |
7108 | #endif | |
7109 | #endif | |
7110 | #ifdef HAVE_STDLIB_H | |
7111 | #include <stdlib.h> | |
7112 | #endif | |
7113 | #ifdef HAVE_UNISTD_H | |
7114 | #include <unistd.h> | |
7115 | #endif | |
451928c5 | 7116 | int main() { |
97bf5e38 | 7117 | char *(*pfn) = (char *(*)) strerror |
451928c5 AC |
7118 | ; return 0; } |
7119 | EOF | |
d28f9cdf | 7120 | if { (eval echo configure:7121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
451928c5 | 7121 | rm -rf conftest* |
97bf5e38 | 7122 | bfd_cv_decl_needed_strerror=no |
451928c5 AC |
7123 | else |
7124 | echo "configure: failed program was:" >&5 | |
7125 | cat conftest.$ac_ext >&5 | |
7126 | rm -rf conftest* | |
97bf5e38 | 7127 | bfd_cv_decl_needed_strerror=yes |
451928c5 AC |
7128 | fi |
7129 | rm -f conftest* | |
7130 | fi | |
7131 | ||
97bf5e38 MK |
7132 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 |
7133 | if test $bfd_cv_decl_needed_strerror = yes; then | |
7134 | cat >> confdefs.h <<\EOF | |
7135 | #define NEED_DECLARATION_STRERROR 1 | |
451928c5 AC |
7136 | EOF |
7137 | ||
97bf5e38 | 7138 | fi |
451928c5 | 7139 | |
97bf5e38 | 7140 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7141 | echo "configure:7142: checking whether strdup must be declared" >&5 |
97bf5e38 | 7142 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
3862412b MK |
7143 | echo $ac_n "(cached) $ac_c" 1>&6 |
7144 | else | |
7145 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7146 | #line 7147 "configure" |
3862412b | 7147 | #include "confdefs.h" |
e17bf198 | 7148 | |
97bf5e38 MK |
7149 | #include <stdio.h> |
7150 | #ifdef HAVE_STRING_H | |
7151 | #include <string.h> | |
7152 | #else | |
7153 | #ifdef HAVE_STRINGS_H | |
7154 | #include <strings.h> | |
7155 | #endif | |
7156 | #endif | |
7157 | #ifdef HAVE_STDLIB_H | |
7158 | #include <stdlib.h> | |
7159 | #endif | |
7160 | #ifdef HAVE_UNISTD_H | |
7161 | #include <unistd.h> | |
7162 | #endif | |
3862412b | 7163 | int main() { |
97bf5e38 | 7164 | char *(*pfn) = (char *(*)) strdup |
3862412b MK |
7165 | ; return 0; } |
7166 | EOF | |
d28f9cdf | 7167 | if { (eval echo configure:7168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7168 | rm -rf conftest* |
97bf5e38 | 7169 | bfd_cv_decl_needed_strdup=no |
3862412b MK |
7170 | else |
7171 | echo "configure: failed program was:" >&5 | |
7172 | cat conftest.$ac_ext >&5 | |
7173 | rm -rf conftest* | |
97bf5e38 | 7174 | bfd_cv_decl_needed_strdup=yes |
3862412b MK |
7175 | fi |
7176 | rm -f conftest* | |
7177 | fi | |
7178 | ||
97bf5e38 MK |
7179 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 |
7180 | if test $bfd_cv_decl_needed_strdup = yes; then | |
7181 | cat >> confdefs.h <<\EOF | |
7182 | #define NEED_DECLARATION_STRDUP 1 | |
3862412b MK |
7183 | EOF |
7184 | ||
97bf5e38 | 7185 | fi |
3862412b | 7186 | |
97bf5e38 | 7187 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7188 | echo "configure:7189: checking whether strstr must be declared" >&5 |
97bf5e38 | 7189 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
3862412b MK |
7190 | echo $ac_n "(cached) $ac_c" 1>&6 |
7191 | else | |
7192 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7193 | #line 7194 "configure" |
3862412b | 7194 | #include "confdefs.h" |
e17bf198 | 7195 | |
97bf5e38 MK |
7196 | #include <stdio.h> |
7197 | #ifdef HAVE_STRING_H | |
7198 | #include <string.h> | |
7199 | #else | |
7200 | #ifdef HAVE_STRINGS_H | |
7201 | #include <strings.h> | |
7202 | #endif | |
7203 | #endif | |
7204 | #ifdef HAVE_STDLIB_H | |
7205 | #include <stdlib.h> | |
7206 | #endif | |
7207 | #ifdef HAVE_UNISTD_H | |
7208 | #include <unistd.h> | |
7209 | #endif | |
3862412b | 7210 | int main() { |
97bf5e38 | 7211 | char *(*pfn) = (char *(*)) strstr |
3862412b MK |
7212 | ; return 0; } |
7213 | EOF | |
d28f9cdf | 7214 | if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3862412b | 7215 | rm -rf conftest* |
97bf5e38 | 7216 | bfd_cv_decl_needed_strstr=no |
3862412b MK |
7217 | else |
7218 | echo "configure: failed program was:" >&5 | |
7219 | cat conftest.$ac_ext >&5 | |
7220 | rm -rf conftest* | |
97bf5e38 | 7221 | bfd_cv_decl_needed_strstr=yes |
3862412b MK |
7222 | fi |
7223 | rm -f conftest* | |
7224 | fi | |
7225 | ||
97bf5e38 MK |
7226 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
7227 | if test $bfd_cv_decl_needed_strstr = yes; then | |
7228 | cat >> confdefs.h <<\EOF | |
7229 | #define NEED_DECLARATION_STRSTR 1 | |
3862412b MK |
7230 | EOF |
7231 | ||
97bf5e38 | 7232 | fi |
3862412b | 7233 | |
97bf5e38 | 7234 | echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 |
d28f9cdf | 7235 | echo "configure:7236: checking whether canonicalize_file_name must be declared" >&5 |
97bf5e38 | 7236 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then |
596c9d4b KB |
7237 | echo $ac_n "(cached) $ac_c" 1>&6 |
7238 | else | |
7239 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7240 | #line 7241 "configure" |
596c9d4b KB |
7241 | #include "confdefs.h" |
7242 | ||
97bf5e38 MK |
7243 | #include <stdio.h> |
7244 | #ifdef HAVE_STRING_H | |
7245 | #include <string.h> | |
7246 | #else | |
7247 | #ifdef HAVE_STRINGS_H | |
7248 | #include <strings.h> | |
7249 | #endif | |
7250 | #endif | |
7251 | #ifdef HAVE_STDLIB_H | |
7252 | #include <stdlib.h> | |
7253 | #endif | |
7254 | #ifdef HAVE_UNISTD_H | |
7255 | #include <unistd.h> | |
7256 | #endif | |
596c9d4b | 7257 | int main() { |
97bf5e38 | 7258 | char *(*pfn) = (char *(*)) canonicalize_file_name |
596c9d4b KB |
7259 | ; return 0; } |
7260 | EOF | |
d28f9cdf | 7261 | if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7262 | rm -rf conftest* |
97bf5e38 | 7263 | bfd_cv_decl_needed_canonicalize_file_name=no |
596c9d4b KB |
7264 | else |
7265 | echo "configure: failed program was:" >&5 | |
7266 | cat conftest.$ac_ext >&5 | |
7267 | rm -rf conftest* | |
97bf5e38 | 7268 | bfd_cv_decl_needed_canonicalize_file_name=yes |
596c9d4b KB |
7269 | fi |
7270 | rm -f conftest* | |
7271 | fi | |
7272 | ||
97bf5e38 MK |
7273 | echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6 |
7274 | if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then | |
7275 | cat >> confdefs.h <<\EOF | |
7276 | #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 | |
596c9d4b KB |
7277 | EOF |
7278 | ||
97bf5e38 | 7279 | fi |
596c9d4b | 7280 | |
97bf5e38 MK |
7281 | |
7282 | # The following save_state_t checkery is only necessary for HPUX | |
7283 | # versions earlier than 10.20. When those fade from memory, this | |
7284 | # could be expunged. --jsm 1999-03-22 | |
7285 | ||
7286 | echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 | |
d28f9cdf | 7287 | echo "configure:7288: checking for HPUX save_state structure" >&5 |
97bf5e38 | 7288 | cat > conftest.$ac_ext <<EOF |
d28f9cdf | 7289 | #line 7290 "configure" |
97bf5e38 MK |
7290 | #include "confdefs.h" |
7291 | #include <machine/save_state.h> | |
7292 | EOF | |
7293 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7294 | egrep "save_state_t" >/dev/null 2>&1; then | |
7295 | rm -rf conftest* | |
7296 | gdb_cv_hpux_savestate=yes | |
7297 | else | |
7298 | rm -rf conftest* | |
7299 | gdb_cv_hpux_savestate=no | |
7300 | fi | |
7301 | rm -f conftest* | |
7302 | ||
7303 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7304 | #line 7305 "configure" |
97bf5e38 MK |
7305 | #include "confdefs.h" |
7306 | #include <machine/save_state.h> | |
7307 | EOF | |
7308 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7309 | egrep "ss_wide" >/dev/null 2>&1; then | |
7310 | rm -rf conftest* | |
7311 | gdb_cv_hpux_sswide=yes | |
7312 | else | |
7313 | rm -rf conftest* | |
7314 | gdb_cv_hpux_sswide=no | |
7315 | fi | |
7316 | rm -f conftest* | |
7317 | ||
7318 | if test $gdb_cv_hpux_savestate = yes | |
7319 | then | |
7320 | cat >> confdefs.h <<\EOF | |
7321 | #define HAVE_STRUCT_SAVE_STATE_T 1 | |
7322 | EOF | |
7323 | ||
7324 | fi | |
7325 | if test $gdb_cv_hpux_sswide = yes | |
7326 | then | |
7327 | cat >> confdefs.h <<\EOF | |
7328 | #define HAVE_STRUCT_MEMBER_SS_WIDE 1 | |
7329 | EOF | |
7330 | ||
7331 | fi | |
7332 | echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 | |
7333 | ||
7334 | ||
7335 | # If we are configured native on GNU/Linux, work around problems with | |
7336 | # sys/procfs.h | |
7337 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. | |
7338 | ||
7339 | if test "${target}" = "${host}"; then | |
7340 | case "${host}" in | |
7341 | i[3456]86-*-linux*) | |
7342 | cat >> confdefs.h <<\EOF | |
7343 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
7344 | EOF | |
7345 | ||
7346 | cat >> confdefs.h <<\EOF | |
7347 | #define sys_quotactl 1 | |
7348 | EOF | |
7349 | ||
7350 | ;; | |
7351 | ia64-*-aix*) | |
7352 | cat >> confdefs.h <<\EOF | |
7353 | #define NEW_PROC_API 1 | |
7354 | EOF | |
7355 | ||
7356 | ;; | |
7357 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) | |
7358 | cat >> confdefs.h <<\EOF | |
7359 | #define NEW_PROC_API 1 | |
7360 | EOF | |
7361 | ||
7362 | ;; | |
7363 | *-*-solaris2.[678]) | |
7364 | cat >> confdefs.h <<\EOF | |
7365 | #define NEW_PROC_API 1 | |
7366 | EOF | |
7367 | ||
7368 | ;; | |
7369 | esac | |
7370 | fi | |
7371 | ||
7372 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
7373 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
d28f9cdf | 7374 | echo "configure:7375: checking for pstatus_t in sys/procfs.h" >&5 |
97bf5e38 | 7375 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
596c9d4b KB |
7376 | echo $ac_n "(cached) $ac_c" 1>&6 |
7377 | else | |
7378 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7379 | #line 7380 "configure" |
596c9d4b KB |
7380 | #include "confdefs.h" |
7381 | ||
7382 | #define _SYSCALL32 | |
7383 | #include <sys/procfs.h> | |
7384 | int main() { | |
97bf5e38 | 7385 | pstatus_t avar |
596c9d4b KB |
7386 | ; return 0; } |
7387 | EOF | |
d28f9cdf | 7388 | if { (eval echo configure:7389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7389 | rm -rf conftest* |
97bf5e38 | 7390 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b KB |
7391 | else |
7392 | echo "configure: failed program was:" >&5 | |
7393 | cat conftest.$ac_ext >&5 | |
7394 | rm -rf conftest* | |
97bf5e38 | 7395 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
596c9d4b KB |
7396 | |
7397 | fi | |
7398 | rm -f conftest* | |
7399 | fi | |
7400 | ||
97bf5e38 | 7401 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
596c9d4b | 7402 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7403 | #define HAVE_PSTATUS_T 1 |
596c9d4b KB |
7404 | EOF |
7405 | ||
7406 | fi | |
97bf5e38 | 7407 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
596c9d4b | 7408 | |
97bf5e38 | 7409 | echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7410 | echo "configure:7411: checking for prrun_t in sys/procfs.h" >&5 |
97bf5e38 | 7411 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then |
596c9d4b KB |
7412 | echo $ac_n "(cached) $ac_c" 1>&6 |
7413 | else | |
7414 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7415 | #line 7416 "configure" |
596c9d4b KB |
7416 | #include "confdefs.h" |
7417 | ||
7418 | #define _SYSCALL32 | |
7419 | #include <sys/procfs.h> | |
7420 | int main() { | |
97bf5e38 | 7421 | prrun_t avar |
596c9d4b KB |
7422 | ; return 0; } |
7423 | EOF | |
d28f9cdf | 7424 | if { (eval echo configure:7425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7425 | rm -rf conftest* |
97bf5e38 | 7426 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b KB |
7427 | else |
7428 | echo "configure: failed program was:" >&5 | |
7429 | cat conftest.$ac_ext >&5 | |
7430 | rm -rf conftest* | |
97bf5e38 | 7431 | bfd_cv_have_sys_procfs_type_prrun_t=no |
596c9d4b KB |
7432 | |
7433 | fi | |
7434 | rm -f conftest* | |
7435 | fi | |
7436 | ||
97bf5e38 | 7437 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
596c9d4b | 7438 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7439 | #define HAVE_PRRUN_T 1 |
596c9d4b KB |
7440 | EOF |
7441 | ||
7442 | fi | |
97bf5e38 | 7443 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 |
596c9d4b | 7444 | |
97bf5e38 | 7445 | echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7446 | echo "configure:7447: checking for gregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7447 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then |
596c9d4b KB |
7448 | echo $ac_n "(cached) $ac_c" 1>&6 |
7449 | else | |
7450 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7451 | #line 7452 "configure" |
596c9d4b KB |
7452 | #include "confdefs.h" |
7453 | ||
7454 | #define _SYSCALL32 | |
7455 | #include <sys/procfs.h> | |
7456 | int main() { | |
97bf5e38 | 7457 | gregset_t avar |
596c9d4b KB |
7458 | ; return 0; } |
7459 | EOF | |
d28f9cdf | 7460 | if { (eval echo configure:7461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
596c9d4b | 7461 | rm -rf conftest* |
97bf5e38 | 7462 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b KB |
7463 | else |
7464 | echo "configure: failed program was:" >&5 | |
7465 | cat conftest.$ac_ext >&5 | |
7466 | rm -rf conftest* | |
97bf5e38 | 7467 | bfd_cv_have_sys_procfs_type_gregset_t=no |
596c9d4b KB |
7468 | |
7469 | fi | |
7470 | rm -f conftest* | |
7471 | fi | |
7472 | ||
97bf5e38 | 7473 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
596c9d4b | 7474 | cat >> confdefs.h <<\EOF |
97bf5e38 | 7475 | #define HAVE_GREGSET_T 1 |
596c9d4b KB |
7476 | EOF |
7477 | ||
7478 | fi | |
97bf5e38 | 7479 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 |
451928c5 | 7480 | |
97bf5e38 | 7481 | echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7482 | echo "configure:7483: checking for fpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7483 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then |
d84dd0c5 | 7484 | echo $ac_n "(cached) $ac_c" 1>&6 |
d84dd0c5 MK |
7485 | else |
7486 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7487 | #line 7488 "configure" |
d84dd0c5 | 7488 | #include "confdefs.h" |
97bf5e38 MK |
7489 | |
7490 | #define _SYSCALL32 | |
d84dd0c5 | 7491 | #include <sys/procfs.h> |
97bf5e38 MK |
7492 | int main() { |
7493 | fpregset_t avar | |
7494 | ; return 0; } | |
d84dd0c5 | 7495 | EOF |
d28f9cdf | 7496 | if { (eval echo configure:7497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7497 | rm -rf conftest* |
7498 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
d84dd0c5 MK |
7499 | else |
7500 | echo "configure: failed program was:" >&5 | |
7501 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7502 | rm -rf conftest* |
7503 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
7504 | ||
d84dd0c5 | 7505 | fi |
97bf5e38 | 7506 | rm -f conftest* |
d84dd0c5 MK |
7507 | fi |
7508 | ||
97bf5e38 MK |
7509 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
7510 | cat >> confdefs.h <<\EOF | |
7511 | #define HAVE_FPREGSET_T 1 | |
d84dd0c5 MK |
7512 | EOF |
7513 | ||
97bf5e38 MK |
7514 | fi |
7515 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 | |
d84dd0c5 | 7516 | |
97bf5e38 | 7517 | echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7518 | echo "configure:7519: checking for prgregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7519 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then |
c906108c SS |
7520 | echo $ac_n "(cached) $ac_c" 1>&6 |
7521 | else | |
7522 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7523 | #line 7524 "configure" |
c906108c | 7524 | #include "confdefs.h" |
c906108c | 7525 | |
97bf5e38 MK |
7526 | #define _SYSCALL32 |
7527 | #include <sys/procfs.h> | |
c906108c | 7528 | int main() { |
97bf5e38 | 7529 | prgregset_t avar |
c906108c SS |
7530 | ; return 0; } |
7531 | EOF | |
d28f9cdf | 7532 | if { (eval echo configure:7533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7533 | rm -rf conftest* |
97bf5e38 | 7534 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c SS |
7535 | else |
7536 | echo "configure: failed program was:" >&5 | |
7537 | cat conftest.$ac_ext >&5 | |
7538 | rm -rf conftest* | |
97bf5e38 MK |
7539 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
7540 | ||
c906108c SS |
7541 | fi |
7542 | rm -f conftest* | |
7543 | fi | |
7544 | ||
97bf5e38 MK |
7545 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
7546 | cat >> confdefs.h <<\EOF | |
7547 | #define HAVE_PRGREGSET_T 1 | |
c906108c SS |
7548 | EOF |
7549 | ||
97bf5e38 MK |
7550 | fi |
7551 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 | |
c906108c | 7552 | |
97bf5e38 | 7553 | echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7554 | echo "configure:7555: checking for prfpregset_t in sys/procfs.h" >&5 |
97bf5e38 | 7555 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then |
d45fe813 KB |
7556 | echo $ac_n "(cached) $ac_c" 1>&6 |
7557 | else | |
7558 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7559 | #line 7560 "configure" |
d45fe813 | 7560 | #include "confdefs.h" |
97bf5e38 MK |
7561 | |
7562 | #define _SYSCALL32 | |
7563 | #include <sys/procfs.h> | |
d45fe813 | 7564 | int main() { |
97bf5e38 | 7565 | prfpregset_t avar |
d45fe813 KB |
7566 | ; return 0; } |
7567 | EOF | |
d28f9cdf | 7568 | if { (eval echo configure:7569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7569 | rm -rf conftest* |
97bf5e38 | 7570 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 KB |
7571 | else |
7572 | echo "configure: failed program was:" >&5 | |
7573 | cat conftest.$ac_ext >&5 | |
7574 | rm -rf conftest* | |
97bf5e38 MK |
7575 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
7576 | ||
d45fe813 KB |
7577 | fi |
7578 | rm -f conftest* | |
7579 | fi | |
7580 | ||
97bf5e38 MK |
7581 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
7582 | cat >> confdefs.h <<\EOF | |
7583 | #define HAVE_PRFPREGSET_T 1 | |
d45fe813 KB |
7584 | EOF |
7585 | ||
97bf5e38 MK |
7586 | fi |
7587 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 | |
d45fe813 | 7588 | |
97bf5e38 | 7589 | echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7590 | echo "configure:7591: checking for prgregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7591 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7592 | echo $ac_n "(cached) $ac_c" 1>&6 |
7593 | else | |
7594 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7595 | #line 7596 "configure" |
d45fe813 | 7596 | #include "confdefs.h" |
97bf5e38 MK |
7597 | |
7598 | #define _SYSCALL32 | |
7599 | #include <sys/procfs.h> | |
d45fe813 | 7600 | int main() { |
97bf5e38 | 7601 | prgregset32_t avar |
d45fe813 KB |
7602 | ; return 0; } |
7603 | EOF | |
d28f9cdf | 7604 | if { (eval echo configure:7605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7605 | rm -rf conftest* |
97bf5e38 | 7606 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 KB |
7607 | else |
7608 | echo "configure: failed program was:" >&5 | |
7609 | cat conftest.$ac_ext >&5 | |
7610 | rm -rf conftest* | |
97bf5e38 MK |
7611 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
7612 | ||
d45fe813 KB |
7613 | fi |
7614 | rm -f conftest* | |
7615 | fi | |
7616 | ||
97bf5e38 MK |
7617 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
7618 | cat >> confdefs.h <<\EOF | |
7619 | #define HAVE_PRGREGSET32_T 1 | |
d45fe813 KB |
7620 | EOF |
7621 | ||
97bf5e38 MK |
7622 | fi |
7623 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 | |
d45fe813 | 7624 | |
97bf5e38 | 7625 | echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7626 | echo "configure:7627: checking for prfpregset32_t in sys/procfs.h" >&5 |
97bf5e38 | 7627 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then |
d45fe813 KB |
7628 | echo $ac_n "(cached) $ac_c" 1>&6 |
7629 | else | |
7630 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7631 | #line 7632 "configure" |
d45fe813 | 7632 | #include "confdefs.h" |
97bf5e38 MK |
7633 | |
7634 | #define _SYSCALL32 | |
7635 | #include <sys/procfs.h> | |
d45fe813 | 7636 | int main() { |
97bf5e38 | 7637 | prfpregset32_t avar |
d45fe813 KB |
7638 | ; return 0; } |
7639 | EOF | |
d28f9cdf | 7640 | if { (eval echo configure:7641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7641 | rm -rf conftest* |
97bf5e38 | 7642 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 KB |
7643 | else |
7644 | echo "configure: failed program was:" >&5 | |
7645 | cat conftest.$ac_ext >&5 | |
7646 | rm -rf conftest* | |
97bf5e38 MK |
7647 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
7648 | ||
d45fe813 KB |
7649 | fi |
7650 | rm -f conftest* | |
7651 | fi | |
7652 | ||
97bf5e38 MK |
7653 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
7654 | cat >> confdefs.h <<\EOF | |
7655 | #define HAVE_PRFPREGSET32_T 1 | |
d45fe813 KB |
7656 | EOF |
7657 | ||
97bf5e38 MK |
7658 | fi |
7659 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 | |
d45fe813 | 7660 | |
97bf5e38 | 7661 | echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7662 | echo "configure:7663: checking for lwpid_t in sys/procfs.h" >&5 |
97bf5e38 | 7663 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then |
d45fe813 KB |
7664 | echo $ac_n "(cached) $ac_c" 1>&6 |
7665 | else | |
7666 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7667 | #line 7668 "configure" |
d45fe813 | 7668 | #include "confdefs.h" |
97bf5e38 | 7669 | |
d45fe813 | 7670 | #define _SYSCALL32 |
97bf5e38 | 7671 | #include <sys/procfs.h> |
d45fe813 | 7672 | int main() { |
97bf5e38 | 7673 | lwpid_t avar |
d45fe813 KB |
7674 | ; return 0; } |
7675 | EOF | |
d28f9cdf | 7676 | if { (eval echo configure:7677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d45fe813 | 7677 | rm -rf conftest* |
97bf5e38 | 7678 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 KB |
7679 | else |
7680 | echo "configure: failed program was:" >&5 | |
7681 | cat conftest.$ac_ext >&5 | |
7682 | rm -rf conftest* | |
97bf5e38 MK |
7683 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
7684 | ||
d45fe813 KB |
7685 | fi |
7686 | rm -f conftest* | |
7687 | fi | |
7688 | ||
97bf5e38 MK |
7689 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
7690 | cat >> confdefs.h <<\EOF | |
7691 | #define HAVE_LWPID_T 1 | |
d45fe813 KB |
7692 | EOF |
7693 | ||
97bf5e38 MK |
7694 | fi |
7695 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 | |
c906108c | 7696 | |
97bf5e38 | 7697 | echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7698 | echo "configure:7699: checking for psaddr_t in sys/procfs.h" >&5 |
97bf5e38 | 7699 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then |
c906108c SS |
7700 | echo $ac_n "(cached) $ac_c" 1>&6 |
7701 | else | |
7702 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7703 | #line 7704 "configure" |
c906108c SS |
7704 | #include "confdefs.h" |
7705 | ||
97bf5e38 MK |
7706 | #define _SYSCALL32 |
7707 | #include <sys/procfs.h> | |
c906108c | 7708 | int main() { |
97bf5e38 | 7709 | psaddr_t avar |
c906108c SS |
7710 | ; return 0; } |
7711 | EOF | |
d28f9cdf | 7712 | if { (eval echo configure:7713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7713 | rm -rf conftest* |
97bf5e38 | 7714 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c SS |
7715 | else |
7716 | echo "configure: failed program was:" >&5 | |
7717 | cat conftest.$ac_ext >&5 | |
7718 | rm -rf conftest* | |
97bf5e38 MK |
7719 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
7720 | ||
c906108c SS |
7721 | fi |
7722 | rm -f conftest* | |
7723 | fi | |
7724 | ||
97bf5e38 MK |
7725 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
7726 | cat >> confdefs.h <<\EOF | |
7727 | #define HAVE_PSADDR_T 1 | |
c906108c SS |
7728 | EOF |
7729 | ||
97bf5e38 MK |
7730 | fi |
7731 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 | |
c906108c | 7732 | |
97bf5e38 | 7733 | echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7734 | echo "configure:7735: checking for prsysent_t in sys/procfs.h" >&5 |
97bf5e38 | 7735 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then |
c906108c | 7736 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7737 | else |
7738 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7739 | #line 7740 "configure" |
c906108c SS |
7740 | #include "confdefs.h" |
7741 | ||
97bf5e38 MK |
7742 | #define _SYSCALL32 |
7743 | #include <sys/procfs.h> | |
7744 | int main() { | |
7745 | prsysent_t avar | |
7746 | ; return 0; } | |
c906108c | 7747 | EOF |
d28f9cdf | 7748 | if { (eval echo configure:7749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7749 | rm -rf conftest* |
7750 | bfd_cv_have_sys_procfs_type_prsysent_t=yes | |
c906108c SS |
7751 | else |
7752 | echo "configure: failed program was:" >&5 | |
7753 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7754 | rm -rf conftest* |
7755 | bfd_cv_have_sys_procfs_type_prsysent_t=no | |
7756 | ||
c906108c | 7757 | fi |
97bf5e38 | 7758 | rm -f conftest* |
c906108c SS |
7759 | fi |
7760 | ||
97bf5e38 MK |
7761 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
7762 | cat >> confdefs.h <<\EOF | |
7763 | #define HAVE_PRSYSENT_T 1 | |
c906108c SS |
7764 | EOF |
7765 | ||
97bf5e38 MK |
7766 | fi |
7767 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 | |
c906108c | 7768 | |
97bf5e38 | 7769 | echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7770 | echo "configure:7771: checking for pr_sigset_t in sys/procfs.h" >&5 |
97bf5e38 | 7771 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then |
c906108c SS |
7772 | echo $ac_n "(cached) $ac_c" 1>&6 |
7773 | else | |
7774 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7775 | #line 7776 "configure" |
c906108c SS |
7776 | #include "confdefs.h" |
7777 | ||
97bf5e38 MK |
7778 | #define _SYSCALL32 |
7779 | #include <sys/procfs.h> | |
c906108c | 7780 | int main() { |
97bf5e38 | 7781 | pr_sigset_t avar |
c906108c SS |
7782 | ; return 0; } |
7783 | EOF | |
d28f9cdf | 7784 | if { (eval echo configure:7785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7785 | rm -rf conftest* |
97bf5e38 | 7786 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c SS |
7787 | else |
7788 | echo "configure: failed program was:" >&5 | |
7789 | cat conftest.$ac_ext >&5 | |
7790 | rm -rf conftest* | |
97bf5e38 MK |
7791 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
7792 | ||
c906108c SS |
7793 | fi |
7794 | rm -f conftest* | |
7795 | fi | |
7796 | ||
97bf5e38 MK |
7797 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
7798 | cat >> confdefs.h <<\EOF | |
7799 | #define HAVE_PR_SIGSET_T 1 | |
c906108c SS |
7800 | EOF |
7801 | ||
97bf5e38 MK |
7802 | fi |
7803 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 | |
c906108c | 7804 | |
97bf5e38 | 7805 | echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 |
d28f9cdf | 7806 | echo "configure:7807: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
97bf5e38 | 7807 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then |
c906108c | 7808 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
7809 | else |
7810 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7811 | #line 7812 "configure" |
c906108c SS |
7812 | #include "confdefs.h" |
7813 | ||
97bf5e38 MK |
7814 | #define _SYSCALL32 |
7815 | #include <sys/procfs.h> | |
7816 | int main() { | |
7817 | pr_sigaction64_t avar | |
7818 | ; return 0; } | |
c906108c | 7819 | EOF |
d28f9cdf | 7820 | if { (eval echo configure:7821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7821 | rm -rf conftest* |
7822 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes | |
c906108c SS |
7823 | else |
7824 | echo "configure: failed program was:" >&5 | |
7825 | cat conftest.$ac_ext >&5 | |
97bf5e38 MK |
7826 | rm -rf conftest* |
7827 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no | |
7828 | ||
c906108c | 7829 | fi |
97bf5e38 | 7830 | rm -f conftest* |
c906108c SS |
7831 | fi |
7832 | ||
97bf5e38 MK |
7833 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
7834 | cat >> confdefs.h <<\EOF | |
7835 | #define HAVE_PR_SIGACTION64_T 1 | |
c906108c SS |
7836 | EOF |
7837 | ||
97bf5e38 MK |
7838 | fi |
7839 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 | |
7840 | ||
7841 | echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 | |
d28f9cdf | 7842 | echo "configure:7843: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
97bf5e38 MK |
7843 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then |
7844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7845 | else | |
7846 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7847 | #line 7848 "configure" |
97bf5e38 MK |
7848 | #include "confdefs.h" |
7849 | ||
7850 | #define _SYSCALL32 | |
7851 | #include <sys/procfs.h> | |
7852 | int main() { | |
7853 | pr_siginfo64_t avar | |
7854 | ; return 0; } | |
7855 | EOF | |
d28f9cdf | 7856 | if { (eval echo configure:7857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
7857 | rm -rf conftest* |
7858 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes | |
7859 | else | |
7860 | echo "configure: failed program was:" >&5 | |
7861 | cat conftest.$ac_ext >&5 | |
7862 | rm -rf conftest* | |
7863 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no | |
7864 | ||
7865 | fi | |
7866 | rm -f conftest* | |
c906108c | 7867 | fi |
c906108c | 7868 | |
97bf5e38 MK |
7869 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
7870 | cat >> confdefs.h <<\EOF | |
7871 | #define HAVE_PR_SIGINFO64_T 1 | |
7872 | EOF | |
c906108c | 7873 | |
97bf5e38 MK |
7874 | fi |
7875 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 | |
7876 | ||
7877 | ||
7878 | ||
7879 | ||
7880 | ||
7881 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
7882 | echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 | |
d28f9cdf | 7883 | echo "configure:7884: checking whether prfpregset_t type is broken" >&5 |
97bf5e38 | 7884 | if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then |
c906108c SS |
7885 | echo $ac_n "(cached) $ac_c" 1>&6 |
7886 | else | |
7887 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 7888 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7889 | else |
7890 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7891 | #line 7892 "configure" |
c906108c | 7892 | #include "confdefs.h" |
97bf5e38 MK |
7893 | #include <sys/procfs.h> |
7894 | int main () | |
7895 | { | |
7896 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
7897 | return 1; | |
7898 | return 0; | |
7899 | } | |
c906108c | 7900 | EOF |
d28f9cdf | 7901 | if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 7902 | then |
97bf5e38 | 7903 | gdb_cv_prfpregset_t_broken=no |
c906108c SS |
7904 | else |
7905 | echo "configure: failed program was:" >&5 | |
7906 | cat conftest.$ac_ext >&5 | |
7907 | rm -fr conftest* | |
97bf5e38 | 7908 | gdb_cv_prfpregset_t_broken=yes |
c906108c SS |
7909 | fi |
7910 | rm -fr conftest* | |
7911 | fi | |
7912 | ||
7913 | fi | |
7914 | ||
97bf5e38 MK |
7915 | echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 |
7916 | if test $gdb_cv_prfpregset_t_broken = yes; then | |
7917 | cat >> confdefs.h <<\EOF | |
7918 | #define PRFPREGSET_T_BROKEN 1 | |
c906108c SS |
7919 | EOF |
7920 | ||
97bf5e38 MK |
7921 | fi |
7922 | fi | |
c906108c | 7923 | |
97bf5e38 MK |
7924 | |
7925 | echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 | |
d28f9cdf | 7926 | echo "configure:7927: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
97bf5e38 | 7927 | if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then |
c906108c SS |
7928 | echo $ac_n "(cached) $ac_c" 1>&6 |
7929 | else | |
7930 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7931 | #line 7932 "configure" |
c906108c | 7932 | #include "confdefs.h" |
97bf5e38 MK |
7933 | #include <unistd.h> |
7934 | #include <sys/types.h> | |
7935 | #include <sys/procfs.h> | |
7936 | ||
7937 | int main() { | |
7938 | ||
7939 | int dummy;; | |
7940 | dummy = ioctl(0, PIOCSET, &dummy); | |
7941 | ||
7942 | ; return 0; } | |
c906108c | 7943 | EOF |
d28f9cdf | 7944 | if { (eval echo configure:7945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7945 | rm -rf conftest* |
97bf5e38 | 7946 | gdb_cv_have_procfs_piocset=yes |
c906108c | 7947 | else |
c906108c SS |
7948 | echo "configure: failed program was:" >&5 |
7949 | cat conftest.$ac_ext >&5 | |
7950 | rm -rf conftest* | |
97bf5e38 | 7951 | gdb_cv_have_procfs_piocset=no |
c906108c SS |
7952 | fi |
7953 | rm -f conftest* | |
7954 | fi | |
97bf5e38 MK |
7955 | |
7956 | echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 | |
7957 | if test $gdb_cv_have_procfs_piocset = yes; then | |
7958 | cat >> confdefs.h <<\EOF | |
7959 | #define HAVE_PROCFS_PIOCSET 1 | |
c906108c | 7960 | EOF |
97bf5e38 MK |
7961 | |
7962 | fi | |
c906108c | 7963 | fi |
c906108c | 7964 | |
97bf5e38 MK |
7965 | if test ${host} = ${target} ; then |
7966 | ||
7967 | echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 | |
d28f9cdf | 7968 | echo "configure:7969: checking for member l_addr in struct link_map" >&5 |
97bf5e38 | 7969 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then |
c906108c SS |
7970 | echo $ac_n "(cached) $ac_c" 1>&6 |
7971 | else | |
7972 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 7973 | #line 7974 "configure" |
c906108c | 7974 | #include "confdefs.h" |
97bf5e38 | 7975 | #include <link.h> |
c906108c | 7976 | int main() { |
97bf5e38 | 7977 | struct link_map lm; (void) lm.l_addr; |
c906108c SS |
7978 | ; return 0; } |
7979 | EOF | |
d28f9cdf | 7980 | if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c | 7981 | rm -rf conftest* |
97bf5e38 | 7982 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c SS |
7983 | else |
7984 | echo "configure: failed program was:" >&5 | |
7985 | cat conftest.$ac_ext >&5 | |
7986 | rm -rf conftest* | |
97bf5e38 | 7987 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c SS |
7988 | fi |
7989 | rm -f conftest* | |
7990 | fi | |
7991 | ||
97bf5e38 MK |
7992 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 |
7993 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then | |
7994 | cat >> confdefs.h <<\EOF | |
7995 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 | |
c906108c | 7996 | EOF |
97bf5e38 MK |
7997 | |
7998 | fi | |
7999 | ||
8000 | ||
8001 | echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 | |
d28f9cdf | 8002 | echo "configure:8003: checking for member lm_addr in struct link_map" >&5 |
97bf5e38 MK |
8003 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then |
8004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c906108c | 8005 | else |
97bf5e38 | 8006 | cat > conftest.$ac_ext <<EOF |
d28f9cdf | 8007 | #line 8008 "configure" |
97bf5e38 MK |
8008 | #include "confdefs.h" |
8009 | #include <sys/types.h> | |
8010 | #include <link.h> | |
8011 | int main() { | |
8012 | struct link_map lm; (void) lm.lm_addr; | |
8013 | ; return 0; } | |
8014 | EOF | |
d28f9cdf | 8015 | if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8016 | rm -rf conftest* |
8017 | gdb_cv_have_struct_link_map_with_lm_members=yes | |
8018 | else | |
8019 | echo "configure: failed program was:" >&5 | |
8020 | cat conftest.$ac_ext >&5 | |
8021 | rm -rf conftest* | |
8022 | gdb_cv_have_struct_link_map_with_lm_members=no | |
8023 | fi | |
8024 | rm -f conftest* | |
c906108c | 8025 | fi |
c906108c | 8026 | |
97bf5e38 MK |
8027 | echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 |
8028 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then | |
8029 | cat >> confdefs.h <<\EOF | |
8030 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 | |
8031 | EOF | |
8032 | ||
8033 | fi | |
8034 | ||
8035 | ||
8036 | echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 | |
d28f9cdf | 8037 | echo "configure:8038: checking for member som_addr in struct so_map" >&5 |
97bf5e38 | 8038 | if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then |
c906108c | 8039 | echo $ac_n "(cached) $ac_c" 1>&6 |
c906108c SS |
8040 | else |
8041 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8042 | #line 8043 "configure" |
c906108c | 8043 | #include "confdefs.h" |
97bf5e38 MK |
8044 | #include <sys/types.h> |
8045 | #ifdef HAVE_NLIST_H | |
8046 | #include <nlist.h> | |
8047 | #endif | |
8048 | #include <link.h> | |
8049 | int main() { | |
8050 | struct so_map lm; (void) lm.som_addr; | |
8051 | ; return 0; } | |
8052 | EOF | |
d28f9cdf | 8053 | if { (eval echo configure:8054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8054 | rm -rf conftest* |
8055 | gdb_cv_have_struct_so_map_with_som_members=yes | |
8056 | else | |
8057 | echo "configure: failed program was:" >&5 | |
8058 | cat conftest.$ac_ext >&5 | |
8059 | rm -rf conftest* | |
8060 | gdb_cv_have_struct_so_map_with_som_members=no | |
8061 | fi | |
8062 | rm -f conftest* | |
8063 | fi | |
c906108c | 8064 | |
97bf5e38 MK |
8065 | echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 |
8066 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then | |
8067 | cat >> confdefs.h <<\EOF | |
8068 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 | |
8069 | EOF | |
c906108c | 8070 | |
97bf5e38 | 8071 | fi |
c906108c | 8072 | |
97bf5e38 MK |
8073 | |
8074 | echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 | |
d28f9cdf | 8075 | echo "configure:8076: checking for struct link_map32 in sys/link.h" >&5 |
97bf5e38 MK |
8076 | if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then |
8077 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8078 | else | |
8079 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8080 | #line 8081 "configure" |
97bf5e38 MK |
8081 | #include "confdefs.h" |
8082 | #define _SYSCALL32 | |
8083 | #include <sys/link.h> | |
8084 | int main() { | |
8085 | struct link_map32 l; | |
8086 | ; return 0; } | |
8087 | EOF | |
d28f9cdf | 8088 | if { (eval echo configure:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8089 | rm -rf conftest* |
8090 | gdb_cv_have_struct_link_map32=yes | |
8091 | else | |
8092 | echo "configure: failed program was:" >&5 | |
8093 | cat conftest.$ac_ext >&5 | |
8094 | rm -rf conftest* | |
8095 | gdb_cv_have_struct_link_map32=no | |
8096 | fi | |
8097 | rm -f conftest* | |
8098 | fi | |
c906108c | 8099 | |
97bf5e38 MK |
8100 | echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 |
8101 | if test $gdb_cv_have_struct_link_map32 = yes; then | |
8102 | cat >> confdefs.h <<\EOF | |
8103 | #define HAVE_STRUCT_LINK_MAP32 1 | |
8104 | EOF | |
c906108c | 8105 | |
97bf5e38 MK |
8106 | cat >> confdefs.h <<\EOF |
8107 | #define _SYSCALL32 1 | |
8108 | EOF | |
c906108c | 8109 | |
97bf5e38 MK |
8110 | fi |
8111 | fi | |
c906108c | 8112 | |
c906108c | 8113 | |
97bf5e38 | 8114 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
d28f9cdf | 8115 | echo "configure:8116: checking for long long support in compiler" >&5 |
97bf5e38 MK |
8116 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
8117 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8118 | else | |
8119 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8120 | #line 8121 "configure" |
97bf5e38 | 8121 | #include "confdefs.h" |
c906108c | 8122 | |
97bf5e38 | 8123 | int main() { |
c906108c | 8124 | |
97bf5e38 MK |
8125 | extern long long foo; |
8126 | switch (foo & 2) { case 0: return 1; } | |
c906108c | 8127 | |
97bf5e38 MK |
8128 | ; return 0; } |
8129 | EOF | |
d28f9cdf | 8130 | if { (eval echo configure:8131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8131 | rm -rf conftest* |
8132 | gdb_cv_c_long_long=yes | |
8133 | else | |
8134 | echo "configure: failed program was:" >&5 | |
8135 | cat conftest.$ac_ext >&5 | |
8136 | rm -rf conftest* | |
8137 | gdb_cv_c_long_long=no | |
8138 | fi | |
8139 | rm -f conftest* | |
8140 | fi | |
c906108c | 8141 | |
97bf5e38 MK |
8142 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 |
8143 | if test $gdb_cv_c_long_long = yes; then | |
8144 | cat >> confdefs.h <<\EOF | |
8145 | #define CC_HAS_LONG_LONG 1 | |
8146 | EOF | |
8147 | ||
8148 | fi | |
8149 | ||
8150 | ||
8151 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
d28f9cdf | 8152 | echo "configure:8153: checking for long long support in printf" >&5 |
97bf5e38 MK |
8153 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
8154 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8155 | else | |
8156 | if test "$cross_compiling" = yes; then | |
8157 | gdb_cv_printf_has_long_long=no | |
8158 | else | |
8159 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8160 | #line 8161 "configure" |
97bf5e38 MK |
8161 | #include "confdefs.h" |
8162 | ||
8163 | int main () { | |
8164 | char buf[32]; | |
8165 | long long l = 0; | |
8166 | l = (l << 16) + 0x0123; | |
8167 | l = (l << 16) + 0x4567; | |
8168 | l = (l << 16) + 0x89ab; | |
8169 | l = (l << 16) + 0xcdef; | |
8170 | sprintf (buf, "0x%016llx", l); | |
8171 | return (strcmp ("0x0123456789abcdef", buf)); | |
c906108c | 8172 | } |
97bf5e38 | 8173 | EOF |
d28f9cdf | 8174 | if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8175 | then |
8176 | gdb_cv_printf_has_long_long=yes | |
8177 | else | |
8178 | echo "configure: failed program was:" >&5 | |
8179 | cat conftest.$ac_ext >&5 | |
8180 | rm -fr conftest* | |
8181 | gdb_cv_printf_has_long_long=no | |
8182 | fi | |
8183 | rm -fr conftest* | |
8184 | fi | |
8185 | ||
8186 | fi | |
8187 | ||
8188 | if test $gdb_cv_printf_has_long_long = yes; then | |
8189 | cat >> confdefs.h <<\EOF | |
8190 | #define PRINTF_HAS_LONG_LONG 1 | |
8191 | EOF | |
8192 | ||
8193 | fi | |
8194 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
8195 | ||
8196 | ||
8197 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 | |
d28f9cdf | 8198 | echo "configure:8199: checking for long double support in compiler" >&5 |
97bf5e38 MK |
8199 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
8200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8201 | else | |
8202 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8203 | #line 8204 "configure" |
97bf5e38 MK |
8204 | #include "confdefs.h" |
8205 | ||
8206 | int main() { | |
8207 | long double foo; | |
8208 | ; return 0; } | |
8209 | EOF | |
d28f9cdf | 8210 | if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
97bf5e38 MK |
8211 | rm -rf conftest* |
8212 | ac_cv_c_long_double=yes | |
8213 | else | |
8214 | echo "configure: failed program was:" >&5 | |
8215 | cat conftest.$ac_ext >&5 | |
8216 | rm -rf conftest* | |
8217 | ac_cv_c_long_double=no | |
8218 | fi | |
8219 | rm -f conftest* | |
8220 | fi | |
c906108c | 8221 | |
97bf5e38 MK |
8222 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 |
8223 | if test $ac_cv_c_long_double = yes; then | |
8224 | cat >> confdefs.h <<\EOF | |
8225 | #define HAVE_LONG_DOUBLE 1 | |
c906108c | 8226 | EOF |
97bf5e38 MK |
8227 | |
8228 | fi | |
8229 | ||
8230 | ||
8231 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
d28f9cdf | 8232 | echo "configure:8233: checking for long double support in printf" >&5 |
97bf5e38 MK |
8233 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
8234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8235 | else | |
8236 | if test "$cross_compiling" = yes; then | |
8237 | gdb_cv_printf_has_long_double=no | |
8238 | else | |
8239 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8240 | #line 8241 "configure" |
97bf5e38 MK |
8241 | #include "confdefs.h" |
8242 | ||
8243 | int main () { | |
8244 | char buf[16]; | |
8245 | long double f = 3.141592653; | |
8246 | sprintf (buf, "%Lg", f); | |
8247 | return (strncmp ("3.14159", buf, 7)); | |
8248 | } | |
8249 | EOF | |
d28f9cdf | 8250 | if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c906108c | 8251 | then |
97bf5e38 | 8252 | gdb_cv_printf_has_long_double=yes |
c906108c SS |
8253 | else |
8254 | echo "configure: failed program was:" >&5 | |
8255 | cat conftest.$ac_ext >&5 | |
8256 | rm -fr conftest* | |
97bf5e38 | 8257 | gdb_cv_printf_has_long_double=no |
c906108c SS |
8258 | fi |
8259 | rm -fr conftest* | |
8260 | fi | |
8261 | ||
8262 | fi | |
8263 | ||
97bf5e38 | 8264 | if test $gdb_cv_printf_has_long_double = yes; then |
c906108c | 8265 | cat >> confdefs.h <<\EOF |
97bf5e38 MK |
8266 | #define PRINTF_HAS_LONG_DOUBLE 1 |
8267 | EOF | |
8268 | ||
8269 | fi | |
8270 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
8271 | ||
8272 | ||
8273 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
d28f9cdf | 8274 | echo "configure:8275: checking for long double support in scanf" >&5 |
97bf5e38 MK |
8275 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
8276 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8277 | else | |
8278 | if test "$cross_compiling" = yes; then | |
8279 | gdb_cv_scanf_has_long_double=no | |
8280 | else | |
8281 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8282 | #line 8283 "configure" |
97bf5e38 MK |
8283 | #include "confdefs.h" |
8284 | ||
8285 | int main () { | |
8286 | char *buf = "3.141592653"; | |
8287 | long double f = 0; | |
8288 | sscanf (buf, "%Lg", &f); | |
8289 | return !(f > 3.14159 && f < 3.14160); | |
8290 | } | |
c906108c | 8291 | EOF |
d28f9cdf | 8292 | if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
97bf5e38 MK |
8293 | then |
8294 | gdb_cv_scanf_has_long_double=yes | |
8295 | else | |
8296 | echo "configure: failed program was:" >&5 | |
8297 | cat conftest.$ac_ext >&5 | |
8298 | rm -fr conftest* | |
8299 | gdb_cv_scanf_has_long_double=no | |
8300 | fi | |
8301 | rm -fr conftest* | |
8302 | fi | |
c906108c SS |
8303 | |
8304 | fi | |
8305 | ||
97bf5e38 MK |
8306 | if test $gdb_cv_scanf_has_long_double = yes; then |
8307 | cat >> confdefs.h <<\EOF | |
8308 | #define SCANF_HAS_LONG_DOUBLE 1 | |
8309 | EOF | |
8310 | ||
8311 | fi | |
8312 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
c906108c | 8313 | |
438013df AO |
8314 | case ${host_os} in |
8315 | aix*) | |
8316 | echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6 | |
d28f9cdf | 8317 | echo "configure:8318: checking for -bbigtoc option" >&5 |
438013df AO |
8318 | if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then |
8319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8320 | else | |
8321 | ||
8322 | SAVE_LDFLAGS=$LDFLAGS | |
8323 | ||
8324 | case $GCC in | |
8325 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
8326 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
8327 | esac | |
8328 | ||
8329 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
8330 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8331 | #line 8332 "configure" |
438013df AO |
8332 | #include "confdefs.h" |
8333 | ||
8334 | int main() { | |
8335 | int i; | |
8336 | ; return 0; } | |
8337 | EOF | |
d28f9cdf | 8338 | if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
438013df AO |
8339 | : |
8340 | else | |
8341 | echo "configure: failed program was:" >&5 | |
8342 | cat conftest.$ac_ext >&5 | |
8343 | rm -rf conftest* | |
8344 | gdb_cv_bigtoc= | |
8345 | fi | |
8346 | rm -f conftest* | |
8347 | ||
8348 | fi | |
8349 | ||
8350 | echo "$ac_t""$gdb_cv_bigtoc" 1>&6 | |
8351 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" | |
8352 | ;; | |
8353 | esac | |
8354 | ||
c906108c SS |
8355 | |
8356 | ||
8357 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
8358 | case ${host_os} in | |
8359 | hpux*) | |
8360 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
d28f9cdf | 8361 | echo "configure:8362: checking for HPUX/OSF thread support" >&5 |
c906108c SS |
8362 | if test -f /usr/include/dce/cma_config.h ; then |
8363 | if test "$GCC" = "yes" ; then | |
8364 | echo "$ac_t""yes" 1>&6 | |
8365 | cat >> confdefs.h <<\EOF | |
8366 | #define HAVE_HPUX_THREAD_SUPPORT 1 | |
8367 | EOF | |
8368 | ||
66b965bb | 8369 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" |
c906108c SS |
8370 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
8371 | else | |
8372 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
8373 | fi | |
8374 | else | |
8375 | echo "$ac_t""no" 1>&6 | |
8376 | fi | |
8377 | ;; | |
8378 | solaris*) | |
d92419e5 JB |
8379 | # See if thread_db library is around for Solaris thread debugging. |
8380 | # Note that we must explicitly test for version 1 of the library | |
8381 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
8382 | # the same API. | |
c906108c | 8383 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 |
d28f9cdf | 8384 | echo "configure:8385: checking for Solaris thread debugging library" >&5 |
c906108c SS |
8385 | if test -f /usr/lib/libthread_db.so.1 ; then |
8386 | echo "$ac_t""yes" 1>&6 | |
8387 | cat >> confdefs.h <<\EOF | |
8388 | #define HAVE_THREAD_DB_LIB 1 | |
8389 | EOF | |
8390 | ||
66b965bb | 8391 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" |
c906108c SS |
8392 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
8393 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
d28f9cdf | 8394 | echo "configure:8395: checking for dlopen in -ldl" >&5 |
c906108c SS |
8395 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
8396 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
8397 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8398 | else | |
8399 | ac_save_LIBS="$LIBS" | |
8400 | LIBS="-ldl $LIBS" | |
8401 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8402 | #line 8403 "configure" |
c906108c SS |
8403 | #include "confdefs.h" |
8404 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8405 | /* We use char because int might match the return type of a gcc2 | |
8406 | builtin and then its argument prototype would still apply. */ | |
8407 | char dlopen(); | |
8408 | ||
8409 | int main() { | |
8410 | dlopen() | |
8411 | ; return 0; } | |
8412 | EOF | |
d28f9cdf | 8413 | if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8414 | rm -rf conftest* |
8415 | eval "ac_cv_lib_$ac_lib_var=yes" | |
8416 | else | |
8417 | echo "configure: failed program was:" >&5 | |
8418 | cat conftest.$ac_ext >&5 | |
8419 | rm -rf conftest* | |
8420 | eval "ac_cv_lib_$ac_lib_var=no" | |
8421 | fi | |
8422 | rm -f conftest* | |
8423 | LIBS="$ac_save_LIBS" | |
8424 | ||
8425 | fi | |
8426 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
8427 | echo "$ac_t""yes" 1>&6 | |
8428 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
8429 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
8430 | cat >> confdefs.h <<EOF | |
8431 | #define $ac_tr_lib 1 | |
8432 | EOF | |
8433 | ||
8434 | LIBS="-ldl $LIBS" | |
8435 | ||
8436 | else | |
8437 | echo "$ac_t""no" 1>&6 | |
8438 | fi | |
8439 | ||
8440 | if test "$GCC" = "yes" ; then | |
8441 | # The GNU linker requires the -export-dynamic option to make | |
8442 | # all symbols visible in the dynamic symbol table. | |
8443 | hold_ldflags=$LDFLAGS | |
8444 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
d28f9cdf | 8445 | echo "configure:8446: checking for the ld -export-dynamic flag" >&5 |
c906108c SS |
8446 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
8447 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8448 | #line 8449 "configure" |
c906108c SS |
8449 | #include "confdefs.h" |
8450 | ||
8451 | int main() { | |
8452 | int i; | |
8453 | ; return 0; } | |
8454 | EOF | |
d28f9cdf | 8455 | if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
8456 | rm -rf conftest* |
8457 | found=yes | |
8458 | else | |
8459 | echo "configure: failed program was:" >&5 | |
8460 | cat conftest.$ac_ext >&5 | |
8461 | rm -rf conftest* | |
8462 | found=no | |
8463 | fi | |
8464 | rm -f conftest* | |
8465 | LDFLAGS=$hold_ldflags | |
8466 | echo "$ac_t""$found" 1>&6 | |
8467 | if test $found = yes; then | |
8468 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
8469 | fi | |
8470 | fi | |
8471 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
8472 | # at one point. | |
8473 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
d28f9cdf | 8474 | echo "configure:8475: checking if <proc_service.h> is old" >&5 |
c906108c SS |
8475 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
8476 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8477 | else | |
8478 | ||
8479 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8480 | #line 8481 "configure" |
c906108c SS |
8481 | #include "confdefs.h" |
8482 | ||
8483 | #include <proc_service.h> | |
8484 | ps_err_e ps_pdwrite | |
8485 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
8486 | ||
8487 | int main() { | |
8488 | ||
8489 | ; return 0; } | |
8490 | EOF | |
d28f9cdf | 8491 | if { (eval echo configure:8492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
8492 | rm -rf conftest* |
8493 | gdb_cv_proc_service_is_old=no | |
8494 | else | |
8495 | echo "configure: failed program was:" >&5 | |
8496 | cat conftest.$ac_ext >&5 | |
8497 | rm -rf conftest* | |
8498 | gdb_cv_proc_service_is_old=yes | |
8499 | fi | |
8500 | rm -f conftest* | |
8501 | ||
8502 | fi | |
8503 | ||
8504 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
8505 | if test $gdb_cv_proc_service_is_old = yes; then | |
8506 | cat >> confdefs.h <<\EOF | |
8507 | #define PROC_SERVICE_IS_OLD 1 | |
8508 | EOF | |
8509 | ||
8510 | fi | |
8511 | else | |
8512 | echo "$ac_t""no" 1>&6 | |
8513 | fi | |
8514 | ;; | |
d92419e5 JB |
8515 | aix*) |
8516 | echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6 | |
d28f9cdf | 8517 | echo "configure:8518: checking for AiX thread debugging library" >&5 |
d92419e5 JB |
8518 | if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then |
8519 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8520 | else | |
8521 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8522 | #line 8523 "configure" |
d92419e5 JB |
8523 | #include "confdefs.h" |
8524 | #include <sys/pthdebug.h> | |
8525 | int main() { | |
8526 | #ifndef PTHDB_VERSION_3 | |
8527 | #error | |
8528 | #endif | |
8529 | ; return 0; } | |
8530 | EOF | |
d28f9cdf | 8531 | if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
d92419e5 JB |
8532 | rm -rf conftest* |
8533 | gdb_cv_have_aix_thread_debug=yes | |
8534 | else | |
8535 | echo "configure: failed program was:" >&5 | |
8536 | cat conftest.$ac_ext >&5 | |
8537 | rm -rf conftest* | |
8538 | gdb_cv_have_aix_thread_debug=no | |
8539 | fi | |
8540 | rm -f conftest* | |
8541 | fi | |
8542 | ||
8543 | echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6 | |
8544 | if test $gdb_cv_have_aix_thread_debug = yes; then | |
8545 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
8546 | CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" | |
8547 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" | |
8548 | fi | |
8549 | ;; | |
c906108c SS |
8550 | esac |
8551 | ||
8552 | fi | |
8553 | ||
3f47be5c EZ |
8554 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
8555 | echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6 | |
d28f9cdf | 8556 | echo "configure:8557: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
3f47be5c EZ |
8557 | if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then |
8558 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8559 | else | |
8560 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8561 | #line 8562 "configure" |
3f47be5c EZ |
8562 | #include "confdefs.h" |
8563 | #include <thread_db.h> | |
8564 | int main() { | |
8565 | int i = TD_NOTALLOC; | |
8566 | ; return 0; } | |
8567 | EOF | |
d28f9cdf | 8568 | if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f47be5c EZ |
8569 | rm -rf conftest* |
8570 | gdb_cv_thread_db_h_has_td_notalloc=yes | |
8571 | else | |
8572 | echo "configure: failed program was:" >&5 | |
8573 | cat conftest.$ac_ext >&5 | |
8574 | rm -rf conftest* | |
8575 | gdb_cv_thread_db_h_has_td_notalloc=no | |
8576 | ||
8577 | fi | |
8578 | rm -f conftest* | |
8579 | ||
8580 | fi | |
8581 | ||
8582 | echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6 | |
8583 | fi | |
8584 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
8585 | cat >> confdefs.h <<\EOF | |
8586 | #define THREAD_DB_HAS_TD_NOTALLOC 1 | |
8587 | EOF | |
8588 | ||
8589 | fi | |
8590 | ||
fb40c209 | 8591 | |
030292b7 DJ |
8592 | # Check whether --with-sysroot or --without-sysroot was given. |
8593 | if test "${with_sysroot+set}" = set; then | |
8594 | withval="$with_sysroot" | |
8595 | ||
8596 | case ${with_sysroot} in | |
8597 | yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;; | |
8598 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; | |
8599 | esac | |
8600 | ||
8601 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
8602 | ||
8603 | if test "x$exec_prefix" = xNONE; then | |
8604 | if test "x$prefix" = xNONE; then | |
8605 | test_prefix=/usr/local | |
8606 | else | |
8607 | test_prefix=$prefix | |
8608 | fi | |
8609 | else | |
8610 | test_prefix=$exec_prefix | |
8611 | fi | |
8612 | case ${TARGET_SYSTEM_ROOT} in | |
8613 | ${test_prefix}*) | |
8614 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" | |
8615 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
8616 | ;; | |
8617 | esac | |
8618 | ||
8619 | else | |
8620 | ||
8621 | TARGET_SYSTEM_ROOT= | |
8622 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
8623 | ||
8624 | fi | |
8625 | ||
8626 | ||
8627 | ||
8628 | ||
3b851bce AC |
8629 | # NOTE: Don't add -Wall or -Wunused, they both include |
8630 | # -Wunused-parameter which reports bogus warnings. | |
8631 | # NOTE: If you add to this list, remember to update | |
8632 | # gdb/doc/gdbint.texinfo. | |
1decb323 | 8633 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ |
93d56215 | 8634 | -Wformat -Wparentheses -Wpointer-arith -Wuninitialized" |
d8038014 AC |
8635 | # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs |
8636 | # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value | |
93d56215 | 8637 | # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual |
d8038014 AC |
8638 | # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes |
8639 | # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls | |
8640 | # -Woverloaded-virtual -Winline -Werror" | |
c906108c SS |
8641 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
8642 | if test "${enable_build_warnings+set}" = set; then | |
8643 | enableval="$enable_build_warnings" | |
1decb323 | 8644 | case "${enableval}" in |
c906108c SS |
8645 | yes) ;; |
8646 | no) build_warnings="-w";; | |
8647 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8648 | build_warnings="${build_warnings} ${t}";; | |
8649 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8650 | build_warnings="${t} ${build_warnings}";; | |
8651 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8652 | esac | |
d4f3574e | 8653 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 8654 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 8655 | fi |
1decb323 | 8656 | fi |
3b851bce AC |
8657 | # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
8658 | if test "${enable_gdb_build_warnings+set}" = set; then | |
8659 | enableval="$enable_gdb_build_warnings" | |
8660 | case "${enableval}" in | |
8661 | yes) ;; | |
8662 | no) build_warnings="-w";; | |
8663 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8664 | build_warnings="${build_warnings} ${t}";; | |
8665 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
8666 | build_warnings="${t} ${build_warnings}";; | |
8667 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
8668 | esac | |
8669 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
8670 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
8671 | fi | |
8672 | fi | |
104c1213 JM |
8673 | WARN_CFLAGS="" |
8674 | WERROR_CFLAGS="" | |
c906108c SS |
8675 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
8676 | then | |
746a987d | 8677 | echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 |
d28f9cdf | 8678 | echo "configure:8679: checking compiler warning flags" >&5 |
746a987d AC |
8679 | # Separate out the -Werror flag as some files just cannot be |
8680 | # compiled with it enabled. | |
8681 | for w in ${build_warnings}; do | |
8682 | case $w in | |
8683 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
8684 | *) # Check that GCC accepts it | |
4536bbc6 AC |
8685 | saved_CFLAGS="$CFLAGS" |
8686 | CFLAGS="$CFLAGS $w" | |
8687 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8688 | #line 8689 "configure" |
4536bbc6 AC |
8689 | #include "confdefs.h" |
8690 | ||
8691 | int main() { | |
8692 | ||
8693 | ; return 0; } | |
8694 | EOF | |
d28f9cdf | 8695 | if { (eval echo configure:8696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4536bbc6 AC |
8696 | rm -rf conftest* |
8697 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
8698 | else | |
8699 | echo "configure: failed program was:" >&5 | |
8700 | cat conftest.$ac_ext >&5 | |
8701 | fi | |
8702 | rm -f conftest* | |
8703 | CFLAGS="$saved_CFLAGS" | |
746a987d AC |
8704 | esac |
8705 | done | |
8706 | echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 | |
c906108c SS |
8707 | fi |
8708 | ||
8709 | ||
104c1213 | 8710 | |
c906108c SS |
8711 | MMALLOC_CFLAGS= |
8712 | MMALLOC= | |
8713 | ||
8714 | ||
8715 | ||
8716 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
8717 | if test "${with_mmalloc+set}" = set; then | |
8718 | withval="$with_mmalloc" | |
8719 | case "${withval}" in | |
8720 | yes) want_mmalloc=true ;; | |
8721 | no) want_mmalloc=false;; | |
8722 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
8723 | esac | |
8724 | else | |
8725 | want_mmalloc=false | |
8726 | fi | |
8727 | ||
8728 | if test x$want_mmalloc = xtrue; then | |
8729 | cat >> confdefs.h <<\EOF | |
8730 | #define USE_MMALLOC 1 | |
8731 | EOF | |
8732 | ||
8733 | cat >> confdefs.h <<\EOF | |
8734 | #define MMCHECK_FORCE 1 | |
8735 | EOF | |
8736 | ||
8737 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
8738 | MMALLOC='../mmalloc/libmmalloc.a' | |
8739 | fi | |
8740 | ||
7a292a7a SS |
8741 | # In the Cygwin environment, we need some additional flags. |
8742 | echo $ac_n "checking for cygwin""... $ac_c" 1>&6 | |
d28f9cdf | 8743 | echo "configure:8744: checking for cygwin" >&5 |
7a292a7a SS |
8744 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then |
8745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8746 | else | |
8747 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 8748 | #line 8749 "configure" |
7a292a7a SS |
8749 | #include "confdefs.h" |
8750 | ||
8751 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
8752 | lose | |
8753 | #endif | |
8754 | EOF | |
8755 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8756 | egrep "lose" >/dev/null 2>&1; then | |
8757 | rm -rf conftest* | |
8758 | gdb_cv_os_cygwin=yes | |
8759 | else | |
8760 | rm -rf conftest* | |
8761 | gdb_cv_os_cygwin=no | |
8762 | fi | |
8763 | rm -f conftest* | |
8764 | ||
8765 | fi | |
8766 | ||
8767 | echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 | |
8768 | ||
aff38e61 AC |
8769 | |
8770 | SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" | |
8771 | case ${host} in | |
95cbc983 AC |
8772 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
8773 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
aff38e61 AC |
8774 | esac |
8775 | ||
8776 | ||
cd0fc7c3 SS |
8777 | # libreadline needs libuser32.a in a cygwin environment |
8778 | WIN32LIBS= | |
8779 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
8780 | WIN32LIBS="-luser32" |
8781 | case "${target}" in | |
8782 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
8783 | ;; | |
8784 | esac | |
cd0fc7c3 | 8785 | fi |
c906108c | 8786 | |
7a292a7a | 8787 | |
3fc11d3e JM |
8788 | LIBGUI="../libgui/src/libgui.a" |
8789 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
8790 | ||
8791 | ||
7a292a7a | 8792 | |
3fc11d3e JM |
8793 | WIN32LDAPP= |
8794 | ||
8795 | ||
8796 | ||
8797 | configdir="unix" | |
8798 | ||
8799 | GDBTKLIBS= | |
8800 | if test "${enable_gdbtk}" = "yes"; then | |
8801 | ||
d1c3b63a KS |
8802 | # Gdbtk must have an absolute path to srcdir in order to run |
8803 | # properly when not installed. | |
8804 | here=`pwd` | |
8805 | cd ${srcdir} | |
8806 | GDBTK_SRC_DIR=`pwd` | |
8807 | cd $here | |
8808 | ||
3fc11d3e JM |
8809 | |
8810 | # | |
8811 | # Ok, lets find the tcl configuration | |
8812 | # First, look for one uninstalled. | |
8813 | # the alternative search directory is invoked by --with-tclconfig | |
8814 | # | |
8815 | ||
8816 | if test x"${no_tcl}" = x ; then | |
8817 | # we reset no_tcl in case something fails here | |
8818 | no_tcl=true | |
8819 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
8820 | if test "${with_tclconfig+set}" = set; then | |
8821 | withval="$with_tclconfig" | |
8822 | with_tclconfig=${withval} | |
8823 | fi | |
8824 | ||
8825 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 | |
d28f9cdf | 8826 | echo "configure:8827: checking for Tcl configuration" >&5 |
3fc11d3e JM |
8827 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
8828 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8829 | else | |
8830 | ||
8831 | ||
8832 | # First check to see if --with-tclconfig was specified. | |
8833 | if test x"${with_tclconfig}" != x ; then | |
8834 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
8835 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
8836 | else | |
8837 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
8838 | fi | |
8839 | fi | |
8840 | ||
8841 | # then check for a private Tcl installation | |
8842 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8843 | for i in \ | |
8844 | ../tcl \ | |
8845 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
8846 | ../../tcl \ | |
8847 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
8848 | ../../../tcl \ | |
8849 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8850 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8851 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8852 | break | |
8853 | fi | |
8854 | done | |
8855 | fi | |
8856 | # check in a few common install locations | |
8857 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8858 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8859 | if test -f "$i/tclConfig.sh" ; then | |
8860 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
8861 | break | |
8862 | fi | |
8863 | done | |
8864 | fi | |
8865 | # check in a few other private locations | |
8866 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8867 | for i in \ | |
8868 | ${srcdir}/../tcl \ | |
8869 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8870 | if test -f "$i/${configdir}/tclConfig.sh" ; then | |
8871 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
8872 | break | |
8873 | fi | |
8874 | done | |
8875 | fi | |
8876 | ||
8877 | fi | |
8878 | ||
8879 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
8880 | TCLCONFIG="# no Tcl configs found" | |
8881 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
8882 | else | |
8883 | no_tcl= | |
8884 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
8885 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
8886 | fi | |
8887 | fi | |
8888 | ||
8889 | if test -z "${no_tcl}"; then | |
8890 | ||
8891 | . $TCLCONFIG | |
8892 | ||
8893 | ||
8894 | ||
8895 | ||
8896 | ||
8897 | ||
8898 | ||
8899 | ||
8900 | ||
8901 | ||
8902 | ||
8903 | ||
8904 | ||
8905 | ||
8906 | ||
8907 | ||
8908 | ||
8909 | ||
8910 | ||
8911 | ||
8912 | ||
8913 | ||
8914 | ||
8915 | ||
8916 | ||
8917 | ||
8918 | # | |
8919 | # Ok, lets find the tk configuration | |
8920 | # First, look for one uninstalled. | |
8921 | # the alternative search directory is invoked by --with-tkconfig | |
8922 | # | |
8923 | ||
8924 | if test x"${no_tk}" = x ; then | |
8925 | # we reset no_tk in case something fails here | |
8926 | no_tk=true | |
8927 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
8928 | if test "${with_tkconfig+set}" = set; then | |
8929 | withval="$with_tkconfig" | |
8930 | with_tkconfig=${withval} | |
8931 | fi | |
8932 | ||
8933 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 | |
d28f9cdf | 8934 | echo "configure:8935: checking for Tk configuration" >&5 |
3fc11d3e JM |
8935 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
8936 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8937 | else | |
8938 | ||
8939 | ||
8940 | # First check to see if --with-tkconfig was specified. | |
8941 | if test x"${with_tkconfig}" != x ; then | |
8942 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
8943 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
8944 | else | |
8945 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
8946 | fi | |
8947 | fi | |
8948 | ||
8949 | # then check for a private Tk library | |
8950 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8951 | for i in \ | |
8952 | ../tk \ | |
8953 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
8954 | ../../tk \ | |
8955 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
8956 | ../../../tk \ | |
8957 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8958 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8959 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8960 | break | |
8961 | fi | |
8962 | done | |
8963 | fi | |
8964 | # check in a few common install locations | |
8965 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8966 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
8967 | if test -f "$i/tkConfig.sh" ; then | |
8968 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
8969 | break | |
8970 | fi | |
8971 | done | |
8972 | fi | |
8973 | # check in a few other private locations | |
8974 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8975 | for i in \ | |
8976 | ${srcdir}/../tk \ | |
8977 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8978 | if test -f "$i/${configdir}/tkConfig.sh" ; then | |
8979 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
8980 | break | |
8981 | fi | |
8982 | done | |
8983 | fi | |
8984 | ||
8985 | fi | |
8986 | ||
8987 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
8988 | TKCONFIG="# no Tk configs found" | |
8989 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
8990 | else | |
8991 | no_tk= | |
8992 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
8993 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
8994 | fi | |
8995 | fi | |
8996 | ||
8997 | ||
8998 | ||
dd2504ab JM |
8999 | # now look for Tcl library stuff |
9000 | ||
9001 | case "${host}" in | |
9002 | *-*-cygwin*) | |
9003 | tcldir=../tcl/win/ | |
9004 | ;; | |
9005 | *) | |
9006 | tcldir=../tcl/unix/ | |
9007 | ;; | |
9008 | esac | |
9009 | ||
9010 | TCL_DEPS="${tcldir}${TCL_LIB_FILE}" | |
9011 | ||
3fc11d3e JM |
9012 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
9013 | # point to doing Tcl. | |
9014 | if test -z "${no_tk}"; then | |
9015 | ||
9016 | if test -f "$TKCONFIG" ; then | |
9017 | . $TKCONFIG | |
9018 | fi | |
9019 | ||
9020 | ||
9021 | ||
9022 | ||
9023 | ||
9024 | ||
9025 | ||
9026 | ||
9027 | ||
9028 | ||
9029 | ||
9030 | ||
9031 | ||
9032 | ||
9033 | # | |
9034 | # Ok, lets find the tcl source trees so we can use the headers | |
9035 | # Warning: transition of version 9 to 10 will break this algorithm | |
9036 | # because 10 sorts before 9. We also look for just tcl. We have to | |
9037 | # be careful that we don't match stuff like tclX by accident. | |
9038 | # the alternative search directory is involked by --with-tclinclude | |
9039 | # | |
9040 | ||
9041 | no_tcl=true | |
9042 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 | |
d28f9cdf | 9043 | echo "configure:9044: checking for Tcl private headers. dir=${configdir}" >&5 |
3fc11d3e JM |
9044 | # Check whether --with-tclinclude or --without-tclinclude was given. |
9045 | if test "${with_tclinclude+set}" = set; then | |
9046 | withval="$with_tclinclude" | |
9047 | with_tclinclude=${withval} | |
9048 | fi | |
9049 | ||
9050 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
9051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9052 | else | |
9053 | ||
9054 | # first check to see if --with-tclinclude was specified | |
9055 | if test x"${with_tclinclude}" != x ; then | |
9056 | if test -f ${with_tclinclude}/tclInt.h ; then | |
9057 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
9058 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then | |
9059 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
9060 | else | |
9061 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9062 | fi | |
9063 | fi | |
9064 | ||
9065 | # next check if it came with Tcl configuration file | |
9066 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
9067 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
9068 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
9069 | fi | |
9070 | fi | |
9071 | ||
9072 | # next check in private source directory | |
9073 | # | |
9074 | # since ls returns lowest version numbers first, reverse its output | |
9075 | if test x"${ac_cv_c_tclh}" = x ; then | |
9076 | for i in \ | |
9077 | ${srcdir}/../tcl \ | |
9078 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ | |
9079 | ${srcdir}/../../tcl \ | |
9080 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ | |
9081 | ${srcdir}/../../../tcl \ | |
9082 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do | |
9083 | if test -f $i/generic/tclInt.h ; then | |
9084 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9085 | break | |
9086 | fi | |
9087 | done | |
9088 | fi | |
9089 | # finally check in a few common install locations | |
9090 | # | |
9091 | # since ls returns lowest version numbers first, reverse its output | |
9092 | if test x"${ac_cv_c_tclh}" = x ; then | |
9093 | for i in \ | |
9094 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ | |
9095 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
9096 | /usr/local/src/tcl \ | |
9097 | /usr/local/lib/tcl \ | |
9098 | ${prefix}/include ; do | |
9099 | if test -f $i/generic/tclInt.h ; then | |
9100 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
9101 | break | |
9102 | fi | |
9103 | done | |
9104 | fi | |
9105 | # see if one is installed | |
9106 | if test x"${ac_cv_c_tclh}" = x ; then | |
9107 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` | |
9108 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
d28f9cdf | 9109 | echo "configure:9110: checking for tclInt.h" >&5 |
3fc11d3e JM |
9110 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9112 | else | |
9113 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 9114 | #line 9115 "configure" |
3fc11d3e JM |
9115 | #include "confdefs.h" |
9116 | #include <tclInt.h> | |
9117 | EOF | |
9118 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 9119 | { (eval echo configure:9120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9120 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9121 | if test -z "$ac_err"; then | |
9122 | rm -rf conftest* | |
9123 | eval "ac_cv_header_$ac_safe=yes" | |
9124 | else | |
9125 | echo "$ac_err" >&5 | |
9126 | echo "configure: failed program was:" >&5 | |
9127 | cat conftest.$ac_ext >&5 | |
9128 | rm -rf conftest* | |
9129 | eval "ac_cv_header_$ac_safe=no" | |
9130 | fi | |
9131 | rm -f conftest* | |
9132 | fi | |
9133 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9134 | echo "$ac_t""yes" 1>&6 | |
9135 | ac_cv_c_tclh=installed | |
9136 | else | |
9137 | echo "$ac_t""no" 1>&6 | |
9138 | ac_cv_c_tclh="" | |
9139 | fi | |
9140 | ||
9141 | fi | |
9142 | ||
9143 | fi | |
9144 | ||
9145 | if test x"${ac_cv_c_tclh}" = x ; then | |
9146 | TCLHDIR="# no Tcl private headers found" | |
9147 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
9148 | fi | |
9149 | if test x"${ac_cv_c_tclh}" != x ; then | |
9150 | no_tcl="" | |
9151 | if test x"${ac_cv_c_tclh}" = x"installed" ; then | |
9152 | echo "$ac_t""is installed" 1>&6 | |
9153 | TCLHDIR="" | |
9154 | else | |
9155 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
9156 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
9157 | TCLHDIR="-I${ac_cv_c_tclh}" | |
9158 | fi | |
9159 | fi | |
9160 | ||
9161 | ||
9162 | ||
9163 | ||
9164 | # | |
9165 | # Ok, lets find the tk source trees so we can use the headers | |
9166 | # If the directory (presumably symlink) named "tk" exists, use that one | |
9167 | # in preference to any others. Same logic is used when choosing library | |
9168 | # and again with Tcl. The search order is the best place to look first, then in | |
9169 | # decreasing significance. The loop breaks if the trigger file is found. | |
9170 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
9171 | # directory. This converts the path from a relative to an absolute, so | |
9172 | # recursive cache variables for the path will work right. We check all | |
9173 | # the possible paths in one loop rather than many seperate loops to speed | |
9174 | # things up. | |
9175 | # the alternative search directory is involked by --with-tkinclude | |
9176 | # | |
9177 | no_tk=true | |
9178 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 | |
d28f9cdf | 9179 | echo "configure:9180: checking for Tk private headers" >&5 |
3fc11d3e JM |
9180 | # Check whether --with-tkinclude or --without-tkinclude was given. |
9181 | if test "${with_tkinclude+set}" = set; then | |
9182 | withval="$with_tkinclude" | |
9183 | with_tkinclude=${withval} | |
9184 | fi | |
9185 | ||
9186 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then | |
9187 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9188 | else | |
9189 | ||
9190 | # first check to see if --with-tkinclude was specified | |
9191 | if test x"${with_tkinclude}" != x ; then | |
9192 | if test -f ${with_tkinclude}/tk.h ; then | |
9193 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
9194 | elif test -f ${with_tkinclude}/generic/tk.h ; then | |
9195 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
9196 | else | |
9197 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } | |
9198 | fi | |
9199 | fi | |
9200 | ||
9201 | # next check if it came with Tk configuration file | |
9202 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
9203 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
9204 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
9205 | fi | |
9206 | fi | |
9207 | ||
9208 | # next check in private source directory | |
9209 | # | |
9210 | # since ls returns lowest version numbers first, reverse its output | |
9211 | if test x"${ac_cv_c_tkh}" = x ; then | |
9212 | for i in \ | |
9213 | ${srcdir}/../tk \ | |
9214 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ | |
9215 | ${srcdir}/../../tk \ | |
9216 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ | |
9217 | ${srcdir}/../../../tk \ | |
9218 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do | |
9219 | if test -f $i/generic/tk.h ; then | |
9220 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9221 | break | |
9222 | fi | |
9223 | done | |
9224 | fi | |
9225 | # finally check in a few common install locations | |
9226 | # | |
9227 | # since ls returns lowest version numbers first, reverse its output | |
9228 | if test x"${ac_cv_c_tkh}" = x ; then | |
9229 | for i in \ | |
9230 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ | |
9231 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
9232 | /usr/local/src/tk \ | |
9233 | /usr/local/lib/tk \ | |
9234 | ${prefix}/include ; do | |
9235 | if test -f $i/generic/tk.h ; then | |
9236 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
9237 | break | |
9238 | fi | |
9239 | done | |
9240 | fi | |
9241 | # see if one is installed | |
9242 | if test x"${ac_cv_c_tkh}" = x ; then | |
9243 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` | |
9244 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
d28f9cdf | 9245 | echo "configure:9246: checking for tk.h" >&5 |
3fc11d3e JM |
9246 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
9247 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9248 | else | |
9249 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 9250 | #line 9251 "configure" |
3fc11d3e JM |
9251 | #include "confdefs.h" |
9252 | #include <tk.h> | |
9253 | EOF | |
9254 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 9255 | { (eval echo configure:9256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
3fc11d3e JM |
9256 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9257 | if test -z "$ac_err"; then | |
9258 | rm -rf conftest* | |
9259 | eval "ac_cv_header_$ac_safe=yes" | |
9260 | else | |
9261 | echo "$ac_err" >&5 | |
9262 | echo "configure: failed program was:" >&5 | |
9263 | cat conftest.$ac_ext >&5 | |
9264 | rm -rf conftest* | |
9265 | eval "ac_cv_header_$ac_safe=no" | |
9266 | fi | |
9267 | rm -f conftest* | |
9268 | fi | |
9269 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
9270 | echo "$ac_t""yes" 1>&6 | |
9271 | ac_cv_c_tkh=installed | |
9272 | else | |
9273 | echo "$ac_t""no" 1>&6 | |
9274 | ac_cv_c_tkh="" | |
9275 | fi | |
9276 | ||
9277 | fi | |
9278 | ||
9279 | fi | |
9280 | ||
9281 | if test x"${ac_cv_c_tkh}" != x ; then | |
9282 | no_tk="" | |
9283 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
9284 | echo "$ac_t""is installed" 1>&6 | |
9285 | TKHDIR="" | |
9286 | else | |
9287 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 | |
9288 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. | |
9289 | TKHDIR="-I${ac_cv_c_tkh}" | |
9290 | fi | |
9291 | else | |
9292 | TKHDIR="# no Tk directory found" | |
9293 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
9294 | no_tk=true | |
9295 | fi | |
9296 | ||
9297 | ||
9298 | ||
9299 | ||
9300 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
d28f9cdf | 9301 | echo "configure:9302: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9302 | if test x"${ac_cv_c_itclh}" = x ; then |
9303 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do | |
9304 | if test -f $i/generic/itcl.h ; then | |
9305 | ac_cv_c_itclh=`(cd $i/generic; pwd)` | |
9306 | break | |
9307 | fi | |
9308 | done | |
9309 | fi | |
9310 | if test x"${ac_cv_c_itclh}" = x ; then | |
9311 | ITCLHDIR="# no Itcl private headers found" | |
9312 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
9313 | fi | |
9314 | if test x"${ac_cv_c_itclh}" != x ; then | |
9315 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
9316 | fi | |
9317 | # should always be here | |
9318 | # ITCLLIB="../itcl/itcl/unix/libitcl.a" | |
9319 | ||
9320 | #AC_SUBST(ITCLLIB) | |
9321 | ||
9322 | ||
9323 | echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
d28f9cdf | 9324 | echo "configure:9325: checking for Itk private headers. srcdir=${srcdir}" >&5 |
3fc11d3e JM |
9325 | if test x"${ac_cv_c_itkh}" = x ; then |
9326 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do | |
9327 | if test -f $i/generic/itk.h ; then | |
9328 | ac_cv_c_itkh=`(cd $i/generic; pwd)` | |
9329 | break | |
9330 | fi | |
9331 | done | |
9332 | fi | |
9333 | if test x"${ac_cv_c_itkh}" = x ; then | |
9334 | ITKHDIR="# no Itk private headers found" | |
9335 | { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } | |
9336 | fi | |
9337 | if test x"${ac_cv_c_itkh}" != x ; then | |
9338 | ITKHDIR="-I${ac_cv_c_itkh}" | |
9339 | fi | |
9340 | # should always be here | |
9341 | # ITKLIB="../itcl/itk/unix/libitk.a" | |
9342 | ||
9343 | #AC_SUBST(ITKLIB) | |
9344 | ||
3fc11d3e | 9345 | |
dd2504ab JM |
9346 | |
9347 | # now look for Tk library stuff | |
9348 | ||
9349 | case "${host}" in | |
9350 | *-*-cygwin*) | |
9351 | tkdir=../tk/win/ | |
9352 | ;; | |
9353 | *) | |
9354 | tkdir=../tk/unix/ | |
9355 | ;; | |
9356 | esac | |
9357 | ||
9358 | TK_DEPS="${tkdir}${TK_LIB_FILE}" | |
9359 | ||
3fc11d3e JM |
9360 | # now look for Itcl library stuff |
9361 | ||
9362 | ||
9363 | # | |
9364 | # Ok, lets find the itcl configuration | |
9365 | # First, look for one uninstalled. | |
9366 | # the alternative search directory is invoked by --with-itclconfig | |
9367 | # | |
9368 | ||
9369 | if test x"${no_itcl}" = x ; then | |
9370 | # we reset no_itcl in case something fails here | |
9371 | no_itcl=true | |
9372 | # Check whether --with-itclconfig or --without-itclconfig was given. | |
9373 | if test "${with_itclconfig+set}" = set; then | |
9374 | withval="$with_itclconfig" | |
9375 | with_itclconfig=${withval} | |
9376 | fi | |
9377 | ||
9378 | echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 | |
d28f9cdf | 9379 | echo "configure:9380: checking for Itcl configuration" >&5 |
3fc11d3e JM |
9380 | if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then |
9381 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9382 | else | |
9383 | ||
9384 | ||
9385 | # First check to see if --with-itclconfig was specified. | |
9386 | if test x"${with_itclconfig}" != x ; then | |
9387 | if test -f "${with_itclconfig}/itclConfig.sh" ; then | |
9388 | ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` | |
9389 | else | |
9390 | { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } | |
9391 | fi | |
9392 | fi | |
9393 | ||
9394 | # then check for a private Itcl library | |
9395 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9396 | for i in \ | |
9397 | ../itcl/itcl \ | |
9398 | `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ | |
9399 | ../../itcl \ | |
9400 | `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ | |
9401 | ../../../itcl \ | |
9402 | `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9403 | if test -f "$i/itclConfig.sh" ; then | |
9404 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9405 | break | |
9406 | fi | |
9407 | done | |
9408 | fi | |
9409 | # check in a few common install locations | |
9410 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9411 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9412 | if test -f "$i/itclConfig.sh" ; then | |
9413 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9414 | break | |
9415 | fi | |
9416 | done | |
9417 | fi | |
9418 | # check in a few other private locations | |
9419 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9420 | for i in \ | |
9421 | ${srcdir}/../itcl/itcl \ | |
9422 | `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do | |
9423 | if test -f "$i/itclConfig.sh" ; then | |
9424 | ac_cv_c_itclconfig=`(cd $i; pwd)` | |
9425 | break | |
9426 | fi | |
9427 | done | |
9428 | fi | |
9429 | ||
9430 | fi | |
9431 | ||
9432 | if test x"${ac_cv_c_itclconfig}" = x ; then | |
9433 | ITCLCONFIG="# no Itcl configs found" | |
9434 | echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 | |
9435 | else | |
9436 | no_itcl= | |
9437 | ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh | |
9438 | echo "$ac_t""found $ITCLCONFIG" 1>&6 | |
9439 | fi | |
9440 | fi | |
9441 | ||
9442 | if test -z "${no_itcl}"; then | |
9443 | ||
9444 | if test -f "$ITCLCONFIG" ; then | |
9445 | . $ITCLCONFIG | |
9446 | fi | |
9447 | ||
9448 | ||
9449 | ||
9450 | ||
9451 | ||
9452 | ||
9453 | ||
9454 | ||
9455 | ||
9456 | ||
3fc11d3e JM |
9457 | |
9458 | ||
9459 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
b381d62d | 9460 | ITCL_DEPS="${ITCL_LIB_FULL_PATH}" |
3fc11d3e JM |
9461 | fi |
9462 | ||
9463 | ||
9464 | # now look for Itk library stuff | |
9465 | ||
9466 | # | |
9467 | # Ok, lets find the itk configuration | |
9468 | # First, look for one uninstalled. | |
9469 | # the alternative search directory is invoked by --with-itkconfig | |
9470 | # | |
9471 | ||
9472 | if test x"${no_itk}" = x ; then | |
9473 | # we reset no_itk in case something fails here | |
9474 | no_itk=true | |
9475 | # Check whether --with-itkconfig or --without-itkconfig was given. | |
9476 | if test "${with_itkconfig+set}" = set; then | |
9477 | withval="$with_itkconfig" | |
9478 | with_itkconfig=${withval} | |
9479 | fi | |
9480 | ||
9481 | echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 | |
d28f9cdf | 9482 | echo "configure:9483: checking for Itk configuration" >&5 |
3fc11d3e JM |
9483 | if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then |
9484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9485 | else | |
9486 | ||
9487 | ||
9488 | # First check to see if --with-itkconfig was specified. | |
9489 | if test x"${with_itkconfig}" != x ; then | |
9490 | if test -f "${with_itkconfig}/itkConfig.sh" ; then | |
9491 | ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` | |
9492 | else | |
9493 | { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } | |
9494 | fi | |
9495 | fi | |
9496 | ||
9497 | # then check for a private Itk library | |
9498 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9499 | for i in \ | |
9500 | ../itcl/itk \ | |
9501 | `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ | |
9502 | ../../itk \ | |
9503 | `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ | |
9504 | ../../../itk \ | |
9505 | `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do | |
9506 | if test -f "$i/itkConfig.sh" ; then | |
9507 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9508 | break | |
9509 | fi | |
9510 | done | |
9511 | fi | |
9512 | # check in a few common install locations | |
9513 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9514 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
9515 | if test -f "$i/itkConfig.sh" ; then | |
9516 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9517 | break | |
9518 | fi | |
9519 | done | |
9520 | fi | |
9521 | # check in a few other private locations | |
9522 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9523 | for i in \ | |
9524 | ${srcdir}/../itcl/itk \ | |
9525 | `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do | |
9526 | if test -f "$i/itkConfig.sh" ; then | |
9527 | ac_cv_c_itkconfig=`(cd $i; pwd)` | |
9528 | break | |
9529 | fi | |
9530 | done | |
9531 | fi | |
9532 | ||
9533 | fi | |
9534 | ||
9535 | if test x"${ac_cv_c_itkconfig}" = x ; then | |
9536 | ITKCONFIG="# no Itk configs found" | |
9537 | echo "configure: warning: Can't find Itk configuration definitions" 1>&2 | |
9538 | else | |
9539 | no_itk= | |
9540 | ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh | |
9541 | echo "$ac_t""found $ITKCONFIG" 1>&6 | |
9542 | fi | |
9543 | fi | |
9544 | ||
9545 | ||
9546 | if test -z "${no_itcl}"; then | |
9547 | ||
9548 | if test -f "$ITKCONFIG" ; then | |
9549 | . $ITKCONFIG | |
9550 | fi | |
9551 | ||
9552 | ||
9553 | ||
9554 | ||
9555 | ||
9556 | ||
9557 | ||
9558 | ||
9559 | ||
9560 | ||
9561 | ||
9562 | ||
3fc11d3e | 9563 | ITKLIB="${ITK_BUILD_LIB_SPEC}" |
b381d62d | 9564 | ITK_DEPS="${ITK_LIB_FULL_PATH}" |
3fc11d3e JM |
9565 | fi |
9566 | ||
4226a5a5 | 9567 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e JM |
9568 | # Tcl/Tk 8.1 require -fwritable strings. I don't |
9569 | # know whether 8.2 will or not, but I bet it will. | |
9570 | # I don't have to worry about 7.x since we don't support it. | |
9571 | GDBTK_CFLAGS="" | |
9572 | if test "$GCC" = "yes"; then | |
9573 | if test "$TCL_VERSION" != "8.0" ; then | |
9574 | GDBTK_CFLAGS="-fwritable-strings" | |
9575 | fi | |
9576 | fi | |
9577 | ||
9578 | # Include some libraries that Tcl and Tk want. | |
b2a1bd4f | 9579 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
3fc11d3e JM |
9580 | # Yes, the ordering seems wrong here. But it isn't. |
9581 | # TK_LIBS is the list of libraries that need to be linked | |
9582 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
9583 | # were in LIBS then any link tests after this point would | |
9584 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
9585 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 FN |
9586 | |
9587 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" | |
9588 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
9589 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
9590 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)" | |
b3a90332 | 9591 | CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)" |
ce844ae2 | 9592 | CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)" |
e56ac5c3 AC |
9593 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
9594 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
9595 | |
9596 | if test x$gdb_cv_os_cygwin = xyes; then | |
9597 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
9598 | WIN32LDAPP="-Wl,--subsystem,console" | |
9599 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
9600 | fi | |
9601 | fi | |
9602 | fi | |
ffc6a242 | 9603 | |
ffc6a242 | 9604 | configdirs="${configdirs} gdbtk" |
3fc11d3e JM |
9605 | fi |
9606 | ||
9607 | ||
9608 | ||
9609 | ||
9610 | ||
9611 | ||
9612 | ||
9613 | ||
9614 | ||
9615 | ||
9616 | ||
9617 | ||
9618 | ||
dd2504ab | 9619 | |
c906108c SS |
9620 | # If we find X, set shell vars x_includes and x_libraries to the |
9621 | # paths, otherwise set no_x=yes. | |
9622 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
9623 | # --without-x overrides everything else, but does not touch the cache. | |
9624 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
d28f9cdf | 9625 | echo "configure:9626: checking for X" >&5 |
c906108c SS |
9626 | |
9627 | # Check whether --with-x or --without-x was given. | |
9628 | if test "${with_x+set}" = set; then | |
9629 | withval="$with_x" | |
9630 | : | |
9631 | fi | |
9632 | ||
9633 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
9634 | if test "x$with_x" = xno; then | |
9635 | # The user explicitly disabled X. | |
9636 | have_x=disabled | |
9637 | else | |
9638 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
9639 | # Both variables are already set. | |
9640 | have_x=yes | |
9641 | else | |
9642 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
9643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
9644 | else | |
9645 | # One or both of the vars are not set, and there is no cached value. | |
9646 | ac_x_includes=NO ac_x_libraries=NO | |
9647 | rm -fr conftestdir | |
9648 | if mkdir conftestdir; then | |
9649 | cd conftestdir | |
9650 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
9651 | cat > Imakefile <<'EOF' | |
9652 | acfindx: | |
9653 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
9654 | EOF | |
9655 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
9656 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9657 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
9658 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9659 | for ac_extension in a so sl; do | |
9660 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
9661 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
9662 | ac_im_usrlibdir=$ac_im_libdir; break | |
9663 | fi | |
9664 | done | |
9665 | # Screen out bogus values from the imake configuration. They are | |
9666 | # bogus both because they are the default anyway, and because | |
9667 | # using them would break gcc on systems where it needs fixed includes. | |
9668 | case "$ac_im_incroot" in | |
9669 | /usr/include) ;; | |
9670 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
9671 | esac | |
9672 | case "$ac_im_usrlibdir" in | |
9673 | /usr/lib | /lib) ;; | |
9674 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
9675 | esac | |
9676 | fi | |
9677 | cd .. | |
9678 | rm -fr conftestdir | |
9679 | fi | |
9680 | ||
9681 | if test "$ac_x_includes" = NO; then | |
9682 | # Guess where to find include files, by looking for this one X11 .h file. | |
9683 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
9684 | ||
9685 | # First, try using that file with no special directory specified. | |
9686 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 9687 | #line 9688 "configure" |
c906108c SS |
9688 | #include "confdefs.h" |
9689 | #include <$x_direct_test_include> | |
9690 | EOF | |
9691 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
d28f9cdf | 9692 | { (eval echo configure:9693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
c906108c SS |
9693 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
9694 | if test -z "$ac_err"; then | |
9695 | rm -rf conftest* | |
9696 | # We can compile using X headers with no special include directory. | |
9697 | ac_x_includes= | |
9698 | else | |
9699 | echo "$ac_err" >&5 | |
9700 | echo "configure: failed program was:" >&5 | |
9701 | cat conftest.$ac_ext >&5 | |
9702 | rm -rf conftest* | |
9703 | # Look for the header file in a standard set of common directories. | |
9704 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9705 | for ac_dir in \ | |
9706 | /usr/X11/include \ | |
9707 | /usr/X11R6/include \ | |
9708 | /usr/X11R5/include \ | |
9709 | /usr/X11R4/include \ | |
9710 | \ | |
9711 | /usr/include/X11 \ | |
9712 | /usr/include/X11R6 \ | |
9713 | /usr/include/X11R5 \ | |
9714 | /usr/include/X11R4 \ | |
9715 | \ | |
9716 | /usr/local/X11/include \ | |
9717 | /usr/local/X11R6/include \ | |
9718 | /usr/local/X11R5/include \ | |
9719 | /usr/local/X11R4/include \ | |
9720 | \ | |
9721 | /usr/local/include/X11 \ | |
9722 | /usr/local/include/X11R6 \ | |
9723 | /usr/local/include/X11R5 \ | |
9724 | /usr/local/include/X11R4 \ | |
9725 | \ | |
9726 | /usr/X386/include \ | |
9727 | /usr/x386/include \ | |
9728 | /usr/XFree86/include/X11 \ | |
9729 | \ | |
9730 | /usr/include \ | |
9731 | /usr/local/include \ | |
9732 | /usr/unsupported/include \ | |
9733 | /usr/athena/include \ | |
9734 | /usr/local/x11r5/include \ | |
9735 | /usr/lpp/Xamples/include \ | |
9736 | \ | |
9737 | /usr/openwin/include \ | |
9738 | /usr/openwin/share/include \ | |
9739 | ; \ | |
9740 | do | |
9741 | if test -r "$ac_dir/$x_direct_test_include"; then | |
9742 | ac_x_includes=$ac_dir | |
9743 | break | |
9744 | fi | |
9745 | done | |
9746 | fi | |
9747 | rm -f conftest* | |
9748 | fi # $ac_x_includes = NO | |
9749 | ||
9750 | if test "$ac_x_libraries" = NO; then | |
9751 | # Check for the libraries. | |
9752 | ||
9753 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
9754 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
9755 | ||
9756 | # See if we find them without any special options. | |
9757 | # Don't add to $LIBS permanently. | |
9758 | ac_save_LIBS="$LIBS" | |
9759 | LIBS="-l$x_direct_test_library $LIBS" | |
9760 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 9761 | #line 9762 "configure" |
c906108c SS |
9762 | #include "confdefs.h" |
9763 | ||
9764 | int main() { | |
9765 | ${x_direct_test_function}() | |
9766 | ; return 0; } | |
9767 | EOF | |
d28f9cdf | 9768 | if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c906108c SS |
9769 | rm -rf conftest* |
9770 | LIBS="$ac_save_LIBS" | |
9771 | # We can link X programs with no special library path. | |
9772 | ac_x_libraries= | |
9773 | else | |
9774 | echo "configure: failed program was:" >&5 | |
9775 | cat conftest.$ac_ext >&5 | |
9776 | rm -rf conftest* | |
9777 | LIBS="$ac_save_LIBS" | |
9778 | # First see if replacing the include by lib works. | |
9779 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9780 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
9781 | /usr/X11/lib \ | |
9782 | /usr/X11R6/lib \ | |
9783 | /usr/X11R5/lib \ | |
9784 | /usr/X11R4/lib \ | |
9785 | \ | |
9786 | /usr/lib/X11 \ | |
9787 | /usr/lib/X11R6 \ | |
9788 | /usr/lib/X11R5 \ | |
9789 | /usr/lib/X11R4 \ | |
9790 | \ | |
9791 | /usr/local/X11/lib \ | |
9792 | /usr/local/X11R6/lib \ | |
9793 | /usr/local/X11R5/lib \ | |
9794 | /usr/local/X11R4/lib \ | |
9795 | \ | |
9796 | /usr/local/lib/X11 \ | |
9797 | /usr/local/lib/X11R6 \ | |
9798 | /usr/local/lib/X11R5 \ | |
9799 | /usr/local/lib/X11R4 \ | |
9800 | \ | |
9801 | /usr/X386/lib \ | |
9802 | /usr/x386/lib \ | |
9803 | /usr/XFree86/lib/X11 \ | |
9804 | \ | |
9805 | /usr/lib \ | |
9806 | /usr/local/lib \ | |
9807 | /usr/unsupported/lib \ | |
9808 | /usr/athena/lib \ | |
9809 | /usr/local/x11r5/lib \ | |
9810 | /usr/lpp/Xamples/lib \ | |
9811 | /lib/usr/lib/X11 \ | |
9812 | \ | |
9813 | /usr/openwin/lib \ | |
9814 | /usr/openwin/share/lib \ | |
9815 | ; \ | |
9816 | do | |
9817 | for ac_extension in a so sl; do | |
9818 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
9819 | ac_x_libraries=$ac_dir | |
9820 | break 2 | |
9821 | fi | |
9822 | done | |
9823 | done | |
9824 | fi | |
9825 | rm -f conftest* | |
9826 | fi # $ac_x_libraries = NO | |
9827 | ||
9828 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
9829 | # Didn't find X anywhere. Cache the known absence of X. | |
9830 | ac_cv_have_x="have_x=no" | |
9831 | else | |
9832 | # Record where we found X for the cache. | |
9833 | ac_cv_have_x="have_x=yes \ | |
9834 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
9835 | fi | |
9836 | fi | |
9837 | fi | |
9838 | eval "$ac_cv_have_x" | |
9839 | fi # $with_x != no | |
9840 | ||
9841 | if test "$have_x" != yes; then | |
9842 | echo "$ac_t""$have_x" 1>&6 | |
9843 | no_x=yes | |
9844 | else | |
9845 | # If each of the values was on the command line, it overrides each guess. | |
9846 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9847 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9848 | # Update the cache value to reflect the command line values. | |
9849 | ac_cv_have_x="have_x=yes \ | |
9850 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
9851 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
9852 | fi | |
9853 | ||
9854 | ||
7a292a7a SS |
9855 | |
9856 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
9857 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
9858 | # This code just checks for a few cases where we'd like to ignore those | |
9859 | # definitions, even when they're present in the '.mt' file. These cases | |
9860 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 9861 | # not part of the source tree. |
7a292a7a SS |
9862 | # |
9863 | # Check whether --enable-sim or --disable-sim was given. | |
9864 | if test "${enable_sim+set}" = set; then | |
9865 | enableval="$enable_sim" | |
9866 | echo "enable_sim = $enable_sim"; | |
9867 | echo "enableval = ${enableval}"; | |
9868 | case "${enableval}" in | |
9869 | yes) ignore_sim=false ;; | |
9870 | no) ignore_sim=true ;; | |
9871 | *) ignore_sim=false ;; | |
9872 | esac | |
9873 | else | |
9874 | ignore_sim=false | |
9875 | fi | |
9876 | ||
9877 | ||
9878 | if test ! -d "${srcdir}/../sim"; then | |
9879 | ignore_sim=true | |
9880 | fi | |
9881 | ||
9882 | if test "${ignore_sim}" = "true"; then | |
9883 | IGNORE_SIM="SIM=" | |
9884 | IGNORE_SIM_OBS="SIM_OBS=" | |
9885 | else | |
9886 | IGNORE_SIM="" | |
9887 | IGNORE_SIM_OBS="" | |
9888 | cat >> confdefs.h <<\EOF | |
9889 | #define WITH_SIM 1 | |
9890 | EOF | |
9891 | ||
9892 | fi | |
9893 | ||
9894 | ||
9895 | ||
c906108c SS |
9896 | |
9897 | ||
9898 | ||
9899 | ||
9900 | ||
9901 | ||
dfcd3bfb | 9902 | |
e56ac5c3 AC |
9903 | |
9904 | ||
b3a90332 AC |
9905 | |
9906 | ||
b46cd165 | 9907 | |
d28f9cdf | 9908 | |
c906108c SS |
9909 | # target_subdir is used by the testsuite to find the target libraries. |
9910 | target_subdir= | |
9911 | if test "${host}" != "${target}"; then | |
9912 | target_subdir="${target_alias}/" | |
9913 | fi | |
9914 | ||
9915 | ||
9916 | frags= | |
9917 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
9918 | if test ! -f ${host_makefile_frag}; then | |
7fd60527 AC |
9919 | # When building a native debuger the .mh file containing things |
9920 | # like NATDEPFILES is needed. Cross debuggers don't need .mh | |
9921 | # since it no longer contains anything useful. | |
9922 | if test "${target}" = "${host}"; then | |
9923 | { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; } | |
9924 | else | |
9925 | host_makefile_frag=/dev/null | |
9926 | fi | |
c906108c SS |
9927 | fi |
9928 | frags="$frags $host_makefile_frag" | |
9929 | ||
9930 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
9931 | if test ! -f ${target_makefile_frag}; then | |
9932 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
9933 | fi | |
9934 | frags="$frags $target_makefile_frag" | |
9935 | ||
9936 | ||
9937 | ||
9938 | ||
9939 | ||
9940 | hostfile=`sed -n ' | |
9941 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9942 | ' ${host_makefile_frag}` | |
9943 | ||
9944 | targetfile=`sed -n ' | |
9945 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9946 | ' ${target_makefile_frag}` | |
9947 | ||
6166d547 AC |
9948 | GDB_MULTI_ARCH=`sed -n ' |
9949 | s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p | |
9950 | ' ${target_makefile_frag}` | |
9951 | ||
c906108c | 9952 | if test "${target}" = "${host}"; then |
a85f51e7 DJ |
9953 | # We pick this up from the host configuration file (.mh) because we |
9954 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
9955 | nativefile=`sed -n ' |
9956 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
9957 | ' ${host_makefile_frag}` | |
c906108c SS |
9958 | fi |
9959 | ||
9960 | ||
6166d547 AC |
9961 | # New targets should just set gdb_multi_arch=yes in configure.tgt. |
9962 | # Old targets being converted can either do that or set GDB_MULTI_ARCH | |
9963 | # in the target specific makefile frag. Eventually gdb_multi_arch=yes | |
9964 | # will be the default. | |
9965 | if test x"${GDB_MULTI_ARCH}" = x ; then | |
9966 | case "${gdb_multi_arch}" in | |
9967 | yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; | |
9968 | no ) GDB_MULTI_ARCH=0 ;; | |
9969 | 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; | |
9970 | esac | |
9971 | fi | |
9972 | if test x"${GDB_MULTI_ARCH}" != x ; then | |
9973 | cat >> confdefs.h <<EOF | |
9974 | #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH} | |
9975 | EOF | |
9976 | ||
9977 | fi | |
6c5cfe5b | 9978 | # Warn the user when they use an old practice |
6166d547 AC |
9979 | case "${GDB_MULTI_ARCH}" in |
9980 | "" ) ;; | |
9981 | 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 ) | |
9982 | echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;; | |
9983 | GDB_MULTI_ARCH_PURE ) | |
9984 | if test x"${targetfile}" != x ; then | |
6c5cfe5b | 9985 | echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 |
5a2402b8 | 9986 | targetfile="" |
6166d547 AC |
9987 | fi ;; |
9988 | *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; | |
9989 | esac | |
9990 | ||
b00a8037 DJ |
9991 | if test x"${gdb_osabi}" != x ; then |
9992 | cat >> confdefs.h <<EOF | |
9993 | #define GDB_OSABI_DEFAULT $gdb_osabi | |
9994 | EOF | |
9995 | ||
9996 | fi | |
9997 | ||
8dcde887 MK |
9998 | # Enable multi-ice-gdb-server. |
9999 | # Check whether --enable-multi-ice or --disable-multi-ice was given. | |
10000 | if test "${enable_multi_ice+set}" = set; then | |
10001 | enableval="$enable_multi_ice" | |
10002 | case $enableval in | |
10003 | yes | no) | |
10004 | ;; | |
10005 | *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;; | |
10006 | esac | |
96baa820 JM |
10007 | fi |
10008 | ||
8dcde887 MK |
10009 | if test "x$enable_multi_ice" = xyes; then |
10010 | configdirs="$configdirs multi-ice" | |
a85f51e7 DJ |
10011 | fi |
10012 | ||
8dcde887 MK |
10013 | # We only build gdbserver automatically if host and target are the same. |
10014 | if test "x$target" = "x$host"; then | |
10015 | echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6 | |
d28f9cdf | 10016 | echo "configure:10017: checking whether gdbserver is supported on this host" >&5 |
8dcde887 MK |
10017 | if test "x$build_gdbserver" = xyes; then |
10018 | configdirs="$configdirs gdbserver" | |
10019 | echo "$ac_t""yes" 1>&6 | |
10020 | else | |
10021 | echo "$ac_t""no" 1>&6 | |
10022 | fi | |
10023 | fi | |
10024 | ||
10025 | subdirs="doc testsuite $configdirs" | |
10026 | ||
96baa820 | 10027 | |
c906108c | 10028 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
5a2402b8 AC |
10029 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty |
10030 | # version. | |
c906108c SS |
10031 | |
10032 | files= | |
10033 | links= | |
5a2402b8 | 10034 | |
c906108c | 10035 | rm -f xm.h |
5a2402b8 | 10036 | xm_h="" |
c906108c | 10037 | if test "${hostfile}" != ""; then |
5a2402b8 AC |
10038 | xm_h=xm.h |
10039 | GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" | |
10040 | files="${files} ${GDB_XM_FILE}" | |
10041 | links="${links} xm.h" | |
10042 | cat >> confdefs.h <<EOF | |
10043 | #define GDB_XM_FILE ${GDB_XM_FILE} | |
10044 | EOF | |
10045 | ||
c906108c | 10046 | fi |
5a2402b8 AC |
10047 | |
10048 | ||
c906108c | 10049 | rm -f tm.h |
5a2402b8 | 10050 | tm_h="" |
c906108c | 10051 | if test "${targetfile}" != ""; then |
5a2402b8 AC |
10052 | tm_h=tm.h |
10053 | GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" | |
10054 | files="${files} ${GDB_TM_FILE}" | |
10055 | links="${links} tm.h" | |
10056 | cat >> confdefs.h <<EOF | |
10057 | #define GDB_TM_FILE ${GDB_TM_FILE} | |
10058 | EOF | |
10059 | ||
c906108c | 10060 | fi |
5a2402b8 AC |
10061 | |
10062 | ||
c906108c | 10063 | rm -f nm.h |
5a2402b8 | 10064 | nm_h="" |
c906108c | 10065 | if test "${nativefile}" != ""; then |
5a2402b8 AC |
10066 | nm_h=nm.h |
10067 | GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" | |
10068 | files="${files} ${GDB_NM_FILE}" | |
10069 | links="${links} nm.h" | |
10070 | cat >> confdefs.h <<EOF | |
10071 | #define GDB_NM_FILE ${GDB_NM_FILE} | |
10072 | EOF | |
10073 | ||
c906108c | 10074 | fi |
5a2402b8 AC |
10075 | |
10076 | ||
c906108c SS |
10077 | |
10078 | ||
10079 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
d28f9cdf | 10080 | echo "configure:10081: checking for Cygwin environment" >&5 |
c906108c SS |
10081 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
10082 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10083 | else | |
10084 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 10085 | #line 10086 "configure" |
c906108c SS |
10086 | #include "confdefs.h" |
10087 | ||
10088 | int main() { | |
10089 | ||
10090 | #ifndef __CYGWIN__ | |
10091 | #define __CYGWIN__ __CYGWIN32__ | |
10092 | #endif | |
10093 | return __CYGWIN__; | |
10094 | ; return 0; } | |
10095 | EOF | |
d28f9cdf | 10096 | if { (eval echo configure:10097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10097 | rm -rf conftest* |
10098 | ac_cv_cygwin=yes | |
10099 | else | |
10100 | echo "configure: failed program was:" >&5 | |
10101 | cat conftest.$ac_ext >&5 | |
10102 | rm -rf conftest* | |
10103 | ac_cv_cygwin=no | |
10104 | fi | |
10105 | rm -f conftest* | |
10106 | rm -f conftest* | |
10107 | fi | |
10108 | ||
10109 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
10110 | CYGWIN= | |
10111 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
10112 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
d28f9cdf | 10113 | echo "configure:10114: checking for mingw32 environment" >&5 |
c906108c SS |
10114 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
10115 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10116 | else | |
10117 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 10118 | #line 10119 "configure" |
c906108c SS |
10119 | #include "confdefs.h" |
10120 | ||
10121 | int main() { | |
10122 | return __MINGW32__; | |
10123 | ; return 0; } | |
10124 | EOF | |
d28f9cdf | 10125 | if { (eval echo configure:10126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c906108c SS |
10126 | rm -rf conftest* |
10127 | ac_cv_mingw32=yes | |
10128 | else | |
10129 | echo "configure: failed program was:" >&5 | |
10130 | cat conftest.$ac_ext >&5 | |
10131 | rm -rf conftest* | |
10132 | ac_cv_mingw32=no | |
10133 | fi | |
10134 | rm -f conftest* | |
10135 | rm -f conftest* | |
10136 | fi | |
10137 | ||
10138 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
10139 | MINGW32= | |
10140 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
10141 | ||
10142 | ||
10143 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
d28f9cdf | 10144 | echo "configure:10145: checking for executable suffix" >&5 |
c906108c SS |
10145 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
10146 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10147 | else | |
10148 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
10149 | ac_cv_exeext=.exe | |
10150 | else | |
10151 | rm -f conftest* | |
10152 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
10153 | ac_cv_exeext= | |
d28f9cdf | 10154 | if { (eval echo configure:10155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
c906108c SS |
10155 | for file in conftest.*; do |
10156 | case $file in | |
b00a8037 | 10157 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
c906108c SS |
10158 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
10159 | esac | |
10160 | done | |
10161 | else | |
10162 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
10163 | fi | |
10164 | rm -f conftest* | |
10165 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
10166 | fi | |
10167 | fi | |
10168 | ||
10169 | EXEEXT="" | |
10170 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
10171 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
10172 | ac_exeext=$EXEEXT | |
10173 | ||
10174 | ||
234b45d4 KB |
10175 | |
10176 | cat >> confdefs.h <<\EOF | |
10177 | #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" | |
10178 | EOF | |
10179 | ||
10180 | ||
10181 | ||
10182 | ||
10183 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10184 | if test "${with_libiconv_prefix+set}" = set; then | |
10185 | withval="$with_libiconv_prefix" | |
10186 | ||
10187 | for dir in `echo "$withval" | tr : ' '`; do | |
10188 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10189 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10190 | done | |
10191 | ||
10192 | fi | |
10193 | ||
10194 | ||
10195 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 | |
d28f9cdf | 10196 | echo "configure:10197: checking for iconv" >&5 |
234b45d4 KB |
10197 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
10198 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10199 | else | |
10200 | ||
10201 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10202 | am_cv_lib_iconv=no | |
10203 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 10204 | #line 10205 "configure" |
234b45d4 KB |
10205 | #include "confdefs.h" |
10206 | #include <stdlib.h> | |
10207 | #include <iconv.h> | |
10208 | int main() { | |
10209 | iconv_t cd = iconv_open("",""); | |
10210 | iconv(cd,NULL,NULL,NULL,NULL); | |
10211 | iconv_close(cd); | |
10212 | ; return 0; } | |
10213 | EOF | |
d28f9cdf | 10214 | if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10215 | rm -rf conftest* |
10216 | am_cv_func_iconv=yes | |
10217 | else | |
10218 | echo "configure: failed program was:" >&5 | |
10219 | cat conftest.$ac_ext >&5 | |
10220 | fi | |
10221 | rm -f conftest* | |
10222 | if test "$am_cv_func_iconv" != yes; then | |
10223 | am_save_LIBS="$LIBS" | |
10224 | LIBS="$LIBS -liconv" | |
10225 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 10226 | #line 10227 "configure" |
234b45d4 KB |
10227 | #include "confdefs.h" |
10228 | #include <stdlib.h> | |
10229 | #include <iconv.h> | |
10230 | int main() { | |
10231 | iconv_t cd = iconv_open("",""); | |
10232 | iconv(cd,NULL,NULL,NULL,NULL); | |
10233 | iconv_close(cd); | |
10234 | ; return 0; } | |
10235 | EOF | |
d28f9cdf | 10236 | if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
234b45d4 KB |
10237 | rm -rf conftest* |
10238 | am_cv_lib_iconv=yes | |
10239 | am_cv_func_iconv=yes | |
10240 | else | |
10241 | echo "configure: failed program was:" >&5 | |
10242 | cat conftest.$ac_ext >&5 | |
10243 | fi | |
10244 | rm -f conftest* | |
10245 | LIBS="$am_save_LIBS" | |
10246 | fi | |
10247 | ||
10248 | fi | |
10249 | ||
10250 | echo "$ac_t""$am_cv_func_iconv" 1>&6 | |
10251 | if test "$am_cv_func_iconv" = yes; then | |
10252 | cat >> confdefs.h <<\EOF | |
10253 | #define HAVE_ICONV 1 | |
10254 | EOF | |
10255 | ||
10256 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 | |
d28f9cdf | 10257 | echo "configure:10258: checking for iconv declaration" >&5 |
234b45d4 KB |
10258 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
10259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
10260 | else | |
10261 | ||
10262 | cat > conftest.$ac_ext <<EOF | |
d28f9cdf | 10263 | #line 10264 "configure" |
234b45d4 KB |
10264 | #include "confdefs.h" |
10265 | ||
10266 | #include <stdlib.h> | |
10267 | #include <iconv.h> | |
10268 | extern | |
10269 | #ifdef __cplusplus | |
10270 | "C" | |
10271 | #endif | |
10272 | #if defined(__STDC__) || defined(__cplusplus) | |
10273 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10274 | #else | |
10275 | size_t iconv(); | |
10276 | #endif | |
10277 | ||
10278 | int main() { | |
10279 | ||
10280 | ; return 0; } | |
10281 | EOF | |
d28f9cdf | 10282 | if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
234b45d4 KB |
10283 | rm -rf conftest* |
10284 | am_cv_proto_iconv_arg1="" | |
10285 | else | |
10286 | echo "configure: failed program was:" >&5 | |
10287 | cat conftest.$ac_ext >&5 | |
10288 | rm -rf conftest* | |
10289 | am_cv_proto_iconv_arg1="const" | |
10290 | fi | |
10291 | rm -f conftest* | |
10292 | 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);" | |
10293 | fi | |
10294 | ||
10295 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10296 | echo "$ac_t""${ac_t:- | |
10297 | }$am_cv_proto_iconv" 1>&6 | |
10298 | cat >> confdefs.h <<EOF | |
10299 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10300 | EOF | |
10301 | ||
10302 | fi | |
10303 | LIBICONV= | |
10304 | if test "$am_cv_lib_iconv" = yes; then | |
10305 | LIBICONV="-liconv" | |
10306 | fi | |
10307 | ||
10308 | ||
10309 | ||
c906108c SS |
10310 | trap '' 1 2 15 |
10311 | cat > confcache <<\EOF | |
10312 | # This file is a shell script that caches the results of configure | |
10313 | # tests run on this system so they can be shared between configure | |
10314 | # scripts and configure runs. It is not useful on other systems. | |
10315 | # If it contains results you don't want to keep, you may remove or edit it. | |
10316 | # | |
10317 | # By default, configure uses ./config.cache as the cache file, | |
10318 | # creating it if it does not exist already. You can give configure | |
10319 | # the --cache-file=FILE option to use a different cache file; that is | |
10320 | # what configure does when it calls configure scripts in | |
10321 | # subdirectories, so they share the cache. | |
10322 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
10323 | # config.status only pays attention to the cache file if you give it the | |
10324 | # --recheck option to rerun configure. | |
10325 | # | |
10326 | EOF | |
10327 | # The following way of writing the cache mishandles newlines in values, | |
10328 | # but we know of no workaround that is simple, portable, and efficient. | |
10329 | # So, don't put newlines in cache variables' values. | |
10330 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
10331 | # and sets the high bit in the cache file unless we assign to the vars. | |
10332 | (set) 2>&1 | | |
10333 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
10334 | *ac_space=\ *) | |
10335 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
10336 | # turns \\\\ into \\, and sed turns \\ into \). | |
10337 | sed -n \ | |
10338 | -e "s/'/'\\\\''/g" \ | |
10339 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
10340 | ;; | |
10341 | *) | |
10342 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
10343 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
10344 | ;; | |
10345 | esac >> confcache | |
10346 | if cmp -s $cache_file confcache; then | |
10347 | : | |
10348 | else | |
10349 | if test -w $cache_file; then | |
10350 | echo "updating cache $cache_file" | |
10351 | cat confcache > $cache_file | |
10352 | else | |
10353 | echo "not updating unwritable cache $cache_file" | |
10354 | fi | |
10355 | fi | |
10356 | rm -f confcache | |
10357 | ||
10358 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
10359 | ||
10360 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
10361 | # Let make expand exec_prefix. | |
10362 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10363 | ||
10364 | # Any assignment to VPATH causes Sun make to only execute | |
10365 | # the first set of double-colon rules, so remove it if not needed. | |
10366 | # If there is a colon in the path, we need to keep it. | |
10367 | if test "x$srcdir" = x.; then | |
10368 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
10369 | fi | |
10370 | ||
10371 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
10372 | ||
10373 | DEFS=-DHAVE_CONFIG_H | |
10374 | ||
10375 | # Without the "./", some shells look in PATH for config.status. | |
10376 | : ${CONFIG_STATUS=./config.status} | |
10377 | ||
10378 | echo creating $CONFIG_STATUS | |
10379 | rm -f $CONFIG_STATUS | |
10380 | cat > $CONFIG_STATUS <<EOF | |
10381 | #! /bin/sh | |
10382 | # Generated automatically by configure. | |
10383 | # Run this file to recreate the current configuration. | |
10384 | # This directory was configured as follows, | |
10385 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
10386 | # | |
10387 | # $0 $ac_configure_args | |
10388 | # | |
10389 | # Compiler output produced by configure, useful for debugging | |
10390 | # configure, is in ./config.log if it exists. | |
10391 | ||
10392 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
10393 | for ac_option | |
10394 | do | |
10395 | case "\$ac_option" in | |
10396 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
10397 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
10398 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
10399 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
10400 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
10401 | exit 0 ;; | |
10402 | -help | --help | --hel | --he | --h) | |
10403 | echo "\$ac_cs_usage"; exit 0 ;; | |
10404 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
10405 | esac | |
10406 | done | |
10407 | ||
10408 | ac_given_srcdir=$srcdir | |
10409 | ac_given_INSTALL="$INSTALL" | |
10410 | ||
ed952ac5 | 10411 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
c906108c SS |
10412 | EOF |
10413 | cat >> $CONFIG_STATUS <<EOF | |
10414 | ||
10415 | # Protect against being on the right side of a sed subst in config.status. | |
10416 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
10417 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
10418 | $ac_vpsub | |
10419 | $extrasub | |
10420 | s%@SHELL@%$SHELL%g | |
10421 | s%@CFLAGS@%$CFLAGS%g | |
10422 | s%@CPPFLAGS@%$CPPFLAGS%g | |
10423 | s%@CXXFLAGS@%$CXXFLAGS%g | |
10424 | s%@FFLAGS@%$FFLAGS%g | |
10425 | s%@DEFS@%$DEFS%g | |
10426 | s%@LDFLAGS@%$LDFLAGS%g | |
10427 | s%@LIBS@%$LIBS%g | |
10428 | s%@exec_prefix@%$exec_prefix%g | |
10429 | s%@prefix@%$prefix%g | |
10430 | s%@program_transform_name@%$program_transform_name%g | |
10431 | s%@bindir@%$bindir%g | |
10432 | s%@sbindir@%$sbindir%g | |
10433 | s%@libexecdir@%$libexecdir%g | |
10434 | s%@datadir@%$datadir%g | |
10435 | s%@sysconfdir@%$sysconfdir%g | |
10436 | s%@sharedstatedir@%$sharedstatedir%g | |
10437 | s%@localstatedir@%$localstatedir%g | |
10438 | s%@libdir@%$libdir%g | |
10439 | s%@includedir@%$includedir%g | |
10440 | s%@oldincludedir@%$oldincludedir%g | |
10441 | s%@infodir@%$infodir%g | |
10442 | s%@mandir@%$mandir%g | |
413ccac7 AC |
10443 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
10444 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
10445 | s%@MAINT@%$MAINT%g | |
c906108c SS |
10446 | s%@CC@%$CC%g |
10447 | s%@CPP@%$CPP%g | |
10448 | s%@host@%$host%g | |
10449 | s%@host_alias@%$host_alias%g | |
10450 | s%@host_cpu@%$host_cpu%g | |
10451 | s%@host_vendor@%$host_vendor%g | |
10452 | s%@host_os@%$host_os%g | |
10453 | s%@target@%$target%g | |
10454 | s%@target_alias@%$target_alias%g | |
10455 | s%@target_cpu@%$target_cpu%g | |
10456 | s%@target_vendor@%$target_vendor%g | |
10457 | s%@target_os@%$target_os%g | |
10458 | s%@build@%$build%g | |
10459 | s%@build_alias@%$build_alias%g | |
10460 | s%@build_cpu@%$build_cpu%g | |
10461 | s%@build_vendor@%$build_vendor%g | |
10462 | s%@build_os@%$build_os%g | |
c906108c | 10463 | s%@RANLIB@%$RANLIB%g |
8bb2c122 | 10464 | s%@SET_MAKE@%$SET_MAKE%g |
c906108c SS |
10465 | s%@ALLOCA@%$ALLOCA%g |
10466 | s%@USE_NLS@%$USE_NLS%g | |
10467 | s%@MSGFMT@%$MSGFMT%g | |
10468 | s%@GMSGFMT@%$GMSGFMT%g | |
10469 | s%@XGETTEXT@%$XGETTEXT%g | |
10470 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
10471 | s%@CATALOGS@%$CATALOGS%g | |
10472 | s%@CATOBJEXT@%$CATOBJEXT%g | |
10473 | s%@DATADIRNAME@%$DATADIRNAME%g | |
10474 | s%@GMOFILES@%$GMOFILES%g | |
10475 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
10476 | s%@INTLDEPS@%$INTLDEPS%g | |
10477 | s%@INTLLIBS@%$INTLLIBS%g | |
10478 | s%@INTLOBJS@%$INTLOBJS%g | |
10479 | s%@POFILES@%$POFILES%g | |
10480 | s%@POSUB@%$POSUB%g | |
10481 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
10482 | s%@GT_NO@%$GT_NO%g | |
10483 | s%@GT_YES@%$GT_YES%g | |
10484 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
10485 | s%@l@%$l%g | |
8dcde887 | 10486 | s%@subdirs@%$subdirs%g |
7a292a7a | 10487 | s%@AWK@%$AWK%g |
c906108c SS |
10488 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
10489 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
10490 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8bb2c122 MK |
10491 | s%@LN_S@%$LN_S%g |
10492 | s%@YACC@%$YACC%g | |
c906108c | 10493 | s%@AR@%$AR%g |
95ca63c4 CF |
10494 | s%@DLLTOOL@%$DLLTOOL%g |
10495 | s%@WINDRES@%$WINDRES%g | |
75c6e08a | 10496 | s%@MIG@%$MIG%g |
c906108c | 10497 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
030292b7 DJ |
10498 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g |
10499 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
c906108c | 10500 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
104c1213 | 10501 | s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g |
c906108c SS |
10502 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
10503 | s%@MMALLOC@%$MMALLOC%g | |
aff38e61 | 10504 | s%@SER_HARDWIRE@%$SER_HARDWIRE%g |
cd0fc7c3 | 10505 | s%@WIN32LIBS@%$WIN32LIBS%g |
7a292a7a SS |
10506 | s%@LIBGUI@%$LIBGUI%g |
10507 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
7a292a7a SS |
10508 | s%@WIN32LDAPP@%$WIN32LDAPP%g |
10509 | s%@TCL_VERSION@%$TCL_VERSION%g | |
10510 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
10511 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
10512 | s%@TCL_CC@%$TCL_CC%g | |
10513 | s%@TCL_DEFS@%$TCL_DEFS%g | |
10514 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
10515 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
10516 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
10517 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
10518 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
10519 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
10520 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
10521 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
10522 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
10523 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
10524 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
10525 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
10526 | s%@TK_VERSION@%$TK_VERSION%g | |
10527 | s%@TK_DEFS@%$TK_DEFS%g | |
10528 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g | |
10529 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
10530 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
10531 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
10532 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
10533 | s%@TCLHDIR@%$TCLHDIR%g | |
10534 | s%@TKHDIR@%$TKHDIR%g | |
10535 | s%@ITCLHDIR@%$ITCLHDIR%g | |
10536 | s%@ITKHDIR@%$ITKHDIR%g | |
7a292a7a SS |
10537 | s%@ITCL_VERSION@%$ITCL_VERSION%g |
10538 | s%@ITCL_DEFS@%$ITCL_DEFS%g | |
10539 | s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g | |
10540 | s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g | |
10541 | s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g | |
10542 | s%@ITK_VERSION@%$ITK_VERSION%g | |
10543 | s%@ITK_DEFS@%$ITK_DEFS%g | |
10544 | s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g | |
10545 | s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g | |
10546 | s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g | |
7a292a7a SS |
10547 | s%@X_CFLAGS@%$X_CFLAGS%g |
10548 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
10549 | s%@X_LIBS@%$X_LIBS%g | |
dd2504ab JM |
10550 | s%@TCL_DEPS@%$TCL_DEPS%g |
10551 | s%@TK_DEPS@%$TK_DEPS%g | |
7a292a7a SS |
10552 | s%@ITCLLIB@%$ITCLLIB%g |
10553 | s%@ITCL_DEPS@%$ITCL_DEPS%g | |
10554 | s%@ITKLIB@%$ITKLIB%g | |
10555 | s%@ITK_DEPS@%$ITK_DEPS%g | |
7a292a7a SS |
10556 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
10557 | s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g | |
d1c3b63a | 10558 | s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g |
7a292a7a SS |
10559 | s%@IGNORE_SIM@%$IGNORE_SIM%g |
10560 | s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g | |
c906108c | 10561 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
d28f9cdf | 10562 | s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g |
c906108c | 10563 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
66b965bb | 10564 | s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g |
c906108c SS |
10565 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
10566 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g | |
dfcd3bfb | 10567 | s%@CONFIG_INITS@%$CONFIG_INITS%g |
b3a90332 AC |
10568 | s%@CONFIG_ALL@%$CONFIG_ALL%g |
10569 | s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g | |
e56ac5c3 AC |
10570 | s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g |
10571 | s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g | |
c906108c SS |
10572 | s%@target_subdir@%$target_subdir%g |
10573 | /@host_makefile_frag@/r $host_makefile_frag | |
10574 | s%@host_makefile_frag@%%g | |
10575 | /@target_makefile_frag@/r $target_makefile_frag | |
10576 | s%@target_makefile_frag@%%g | |
10577 | s%@frags@%$frags%g | |
5a2402b8 AC |
10578 | s%@xm_h@%$xm_h%g |
10579 | s%@tm_h@%$tm_h%g | |
10580 | s%@nm_h@%$nm_h%g | |
c906108c | 10581 | s%@EXEEXT@%$EXEEXT%g |
234b45d4 | 10582 | s%@LIBICONV@%$LIBICONV%g |
c906108c SS |
10583 | |
10584 | CEOF | |
10585 | EOF | |
10586 | ||
10587 | cat >> $CONFIG_STATUS <<\EOF | |
10588 | ||
10589 | # Split the substitutions into bite-sized pieces for seds with | |
10590 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
234b45d4 | 10591 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
c906108c SS |
10592 | ac_file=1 # Number of current file. |
10593 | ac_beg=1 # First line for current file. | |
10594 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
10595 | ac_more_lines=: | |
10596 | ac_sed_cmds="" | |
10597 | while $ac_more_lines; do | |
10598 | if test $ac_beg -gt 1; then | |
10599 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
10600 | else | |
10601 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
10602 | fi | |
10603 | if test ! -s conftest.s$ac_file; then | |
10604 | ac_more_lines=false | |
10605 | rm -f conftest.s$ac_file | |
10606 | else | |
10607 | if test -z "$ac_sed_cmds"; then | |
10608 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
10609 | else | |
10610 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
10611 | fi | |
10612 | ac_file=`expr $ac_file + 1` | |
10613 | ac_beg=$ac_end | |
10614 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
10615 | fi | |
10616 | done | |
10617 | if test -z "$ac_sed_cmds"; then | |
10618 | ac_sed_cmds=cat | |
10619 | fi | |
10620 | EOF | |
10621 | ||
10622 | cat >> $CONFIG_STATUS <<EOF | |
10623 | ||
ed952ac5 | 10624 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
c906108c SS |
10625 | EOF |
10626 | cat >> $CONFIG_STATUS <<\EOF | |
10627 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
10628 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10629 | case "$ac_file" in | |
10630 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10631 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10632 | *) ac_file_in="${ac_file}.in" ;; | |
10633 | esac | |
10634 | ||
10635 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
10636 | ||
10637 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10638 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10639 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10640 | # The file is in a subdirectory. | |
10641 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10642 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
10643 | # A "../" for each directory in $ac_dir_suffix. | |
10644 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
10645 | else | |
10646 | ac_dir_suffix= ac_dots= | |
10647 | fi | |
10648 | ||
10649 | case "$ac_given_srcdir" in | |
10650 | .) srcdir=. | |
10651 | if test -z "$ac_dots"; then top_srcdir=. | |
10652 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
10653 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
10654 | *) # Relative path. | |
10655 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
10656 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
10657 | esac | |
10658 | ||
10659 | case "$ac_given_INSTALL" in | |
10660 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10661 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10662 | esac | |
10663 | ||
10664 | echo creating "$ac_file" | |
10665 | rm -f "$ac_file" | |
10666 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
10667 | case "$ac_file" in | |
10668 | *Makefile*) ac_comsub="1i\\ | |
10669 | # $configure_input" ;; | |
10670 | *) ac_comsub= ;; | |
10671 | esac | |
10672 | ||
10673 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10674 | sed -e "$ac_comsub | |
10675 | s%@configure_input@%$configure_input%g | |
10676 | s%@srcdir@%$srcdir%g | |
10677 | s%@top_srcdir@%$top_srcdir%g | |
10678 | s%@INSTALL@%$INSTALL%g | |
10679 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
10680 | fi; done | |
10681 | rm -f conftest.s* | |
10682 | ||
10683 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
10684 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
10685 | # | |
10686 | # ac_d sets the value in "#define NAME VALUE" lines. | |
10687 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
10688 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
10689 | ac_dC='\3' | |
10690 | ac_dD='%g' | |
10691 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
10692 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10693 | ac_uB='\([ ]\)%\1#\2define\3' | |
10694 | ac_uC=' ' | |
10695 | ac_uD='\4%g' | |
10696 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
10697 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
10698 | ac_eB='$%\1#\2define\3' | |
10699 | ac_eC=' ' | |
10700 | ac_eD='%g' | |
10701 | ||
10702 | if test "${CONFIG_HEADERS+set}" != set; then | |
10703 | EOF | |
10704 | cat >> $CONFIG_STATUS <<EOF | |
10705 | CONFIG_HEADERS="config.h:config.in" | |
10706 | EOF | |
10707 | cat >> $CONFIG_STATUS <<\EOF | |
10708 | fi | |
10709 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
10710 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
10711 | case "$ac_file" in | |
10712 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
10713 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
10714 | *) ac_file_in="${ac_file}.in" ;; | |
10715 | esac | |
10716 | ||
10717 | echo creating $ac_file | |
10718 | ||
10719 | rm -f conftest.frag conftest.in conftest.out | |
10720 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
10721 | cat $ac_file_inputs > conftest.in | |
10722 | ||
10723 | EOF | |
10724 | ||
10725 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
10726 | # the proper values into config.h.in to produce config.h. And first: | |
10727 | # Protect against being on the right side of a sed subst in config.status. | |
10728 | # Protect against being in an unquoted here document in config.status. | |
10729 | rm -f conftest.vals | |
10730 | cat > conftest.hdr <<\EOF | |
10731 | s/[\\&%]/\\&/g | |
10732 | s%[\\$`]%\\&%g | |
10733 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
10734 | s%ac_d%ac_u%gp | |
10735 | s%ac_u%ac_e%gp | |
10736 | EOF | |
10737 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
10738 | rm -f conftest.hdr | |
10739 | ||
10740 | # This sed command replaces #undef with comments. This is necessary, for | |
10741 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
10742 | # on some systems where configure will not decide to define it. | |
10743 | cat >> conftest.vals <<\EOF | |
10744 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
10745 | EOF | |
10746 | ||
10747 | # Break up conftest.vals because some shells have a limit on | |
10748 | # the size of here documents, and old seds have small limits too. | |
10749 | ||
10750 | rm -f conftest.tail | |
10751 | while : | |
10752 | do | |
10753 | ac_lines=`grep -c . conftest.vals` | |
10754 | # grep -c gives empty output for an empty file on some AIX systems. | |
10755 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
10756 | # Write a limited-size here document to conftest.frag. | |
10757 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
10758 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
10759 | echo 'CEOF | |
10760 | sed -f conftest.frag conftest.in > conftest.out | |
10761 | rm -f conftest.in | |
10762 | mv conftest.out conftest.in | |
10763 | ' >> $CONFIG_STATUS | |
10764 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
10765 | rm -f conftest.vals | |
10766 | mv conftest.tail conftest.vals | |
10767 | done | |
10768 | rm -f conftest.vals | |
10769 | ||
10770 | cat >> $CONFIG_STATUS <<\EOF | |
10771 | rm -f conftest.frag conftest.h | |
10772 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
10773 | cat conftest.in >> conftest.h | |
10774 | rm -f conftest.in | |
10775 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
10776 | echo "$ac_file is unchanged" | |
10777 | rm -f conftest.h | |
10778 | else | |
10779 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10780 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
10781 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
10782 | # The file is in a subdirectory. | |
10783 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
10784 | fi | |
10785 | rm -f $ac_file | |
10786 | mv conftest.h $ac_file | |
10787 | fi | |
10788 | fi; done | |
10789 | ||
10790 | EOF | |
10791 | ||
10792 | cat >> $CONFIG_STATUS <<EOF | |
10793 | ac_sources="$files" | |
10794 | ac_dests="$links" | |
10795 | EOF | |
10796 | ||
10797 | cat >> $CONFIG_STATUS <<\EOF | |
10798 | srcdir=$ac_given_srcdir | |
10799 | while test -n "$ac_sources"; do | |
10800 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
10801 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
10802 | ||
10803 | echo "linking $srcdir/$ac_source to $ac_dest" | |
10804 | ||
10805 | if test ! -r $srcdir/$ac_source; then | |
10806 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
10807 | fi | |
10808 | rm -f $ac_dest | |
10809 | ||
10810 | # Make relative symlinks. | |
10811 | # Remove last slash and all that follows it. Not all systems have dirname. | |
10812 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
10813 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
10814 | # The dest file is in a subdirectory. | |
10815 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
10816 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
10817 | # A "../" for each directory in $ac_dest_dir_suffix. | |
10818 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
10819 | else | |
10820 | ac_dest_dir_suffix= ac_dots= | |
10821 | fi | |
10822 | ||
10823 | case "$srcdir" in | |
10824 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
10825 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
10826 | esac | |
10827 | ||
10828 | # Make a symlink if possible; otherwise try a hard link. | |
10829 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
10830 | ln $srcdir/$ac_source $ac_dest; then : | |
10831 | else | |
10832 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
10833 | fi | |
10834 | done | |
10835 | EOF | |
10836 | cat >> $CONFIG_STATUS <<EOF | |
10837 | ||
10838 | gdb_host_cpu=$gdb_host_cpu | |
10839 | gdb_target_cpu=$gdb_target_cpu | |
10840 | nativefile=$nativefile | |
10841 | ||
10842 | EOF | |
10843 | cat >> $CONFIG_STATUS <<\EOF | |
10844 | ||
10845 | if test "${nativefile}" = ""; then | |
c4620205 | 10846 | < Makefile \ |
e27da16d JT |
10847 | sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \ |
10848 | -e '/^NATDEPFILES[ ]*=/s/^/# /' \ | |
c4620205 JB |
10849 | | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ |
10850 | > Makefile.tem | |
c906108c SS |
10851 | mv -f Makefile.tem Makefile |
10852 | fi | |
10853 | ||
10854 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
10855 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
10856 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
10857 | mv -f Makefile.tmp Makefile | |
10858 | ||
2acceee2 | 10859 | |
c906108c SS |
10860 | case x$CONFIG_HEADERS in |
10861 | xconfig.h:config.in) | |
10862 | echo > stamp-h ;; | |
10863 | esac | |
10864 | ||
10865 | exit 0 | |
10866 | EOF | |
10867 | chmod +x $CONFIG_STATUS | |
10868 | rm -fr confdefs* $ac_clean_files | |
10869 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
10870 | ||
10871 | if test "$no_recursion" != yes; then | |
10872 | ||
10873 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
10874 | ac_sub_configure_args= | |
10875 | ac_prev= | |
10876 | for ac_arg in $ac_configure_args; do | |
10877 | if test -n "$ac_prev"; then | |
10878 | ac_prev= | |
10879 | continue | |
10880 | fi | |
10881 | case "$ac_arg" in | |
10882 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
10883 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
10884 | ac_prev=cache_file ;; | |
10885 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
10886 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
10887 | ;; | |
10888 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
10889 | ac_prev=srcdir ;; | |
10890 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
10891 | ;; | |
10892 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
10893 | esac | |
10894 | done | |
10895 | ||
8dcde887 | 10896 | for ac_config_dir in doc testsuite $configdirs; do |
c906108c SS |
10897 | |
10898 | # Do not complain, so a configure script can configure whichever | |
10899 | # parts of a large source tree are present. | |
10900 | if test ! -d $srcdir/$ac_config_dir; then | |
10901 | continue | |
10902 | fi | |
10903 | ||
10904 | echo configuring in $ac_config_dir | |
10905 | ||
10906 | case "$srcdir" in | |
10907 | .) ;; | |
10908 | *) | |
10909 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
10910 | else | |
10911 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
10912 | fi | |
10913 | ;; | |
10914 | esac | |
10915 | ||
10916 | ac_popdir=`pwd` | |
10917 | cd $ac_config_dir | |
10918 | ||
10919 | # A "../" for each directory in /$ac_config_dir. | |
10920 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
10921 | ||
10922 | case "$srcdir" in | |
10923 | .) # No --srcdir option. We are building in place. | |
10924 | ac_sub_srcdir=$srcdir ;; | |
10925 | /*) # Absolute path. | |
10926 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
10927 | *) # Relative path. | |
10928 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; | |
10929 | esac | |
10930 | ||
10931 | # Check for guested configure; otherwise get Cygnus style configure. | |
10932 | if test -f $ac_sub_srcdir/configure; then | |
10933 | ac_sub_configure=$ac_sub_srcdir/configure | |
10934 | elif test -f $ac_sub_srcdir/configure.in; then | |
10935 | ac_sub_configure=$ac_configure | |
10936 | else | |
10937 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
10938 | ac_sub_configure= | |
10939 | fi | |
10940 | ||
10941 | # The recursion is here. | |
10942 | if test -n "$ac_sub_configure"; then | |
10943 | ||
10944 | # Make the cache file name correct relative to the subdirectory. | |
10945 | case "$cache_file" in | |
10946 | /*) ac_sub_cache_file=$cache_file ;; | |
10947 | *) # Relative path. | |
10948 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
10949 | esac | |
10950 | case "$ac_given_INSTALL" in | |
10951 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
10952 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
10953 | esac | |
10954 | ||
10955 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
10956 | # The eval makes quoting arguments work. | |
10957 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
10958 | then : | |
10959 | else | |
10960 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
10961 | fi | |
10962 | fi | |
10963 | ||
10964 | cd $ac_popdir | |
10965 | done | |
10966 | fi | |
10967 | ||
10968 | ||
10969 | exit 0 |